Python Plugin: Life 360 Presence Detection (deprecated)

Python and python framework

Moderator: leecollings

tomigonzo
Posts: 4
Joined: Tuesday 05 February 2019 11:13
Target OS: NAS (Synology & others)
Domoticz version:
Contact:

Re: Python Plugin: Life 360 Presence Detection

Post by tomigonzo »

thank you!
i find the right folder ;)
it works,
User avatar
gielie
Posts: 290
Joined: Tuesday 12 January 2016 11:40
Target OS: Raspberry Pi / ODroid
Domoticz version: latest β
Location: The Netherlands (Alkmaar)
Contact:

Re: Python Plugin: Life 360 Presence Detection

Post by gielie »

I had this plugin working for a while but now I get an error

Code: Select all

 
 2019-07-17 08:35:30.332 (Life360) Life360 URLError Reason: [SSL] internal error (_ssl.c:720)
2019-07-17 08:35:30.332 (Life360) No Token Received; Please Check Life360 Username and Password
2019-07-17 08:35:30.332 (Life360) Error Authenticating Life360 or Connection Problem...
2019-07-17 08:35:30.332 (Life360) Please Use Correct Credentials and Restart The Plugin!
 
Off course I checked my credentials, and they are fine. Does someone know what to do to solve this?
- Aeon Labs USB Stick met Z-wave plus
- Aeotec MultiSensor 6
- FIBARO FGS223
- FIBARO FGWPE Wall Plug
- Neo CoolCam Power plug
- Popp Smoke Detector
- Toon
- Kodi Media Server
daveabbott007
Posts: 7
Joined: Friday 03 June 2016 16:44
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Python Plugin: Life 360 Presence Detection

Post by daveabbott007 »

Snap! just started getting the same issue here after domoticz beta update,

2019-08-07 21:58:46.240 (Life360) Life360 URLError Reason: [SSL] internal error (_ssl.c:720)
2019-08-07 21:58:46.240 (Life360) No Token Received; Please Check Life360 Username and Password
2019-08-07 21:58:46.240 (Life360) Error Authenticating Life360 or Connection Problem...
2019-08-07 21:58:46.240 (Life360) Please Use Correct Credentials and Restart The Plugin!!!

Domoticz Version: 4.11074
Build Hash: b736cab34
Compile Date: 2019-08-07 10:01:53
dzVents Version: 2.4.27
Python Version: 3.5.3 (default, Sep 27 2018, 17:25:39) [GCC 6.3.0 20170516]
repoman
Posts: 38
Joined: Saturday 15 April 2017 13:05
Target OS: Windows
Domoticz version:
Contact:

Re: Python Plugin: Life 360 Presence Detection

Post by repoman »

Hi There,

Thanks for making this plugin. I'm using life360 for over a year and domoticz for about 5 years.
Had some troubles installing this on Windows10. Problem was Python. Downgraded to 3.5.3.
Now it's working and I see the devices, location etc (tomtom)

What I don't understand is the Distance part. My wife is at home and I'm at the camping.
Both locations are mentioned in locations.txt and correctly displayed in Domoticz.
The strange part is that the distance for both of us is 0 minutes... (We're 100 km apart)

Thought the plugin was calculating time to home (including traffic)

How is this possible?

Could it be that the plugin is calculating to the nearest know location in locations.txt?

Another question is if it would be possible to send a notification if someone is at (or leaving) a mentioned location?
I don't see the notification option on the location button...

If I could use the location (from location.txt) in blockly I could arm/disarm my alarm at home as well at camping.
(or trigger an action/send mail if the kids are leaving school to early etc)

The geofencing functionallity in the domoticz app isn't that great. Using Life 360, combined with location, would make it much better.

Keep on the good work. Very nice plugin!

Pascal
febalci
Posts: 331
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 »

Unfortunately, i am not using domoticz anymore, so no more support on my side. You can fork the github repository and change/revise the code any way you like. Sorry...
repoman
Posts: 38
Joined: Saturday 15 April 2017 13:05
Target OS: Windows
Domoticz version:
Contact:

Re: Python Plugin: Life 360 Presence Detection

Post by repoman »

Ok, thank you for your quick answer.

It's pitty. Great project!

Hope someone will take it to the next level :-)

But could you explain how I should read "Distance" ?

My wife and children are at sportsschool a few 100m from home.
Distance says it's 47 min. Cant't be true.

I'm not at home (work related) but the plugin says 0 min (from what?)

Thank you,

Pascal
febalci
Posts: 331
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 »

Dear Pascal,

I want to make sure about some basic items first:
1. Did you selected Tomtom in plugin configuration page?
2. If it is Tomtom did you get and entered Tomtom API Key in plugin config page?
3. Did you entered your home latitude and longitude in Domoticz Settings page? (And pls check if you mistakenly entered lat to lon and lon to lat)
4. Did you named the locations you referred also in Life360?

Sorry, i had to ask these first...

The algorithm is like this:
- Check if Life360 has a location name for this coordinates If No:
- Check if Tomtom selected and has API key, get travel distance by car in minutes between current life360 coordinates of the person to home coordinates entered in domoticz settings.
- Check if the current life360 coordinates are in the defined locations.txt file
- If yes, name Location device to this
- If no, name Location Device to the address we get from Tomtom
- If Tomtom is selected but there is no API key, set location to 'No Key' and set distance to 0 mins.

- Check if Life360 has a location name for this coordinates, If yes:
- Name Location Device to the name in Life360
- If the name is 'Home' set distance to 0 mins
- If the name is not 'Home' then get the driving distance from Tomtom API in mins.

So, in short; if there is no problem with the 4 items in the beginning of my message; then there might be a change in Tomtom API which i am not aware of. If there is a problem with Tomtom API, Sorry but i am in the process of working on my smarthome migration to a dfferent platform, so i could not be of much help.
Good Luck...
repoman
Posts: 38
Joined: Saturday 15 April 2017 13:05
Target OS: Windows
Domoticz version:
Contact:

Re: Python Plugin: Life 360 Presence Detection

Post by repoman »

Hi Febalci,

Thank you for your reply. I've been thinking about it today and I think I found the "problem"

I've installed python and the plugin on my camping server.

The coordinates in the settings are not the same as home (of course)

So when my wife went to sports (nicely shown in the location button) the plugin/tomtom was calculating the distance to my server on the camping instead of the server at home...

I further understood that distance is set to 0 when at a location mentioned in locations.txt

That is why my wife and I both got 0 while 100 km apart.

To test this theory I've used the home coordinates in my camping server.
Now the distance (to my home) is correctly shown.

Think I'll get an extra tomtom key so I could use this plugin for both my server at home as well at camping.

Can anyone tell me from which domoticz version problems appear (as mentioned previously)
I'm still on domoticz 4.9700 and I don't want to break the plugin.

I understood you're not using domoticz anymore. I'm not a coder so I hope someone else will pick this up.

Would be really nice to have the locations in locations.txt available in blockly to trigger events/send notification.

Anyways, thank you for this plugin.

Pascal
EddyG
Posts: 1042
Joined: Monday 02 November 2015 5:54
Target OS: -
Domoticz version:

Re: Python Plugin: Life 360 Presence Detection

Post by EddyG »

I am using Domoticz 4.10717 on Raspbian 4.14.83v7 and Python 3.5.3
I use 3 Python plugins: zigbee2mqtt, Life360 and BroadlinkRM2.
When I added the Life360 plugin I got frequently "thread ended" errors on both the Life360 and zigbee2mqtt plugin.
The errors disappear when I disable the Life360 plugin.
Anyone having a solution?
EddyG
Posts: 1042
Joined: Monday 02 November 2015 5:54
Target OS: -
Domoticz version:

Re: Python Plugin: Life 360 Presence Detection

Post by EddyG »

I installed the Life360 plugin on my Slave system and the same problem comes up.
Both on the Life360 plugin as on the Bluetooth presence plugin I get errors.

Code: Select all

2019-11-04 17:00:09.031 Error: Bluetooth hardware (14) thread seems to have ended unexpectedly
2019-11-04 17:00:09.032 Error: Life 360 hardware (17) thread seems to have ended unexpectedly
2019-11-04 17:00:23.035 Error: Bluetooth hardware (14) thread seems to have ended unexpectedly
2019-11-04 17:00:23.035 Error: Life 360 hardware (17) thread seems to have ended unexpectedly
2019-11-04 17:00:37.039 Error: Bluetooth hardware (14) thread seems to have ended unexpectedly
2019-11-04 17:00:37.041 Error: Life 360 hardware (17) thread seems to have ended unexpectedly
2019-11-04 17:00:51.044 Error: Life 360 hardware (17) thread seems to have ended unexpectedly
Anybody any idea how to solve this?
bertbigb
Posts: 147
Joined: Thursday 13 August 2015 13:36
Target OS: NAS (Synology & others)
Domoticz version: beta
Location: Netherlands
Contact:

Re: Python Plugin: Life 360 Presence Detection

Post by bertbigb »

Hi All,

I can need some help with the following:
I have installed the plugin and started, i created very nice the 4 devices for me.
I have a problem because the devices don't get updated.
When I look into the domoticz log I see
2019-11-18 15:37:24.147 (Bert-Life360) Checking Life360 Circle...
2019-11-18 15:37:26.076 (Bert-Life360) OSM Nominatim API URLError Reason: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:645)
2019-11-18 15:37:28.105 (Bert-Life360) OSM Nominatim API URLError Reason: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:645)
2019-11-18 15:37:53.148 (Annemarie-Life360) Checking Life360 Circle...
2019-11-18 15:37:55.125 (Annemarie-Life360) OSM Nominatim API URLError Reason: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:645)
2019-11-18 15:37:57.152 (Annemarie-Life360) OSM Nominatim API URLError Reason: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:645)
Annemarie and Bert are both in the same circle

Hope someone can give me a clue or guidance how to solve this.

Thanks for your help and kind regards,
Bert
Best regards Bert

Synology DS1517+ - DSM 6.2
Raspberry PI2-B, Raspberry Nano - Raspberry PI3 - model B
Xiaomi Gateway - Philips HUE Lights - Zwave - RFXCom(E) with KaKu and other 433MHz devices - Yeelight Lights - Toon
bertbigb
Posts: 147
Joined: Thursday 13 August 2015 13:36
Target OS: NAS (Synology & others)
Domoticz version: beta
Location: Netherlands
Contact:

Re: Python Plugin: Life 360 Presence Detection

Post by bertbigb »

Hello All,

I started with a clean Raspberry and Domoticz install, then I just installed the Life360 plugin.
I runs for a while and gives the proper information in Domoticz but after a while it freezes my Domoticz everytime.
I have the following in the log file:
2019-11-27 21:27:46.344 (Life360) Checking Life360 Circle...
Fatal Python error: Segmentation fault

Current thread 0x74dae220 (most recent call first):
File "/usr/lib/python3.7/ssl.py", line 1117 in do_handshake
File "/usr/lib/python3.7/ssl.py", line 853 in _create
File "/usr/lib/python3.7/ssl.py", line 412 in wrap_socket
File "/usr/lib/python3.7/http/client.py", line 1392 in connect
File "/usr/lib/python3.7/http/client.py", line 956 in send
File "/usr/lib/python3.7/http/client.py", line 1016 in _send_output
File "/usr/lib/python3.7/http/client.py", line 1224 in endheaders
File "/usr/lib/python3.7/http/client.py", line 1275 in _send_request
File "/usr/lib/python3.7/http/client.py", line 1229 in request
File "/usr/lib/python3.7/urllib/request.py", line 1317 in do_open
File "/usr/lib/python3.7/urllib/request.py", line 1360 in https_open
File "/usr/lib/python3.7/urllib/request.py", line 503 in _call_chain
File "/usr/lib/python3.7/urllib/request.py", line 543 in _open
File "/usr/lib/python3.7/urllib/request.py", line 525 in open
File "/usr/lib/python3.7/urllib/request.py", line 222 in urlopen
File "/home/pi/domoticz/plugins/Life360/life360.py", line 32 in make_request
File "/home/pi/domoticz/plugins/Life360/life360.py", line 51 in authenticate
File "/home/pi/domoticz/plugins/Life360/plugin.py", line 167 in onHeartbeat
File "/home/pi/domoticz/plugins/Life360/plugin.py", line 294 in onHeartbeat
2019-11-27 21:27:46.692 Error: Domoticz(pid:1869, tid:1872('PluginMgr')) received fatal signal 11 (Segmentation fault)
2019-11-27 21:27:46.692 Error: siginfo address=0x74d, address=(nil)
And from a later time:
2019-11-28 11:53:18.904 (Life360) Checking Life360 Circle...
free(): invalid next size (fast)
Fatal Python error: Aborted

Current thread 0x74d32220 (most recent call first):
File "/usr/lib/python3.7/socket.py", line 660 in close
File "/usr/lib/python3.7/http/client.py", line 401 in _close_conn
File "/usr/lib/python3.7/http/client.py", line 465 in read
File "/home/pi/domoticz/plugins/Life360/life360.py", line 40 in make_request
File "/home/pi/domoticz/plugins/Life360/life360.py", line 73 in get_circle
File "/home/pi/domoticz/plugins/Life360/plugin.py", line 170 in onHeartbeat
File "/home/pi/domoticz/plugins/Life360/plugin.py", line 294 in onHeartbeat
2019-11-28 11:53:19.884 Error: Domoticz(pid:3227, tid:3230('PluginMgr')) received fatal signal 6 (Aborted)
2019-11-28 11:53:19.884 Error: siginfo address=0xc9b, address=(nil)
corrupted size vs. prev_size
2019-11-28 11:53:23.760 Error: Domoticz(pid:3227, tid:3230('PluginMgr')) received fatal signal 6 (Aborted) while backtracing
2019-11-28 11:53:23.760 Error: siginfo address=0xc9b, address=0xffffffff
2019-11-28 11:53:23.762 Error: #0 ./domoticz() [0x2d8464]
2019-11-28 11:53:23.762 Error: #1 ./domoticz : signal_handler(int, siginfo_t*, void*) + 0x260 [0x2d8edc]
2019-11-28 11:53:23.762 Error: #2 /lib/arm-linux-gnueabihf/libc.so.6 : __default_rt_sa_restorer + 0 [0x76bba130]
2019-11-28 11:53:23.762 Error: Domoticz(pid:3227, tid:3230('PluginMgr')) received fatal signal 6 (Aborted)
2019-11-28 11:53:23.762 Error: siginfo address=0xc9b, address=0xffffffff
2019-11-28 11:54:28.213 Error: Life360 hardware (4) thread seems to have ended unexpectedly

2019-11-28 11:59:50.336 Error: Life360 hardware (4) thread seems to have ended unexpectedly
2019-11-28 12:04:51.757 Error: mainworker seems to have ended or hung unexpectedly (last update 301.000000 seconds ago)
2019-11-28 12:04:51.757 Error: Domoticz(3227) is exiting due to watchdog triggered...
Can someone please help me to make it wotk since the plugin gives me exactly the information I like to have for my domoticz project.
Help is appreciated.
Best regards Bert

Synology DS1517+ - DSM 6.2
Raspberry PI2-B, Raspberry Nano - Raspberry PI3 - model B
Xiaomi Gateway - Philips HUE Lights - Zwave - RFXCom(E) with KaKu and other 433MHz devices - Yeelight Lights - Toon
spider2
Posts: 13
Joined: Wednesday 21 November 2018 19:57
Target OS: NAS (Synology & others)
Domoticz version:
Contact:

Re: Python Plugin: Life 360 Presence Detection

Post by spider2 »

I use domoticz under docker and use this plugin without problem.
Now I installed a new plugin https://github.com/kofec/Domoticz-Enigma2
After this new plugin setup and run got this problem from Life360:

Code: Select all

(Life360) 'onHeartbeat' failed 'timeout'.
2020-02-28 09:25:59.668 Error: (Life360) ----> Line 294 in '/config/plugins/Life360/plugin.py', function onHeartbeat
2020-02-28 09:25:59.668 Error: (Life360) ----> Line 200 in '/config/plugins/Life360/plugin.py', function onHeartbeat
2020-02-28 09:25:59.668 Error: (Life360) ----> Line 50 in '/config/plugins/Life360/tomtomapi.py', function getdistance
2020-02-28 09:25:59.668 Error: (Life360) ----> Line 27 in '/config/plugins/Life360/tomtomapi.py', function make_request
2020-02-28 09:25:59.669 Error: (Life360) ----> Line 222 in '/usr/lib/python3.7/urllib/request.py', function urlopen
2020-02-28 09:25:59.669 Error: (Life360) ----> Line 525 in '/usr/lib/python3.7/urllib/request.py', function open
2020-02-28 09:25:59.669 Error: (Life360) ----> Line 543 in '/usr/lib/python3.7/urllib/request.py', function _open
2020-02-28 09:25:59.669 Error: (Life360) ----> Line 503 in '/usr/lib/python3.7/urllib/request.py', function _call_chain
2020-02-28 09:25:59.669 Error: (Life360) ----> Line 1360 in '/usr/lib/python3.7/urllib/request.py', function https_open
2020-02-28 09:25:59.669 Error: (Life360) ----> Line 1323 in '/usr/lib/python3.7/urllib/request.py', function do_open
2020-02-28 09:25:59.669 Error: (Life360) ----> Line 1361 in '/usr/lib/python3.7/http/client.py', function getresponse
2020-02-28 09:25:59.669 Error: (Life360) ----> Line 306 in '/usr/lib/python3.7/http/client.py', function begin
2020-02-28 09:25:59.669 Error: (Life360) ----> Line 267 in '/usr/lib/python3.7/http/client.py', function _read_status
2020-02-28 09:25:59.669 Error: (Life360) ----> Line 592 in '/usr/lib/python3.7/socket.py', function readinto
2020-02-28 09:25:59.669 Error: (Life360) ----> Line 1071 in '/usr/lib/python3.7/ssl.py', function recv_into
2020-02-28 09:25:59.669 Error: (Life360) ----> Line 939 in '/usr/lib/python3.7/ssl.py', function read
If stop the new plugin and run only the Life360 working good again. What is the problem, and why they can work together?
Please help!
rgroothuis
Posts: 347
Joined: Friday 03 April 2015 17:09
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Python Plugin: Life 360 Presence Detection

Post by rgroothuis »

I know the last message in this thread was a more than 2 years ago, the plug-in is not maintained anymore (if I read it correct) but I'm still trying to use the plugin to do the presence detection with Life360.

I'm running:
- Life360: Initialized version 2.3.1, author 'febalci'
- Domoticz version 2022.1, dzVents version: 3.1.8 and Python version: 3.7.3.

For some reason the Presence, Battery Percentage, Location are not being updated. I do not see any error messages, also not when debug is enabled. When I enabled the plugin for the first time, I see that last status change date/time was updated. But after that, no updates. What an I doing wrong?

Or should I not use the plugin from febalci anymore as it is not supported?

Logging:

Code: Select all

2022-05-12 22:05:21.011 (Life360) Acquiring lock for 'Life360'
2022-05-12 22:05:21.011 (Life360) Releasing lock for 'Life360'
2022-05-12 22:05:21.011 Life360: Pushing 'onHeartbeatCallback' on to queue
2022-05-12 22:05:21.062 Life360: (Life360) Processing 'onHeartbeatCallback' message
2022-05-12 22:05:21.062 (Life360) Acquiring lock for 'onHeartbeatCallback'
2022-05-12 22:05:21.062 Life360: Calling message handler 'onHeartbeat' on 'module' type object.
2022-05-12 22:05:21.062 Life360: onHeartBeat called:2/12
2022-05-12 22:05:21.062 (Life360) Releasing lock for 'onHeartbeatCallback'
2022-05-12 22:05:21.062 (Life360) Acquiring lock for 'Life360'
And:

Code: Select all

2022-05-12 22:09:11.027  (Life360) Releasing lock for 'Life360'
2022-05-12 22:09:11.027  Life360: Pushing 'onHeartbeatCallback' on to queue
2022-05-12 22:09:11.078  Life360: (Life360) Processing 'onHeartbeatCallback' message
2022-05-12 22:09:11.078  (Life360) Acquiring lock for 'onHeartbeatCallback'
2022-05-12 22:09:11.078  Life360: Calling message handler 'onHeartbeat' on 'module' type object.
2022-05-12 22:09:11.078  Life360: onHeartBeat called:12/12
2022-05-12 22:09:11.079  Life360: Checking Life360 Circle...
2022-05-12 22:09:11.684  Life360: Token Received: MzAxZ..........ZDAx
2022-05-12 22:09:12.228  Life360: Family Circle:{'id': '61........9d', 'name': 'Family', 'color': '7f26c2', 'type': 'basic', 'createdAt': '1474451151', 'memberCount': '4', 'unreadMessages': '0', 'unreadNotifications': '0', 'features': {'ownerId': None, 'skuId': None, 'premium': '0', 'locationUpdatesLeft': 0, 'priceMonth': '0', 'priceYear': '0', 'skuTier': None}, 'members': [{'features': {'device': '1', 'smartphone': '1', 'nonSmartphoneLocating': '0', 'geofencing': '1', 'shareLocation': '1', 'shareOffTimestamp': None, 'disconnected': '0', 'pendingInvite': '0', 'mapDisplay': '1'}, 'issues': {'disconnected': '0', 'type': None, 'status': None, 'title': None, 'dialog': None, 'action': None, 'troubleshooting': '0'}, 'location': {'latitude': '52.11,.......', 'longitude': '4.2......', 'accuracy': '50', 'startTimestamp': 1652383306, 'endTimestamp': '1652385417', 'since': 1652383306, 'timestamp': '1652385417', 'name': 'Home', 'placeType': None, 'source': 'l', 'sourceId': '8a..........91', 'address1': 'Home', 'address2': '', 'shortAddress': '', 'inTransit': '0', 'tripId': None, 'driveSDKStatus': None, 'battery': '72', 'charge': '0', 'wifiState': '1', 'speed': -1, 'isDriving': '0', 'userActivity': None}, 'communications': [{'channel': 'Voice', 'value': '+316....36', 'type': 'Home'}, {'channel': 'Email', 'value': '[email protected]', 'type': None}], 'medical': None, 'relation': None, 'createdAt': '1474451151', 'activity': None, 'id': '62.........d7', 'firstName': 'Rene', 'lastName': 'Groothuis', 'isAdmin': '1', 'avatar': None, 'pinNumber': None, 'loginEmail': '[email protected]', 'loginPhone': '+316.......6'}, {'features': {'device': '1', 'smartphone': '1', 'nonSmartphoneLocating': '0', 'geofencing': '1', 'shareLocation': '1', 'shareOffTimestamp': None, 'disconnected': '0', 'pendingInvite': '0', 'mapDisplay': '1'}, 'issues': {'disconnected': '0', 'type': None, 'status': None, 'title': None, 'dialog': None, 'action': None, 'troubleshooting': '0'}, 'location': {'latitude': '.....502', 'longitude': '4.2.....8', 'accuracy': '50', 'startTimestamp': 1652383021, 'endTimestamp': '1652385481', 'since': 1652383021, 'timestamp': '1652385481', 'name': 'Home', 'placeType': None, 'source': 'l', 'sourceId': '8a..........91', 'address1': 'Home', 'address2': '', 'shortAddress': '', 'inTransit': '0', 'tripId': None, 'driveSDKStatus': None, 'battery': '87', 'charge': '0', 'wifiState': '1', 'speed': -1, 'isDriving': '0', 'userActivity': None}, 'communications': [{'channel': 'Voice', 'value': '+316.......8', 'type': 'Home'}, {'channel': 'Email', 'value': '[email protected]', 'type': None}], 'medical': None, 'relation': None, 'createdAt': '1551726961', 'activity': None, 'id': 'a77......4', 'firstName': 'Dorien', 'lastName': '', 'isAdmin': '0', 'avatar': 'https://www.life360.com/img/user_images/a77........d6403539.jpg?fd=2', 'pinNumber': None, 'loginEmail': '[email protected]', 'loginPhone': '+31.....58'}, {'features': {'device': '1', 'smartphone': '1', 'nonSmartphoneLocating': '0', 'geofencing': '1', 'shareLocation': '1', 'shareOffTimestamp': None, 'disconnected': '0', 'pendingInvite': '0', 'mapDisplay': '1'}, 'issues': {'disconnected': '0', 'type': None, 'status': None, 'title': None, 'dialog': None, 'action': None, 'troubleshooting': '0'}, 'location': {'latitude': '38.3...1', 'longitude': '-0.4....8', 'accuracy': '50', 'startTimestamp': 1652380576, 'endTimestamp': '1652385480', 'since': 1652380576, 'timestamp': '1652385480', 'name': None, 'placeType': None, 'source': None, 'sourceId': None, 'address1': None, 'address2': '', 'shortAddress': '', 'inTransit': '0', 'tripId': None, 'driveSDKStatus': None, 'battery': '51', 'charge': '0', 'wifiState': '1', 'speed': -1, 'isDriving': '0', 'userActivity': None}, 'communications': [{'channel': 'Voice', 'value': '+31622107867', 'type': 'Home'}, {'channel': 'Email', 'value': '[email protected]', 'type': None}], 'medical': None, 'relation': None, 'createdAt': '1474455989', 'activity': None, 'id': '46.........55', 'firstName': 'Laura', 'lastName': 'G', 'isAdmin': '0', 'avatar': 'https://www.life360.com/img/user_images/464a1246-d1de-4a87...............c73b.jpg?fd=2', 'pinNumber': None, 'loginEmail': '[email protected]', 'loginPhone': '+316.......7'}, {'features': {'device': '1', 'smartphone': '1', 'nonSmartphoneLocating': '0', 'geofencing': '1', 'shareLocation': '1', 'shareOffTimestamp': None, 'disconnected': '0', 'pendingInvite': '0', 'mapDisplay': '1'}, 'issues': {'disconnected': '0', 'type': None, 'status': None, 'title': None, 'dialog': None, 'action': None, 'troubleshooting': '0'}, 'location': {'latitude': '52.03......', 'longitude': '4.3......7', 'accuracy': '50', 'startTimestamp': 1652372702, 'endTimestamp': '1652385479', 'since': 1652372702, 'timestamp': '1652385479', 'name': 'Manon', 'placeType': None, 'source': 'u', 'sourceId': '10b.......f5', 'address1': 'Manon', 'address2': '', 'shortAddress': '', 'inTransit': '0', 'tripId': None, 'driveSDKStatus': None, 'battery': '30.000001907348633', 'charge': '0', 'wifiState': '1', 'speed': 0, 'isDriving': '0', 'userActivity': None}, 'communications': [{'channel': 'Voice', 'value': '+3163.......5', 'type': 'Home'}, {'channel': 'Email', 'value': '[email protected]', 'type': None}], 'medical': None, 'relation': None, 'createdAt': '1474465619', 'activity': None, 'id': '3d............25', 'firstName': 'Noor G', 'lastName': '', 'isAdmin': '0', 'avatar': 'https://www.life360.com/img/user_images/3d30c1..........4978023b.jpg?fd=2', 'pinNumber': None, 'loginEmail': '[email protected]', 'loginPhone': '+316........5'}]}
2022-05-12 22:09:12.228  Life360: 0/4
2022-05-12 22:09:12.228  Life360: Foundidx=0,Rene
2022-05-12 22:09:12.228  Life360: Updated Device:1,Rene
2022-05-12 22:09:12.228  Life360: Updated Device:2,Rene
2022-05-12 22:09:12.228  Life360: Updated Device:3,Rene
2022-05-12 22:09:12.228  Life360: Updated Device:4,Rene
2022-05-12 22:09:13.230  Life360: 1/4
2022-05-12 22:09:13.231  Life360: Foundidx=3,Dorien
2022-05-12 22:09:13.231  Life360: Updated Device:13,Dorien
2022-05-12 22:09:13.231  Life360: Updated Device:14,Dorien
2022-05-12 22:09:13.231  Life360: Updated Device:15,Dorien
2022-05-12 22:09:13.232  Life360: Updated Device:16,Dorien
..........
..........
The home life360 circle is named: "Home" and the locations.txt in the plugin directory is left empty (for now).

Any suggestions?
superustas
Posts: 15
Joined: Monday 29 January 2018 13:53
Target OS: Linux
Domoticz version:
Contact:

Re: Python Plugin: Life 360 Presence Detection

Post by superustas »

The author removed the plugin from git :(

Please share the latest version?
User avatar
waltervl
Posts: 5149
Joined: Monday 28 January 2019 18:48
Target OS: Linux
Domoticz version: 2024.7
Location: NL
Contact:

Re: Python Plugin: Life 360 Presence Detection

Post by waltervl »

Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
rgroothuis
Posts: 347
Joined: Friday 03 April 2015 17:09
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Python Plugin: Life 360 Presence Detection

Post by rgroothuis »

I'm still using the Life360 plugin for presence detection. For 3 of the 4 family members it is still working great. But for one family member I get the following error messages:
2023-04-02 11:20:26.299 Error: Life360: 'onHeartbeat' failed 'ValueError':''Noor' is not in list'.
2023-04-02 11:20:26.299 Error: Life360: Exception traceback:
2023-04-02 11:20:26.300 Error: Life360: ----> Line 294 in '/home/pi/domoticz/plugins/life360/plugin.py', function onHeartbeat
2023-04-02 11:20:26.300 Error: Life360: ----> Line 182 in '/home/pi/domoticz/plugins/life360/plugin.py', function onHeartbeat
2023-04-02 11:20:36.298 Error: Life360: 'onHeartbeat' failed 'ValueError':''Noor' is not in list'.
2023-04-02 11:20:36.298 Error: Life360: Exception traceback:
2023-04-02 11:20:36.298 Error: Life360: ----> Line 294 in '/home/pi/domoticz/plugins/life360/plugin.py', function onHeartbeat
2023-04-02 11:20:36.298 Error: Life360: ----> Line 182 in '/home/pi/domoticz/plugins/life360/plugin.py', function onHeartbeat
2023-04-02 11:20:46.249 Error: Life360: 'onHeartbeat' failed 'ValueError':''Noor' is not in list'.
2023-04-02 11:20:46.249 Error: Life360: Exception traceback:
2023-04-02 11:20:46.249 Error: Life360: ----> Line 294 in '/home/pi/domoticz/plugins/life360/plugin.py', function onHeartbeat
2023-04-02 11:20:46.249 Error: Life360: ----> Line 182 in '/home/pi/domoticz/plugins/life360/plugin.py', function onHeartbeat
2023-04-02 11:20:56.588 Error: Life360: 'onHeartbeat' failed 'ValueError':''Noor' is not in list'.
2023-04-02 11:20:56.588 Error: Life360: Exception traceback:
2023-04-02 11:20:56.588 Error: Life360: ----> Line 294 in '/home/pi/domoticz/plugins/life360/plugin.py', function onHeartbeat
2023-04-02 11:20:56.588 Error: Life360: ----> Line 182 in '/home/pi/domoticz/plugins/life360/plugin.py', function onHeartbeat
When I run the plugin in debug mode and I'm checking the Life360 API response I get feedback for 4 family members but the last one is way shorter compared to the first three:

'id': '464a1246-d1de-4a87-9a21-2373c6509055', 'firstName': 'Laura', 'lastName': 'G', 'isAdmin': '0', 'avatar': 'https://www.life360.com/img/user_images ... b.jpg?fd=2', 'pinNumber': None, 'loginEmail': '[email protected]', 'loginPhone': '+316xxxxxxx'}, {'features': {'device': '1', 'smartphone': '1', 'nonSmartphoneLocating': '0', 'geofencing': '1', 'shareLocation': '1', 'shareOffTimestamp': None, 'disconnected': '0', 'pendingInvite': '0', 'mapDisplay': '1'}, 'issues': {'disconnected': '0', 'type': None, 'status': None, 'title': None, 'dialog': None, 'action': None, 'troubleshooting': '0'}, 'location': {'latitude': '52.0xxxxx', 'longitude': '5.xxxxxx', 'accuracy': '50', 'startTimestamp': 1680393198, 'endTimestamp': '1680427165', 'since': 1680393198, 'timestamp': '1680427165', 'name': None, 'placeType': None, 'source': None, 'sourceId': None, 'address1': None, 'address2': '', 'shortAddress': '', 'inTransit': '0', 'tripId': None, 'driveSDKStatus': None, 'battery': '85', 'charge': '0', 'wifiState': '1', 'speed': -1, 'isDriving': '0', 'userActivity': None, 'algorithm': None}, 'communications': [{'channel': 'Voice', 'value': '+316xxxxx', 'type': 'Home'}, {'channel': 'Email', 'value': '[email protected]', 'type': None}], 'medical': None, 'relation': None, 'createdAt': '1474465619', 'activity': None,

'id': '3d30c1dc-513c-4581-b549-898b5e190c25', 'firstName': 'Noor', 'lastName': 'G', 'isAdmin': '0', 'avatar': 'https://www.life360.com/img/user_images ... b.jpg?fd=2', 'pinNumber': None, 'loginEmail': '[email protected]', 'loginPhone': '+316xxxxxxx'}]}.
Any idea why this is the case? Could this have something to do with access rights? Or disabling the location sharing? In the Life360 App on my phone I can see the location of the last family member, so the location is being shared in my view. Why do I get a limited response?
Lebo2d9
Posts: 139
Joined: Tuesday 06 September 2016 20:39
Target OS: Raspberry Pi / ODroid
Domoticz version: L stab
Location: Belgium
Contact:

Re: Python Plugin: Life 360 Presence Detection

Post by Lebo2d9 »

Hi,

Yesterday the Life360 plugin stopped working. I got the error that I needed to check my credentials.
I found out the the authorization_token used in plugin.py needs to be changed.

the new token is
Spoiler: show
Y2F0aGFwYWNyQVBoZUtVc3RlOGV2ZXZldnVjSGFmZVRydVl1ZnJhYzpkOEM5ZVlVdkE2dUZ1YnJ1SmVnZXRyZVZ1dFJ
Domoicz on RPI3 (wifi) directly connected 3x ds18b20 for CV temp, Evohome (9 zone), 1 remote 220V switch based on ESP-12. RFXtrx433E, 16x AMST-606, 5 Somfy RTS motors
Domoticz on RPI3(wifi) as slave for terraruim control
More to come
Fredom
Posts: 140
Joined: Saturday 19 September 2020 21:02
Target OS: Raspberry Pi / ODroid
Domoticz version: 2022.2
Location: Krimpen aan den IJssel
Contact:

Re: Python Plugin: Life 360 Presence Detection

Post by Fredom »

Lebo2d9 wrote: Thursday 24 August 2023 1:40 Hi,

Yesterday the Life360 plugin stopped working. I got the error that I needed to check my credentials.
I found out the the authorization_token used in plugin.py needs to be changed.

the new token is
Spoiler: show
Y2F0aGFwYWNyQVBoZUtVc3RlOGV2ZXZldnVjSGFmZVRydVl1ZnJhYzpkOEM5ZVlVdkE2dUZ1YnJ1SmVnZXRyZVZ1dFJ
Hi
I have the same problem with life 360. How do I get a token?
I copied your token and pasted it in place of my old token. But unfortunately it doesn't work yet.

Code: Select all

2023-09-13 14:08:54.068 L 360 P: Checking Life360 Circle...
2023-09-13 14:08:54.525 L 360 P: Life360 HTTPError code: 403
2023-09-13 14:08:54.527 L 360 P: No Token Received; Please Check Life360 Username and Password
2023-09-13 14:08:54.527 L 360 P: Error Authenticating Life360 or Connection Problem...
2023-09-13 14:08:54.527 L 360 P: Please Use Correct Credentials and Restart The Plugin!!!

Code: Select all

class BasePlugin:

    def __init__(self):
        self.authorization_token = "Y2F0aGFwYWNyQVBoZUtVc3RlOGV2ZXZldnVjSGFmZVRydVl1ZnJhYzpkOEM5ZVlVdkE2dUZ1YnJ1SmVnZXRyZVZ1dFJ=="
        self.deviceFirstName = []
        self.membercount = 0
        self.id = ''
        self.pollPeriod = 0
        self.pollCount = 0
        self.tomtomapikey = ''
        self.myHomelat = 0
        self.myHomelon = 0
        self.circleFirstName = ''
        self.circleBattery = 0
        self.circleLatitude = 0
        self.circleLongitude = 0
        self.circlLocationName = ''
        self.selectedMap = ''
        self.locationNames = []
        return
Yours sincerely,
Fred

Rasberry Pi 3B+ - Debian Buster - Domoticz 2022.2
RFLink - RFXCom - Zigbee (CC2531)
P1 Smart Meter - KaKu
aldodemi
Posts: 25
Joined: Tuesday 07 October 2014 17:43
Target OS: Linux
Domoticz version: 3.8275
Location: Genoa Italy
Contact:

Re: Python Plugin: Life 360 Presence Detection

Post by aldodemi »

There was also, if a read correctly, a change in cloud service.
See here: https://github.com/harperreed/life360-p ... d728fb6R20
I try to use those informations but still no work...
Server Domoticz 3.7243 (usually the last beta) on Debian Linux (Jessie) - Hw homemade with Atom CPU/4 GB RAM
RFXCom and ZWave Stick (Aeon)
Post Reply

Who is online

Users browsing this forum: Google [Bot] and 1 guest