timeline-exporter icon indicating copy to clipboard operation
timeline-exporter copied to clipboard

timeline-exporter fails with new google maps timeline ?

Open effgee opened this issue 1 year ago • 7 comments

I used this on April 29, 2024, worked fine.

Now every time I open the extension I get the following error popup in the bottom right of the screen:

Error × Failed to fetch Google timeline data: Network Error

I've check permissoins and can't see anything that would cause this.

effgee avatar Jun 04 '24 01:06 effgee

Thanks for opening an issue; does the normal google timeline page work for you? https://timeline.google.com/

reinzor avatar Jun 04 '24 09:06 reinzor

sorry for the slow reply. No, that link (which previously worked fine) now gives these messages, due to google stopping access from pc-based web browsers:

USE THE APP Timeline is no longer available on web browsers. To view or change your Timeline settings, go to Activity controls.

On Tue, 4 Jun 2024 at 19:50, Rein Appeldoorn @.***> wrote:

Thanks for opening an issue; does the normal google timeline page work for you? https://timeline.google.com/

— Reply to this email directly, view it on GitHub https://github.com/reinzor/timeline-exporter/issues/20#issuecomment-2147104711, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAN252LVTBMYQ2OL7WGZJ2LZFWEXBAVCNFSM6AAAAABIXRRDQCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCNBXGEYDINZRGE . You are receiving this because you authored the thread.Message ID: @.***>

effgee avatar Jun 17 '24 07:06 effgee

I saw this thread

https://support.google.com/maps/thread/254868591/timeline-is-no-longer-available-on-web-browsers?hl=en

So this means that the API that is currently used will not be available within some time for all users. This would mean the end of the timeline exporter I am afraid :(

reinzor avatar Jun 18 '24 06:06 reinzor

That's what I feared. It was great while it lasted. I created a workaround downloading my location history via Google takeout (which takes up to 1 day for them to process and notify your download is ready), then processing this with some python code to create the same output data format. But it is at least 10x less convenient than timeline exporter.

Thanks so much for creating timeline-exporter, it will be sadly missed

On Tue, 18 June 2024, 16:27 Rein Appeldoorn, @.***> wrote:

I saw this thread

https://support.google.com/maps/thread/254868591/timeline-is-no-longer-available-on-web-browsers?hl=en

So this means that the API that is currently used will not be available within some time for all users. This would mean the end of the timeline exporter I am afraid :(

— Reply to this email directly, view it on GitHub https://github.com/reinzor/timeline-exporter/issues/20#issuecomment-2175194263, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAN252NY74UXEVL4DHQMPODZH7HOTAVCNFSM6AAAAABIXRRDQCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCNZVGE4TIMRWGM . You are receiving this because you authored the thread.Message ID: @.***>

effgee avatar Jun 19 '24 05:06 effgee

Thanks for your positive note! When I am experiencing this issue myself, I will look at a possible way to fix it (Google is rolling this out in phases). But I have to work with the API that google offers so lets see. I will keep this issue open for writing down my findings at that time.

reinzor avatar Jun 19 '24 08:06 reinzor

Hi! Is there a possibility to convert this tool to use the timeline export from Google Takeout?

I'm looking at the data and it looks like the "Semantic Location History" could be used for this. I'm wondering if I could extend this information with for example the Home Assistant location data so I get more accurate results as to what length I've driven.

I can do the implementation myself, but with a bit of knowledge transfer. Let me know how this tool works (architectually), and what your approach would be and which changes to make, to make this possible.

The Takeout data structure
    
    export interface TakeoutJson {
        timelineObjects: TimelineObject[];
    }

    export interface TimelineObject {
        activitySegment?: ActivitySegment;
        placeVisit?:      PlaceVisit;
    }

    export interface ActivitySegment {
        startLocation:      Location;
        endLocation:        Location;
        duration:           DurationClass;
        distance:           number;
        activityType:       ActivityType;
        confidence:         Confidence;
        activities:         Activity[];
        waypointPath?:      WaypointPath;
        simplifiedRawPath?: SimplifiedRawPath;
        parkingEvent?:      ParkingEvent;
    }

    export interface Activity {
        activityType: ActivityType;
        probability:  number;
    }

    export type ActivityType = "IN_PASSENGER_VEHICLE" | "MOTORCYCLING" | "STILL" | "WALKING" | "IN_BUS" | "CYCLING" | "RUNNING" | "FLYING" | "IN_FERRY" | "IN_TRAIN" | "SKIING" | "SAILING" | "IN_SUBWAY" | "IN_TRAM" | "IN_VEHICLE";

    export type Confidence = "HIGH" | "LOW" | "MEDIUM";

    export interface DurationClass {
        startTimestamp: Date;
        endTimestamp:   Date;
    }

    export interface Location {
        latitudeE7:  number;
        longitudeE7: number;
        sourceInfo:  SourceInfo;
    }

    export interface SourceInfo {
        deviceTag: number;
    }

    export interface ParkingEvent {
        location:       ParkingEventLocation;
        method:         "END_OF_ACTIVITY_SEGMENT";
        locationSource: "FROM_RAW_LOCATION";
        timestamp:      Date;
    }

    export interface ParkingEventLocation {
        latitudeE7:     number;
        longitudeE7:    number;
        accuracyMetres: number;
    }

    export interface SimplifiedRawPath {
        points:          Point[];
        source?:         "INFERRED";
        distanceMeters?: number;
    }

    export interface Point {
        latE7:          number;
        lngE7:          number;
        accuracyMeters: number;
        timestamp:      Date;
    }

    export interface WaypointPath {
        waypoints:      { [key: string]: number }[];
        source:         "INFERRED";
        roadSegment:    RoadSegment[];
        distanceMeters: number;
        travelMode:     TravelMode;
        confidence:     number;
    }

    export interface RoadSegment {
        placeId:  string;
        duration: Duration;
    }

    export type Duration = `${number}s`;

    export type TravelMode = "DRIVE" | "BICYCLE" | "WALK";

    export interface PlaceVisit {
        location:                OtherCandidateLocationClass;
        duration:                DurationClass;
        placeConfidence:         PlaceConfidence;
        centerLatE7:             number;
        centerLngE7:             number;
        visitConfidence:         number;
        otherCandidateLocations: OtherCandidateLocationClass[];
        editConfirmationStatus:  "NOT_CONFIRMED";
        locationConfidence:      number;
        placeVisitType:          "SINGLE_PLACE";
        placeVisitImportance:    PlaceVisitImportance;
        simplifiedRawPath?:      SimplifiedRawPath;
    }

    export interface OtherCandidateLocationClass {
        latitudeE7:            number;
        longitudeE7:           number;
        placeId?:              string;
        address?:              string;
        name?:                 string;
        sourceInfo?:           SourceInfo;
        locationConfidence:    number;
        calibratedProbability: number;
        semanticType?:         SemanticType;
    }

    export type SemanticType = "TYPE_HOME" | "TYPE_SEARCHED_ADDRESS" | "TYPE_ALIASED_LOCATION";

    export type PlaceConfidence = "LOW_CONFIDENCE" | "HIGH_CONFIDENCE" | "MEDIUM_CONFIDENCE";

    export type PlaceVisitImportance = "MAIN" | "TRANSITIONAL";
    ```

</details>

alber70g avatar Nov 11 '24 10:11 alber70g

Hi @alber70g ; as already discussed here https://github.com/reinzor/timeline-exporter/issues/21 , this is out of scope for this extension. This extension uses the google timeline api , feel free to for but I don't have the cycles to help you with that sorry.

reinzor avatar Nov 12 '24 06:11 reinzor