Google Maps location sharing

I really like @costas’ idea of a component [too bad I can’t help - I just don’t know how to do it ;(]!
but in the meantime, I tried to configure @aa755’s component and - it went surprisingly quick and easy, but it doesn’t work anyway :frowning:

I’ve got this error:

2018-01-05 23:16:13 ERROR (MainThread) [homeassistant.core] Error doing job: Future exception was never retrieved
Traceback (most recent call last):
File "/usr/lib/python3.6/concurrent/futures/thread.py", line 56, in run
result = self.fn(*self.args, **self.kwargs)
File "/config/custom_components/device_tracker/gplus.py", line 117, in get_position
gps_accuracy=int(accuracy),)
ValueError: invalid literal for int() with base 10: 'XX.XXXXXXX'

instead of XX.XXXXXXX I’ve got something that looks like a coordinate.

do you have any ideas how to fix it?

If you show the code you currently have I can give it a try. I do not expose an accuracy attribute so that is definitely wrong. Of course I could expose it if somebody can actually validate that that field is actually an accuracy value.

To the people that “liked” my post about the library, could we maybe have some feedback if they tried it, if it worked for them properly and where are they located in the world? Thanks in advance!

by “the code” you mean my gplus.py version? it’s ctrl-c, ctrl-v from @aa755’s github

that would be me :blush:
I really like the idea, but with my programming-knowledge, didn’t even tried to run it… ;(

Well in that case (the copy, paste case) it is normal not to work since my library exposes very different things than what the gplus had. From what I understand you are just using gplus as it was and that is known not to work any more. If no one makes a component out of my library I will at some point but truth be told I am quite busy so I am hoping that someone will step up. If you want to try out the library part you can just follow the documentation on how to install http://locationsharinglib.readthedocs.io/en/latest/installation.html and how to use http://locationsharinglib.readthedocs.io/en/latest/usage.html

oh bummer, so I misunderstood the whole discussion :sweat_smile:
thought that it works still, but not as good as it should and that’s why you did your own library…

EDIT: plus.py is working :slight_smile: it just need some tweaking, pointed out by @davegravy somewhere in the upper comments. three lines needs to be altered - numbers in []:
latitude = words[15]
longitude = words[16]
accuracy = words[18]

Hmm, I haven’t made these changes and it appears to still be working without a hitch for me!

Is it possible to install/use this with Hassio? I did not think the Hassio host would allow such installs.
Or if I run it on a different box import the information into my RPi running Hassio?

Sorry for jumping to conclusions.I was under the impression that the original gplus did not work from the comments of some people.

@costas The code is working fine, however there seems to be an issue in the logging out code. Haven’t looked at the actual python code yet.

I’ve opened an issue on your github for this.

Is anyone working on wrapping this code in a hass platform for device_tracker?

@michaelarnauts, I just fixed the logout issue and pushed 0.1.3 which should work. I am not working on a device_tracker, being quite busy currently with a lot of stuff. If nobody picks this up at some point I will but not very soon.

1 Like

@costas, the trailing slash wasn’t the issue, it’s still happening. I’m trying to find out what is causing that exception.

I’ve made a device_tracker before, so I might also take a look at it. I’m not sure however how to link Peron id’s to a device_tracker entry, since I guess I need a mac adres for that.

The logout works for me (hated words :slight_smile: ) but please provide details in github if I can help. I am not sure that the mac is required because there are device trackers without it like volvooncall.

@michaelarnauts I have refactored the code a bit and now supports saved sessions. If you start with a device_tracker project I can try to help you out if I can.

Is it possible to use this in a Hass.io installation?

That is my question as well. I converted over to HassIO a while back and am happy with it. I would prefer not to revert but this is definitely a desired component for me.

@Christian_Hollbjar @Corey_Johnson if you’re asking about gplus.py in Hass.io - yes, it works. I’m using it on this installation

3 Likes

This worked for me with slight modifications. I’m using the Hassbian install.

ssh pi@[my iP]
cd /home/homeassistant/.homeassistant
sudo su -s /bin/bash homeassistant
source /srv/homeassistant/bin/activate
pip install BeautifulSoup4

I’m running the latest version of everything (just installed last night) so please note that I’m using pip (not pip3) even though I’m running Python3.5

Thank you all in advance for working on this! I’m looking forward to being able to use Google Location Services as a device tracker in Home Assistant. This would be a great feature for Android users! Thank you

1 Like