Python Plugin: Life 360 Presence Detection (deprecated)

Python and python framework

Moderator: leecollings

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 »

Also may be the token is:
"Y2F0aGFwYWNyQVBoZUtVc3RlOGV2ZXZldnVjSGFmZVRydVl1ZnJhYzpkOEM5ZVlVdkE2dUZ1YnJ1SmVnZXRyZVZ1dFJlQ1JVWQ=="
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)
User avatar
Marathon2010
Posts: 37
Joined: Tuesday 02 February 2021 23:02
Target OS: NAS (Synology & others)
Domoticz version: 2025.1
Location: Netherlands
Contact:

Re: Python Plugin: Life 360 Presence Detection

Post by Marathon2010 »

Did implement few years ago life360 plugin vs 2.3.1 from febalci. Also my connection broke few months ago. Got next messages:

2023-08-24 11:16:43.762 Life360 HTTPError code: 403
2023-08-24 11:16:43.762 No Token Received; Please Check Life360 Username and Password
2023-08-24 11:16:43.762 You can Validate Your Credentials in www.life360.com
2023-08-24 11:16:43.762 Error Authenticating Life360 or Connection Problem...
2023-08-24 11:16:43.762 Please Use Correct Credentials and Restart The Plugin!

Based on earlier comments in this thread I've changed plugin.py and life360.py (both in the zip file
life360.zip
(4.77 KiB) Downloaded 63 times
). Changes are commented by "18nov23". Place the two files in the plugin folder (just overwrite), stop the plugin in the hardware section and restart the plugin. And the integration with life360 is working again :D
Synology NAS DS920+ DSM7 (Docker) | Integrations: Audio, Heating, Gas, Electricity, Water, Alarm, Car, Camera, Doorbell, Garage | SW: Tasmota, DzVents, Pushbullet | Plugins: GPSLogger, BatteryLevel, Hyundai KIA, Rhasspy
g00fy
Posts: 16
Joined: Friday 08 September 2017 8:27
Target OS: Raspberry Pi / ODroid
Domoticz version: 3.8153
Location: Dordrecht, The Netherlands
Contact:

Re: Python Plugin: Life 360 Presence Detection

Post by g00fy »

Are there still people using this plugin? I still do, but since a few days the authentication seems to go wrong again. Are there more people who experience this?

In forums about Home Assistant I read that people also suffered from it, but a solution has now been found. Could that solution work for this plugin as well? Or do you use something else these days to determine the home status of family members?
User avatar
Marathon2010
Posts: 37
Joined: Tuesday 02 February 2021 23:02
Target OS: NAS (Synology & others)
Domoticz version: 2025.1
Location: Netherlands
Contact:

Re: Python Plugin: Life 360 Presence Detection

Post by Marathon2010 »

I'm also facing an issue to connect to the API. The log shows next:
  • Life360 HTTPError code: 403
  • No Token Received; Please Check Life360 Username and Password
  • Error Authenticating Life360 or Connection Problem...
  • Please Use Correct Credentials and Restart The Plugin!!!
Using the same credentials to login to the life360 app. Looking into the plugin to find a solution.
Synology NAS DS920+ DSM7 (Docker) | Integrations: Audio, Heating, Gas, Electricity, Water, Alarm, Car, Camera, Doorbell, Garage | SW: Tasmota, DzVents, Pushbullet | Plugins: GPSLogger, BatteryLevel, Hyundai KIA, Rhasspy
g00fy
Posts: 16
Joined: Friday 08 September 2017 8:27
Target OS: Raspberry Pi / ODroid
Domoticz version: 3.8153
Location: Dordrecht, The Netherlands
Contact:

Re: Python Plugin: Life 360 Presence Detection

Post by g00fy »

It seems they implement a solution in the life360/api.py file of the repo https://github.com/pnbruckner/life360.git.
Maybe someone knows how to implement it in this plugin also? It look like febalci has stopped development a while ago :(.
User avatar
Marathon2010
Posts: 37
Joined: Tuesday 02 February 2021 23:02
Target OS: NAS (Synology & others)
Domoticz version: 2025.1
Location: Netherlands
Contact:

Re: Python Plugin: Life 360 Presence Detection

Post by Marathon2010 »

So, based on Life360 integration, I've created a new plugin (see https://github.com/TurnOfAFriendlyCard/ ... ger-Plugin for more details).

End result in Domoticz is the same as the Life360 integration (same kind of devices). Created a new topic for this https://www.domoticz.com/forum/viewtopic.php?t=42045.
Synology NAS DS920+ DSM7 (Docker) | Integrations: Audio, Heating, Gas, Electricity, Water, Alarm, Car, Camera, Doorbell, Garage | SW: Tasmota, DzVents, Pushbullet | Plugins: GPSLogger, BatteryLevel, Hyundai KIA, Rhasspy
sloeber70
Posts: 22
Joined: Wednesday 08 July 2020 10:59
Target OS: Linux
Domoticz version: latest
Location: Bruges
Contact:

Re: Python Plugin: Life 360 Presence Detection (deprecated)

Post by sloeber70 »

Hi,

Since a few days the plugin does not work anymore.
The connection json to upload data into the devices in Domoticz is working fine. So I get the rawdata for all devices.

The batterylevels and speed are update into domoticz. Location NOT anymore.

I get these errors in the log:
2025-04-14 09:22:21.104 Error: GPS: ~~~~^^^
2025-04-14 09:22:21.104 Error: GPS: IndexError: list index out of range
2025-04-14 09:22:36.090 Error: GPS: Call to function 'onHeartbeat' failed, exception details:
2025-04-14 09:22:36.091 Error: GPS: Traceback (most recent call last):
2025-04-14 09:22:36.092 Error: GPS: File "/home/hans/domoticz/plugins/Domoticz-GPSLogger-Plugin/plugin.py", line 317, in onHeartbeat
2025-04-14 09:22:36.092 Error: GPS: _plugin.onHeartbeat()
2025-04-14 09:22:36.092 Error: GPS: File "/home/hans/domoticz/plugins/Domoticz-GPSLogger-Plugin/plugin.py", line 237, in onHeartbeat
2025-04-14 09:22:36.092 Error: GPS: if int(distanceToLoc)<=int(line[3]):
2025-04-14 09:22:36.092 Error: GPS: ~~~~^^^
2025-04-14 09:22:36.092 Error: GPS: IndexError: list index out of range
2025-04-14 09:22:51.082 Error: GPS: Call to function 'onHeartbeat' failed, exception details:
2025-04-14 09:22:51.082 Error: GPS: Traceback (most recent call last):
2025-04-14 09:22:51.082 Error: GPS: File "/home/hans/domoticz/plugins/Domoticz-GPSLogger-Plugin/plugin.py", line 317, in onHeartbeat
2025-04-14 09:22:51.082 Error: GPS: _plugin.onHeartbeat()
2025-04-14 09:22:51.082 Error: GPS: File "/home/hans/domoticz/plugins/Domoticz-GPSLogger-Plugin/plugin.py", line 237, in onHeartbeat
2025-04-14 09:22:51.082 Error: GPS: if int(distanceToLoc)<=int(line[3]):
2025-04-14 09:22:51.082 Error: GPS: ~~~~^^^
2025-04-14 09:22:51.082 Error: GPS: IndexError: list index out of range
2025-04-14 09:23:06.071 Error: GPS: Call to function 'onHeartbeat' failed, exception details:
2025-04-14 09:23:06.071 Error: GPS: Traceback (most recent call last):
2025-04-14 09:23:06.071 Error: GPS: File "/home/hans/domoticz/plugins/Domoticz-GPSLogger-Plugin/plugin.py", line 317, in onHeartbeat
2025-04-14 09:23:06.071 Error: GPS: _plugin.onHeartbeat()
2025-04-14 09:23:06.071 Error: GPS: File "/home/hans/domoticz/plugins/Domoticz-GPSLogger-Plugin/plugin.py", line 237, in onHeartbeat
2025-04-14 09:23:06.071 Error: GPS: if int(distanceToLoc)<=int(line[3]):
2025-04-14 09:23:06.071 Error: GPS: ~~~~^^^
2025-04-14 09:23:06.071 Error: GPS: IndexError: list index out of range

I did already get a new api key for TomTom. No cure.
Switched to OPenStreetMaps. No cure either.

I am on the latest beta version Domoticz.
plugin is uptodate : git pull : already updated..
Attachments
2025-04-14_09-31-50.jpg
2025-04-14_09-31-50.jpg (281.12 KiB) Viewed 231 times
Kind regards,
Sloeber70

Linux 12 Bookworm standard edition
Domoticz latest beta
User avatar
Marathon2010
Posts: 37
Joined: Tuesday 02 February 2021 23:02
Target OS: NAS (Synology & others)
Domoticz version: 2025.1
Location: Netherlands
Contact:

Re: Python Plugin: Life 360 Presence Detection (deprecated)

Post by Marathon2010 »

I will take a look. My integration (Domoticz 2404.7) is still running fine and location is updated.
Synology NAS DS920+ DSM7 (Docker) | Integrations: Audio, Heating, Gas, Electricity, Water, Alarm, Car, Camera, Doorbell, Garage | SW: Tasmota, DzVents, Pushbullet | Plugins: GPSLogger, BatteryLevel, Hyundai KIA, Rhasspy
sloeber70
Posts: 22
Joined: Wednesday 08 July 2020 10:59
Target OS: Linux
Domoticz version: latest
Location: Bruges
Contact:

Re: Python Plugin: Life 360 Presence Detection (deprecated)

Post by sloeber70 »

Hi,

I've restored an earlier version of the Domoticz-GPSlogger-Plugin directory.

The plugin is functioning again.

I can only see 2 possibilties :
or I did delete some files by mistake by doing git pull force
or SSD had errors on the directory..... corruption....

Anyway, the restore did the job.
Kind regards,
Sloeber70

Linux 12 Bookworm standard edition
Domoticz latest beta
sloeber70
Posts: 22
Joined: Wednesday 08 July 2020 10:59
Target OS: Linux
Domoticz version: latest
Location: Bruges
Contact:

Re: Python Plugin: Life 360 Presence Detection (deprecated)

Post by sloeber70 »

2025-04-15_19-40-58.jpg
2025-04-15_19-40-58.jpg (153.66 KiB) Viewed 172 times
Kind regards,
Sloeber70

Linux 12 Bookworm standard edition
Domoticz latest beta
User avatar
Marathon2010
Posts: 37
Joined: Tuesday 02 February 2021 23:02
Target OS: NAS (Synology & others)
Domoticz version: 2025.1
Location: Netherlands
Contact:

Re: Python Plugin: Life 360 Presence Detection (deprecated)

Post by Marathon2010 »

I can confirm your issue is caused by overwriting the file locations.txt which stores your standard locations that show up in the Domoticz device <user>Location. Next time before doing a clean install backup that file and after the clean install copy it back to the folder. So those standard locations are preserved instead of being emptied.
Basically this is what you did by restoring a previous version of the plugin.
Synology NAS DS920+ DSM7 (Docker) | Integrations: Audio, Heating, Gas, Electricity, Water, Alarm, Car, Camera, Doorbell, Garage | SW: Tasmota, DzVents, Pushbullet | Plugins: GPSLogger, BatteryLevel, Hyundai KIA, Rhasspy
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest