Page 2 of 9
Re: Python Plugin: Life 360 Presence Detection
Posted: Wednesday 29 November 2017 20:55
by EdwinK
EdwinK wrote: ↑Thursday 23 November 2017 17:27
febalci wrote: ↑Wednesday 22 November 2017 8:13
Edwin, do you have something like this error in the beginning of your logfile?
Code: Select all
PluginSystem: Failed dynamic library load, install the latest libpython3.x library that is available for your platform.
I can't check it at the moment. The second I activate one of the mentioned scripts, Domoticz stops working and will not continue before removing the plugins again.
Checked at last, but I don't have that line in the logs.
Re: Python Plugin: Life 360 Presence Detection
Posted: Wednesday 29 November 2017 21:44
by EdwinK
Checked again, and got
Code: Select all
EventSystem: reset all events...
2017-11-29 21:43:40.101 PluginSystem: Started, Python version '3.5.3'.
Re: Python Plugin: Life 360 Presence Detection
Posted: Wednesday 29 November 2017 22:07
by febalci
EdwinK wrote: ↑Thursday 23 November 2017 18:26
Giving up for now.
Screen Shot 2017-11-23 at 18.25.39.png
Dear Edwin,
I believe you also tried 1.0.4 i uploaded today. If it is still the same;
I believe your situation is not directly related to the plugin itself but your domoticz installation if you still have that "Problem retrieving devices". I suggest:
1. Clearing your browser cache while the plugin is not installed and try installing again.
2. As I recall you also have a problem with another plugin maybe buienradar, it sounds like you might have a problem with the devices in domoticz database. If it is so, you either try to fix it by using sqlite or some other tool, or worst case scenario backup your db, delete it and recreate from scratch. But since i know it is a long and tedious approach, if i were you, i would only do it if you have some other serious problems with domoticz database.
If this is not the solution, i really run out of ideas. Good luck.
Re: Python Plugin: Life 360 Presence Detection
Posted: Friday 01 December 2017 16:18
by EdwinK
Thanks. Looks like there is some serious problem with my python installation and domoticz. Will try and figure this out
Re: Python Plugin: Life 360 Presence Detection
Posted: Saturday 09 December 2017 22:24
by Mace
Here also some problems getting the plugin working. After creating the life360 directory in the plugins section and copying the files to it and finally restarting Domoticz, I don't see it in the hardware list. I do get an error in Domoticz:
PluginList: Parsing '/home/mace/domoticz/plugins/life360/', 'Error document empty.' at line 0 column 0 in XML ''
Running 3.8775
Re: Python Plugin: Life 360 Presence Detection
Posted: Sunday 10 December 2017 10:30
by febalci
Try chmod +x with the files under life360 folder, could be permissions problem.
Re: Python Plugin: Life 360 Presence Detection
Posted: Sunday 10 December 2017 11:09
by Mace
Didn't work. All relevant files have 755. After restart same error message and Life360 isn't in the list of hardware.
Re: Python Plugin: Life 360 Presence Detection
Posted: Sunday 10 December 2017 11:23
by febalci
Mace wrote: ↑Sunday 10 December 2017 11:09
Didn't work. All relevant files have 755. After restart same error message and Life360 isn't in the list of hardware.
Would you please check if plugin.py is not empty? And do you have any other plugin installed and working? Python Version?
Re: Python Plugin: Life 360 Presence Detection
Posted: Sunday 10 December 2017 15:22
by Mace
plugin.py is same as downloaded file (checked with nano)
I've got NUT_UPS running, also have Buienradar, but that crashes if activated
Re: Python Plugin: Life 360 Presence Detection
Posted: Sunday 10 December 2017 16:37
by febalci
Tried 8775 on windows with no problems. Did you also checked life360 folder permissions? And also try 0777 on folder and files.
Re: Python Plugin: Life 360 Presence Detection
Posted: Tuesday 12 December 2017 17:35
by febalci
Mace wrote: ↑Sunday 10 December 2017 15:22
plugin.py is same as downloaded file (checked with nano)
Think i may have found something; the error "'Error document empty.' at line 0 column 0 in XML" says that the plugin definiton of the plugin.py is not validated correctly. This Part of the plugin.py:
Code: Select all
"""
<plugin key="Life360" name="Life 360 Presence" author="febalci" version="1.0.4">
<params>
<param field="Username" label="Life360 Username" width="150px" required="true" default="username"/>
<param field="Password" label="Life360 Password" width="150px" required="true" default="password"/>
<param field="Mode2" label="Poll Period (min)" width="75px" required="true" default="2"/>
<param field="Mode3" label="Google Maps API Key" width="300px" required="false"/>
<param field="Mode6" label="Debug" width="75px">
<options>
<option label="True" value="Debug"/>
<option label="False" value="Normal" default="true" />
</options>
</param>
</params>
</plugin>
"""
might have something corrupted; that is if you change anything here, before copying the file to life360 directory, there may be problem:
Code: Select all
<param field="Username" label="Life360 Username" default= "test" width="150px" required="true" default="username"/>
For example, here please note that it has 2 default values, test and username; so the xml file in unvalidated with errors. Any missing quotes, or unclosed fields etc. might cause this problem. So, in short, please make sure the beginning of the plugin.py is exactly the same as you downloaded.
Re: Python Plugin: Life 360 Presence Detection
Posted: Wednesday 13 December 2017 17:21
by Mace
Turns out something went wrong with downloading the files. Content somehow became the Internetpage code.....
Fixed this, but when I activate the plugin (so set it up in hardware), as soon as the devices are 'made' and I go to the device page, the list of devices is empty and a second later, Domoticz goes off-line.
Re: Python Plugin: Life 360 Presence Detection
Posted: Wednesday 13 December 2017 18:09
by febalci
Mace wrote: ↑Wednesday 13 December 2017 17:21
Fixed this, but when I activate the plugin (so set it up in hardware), as soon as the devices are 'made' and I go to the device page, the list of devices is empty and a second later, Domoticz goes off-line.
I need a log file with the DEBUG option On to understand what is going on.
Re: Python Plugin: Life 360 Presence Detection
Posted: Wednesday 13 December 2017 20:36
by Mace
OK, will get that for you. Will be a couple of days before I have time.
Re: Python Plugin: Life 360 Presence Detection
Posted: Sunday 17 December 2017 12:35
by corthebor
Hello
Can you explain the next error:
2017-12-17 12:31:27.372 Error: (Life360) 'onHeartbeat' failed 'HTTPError'.
I can't see any device.
Greetings Cor
Re: Python Plugin: Life 360 Presence Detection
Posted: Sunday 17 December 2017 12:42
by febalci
I need your Domoticz version and also you better Turn on the debug option, for me to better understand the problem. Did you entered life360 username and password when creating the hardware?
Re: Python Plugin: Life 360 Presence Detection
Posted: Sunday 17 December 2017 21:38
by corthebor
My domoticz is V3.8153
User and password is filled in.
With debug true:
2017-12-17 21:36:48.633 (Life360) Calling message handler 'onHeartbeat'.
2017-12-17 21:36:48.634 (Life360) onHeartBeat called:0/0
2017-12-17 21:36:48.634 (Life360) Checking Circle...
2017-12-17 21:36:49.105 Error: (Life360) 'onHeartbeat' failed 'HTTPError'.
2017-12-17 21:36:49.105 Error: (Life360) ----> Line 191 in /home/pi/domoticz/plugins/Life360/plugin.py, function onHeartbeat
2017-12-17 21:36:49.105 Error: (Life360) ----> Line 122 in /home/pi/domoticz/plugins/Life360/plugin.py, function onHeartbeat
2017-12-17 21:36:49.105 Error: (Life360) ----> Line 40 in /home/pi/domoticz/plugins/Life360/life360.py, function authenticate
2017-12-17 21:36:49.105 Error: (Life360) ----> Line 29 in /home/pi/domoticz/plugins/Life360/life360.py, function make_request
2017-12-17 21:36:49.105 Error: (Life360) ----> Line 163 in /usr/lib/python3.5/urllib/request.py, function urlopen
2017-12-17 21:36:49.105 Error: (Life360) ----> Line 472 in /usr/lib/python3.5/urllib/request.py, function open
2017-12-17 21:36:49.105 Error: (Life360) ----> Line 582 in /usr/lib/python3.5/urllib/request.py, function http_response
2017-12-17 21:36:49.105 Error: (Life360) ----> Line 510 in /usr/lib/python3.5/urllib/request.py, function error
2017-12-17 21:36:49.105 Error: (Life360) ----> Line 444 in /usr/lib/python3.5/urllib/request.py, function _call_chain
2017-12-17 21:36:49.105 Error: (Life360) ----> Line 590 in /usr/lib/python3.5/urllib/request.py, function http_error_default
Re: Python Plugin: Life 360 Presence Detection
Posted: Sunday 17 December 2017 22:04
by febalci
Hello Cor,
life360 does not authenticate your request. Your username-password is wrong. Please put your email address for Life360 username, not only the username itself. You can check the authenticity of your username-password combo from life360 website-Login.
Re: Python Plugin: Life 360 Presence Detection
Posted: Sunday 17 December 2017 23:07
by corthebor
that's it. Using email address as user-name
Thanks al lot.
Greetings
Cor
Re: Python Plugin: Life 360 Presence Detection
Posted: Friday 12 January 2018 9:32
by g00fy
As we use life360 already for a while I am very interested in this plugin. So, I installed it on the last stable release of Domoticz, I configured a poll interval of 2 minutes and use a Google Maps API key.
It was working for a while (few hours). But then Domoticz started to crash every 3 till 4 hours with this messages in the log:
Code: Select all
2018-01-10 07:58:29.731 Error: Domoticz received fatal signal 11 !...
2018-01-10 07:58:29.733 Error: /home/pi/domoticz/domoticz() [0x1cdc48]
2018-01-10 07:58:29.733 Error: /home/pi/domoticz/domoticz(_Z14signal_handleri+0x58) [0x1cdd00]
2018-01-10 07:58:29.733 Error: /lib/arm-linux-gnueabihf/libc.so.6(__default_sa_restorer_v2+0) [0x76aeb180]
Disabling the pugin resulted in normal operation again.
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.
Thanks!
Emile.