Google Geocode Custom Component - GPS to Street Address

@doubleUS It looks like your device tracker is sending empty lat lon coordinates. When you say it works quite good. Is it presenting you with street name info intermittently or just if you are in a zone? The NoneType is basically saying that it did not get any information from your tracker. I have uploaded a fix to GitHub that will skip that update if there is no lat lon coordinates to use. Let me know how you get on with the new code.

street, state, etc supposed to be blank when im at home or its a bug?

@ashfaaaa Yeah its blank at the moment there is no function built in to deal with yet. I will need to get it from the zone component its on the to do list.

1 Like

@michaelmcarthur

Awesome! I just decided to wipe my slate and give it a go with hass.io. Iā€™ll test it out when I get back up and running.

I must be doing something wrong. I used your new code and I just get, ā€œAwaiting Updateā€ with the same logger error.

Is there someway to find my perceived ā€œoriginā€ in the front end developer tools?

Developer tools -> States and device_trackerā€¦

That shows my correct co-ords. Anything else needed there?

friendly_name: bruces phone
source_type: gps
battery: 80
gps_accuracy: 20
longitude: -86.xxx
latitude: 33.xxx
entity_picture: /local/geezer.jpg

@bmorgan Iā€™m certain that it is a problem with my component recognising your trackers name. The error shows that it canā€™t find the tracker. Can you paste your sensor.yaml Geocode config. Double check your device tracker name for your owntracks / GPS device in developer > states. I want to get to the bottom of this so this component can be as stable as possible for all users. Thanks

- platform: google_geocode
  name: Bruce's G6 geocode
  api_key: real_key
  origin: device_tracker.bruces_phone_bruce
  options: full

I re-pasted both origins and mine now says ā€œHomeā€, but nothing is populated in either of the pop-ups (wifeā€™s, too).

@bmorgan if you are seeing home thatā€™s good as itā€™s now recognising your trackers. At the moment nothing appears in the pop up when you are home. It looks like you are running an old version of my code. If you go to my GitHub copy over the new google_geocode.py file. Read the readme file as the options have changed. You will need to remove the api_key config and change the option from Full to one of the other settings. Let me know how you get on.

Well, the wifeā€™s is now showing everything but the Postal Town. Her location is off by about 10 miles, but itā€™s a start.

Nothing showing up for me. An odd thing for mine is that I have 2 trackers, another one named bruce_phone_bphone. I have no idea where it came from, but has the same properties as the other. Iā€™ve tried using it and also deleting it, but comes back.

@bmorgan I glad you got it working. If the device tracker is 10 mile off it will just be that her gps app hasnā€™t sent through a new location yet.

I had her push a message and that updated her location. Must be something to do with her owntracks.

Any further ideas on my account?

@bmorgan I would go into known_devices.yaml and delete all your owntracks found devices. Leave your wifeā€™s one alone. Restart home assistant it will rediscover your devices. If you still have two just push a location through from your phone and watch which one updates with the new coordinates. Good luck

Michael, it is very useful component you made. Thanks.

Great work man,:+1::+1::+1:, works like a charm, anyway to get the street number?

It worked in an older version, but at the moment it does not. Heā€™s currently working on it.

@Coolie1101 Thanks. I can get the house number information from google. Itā€™s not implimented but Iā€™ll add it to the requests list.

working flawless on HassIO on Rpi3, tkx for the update. keep up the good work

Great.
Thanks