Quantcast
Channel: Configuration - Home Assistant Community
Viewing all articles
Browse latest Browse all 96121

Export Coordinates to CSV/KML format

$
0
0

@dmartinez7500 wrote:

Hey all,
I’m working on a project to keep daily travel logs for work, and I figured I could use the GPS data from my phone, that’s already in HA, to export it to a KML file. I know I can use my existing PHPMyAdmin add-on to export the data based on SQL queries to a CSV, then use a converter to parse it to KML.

I’ve tried creating templates for both lat and long, and combining them to a new device tracker, but the data is still parsed together, as below.

"state_id","domain","entity_id","state","attributes","event_id","last_changed","last_updated","created","context_id","context_user_id"
"20353","device_tracker","device_tracker.my_coords","home","{""source_type"": ""gps"", ""latitude"": 25.57806396484375, ""longitude"": -70.34037622778185, ""gps_accuracy"": 0, ""friendly_name"": ""my_coords""}","24393","2020-03-10 02:19:04","2020-03-10 02:19:04","2020-03-10 02:19:06","0fcb87b99c9e470ab30bffcc469f27f9",NULL
"21456","device_tracker","device_tracker.my_coords","home","{""source_type"": ""gps"", ""latitude"": 25.578079223632812, ""longitude"": -70.34044844154484, ""gps_accuracy"": 0, ""friendly_name"": ""my_coords""}","25563","2020-03-10 02:19:04","2020-03-10 04:27:11","2020-03-10 04:27:11","4f448ca194f6444797529545f6a47b2a",NULL
"21549","device_tracker","device_tracker.my_coords","home","{""source_type"": ""gps"", ""latitude"": 25.578018188476562, ""longitude"": -70.34038697199517, ""gps_accuracy"": 0, ""friendly_name"": ""my_coords""}","25658","2020-03-10 02:19:04","2020-03-10 04:37:51","2020-03-10 04:37:51","aba077ed94a54708a1eb854aff9b4a48",NULL

Is there any way to get this data properly formatted how I’d need it, or am I going about this in a overly complicated manner?

Posts: 2

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 96121

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>