Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

timeline-exporter fails with new google maps timeline ? #20

Open
effgee opened this issue Jun 4, 2024 · 7 comments
Open

timeline-exporter fails with new google maps timeline ? #20

effgee opened this issue Jun 4, 2024 · 7 comments
Labels
bug Something isn't working wontfix This will not be worked on

Comments

@effgee
Copy link

effgee commented Jun 4, 2024

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.

@reinzor
Copy link
Owner

reinzor commented Jun 4, 2024

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

@reinzor reinzor added the bug Something isn't working label Jun 4, 2024
@effgee
Copy link
Author

effgee commented Jun 17, 2024 via email

@reinzor
Copy link
Owner

reinzor commented Jun 18, 2024

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 reinzor added the wontfix This will not be worked on label Jun 18, 2024
@effgee
Copy link
Author

effgee commented Jun 19, 2024 via email

@reinzor
Copy link
Owner

reinzor commented Jun 19, 2024

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 reinzor pinned this issue Jun 19, 2024
@alber70g
Copy link

alber70g commented Nov 11, 2024

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>

@reinzor
Copy link
Owner

reinzor commented Nov 12, 2024

Hi @alber70g ; as already discussed here #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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

3 participants