Page 7 of 9
Re: Python Plugin: Life 360 Presence Detection
Posted: Tuesday 26 February 2019 16:05
by Minglarn
febalci wrote: ↑Wednesday 13 February 2019 16:58
Minglarn wrote: ↑Wednesday 13 February 2019 16:05
Hi!
Love the plugin... However... my phyton knowlege is kinda zero..
How do I trunc the text to just contain the first sentence before the first "," ...
I just want the "Sicklatunneln" ... the rest is just to much info
Looks easy. Open the plugin.py in a text editor go to:
Line 212:
Under
Code: Select all
currentstat2, currentloc = a.getaddress(self.tomtomapikey,self.circleLatitude,self.circleLongitude)
add:
Code: Select all
currentloc = currentloc.split(',',1)[0]
and the same on line 217. This assumes all your addresses are in the format like xxxx, xxxx, xxxx, xxxx and so theis command gets the first text before the first comma. Also these added lines should start on the same column with their previus lines and you should go there by pressing space bar, not tab... Like:
Code: Select all
if self.tomtomapikey != 'Empty':
currentstat, currentmin = a.getdistance(self.tomtomapikey,self.circleLatitude,self.circleLongitude,self.myHomelat,self.myHomelon)
currentstat2, currentloc = a.getaddress(self.tomtomapikey,self.circleLatitude,self.circleLongitude)
currentloc = currentloc.split(',',1)[0]
Nice...
but it seems that there is no consistency with the location adresse...
Is it possible to truncate the line to ... lets say...20chars and end it with "..." ?
Re: Python Plugin: Life 360 Presence Detection
Posted: Tuesday 26 February 2019 17:24
by febalci
Minglarn wrote: ↑Tuesday 26 February 2019 16:05
Nice...
but it seems that there is no consistency with the location adresse...
Is it possible to truncate the line to ... lets say...20chars and end it with "..." ?
So, instead of:
Code: Select all
currentloc=currentloc.split(‘,’,1)[0]
Use:
Re: Python Plugin: Life 360 Presence Detection
Posted: Tuesday 26 February 2019 17:42
by Minglarn
Great support...
Again... Thanks for the plugin.. Great job!
Re: Python Plugin: Life 360 Presence Detection
Posted: Wednesday 27 February 2019 8:23
by Minglarn
Did not work...
Well it works if I dont use TomTom maps...
When using TomTom is still shows me the whole line...
Re: Python Plugin: Life 360 Presence Detection
Posted: Wednesday 27 February 2019 8:58
by febalci
pls send me your current plugin.py, i will fix it for you.
Re: Python Plugin: Life 360 Presence Detection
Posted: Wednesday 27 February 2019 9:29
by Minglarn
PM sent.
Re: Python Plugin: Life 360 Presence Detection
Posted: Wednesday 27 February 2019 10:20
by febalci
Minglarn wrote: ↑Wednesday 27 February 2019 9:29PM sent.
PM broken, can not send...
Try this plugin.py:
https://drive.google.com/file/d/1s1QSZr ... sp=sharing
Re: Python Plugin: Life 360 Presence Detection
Posted: Wednesday 27 February 2019 14:00
by Minglarn
And as usual... Perfect!
Thanks!

- 464.JPG (17 KiB) Viewed 3351 times
Re: Python Plugin: Life 360 Presence Detection
Posted: Wednesday 27 February 2019 23:06
by WarLion
hi guys , i got a problem here, everytime someone from my circle or me leave the Home get this error message
Code: Select all
2019-02-27 16:04:41.395 (life360) Checking Life360 Circle...
2019-02-27 16:04:47.544 Error: (life360) 'onHeartbeat' failed 'IndexError':'list index out of range'.
2019-02-27 16:04:47.545 Error: (life360) ----> Line 294 in '/home/warlion/domoticz/plugins/DomoticzLife360/plugin.py', function onHeartbeat
2019-02-27 16:04:47.545 Error: (life360) ----> Line 216 in '/home/warlion/domoticz/plugins/DomoticzLife360/plugin.py', function onHeartbeat
any idea whats wrong on my installation
thanks
Re: Python Plugin: Life 360 Presence Detection
Posted: Thursday 28 February 2019 8:11
by febalci
WarLion wrote: ↑Wednesday 27 February 2019 23:06
hi guys , i got a problem here, everytime someone from my circle or me leave the Home get this error message
any idea whats wrong on my installation
thanks
Hi warlion,
If you are using version 2.3.1, Your error refers to something wrong with your locations.txt file. I suppose you use OSM, not Tomtom... Do you have any locations listed in locations.txt?
EDIT: I managed to recreate this error by adding an extra empty line in locations.txt file. So, please check this file and delete empty lines...
Re: Python Plugin: Life 360 Presence Detection
Posted: Thursday 28 February 2019 19:28
by WarLion
febalci wrote: ↑Thursday 28 February 2019 8:11
Hi warlion,
If you are using version 2.3.1, Your error refers to something wrong with your locations.txt file. I suppose you use OSM, not Tomtom... Do you have any locations listed in locations.txt?
EDIT: I managed to recreate this error by adding an extra empty line in locations.txt file. So, please check this file and delete empty lines...
thanks febalci i notice a new line on my locations.txt i removeit will give it a try with a fake gps , and i post any result , thanks mate
Re: Python Plugin: Life 360 Presence Detection
Posted: Monday 22 April 2019 20:24
by superustas
A few days ago, for some reason, the plugin stopped working normally. Apparently, after the update.
In the error logs (constantly repeated):
- Spoiler: show
- 2019-04-22 21:21:34.527 Error: (Life360) 'onHeartbeat' failed 'ValueError':''Alexey' is not in list'.
2019-04-22 21:21:34.527 Error: (Life360) ----> Line 294 in /home/ustas/domoticz/plugins/Life360/plugin.py, function onHeartbeat
2019-04-22 21:21:34.527 Error: (Life360) ----> Line 182 in /home/ustas/domoticz/plugins/Life360/plugin.py, function onHeartbeat
immediately after launch:
- Spoiler: show
- 2019-04-23 13:24:55.853 Error: (Life360) 'onStart' failed 'FileNotFoundError'.
2019-04-23 13:24:55.853 Error: (Life360) ----> Line 266 in /home/ustas/domoticz/plugins/Life360/plugin.py, function onStart
2019-04-23 13:24:55.853 Error: (Life360) ----> Line 105 in /home/ustas/domoticz/plugins/Life360/plugin.py, function onStart
Sometimes updated information about the battery level.

- 2019-04-22_21-22-54.png (167.14 KiB) Viewed 3105 times
Domoticz - 4.9701
Python - 3.5.2
Life 360 Presence Detection - v2.3.1
Re: Python Plugin: Life 360 Presence Detection
Posted: Thursday 02 May 2019 15:29
by superustas
Full re-install plugin and all work fine!
Re: Python Plugin: Life 360 Presence Detection
Posted: Wednesday 19 June 2019 17:02
by tomigonzo
HI,
it could work in Synology/Domoticz V4.10717/Python3.5.1 -0108 ?
The files had been copied to the domoticz/plugins foldar, but i can't find the plugin in the hardware list.
Re: Python Plugin: Life 360 Presence Detection
Posted: Wednesday 19 June 2019 18:23
by febalci
tomigonzo wrote: ↑Wednesday 19 June 2019 17:02
HI,
it could work in Synology/Domoticz V4.10717/Python3.5.1 -0108 ?
The files had been copied to the domoticz/plugins foldar, but i can't find the plugin in the hardware list.
Did you restarted Domoticz service?
Re: Python Plugin: Life 360 Presence Detection
Posted: Wednesday 19 June 2019 22:52
by tomigonzo
sure
Re: Python Plugin: Life 360 Presence Detection
Posted: Thursday 20 June 2019 10:32
by febalci
tomigonzo wrote: ↑Wednesday 19 June 2019 22:52sure
There could be a number of issues but i highly doubt it is on the plugin part; but instead on domoticz Synology side:
1. Is the domoticz version on your Synology a Python plugin supported version?
2. Is there any other Python plugin working on your installation?
3. As far as i remember there were 2 folders on Synology; one was in "/volume1/@appstore/domoticz/plugins" and the other was in "/usr/somethingsomething...". Only one of these folders were working as plugin installaton folder.
4. The life360 plugin files might be corrupted on download, check it with a text editor...
Re: Python Plugin: Life 360 Presence Detection
Posted: Thursday 20 June 2019 12:32
by poudenes
Hi All,
I get this error after I add a new user in the Circle:
Code: Select all
2019-06-20 12:29:41.229 (Life360) Checking Life360 Circle...
2019-06-20 12:29:43.412 Error: (Life360) 'onHeartbeat' failed 'ValueError':''Peter NS' is not in list'.
2019-06-20 12:29:43.412 Error: (Life360) ----> Line 294 in '/home/pi/domoticz/plugins/Life360/plugin.py'
2019-06-20 12:29:43.413 Error: (Life360) ----> Line 182 in '/home/pi/domoticz/plugins/Life360/plugin.py'
2019-06-20 12:29:52.933 (Life360) Checking Life360 Circle...
2019-06-20 12:29:55.146 Error: (Life360) 'onHeartbeat' failed 'ValueError':''Peter NS' is not in list'.
2019-06-20 12:29:55.146 Error: (Life360) ----> Line 294 in '/home/pi/domoticz/plugins/Life360/plugin.py'
2019-06-20 12:29:55.146 Error: (Life360) ----> Line 182 in '/home/pi/domoticz/plugins/Life360/plugin.py'
Removed the hardware and add it again. The error is gone.
Re: Python Plugin: Life 360 Presence Detection
Posted: Friday 21 June 2019 18:40
by tomigonzo
febalci wrote: ↑Thursday 20 June 2019 10:32
tomigonzo wrote: ↑Wednesday 19 June 2019 22:52sure
There could be a number of issues but i highly doubt it is on the plugin part; but instead on domoticz Synology side:
1. Is the domoticz version on your Synology a Python plugin supported version?
2. Is there any other Python plugin working on your installation?
3. As far as i remember there were 2 folders on Synology; one was in "/volume1/@appstore/domoticz/plugins" and the other was in "/usr/somethingsomething...". Only one of these folders were working as plugin installaton folder.
4. The life360 plugin files might be corrupted on download, check it with a text editor...
1, is there Python plugin NON-supported version?
2, noit should be the first one.
3, there are same, linked/mirrored folders
4, i going to check it, but it could be ok
Re: Python Plugin: Life 360 Presence Detection
Posted: Friday 21 June 2019 19:00
by febalci
tomigonzo wrote: ↑Friday 21 June 2019 18:40
1, is there Python plugin NON-supported version?
2, noit should be the first one.
3, there are same, linked/mirrored folders
4, i going to check it, but it could be ok
Jadahl distributes Synology Domoticz packages as Domoticz stable for DSM 6.2 and Domoticz Stable for DSM 6.2 with Python. You cannot run any python plugins with the first one:
http://jadahl.dscloud.me/ Also, you have to install Python 3.x on Synology. Anyway, please try some other plugin, if it is also not working, there is a problem with your Domoticz or Python installation, not with the plugin itself.