custom_components.zip worked for me, but I didn’t unpacked it to /config/custom_components/device_tracker/__pycache___/ directory as the *.pyc files, just unzipped all to /config/custom_components/device_tracker/ and that’s it.
but I’ve got another question:
devices found by google maps are added to known_devices.yaml as google_maps_<21-numbers-long-id>, and following that, I need to use it as device_tracker.google_maps_<21-numbers-long-id> in my automations. is there any way to make an alias so automations/scripts could “see” it as for example: device_tracker.wife_google_maps_location?
I tried adding the “name” attribute but it isn’t working unfortunately.
a good evening i have some problems
my google maps doesnt work i installed my hassio tottaly new or a fresh start but now google maps doesnt work any more
the cookie file dosnt excist (i cant see him)
how i ca i solve it
pls help
2019-01-15 22:16:25 ERROR (MainThread) [homeassistant.components.device_tracker] Error setting up platform google_maps
Traceback (most recent call last):
File “/usr/local/lib/python3.6/site-packages/homeassistant/components/device_tracker/init.py”, line 183, in async_setup_platform
disc_info)
File “/usr/local/lib/python3.6/concurrent/futures/thread.py”, line 56, in run
result = self.fn(*self.args, **self.kwargs)
File “/usr/local/lib/python3.6/site-packages/homeassistant/components/device_tracker/google_maps.py”, line 46, in setup_scanner
scanner = GoogleMapsScanner(hass, config, see)
File “/usr/local/lib/python3.6/site-packages/homeassistant/components/device_tracker/google_maps.py”, line 66, in init
self._update_info()
File “/usr/local/lib/python3.6/site-packages/homeassistant/components/device_tracker/google_maps.py”, line 78, in _update_info
for person in self.service.get_all_people():
File “/usr/local/lib/python3.6/site-packages/locationsharinglib/locationsharinglib.py”, line 465, in get_all_people
people = self.get_shared_people() + [self.get_authenticated_person()]
File “/usr/local/lib/python3.6/site-packages/locationsharinglib/locationsharinglib.py”, line 426, in get_shared_people
for info in output[0]:
TypeError: ‘NoneType’ object is not iterable
I can’t get it to work with HA 92.2 either.
I copied the Custom Component into the directory config\custom_components\google_maps\ and renamed the google_maps.py files to device_tracker.py.
After that the cookie file is created, but I get the following error messages in the log:
2019-05-05 18:24:19 ERROR (MainThread) [homeassistant.components.device_tracker] Error setting up platform google_maps
Traceback (most recent call last):
File "/usr/src/app/homeassistant/components/device_tracker/__init__.py", line 177, in async_setup_platform
disc_info)
File "/usr/local/lib/python3.7/concurrent/futures/thread.py", line 57, in run
result = self.fn(*self.args, **self.kwargs)
File "/usr/src/app/homeassistant/components/google_maps/device_tracker.py", line 39, in setup_scanner
scanner = GoogleMapsScanner(hass, config, see)
File "/usr/src/app/homeassistant/components/google_maps/device_tracker.py", line 60, in __init__
self._update_info()
File "/usr/src/app/homeassistant/components/google_maps/device_tracker.py", line 72, in _update_info
for person in self.service.get_all_people():
File "/config/deps/lib/python3.7/site-packages/locationsharinglib/locationsharinglib.py", line 439, in get_all_people
people = self.get_shared_people() + [self.get_authenticated_person()]
File "/config/deps/lib/python3.7/site-packages/locationsharinglib/locationsharinglib.py", line 400, in get_shared_people
for info in output[0]:
Without the Custom Component it doesn’t work either
unfortunately not
I have given up and switched to the life360 device tracker.
The only thing that’s a little annoying is that it’s an extra app on the phone.
Apart from that, it’s really very easy to configure and works perfectly for us so far.
I also gave up with the Google Maps tracker. It just kept failing.
I decided that all I care about is knowing whether someone is home or not (not tracking all of the time). I just use the NMAP and Tado trackers. They’re working well. The upside is that there are no extra apps on the phone as I already have the Tado app for automatic heating control.
Be aware that this was once a custom component that has now been integrated into HA… You dont need to download anything. Just remove the files and configs you have made and follow this guide to make it work:
Thanks for the hint @argykaraz , but I know it’s an official component now. Unfortunately it doesn’t work for me. Nor with the official component neither with the custom hacks
I managed to take the newest version of locationsharinglib (4.0.1) and the google_maps component and make them into a custom component, that seems to be working so far:
Sorry, only just saw your message. There’s no additional battery impact from what the Tado all would use otherwise. But, it will only say whether you are home–not where you are when you are not home.
perhaps i missed something there. the git you linked contains a package that overwrites device_tracker.py but doesn’t overload anything in the locationshareinglib. so in order for this to work i have to manually upgrade the locationshareinglib to 4.0.x first?
i tried the custom_component as-is, it did not work. error was “invalideuser: /config/.google_maps_location_shareing.cookies.myuser.” looks like it was trying to put the cookie file name to where the “username” is suppose to be, something is not quite right.
You want to put the whole gmaps folder in the custom_components subdirectory of your .homeassistant config directory. It should upgrade locationsharinglib to 4.0.1 when you restart.
You have to create the cookie yourself and put it in your config directory, naming it with the same username (slugified,) ie, if the account you use for the google maps user is [email protected], you would name the cookie
i didn’t have issue with where to put the custom_components and already have a cookies file previously generated by the cookiegettercli.
but there is really only one file in the gmaps package: “device_tracker.py”. is that really right? i don’t see how it could upgrade the locationsharinglib like that?
i saw the requirements specifying locationsharinglib 4.0.1 but wasn’t aware that this would actually cause the package to be upgraded…
in any case, it is not working for me as locationsharinglib stayed at 3.0.11… i will dig around some more and maybe try it with a manual upgrade and hope for the best.
thanks for the effort. i’m glad to hear it worked for you, this gives me some hope at least.
Interesting. I tried it on a couple machines and it did the upgrade. The way I discovered the manifest is that I would upgrade it with pip then restart and it would downgrade
I have this in my home-assistant.log when it gets the package:
2019-07-10 15:13:40 INFO (SyncWorker_5) [homeassistant.util.package] Attempting install of locationsharinglib==4.0.2
How are you running HA? Mine is using venv. Maybe it’s different? If you are using venv you could try this after activating the venv: