But when I restart the system I get these 2 errors:
Unable to load /config/known_devices.yaml: Config file not found: /config/known_devices.yaml
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
The process is briefly described in the topic linked above. But I nearly killed myself before I figured it out! So for all noobs like me here is the “easy” explanation of what to do:
First of all add the “device_tracker” component to HA configuration.yaml file. Restart HA and check if you get any errors in the log. I got 2 errors: missing “known_devices.yaml” file and “Error setting up platform google_maps”. As I wrote above. To fix the “known_devices.yaml” file issue just create the file manually - step #8.
You will need a working linux operating system. I used Linux Mint running in Oracle VW Virtual machine.
As soon as I installed the above mentioned “virtualenvwrapper” I checked that it works by typing “mkvirtualenv foo” in to the terminal window, as suggested by the guide above. And surprisingly it worked!
You will also need to install “git”. Copy and execute following command in terminal window: sudo apt install git
Now you are ready to follow the instructions on creating a new cookie file for google location sharing service.
Copy/paste following command one by one in to the linux terminal and execute:
But make sure to change <your email> and <your password> with your email and password for google location sharing service respectively. Also before executing the last line in the terminal make sure it is properly copied when you paste it. I had a problem where it wouldn’t paste properly. So I pasted it inside notepad first, changed my email and password and then copied it to terminal window.
After you executed the last command, if there was no errors, you should have the cookie file ready. Open the folder browser. Go to home folder. Find a folder called “locationsharinglib” and go inside. Make sure to switch on “show hidden files”. Find the file called “.google_maps_location_sharing.cookies”. Copy that file into home assistant config folder. I used samba share to do it. It will tell you that where is already such a file in the folder. Just overwrite it.
You will also need to manually create “known_devices.yaml” file in HA config folder.
Now go back to HA configuration web page and restart HA. If all goes well after restart you will see your location icons in the overview page top next to the sun and weather icons.
I’m running Hass.IO from Ubuntu 16.04, hosted on a Hyper-V VM. With mine, I found that there was a DNS issue (accidentally, through cross-referencing an issue another user was having with Life360). I fixed it by creating /etc/docker/daemon.json and adding the following: {“dns”: [“8.8.8.8”, “8.8.4.4”]}
This also fixed an issue I was having with Google Text to Voice.
I really hope this keeps working for you because I liked having Google Maps Location Sharing. However, its never been reliable for me. If you do find that this stops working, I would definitely recommend giving life360 a go: -
You might be interested in this (if you haven’t seen it yet):
I explain how I use both Google Maps Location Sharing and Life360. Although this particular post is about how Life360 tends to be more up-to-date, I’ve actually found that using them both provides a better overall solution.