I’m not sure why but I started getting errors in the get_authenticated_person function.
Note that I’m using a different account that is tracking my other accounts but that has no location data for itself. I guess get_authenticated_person() wasn’t tested for this case.
home-assistant_1 | Traceback (most recent call last):
home-assistant_1 | File "/config/deps/lib/python3.6/site-packages/locationsharinglib/locationsharinglib.py", line 305, in get_authenticated_person
home-assistant_1 | output[9][1],
home-assistant_1 | TypeError: 'NoneType' object is not subscriptable
I suppose this is just debugging, but it is spamming my logs while it shouldn’t do that. Isn’t there a way to check if there is location data for the account owner before doing this?
Ow, right, I’m still on 1.2.0 since 1.2.1 wasn’t available on pypi a few moments ago.
Looking at the code, I do notice that we are calling _get_data twice now. Once for the shared users, and once for the authenticated user. The second call will never return data for me, so that call is useless.
True, but we needed a way to handle situations that people actually want to retrieve their accounts which are shared. You can follow that discussion on github on the component.
No matter how many times i read this thread i cant figure out if im suppose to be able to install locationsharinglib on my hass.io installation on my pi3?
I have added the /config/custom_components/device_tracker/google_maps.py file,
but when i try tu run core-ssh:~# pip install locationsharinglib
i only get an error: -bash: bash:: command not found
After updating the component, I get this error at HASS startup:
2018-04-03 21:55:29 ERROR (MainThread) [homeassistant.components.device_tracker] Error setting up platform google_maps
Traceback (most recent call last):
File "/srv/homeassistant/lib/python3.5/site-packages/homeassistant/components/device_tracker/__init__.py", line 169, in async_setup_platform
disc_info)
File "/usr/lib/python3.5/asyncio/futures.py", line 361, in __iter__
yield self # This tells Task to wait for completion.
File "/usr/lib/python3.5/asyncio/tasks.py", line 296, in _wakeup
future.result()
File "/usr/lib/python3.5/asyncio/futures.py", line 274, in result
raise self._exception
File "/usr/lib/python3.5/concurrent/futures/thread.py", line 55, in run
result = self.fn(*self.args, **self.kwargs)
File "/var/lib/home-assistant/custom_components/device_tracker/google_maps.py", line 38, in setup_scanner
scanner = GoogleMapsScanner(hass, config, see)
File "/var/lib/home-assistant/custom_components/device_tracker/google_maps.py", line 58, in __init__
self._update_info()
File "/var/lib/home-assistant/custom_components/device_tracker/google_maps.py", line 71, in _update_info
dev_id = 'google_maps_{0}'.format(slugify(person.id))
File "/srv/homeassistant/lib/python3.5/site-packages/homeassistant/util/__init__.py", line 42, in slugify
text = normalize('NFKD', text)
TypeError: normalize() argument 2 must be str, not None
After this, no more errors, but only 2 of 3 shared devices are discovered. The third is never seen.
Aparently, it cannot get the device id.
I was using a max_gps_accuracy value of 55. I increased it to 150 and now all 3 devices are detected correctly, although the error keeps dumping at startup.
Aparently, now it updates OK. I’ll keep up testing…
I tested this with hass.io 0.67beta0 and it’s updating super fine. but how can I change the identifier from device_tracker.google_maps_ to something customized like device_tracker.disrupted? It didn’t create an entry in entity_registry.yaml and if I change it in known_devices.yaml I will end up with a new entry.
Can anyone help me get this working in Hassio? I’m running the latest version at the time of writing, 66.1, but it’s just not working. I use 2FA normally, and so I generated an app specific password but when I do that it throws an invalid password related error in the log.
This seems to work well most of the time (I used the custom component before, and then 0.67 beta), but every so often I notice if I visit google maps from any device on my network (ie my mobile), I have to do a captcha to proceed because google says it detected unusual activity from my IP.