Tracking and mapping one or more devices using Home Assistant, Google Sheets, Google Maps Api, and IFTTT. Similar to Google Maps Timeline feature.
Displays the history of a Home Assistant device tracker (e.g. phones) on a Google map. Uses Google Sheets as data storage.
I am aware, that all this could be done a lot easier with a small python script and a local file or sending a PUT REST to Google Sheets or even using the local history. I prepared this as a small training project that goes through a lot of stuff.
You can also ignore most of the stuff in the git and just feed a local CSV file to the map.
Now with multiple devices!
Date filters: day, period (you can go back in time as long as you want);
For now it’s one device per map (any type of device that feeds coordinates). If you send data without any device tag (like now), from multiple devices to the same Google sheets file it will be a bit of a mess.
You either: create a different map for each device or send a device tag together with the other data and create a filter in the html to organize it a little. If there is enough interest I will implement proper multiple device support. Myself, i don’t need it (for now). --
It supports multiple devices now.
I get the following with any key used from different accounts:
"TypeError: Cannot read property 'push' of undefined
at Array.forEach (<anonymous>)
at Object.<anonymous> (https://d3js.org/d3.v4.min.js:2:64779)
at k.call (https://d3js.org/d3.v4.min.js:2:99927)
at XMLHttpRequest.e (https://d3js.org/d3.v4.min.js:2:63355)"
"Google Maps API error: InvalidKeyMapError =
The API key included in the script element that loads the API is not found. Please make sure you are using a correct API key. You can generate a new API key on the Google API Console.
I have a SmartHome system would like to track again SmartHome system my location of the mobile phone to control various things.
Is there a possibility to get the data only with a request of course with the Abi key.
I just need the coordinates everything else I can do in large format in Json format.