Google Maps location sharing

Yes I have just set up zones.

However I still get the same errors that I had before but my device shows up in HA.

Do you experience the same?

I resolved it by getting the correct data from the values i.e. sid, ssid etc. But like I mentioned I still get the same errors as before although my device does show up on HA frontend.

if you have virtual enviroment try to install BeautifulSoup4 in your virtual enviroment.

no, im not getting gplus errors at all. My gplus tracker state change (every 10 min) and detects the zones where my device is (work, home, not_home, etcā€¦)

I have just set up on safe mode now and it worked fine but after 10mins I get error saying:

ERROR (Thread-10) [homeassistant.components.device_tracker.gplus] No response received to the location query
ERROR (Thread-10) [homeassistant.components.device_tracker.gplus] Google didn't send the location. Updating data['at']

Its really frustrating.

I have deleted my login details on FireFox and I have shut Firefox on my PC. I think it could be the reason why I am getting these errors every 10mins.

Right and after 5mins I get the same errors as before:

ERROR (Thread-2) [homeassistant.core] Error doing job: Future exception was never retrieved
Traceback (most recent call last):
  File "/usr/lib/python3.4/concurrent/futures/thread.py", line 54, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/srv/homeassistant/lib/python3.4/site-packages/homeassistant/components/device_tracker/gplus.py", line 105, in get_position
    update_data_at()#the new value will be used at the next call.
  File "/srv/homeassistant/lib/python3.4/site-packages/homeassistant/components/device_tracker/gplus.py", line 90, in update_data_at
    data['at'] = sdict['SNlM0e']
KeyError: 'SNlM0e'

@virualdo @aa755 I think I know why I am getting the errors mentioned above. I have left Firefox open on my dummy account page showing the main account location. Its been over 15mins and I do not get any errors whatsoever.

Does that mean that I require Firefox to be open 24/7 logged in using the dummy account showing my main account location?

have you done this?

If using this component in Self Mode, open Firefox and log into Google as [email protected] and visit aboutme.google.com. If instead, you wish to use this component in Safe Mode, log into [email protected], and visit the Google Plus profile page of [email protected]. The url of this page goes to the home_url field above. You may want to select the remember this computer" option while logging in, so that the cookie fields donā€™t get invalidated every few days.

I think that has resolved the issues thanks alot.

I can see my device in the front end but I cannot see it under map. Do you know how I can show it under map?

Great!
When device is at home the device is not showed in the map.

1 Like

I thought I had.

Unless Iā€™m wrong somehow?

pi@hassbian:~ $ sudo su -s /bin/bash homeassistant
homeassistant@hassbian:/home/pi $ pip install BeautifulSoup4
Requirement already satisfied (use --upgrade to upgrade): BeautifulSoup4 in /usr/local/lib/python2.7/dist-packages
Cleaning up...

When I remove it from the non-venv, then try and install it in the virtual environment - this is what I get.

Exception:
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/pip/basecommand.py", line 122, in main
    status = self.run(options, args)
  File "/usr/lib/python2.7/dist-packages/pip/commands/install.py", line 295, in run
    requirement_set.install(install_options, global_options, root=options.root_path)
  File "/usr/lib/python2.7/dist-packages/pip/req.py", line 1436, in install
    requirement.install(install_options, global_options, *args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/pip/req.py", line 672, in install
    self.move_wheel_files(self.source_dir, root=root)
  File "/usr/lib/python2.7/dist-packages/pip/req.py", line 902, in move_wheel_files
    pycompile=self.pycompile,
  File "/usr/lib/python2.7/dist-packages/pip/wheel.py", line 214, in move_wheel_files
    clobber(source, lib_dir, True)
  File "/usr/lib/python2.7/dist-packages/pip/wheel.py", line 204, in clobber
    os.makedirs(destdir)
  File "/usr/lib/python2.7/os.py", line 157, in makedirs
    mkdir(name, mode)
OSError: [Errno 13] Permission denied: '/usr/local/lib/python2.7/dist-packages/bs4'

Storing debug log for failure in /home/homeassistant/.pip/pip.log

Obviously some kind of permission error between the root user and the virtual environment user, but I have no idea how to overcome it. Thoughts?

edit: fixed with ā€œpip install --user bs4ā€

edit 2: yea, that still didnā€™t work, even after installing bs4, I still get the cannot find module bs4 errorā€¦

i think you are missing one step before pip install

pi@hasspi:/home/homeassistant/.homeassistant $ sudo su -s /bin/bash homeassistant
homeassistant@hasspi:~/.homeassistant$ source /srv/homeassistant/homeassistant_venv/bin/activate
(homeassistant_venv) homeassistant@hasspi:~/.homeassistant$ pip install BeautifulSoup4

@virualdo @beanian Did u manage to get more frequent/real time updates? Is this possible @virualdo? Thanks

Anyone have this problem? After i click preview, the current location card does not showā€¦
My other account works

YES! Great success!

Thanks for all your help!

If it helps, I finally found the correct data?ds.extension request after a bit of trial and error- the format of the f.req is key as it seems to be what determines the shape of the response (maybe it should stand for ā€œformat requestā€?). The values of SID, HSID etc were the same in data?ds.extension entry, but the shape of the f.req changed substantially.

I found the right one for safe mode by looking at the one that came before the details that were returned by the Google Plus cards in the console in Chrome - basically I looked for the photos of my contacts / Google plus account! Now, Iā€™m getting the location details in HASS, will be setting up the zones next.

Thanks to everyone in this thread for their help and comments; this is just what Iā€™ve been looking for for a while.

Can sb post an walkthrough how to get this working so as for everzbody to be easier to implement it?

i have locally modified the component gplus.py and hardcoded to get updates every 1 min.
replace
update_minutes = list(range(0, 60, config[CONF_SCAN_INTERVAL]))
with
update_minutes = list(range(0, 60, 1))

1 Like

Per the update interval discussion, did set the update interval to 1 minute by modifying the scan interval manually for the custom component, but it seems my device a Samsung Galaxy S8 only really updates the location to google every 10 minutes when I am in motion and far less frequently when I am mostly still (I.E moving around my college campus)

Are others seeing similar results.

@keatontaylor That is correct even I experience the same after:
replacing
update_minutes = list(range(0, 60, config[CONF_SCAN_INTERVAL]))
With
update_minutes = list(range(0, 60, 1))

@virualdo do you experience the same?

In my experience my gplus device tracker updates every minute.
When i use google maps, i can see that my wifeā€™s device donā€™t update every minute, maybe every two or three minutes and the precision varies between 5 meters a 100 meters.
Iā€™ve tested compare my router device tracker with my gplus device tracker when i leave home and are very similars the time updates of both device trackers.