Python Plugin: Life 360 Presence Detection

Python and python framework
febalci
Posts: 278
Joined: Monday 03 July 2017 19:58
Target OS: NAS (Synology & others)
Domoticz version:
Contact:

Re: Python Plugin: Life 360 Presence Detection

Post by febalci » Friday 12 January 2018 10:53

g00fy wrote:
Friday 12 January 2018 10:32
How can I debug this (setting debugging on doesn't give more information in the domoticz log). I would be very pleased to be able to make use of this plugin.
Dear Emile,
I believe this 'Fatal Signal 11' error is unfortunately more of something related to Domoticz side, not the plugin itself. Please check: http://www.domoticz.com/forum/viewtopic ... 11#p165132 and https://github.com/domoticz/domoticz/issues/1891 As far as i know no solution is found yet. As i see you are using stable 3.8153, and what platform is it? Raspberry Pi? I am using the plugin on 3.8153 on Synology and Windows without problems. You can try without the google Key, leave that option empty and try again. So that we can maybe understand if it is a google api or life360 api based problem.

If the plugin is no-go and you still want to use Life360 presence, you can always use https://www.domoticz.com/forum/viewtopi ... 60#p144142 bash script of this plugin. It is missing Battery and Location options.

g00fy
Posts: 8
Joined: Friday 08 September 2017 8:27
Target OS: Raspberry Pi
Domoticz version: 3.8153
Location: Dordrecht, The Netherlands
Contact:

Re: Python Plugin: Life 360 Presence Detection

Post by g00fy » Thursday 18 January 2018 17:42

Hey Febalci,

Thanks for your answer. Looking through some older posts I saw that this was more of a Domoticz problem indeed.
I was using the prebuild version for Raspberry Pi and found out that there are plenty of people with the same problem. Now I build the last development version myself and the plugin is running fine since yesterday evening.

So, thanks for making this very nice plugin and for leading me to the right answer why it was not working before.

User avatar
EdwinK
Posts: 1042
Joined: Sunday 22 January 2017 22:46
Target OS: Raspberry Pi
Domoticz version: BETA
Location: Rhoon
Contact:

Re: Python Plugin: Life 360 Presence Detection

Post by EdwinK » Saturday 20 January 2018 17:47

Since I now can install all kind of Python plugins, I decided to try this again. At first it looked like it was going to work, could enter my credentials, but it couldn't create any devices, so I had to delete it completely :( I guess there still is something not working right on my install :(
Running latest BETA on a Pi-3 | Toon Thermostat | RFxcom | Dashticz V2 |

Mace
Posts: 77
Joined: Monday 21 August 2017 19:52
Target OS: Windows
Domoticz version: 3.8153
Location: Rhoon
Contact:

Re: Python Plugin: Life 360 Presence Detection

Post by Mace » Saturday 20 January 2018 22:10

@Edwin, happens to me to. Did a brand new install of Domoticz and this script still manages to kill it. Too bad, but I already pitched in for the Life 360 program...

Hope someone can shine a light on this.

febalci
Posts: 278
Joined: Monday 03 July 2017 19:58
Target OS: NAS (Synology & others)
Domoticz version:
Contact:

Re: Python Plugin: Life 360 Presence Detection

Post by febalci » Saturday 20 January 2018 23:03

Make sure the first created circle is called 'Home' and you and your family is in this circle (circle[0]). If you open debug option you will most probably catch the problem.
And are you sure your credentials are correct? (Username needs email adress, not username)

User avatar
EdwinK
Posts: 1042
Joined: Sunday 22 January 2017 22:46
Target OS: Raspberry Pi
Domoticz version: BETA
Location: Rhoon
Contact:

Re: Python Plugin: Life 360 Presence Detection

Post by EdwinK » Sunday 21 January 2018 0:19

Yes... I am sure. When installed and after entering the details it gives something like 'problems retrieving devices' (can't remember the exact text'), and then Domoticz sort of crashes. All devices are gone and have to remove the plugin from the server is the only remedy to fix it.
Screen Shot 2018-01-20 at 23.31.14.png
Problems retrieving devices
Screen Shot 2018-01-20 at 23.31.14.png (24.31 KiB) Viewed 250 times

@mace strange it's doing this for both of us. Maybe it doesn't like our beautiful city :(
Running latest BETA on a Pi-3 | Toon Thermostat | RFxcom | Dashticz V2 |

Mace
Posts: 77
Joined: Monday 21 August 2017 19:52
Target OS: Windows
Domoticz version: 3.8153
Location: Rhoon
Contact:

Re: Python Plugin: Life 360 Presence Detection

Post by Mace » Sunday 21 January 2018 0:41

@febalci: Exactly the same behavior at my installation as my near neighbour has...

GCB2016
Posts: 22
Joined: Thursday 10 November 2016 23:13
Target OS: Raspberry Pi
Domoticz version: V3.8153
Location: Rotterdam
Contact:

Re: Python Plugin: Life 360 Presence Detection

Post by GCB2016 » Friday 26 January 2018 16:29

Hi Febalci, I had to freshly install my entire raspberry pi which means I have to reinstall Life360 plugin again. But I run into something weird and I am probably making a stupid mistake, but I have no idea what. The problem is that after restarting Domoticz the plugin is not in the Hardware list.

My Domoticz install = V3.8153.
Life360 plugin version = 1.0.4 from your github.
Running on RPi3.

I created a folder /home/pi/domoticz/plugins/life360 and copied all files inside with FileZilla. I confirmed the files in the Terminal (with nano) and they are all there.

Domoticz log says the following on Python:

Code: Select all

2018-01-26 14:49:23.903 PluginSystem: Failed dynamic library load, install the latest libpython3.x library that is available for your platform.
2018-01-26 14:49:25.996 EventSystem - Python: Failed dynamic library load, install the latest libpython3.x library that is available for your platform
But looking into /usr/lib/ I can see Python is installed. Confirmed it with both python -v and python3 -v.

I added a screenshot of the plugin.py file

Is this a known issue, or maybe you know what I am doing wrong?
Attachments
Screen Shot 2018-01-26 at 15.28.35.png
Screen Shot 2018-01-26 at 15.28.35.png (351.27 KiB) Viewed 175 times

febalci
Posts: 278
Joined: Monday 03 July 2017 19:58
Target OS: NAS (Synology & others)
Domoticz version:
Contact:

Re: Python Plugin: Life 360 Presence Detection

Post by febalci » Friday 26 January 2018 16:35

GCB2016 wrote:
Friday 26 January 2018 16:29
Is this a known issue, or maybe you know what I am doing wrong?
If it is raspbian stretch, you have to install libssl1.0 from jessie for 3.8153, this is a known issue. You can search the forums for more detail. Otherwise plugin framework will not work.
Or install python3-dev.

GCB2016
Posts: 22
Joined: Thursday 10 November 2016 23:13
Target OS: Raspberry Pi
Domoticz version: V3.8153
Location: Rotterdam
Contact:

Re: Python Plugin: Life 360 Presence Detection

Post by GCB2016 » Friday 26 January 2018 17:39

You are my hero. After

Code: Select all

sudo apt-get install python3-dev
and restarting domoticz I finally see the plugin and everything works. Thanks a lot!

febalci
Posts: 278
Joined: Monday 03 July 2017 19:58
Target OS: NAS (Synology & others)
Domoticz version:
Contact:

Re: Python Plugin: Life 360 Presence Detection

Post by febalci » Saturday 24 February 2018 14:53

New update; Added Device for 'Driving Duration to Home from the current location'. Thanks for the suggestion @heggink ... You can find the details in the first post.

User avatar
heggink
Posts: 383
Joined: Tuesday 08 September 2015 21:44
Target OS: Raspberry Pi
Domoticz version: V3.7067
Location: NL
Contact:

Re: Python Plugin: Life 360 Presence Detection

Post by heggink » Saturday 24 February 2018 14:56

Brill, thanks!
Now python framework instead of urllib.request please please, pretty please, cherry on top???
Pi3, latest beta
RFXCOM, z-wave (AEOTEC, switches, temhum, pir, contacts),
Plugwise2py, P1 'smart'meter & solar panel
Alexa, Wifi Cams motion detection
ESP: relays, PIR & Temp/TempHum
Geofence iCloud, Bluetooth & Wifi ping
Harmony hub, Nest

febalci
Posts: 278
Joined: Monday 03 July 2017 19:58
Target OS: NAS (Synology & others)
Domoticz version:
Contact:

Re: Python Plugin: Life 360 Presence Detection

Post by febalci » Sunday 25 February 2018 0:20

heggink wrote:
Saturday 24 February 2018 14:56
Brill, thanks!
Now python framework instead of urllib.request please please, pretty please, cherry on top??? Image
Dear @heggink,

i did my best but it seems that the HTTP support in Plugin Framework is not mature enough to support https requests in which this plugin needs it for both life360 and google maps connections. Sorry...

I can confirm that the plugin works with Domoticz 3.8153 stable under linux and windows and Domoticz beta 3.8944 beta under Docker. Which version are you using, which OS and what error the plugin gives?

User avatar
heggink
Posts: 383
Joined: Tuesday 08 September 2015 21:44
Target OS: Raspberry Pi
Domoticz version: V3.7067
Location: NL
Contact:

Re: Python Plugin: Life 360 Presence Detection

Post by heggink » Sunday 25 February 2018 0:23

I am on raspbian stretch beta ie the segfault crash with urllib.request.
Pi3, latest beta
RFXCOM, z-wave (AEOTEC, switches, temhum, pir, contacts),
Plugwise2py, P1 'smart'meter & solar panel
Alexa, Wifi Cams motion detection
ESP: relays, PIR & Temp/TempHum
Geofence iCloud, Bluetooth & Wifi ping
Harmony hub, Nest

febalci
Posts: 278
Joined: Monday 03 July 2017 19:58
Target OS: NAS (Synology & others)
Domoticz version:
Contact:

Re: Python Plugin: Life 360 Presence Detection

Post by febalci » Sunday 25 February 2018 0:36

I think raspbian stretch uses Python 3.5 by default which might be the culprit. Have you tried using Python 3.4 or Python 3.6 with pyenv default to these? I reccommend also to update to latest beta.

Post Reply

Who is online

Users browsing this forum: No registered users and 6 guests