Python Plugin: GPSLogger
Moderator: leecollings
- Marathon2010
- Posts: 37
- Joined: Tuesday 02 February 2021 23:02
- Target OS: NAS (Synology & others)
- Domoticz version: 2025.1
- Location: Netherlands
- Contact:
Python Plugin: GPSLogger
I've used the Life360 integration for several years with much pleasure. Unfortunately the Domoticz integration was not maintained anymore the moment the integration appeared to be broken (authentication issue by Life360, see https://www.domoticz.com/forum/viewtopi ... 60#p310361).
So, based on this integration, I've created a new plugin (see https://github.com/TurnOfAFriendlyCard/ ... ger-Plugin for more details). A mobile phone is used to capture actual location data. The app used for this plugin is GPSLogger (see https://gpslogger.app), however other GPS logging apps can be used as well. In fact the most important prerequisite is that the app is able to share location data via the Domoticz API on regular basis.
Concept is that users are determined for these mobile phones (just names, no formal users in Domoticz). Besides that the home location is identified by the location setup in Domoticz. A fence around the home location determines how Home is identified. For example a circle of 100 meters around the address Coolsingel 40, Rotterdam, the Netherlands (latitude 51.922710 and longitude 4.479160).
Next devices will be created and updated in Domoticz (in the utility tab unless otherwise specified) - those devices are the same as for the Life360 integration:
Presence: This is an On/Off switch indicating the user is within the fence (in switches tab).
Location: Text describing what the actual location of the user is.
Battery: Charging percentage of the battery of the user.
Distance: Distance in minutes of the actual location to the fence (to implement in future).
Speed: Speed in kilometers / hour of the user.
RawData: Data which is captured from the GPSLogger app. This device is hidden (only in devices tab).
So, based on this integration, I've created a new plugin (see https://github.com/TurnOfAFriendlyCard/ ... ger-Plugin for more details). A mobile phone is used to capture actual location data. The app used for this plugin is GPSLogger (see https://gpslogger.app), however other GPS logging apps can be used as well. In fact the most important prerequisite is that the app is able to share location data via the Domoticz API on regular basis.
Concept is that users are determined for these mobile phones (just names, no formal users in Domoticz). Besides that the home location is identified by the location setup in Domoticz. A fence around the home location determines how Home is identified. For example a circle of 100 meters around the address Coolsingel 40, Rotterdam, the Netherlands (latitude 51.922710 and longitude 4.479160).
Next devices will be created and updated in Domoticz (in the utility tab unless otherwise specified) - those devices are the same as for the Life360 integration:
Presence: This is an On/Off switch indicating the user is within the fence (in switches tab).
Location: Text describing what the actual location of the user is.
Battery: Charging percentage of the battery of the user.
Distance: Distance in minutes of the actual location to the fence (to implement in future).
Speed: Speed in kilometers / hour of the user.
RawData: Data which is captured from the GPSLogger app. This device is hidden (only in devices tab).
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
- waltervl
- Posts: 5842
- Joined: Monday 28 January 2019 18:48
- Target OS: Linux
- Domoticz version: 2024.7
- Location: NL
- Contact:
Re: Python Plugin: GPSLogger
Thanks for the alternative!
I have added your plugin to the Wiki Plugin List and modified the original start topic of the Life 360 plugin to indicate its deprecation.
I have added your plugin to the Wiki Plugin List and modified the original start topic of the Life 360 plugin to indicate its deprecation.
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
- EdwinK
- Posts: 1820
- Joined: Sunday 22 January 2017 21:46
- Target OS: Raspberry Pi / ODroid
- Domoticz version: BETA
- Location: Rhoon
- Contact:
Re: Python Plugin: GPSLogger
Looks great, but atm there is an error message that GPSLogger has some bugs and it won't open. .
Running latest BETA on a Pi-3 | Toon® Thermostat (rooted) | Hue | Tuya | IKEA tradfri | Dashticz V3 on Lenovo Huawei Tablet | Conbee
- 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: GPSLogger
Hello Edwin, please share details so I can analyse.
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
- EdwinK
- Posts: 1820
- Joined: Sunday 22 January 2017 21:46
- Target OS: Raspberry Pi / ODroid
- Domoticz version: BETA
- Location: Rhoon
- Contact:
Re: Python Plugin: GPSLogger
It seems fixed now.
Running latest BETA on a Pi-3 | Toon® Thermostat (rooted) | Hue | Tuya | IKEA tradfri | Dashticz V3 on Lenovo Huawei Tablet | Conbee
-
- Posts: 612
- Joined: Sunday 01 November 2015 22:45
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 2023.2
- Location: Twente
- Contact:
Re: Python Plugin: GPSLogger
Bugs bug me.
- waltervl
- Posts: 5842
- Joined: Monday 28 January 2019 18:48
- Target OS: Linux
- Domoticz version: 2024.7
- Location: NL
- Contact:
Re: Python Plugin: GPSLogger
Because the wiki list and the plugin manager(s, there are 2) are not related.
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
- EdwinK
- Posts: 1820
- Joined: Sunday 22 January 2017 21:46
- Target OS: Raspberry Pi / ODroid
- Domoticz version: BETA
- Location: Rhoon
- Contact:
Re: Python Plugin: GPSLogger
So far I have it working on the phone, but in the log I can see a message that it couldn't upload the log. I created an user for GPSLogger and used this in the base64decode site. The output from there I entered in GPSLogger app.
I can manually enter data to the devices with going directly to https://<myurl>.ddns.net/json.htm?type=command¶m=udevice&idx=429&nvalue=1&svalue=1,2,3Custom URL: maximum attemps failed: giving up
Custom URL: Kon het bestand niet uploaden (Coulnd't upload the file)
Running latest BETA on a Pi-3 | Toon® Thermostat (rooted) | Hue | Tuya | IKEA tradfri | Dashticz V3 on Lenovo Huawei Tablet | Conbee
- 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: GPSLogger
Related to the example, can you see in Domoticz the setup/devices tab the RawData device showing data received from GPSLogger? In your situation it should show "1,2,3"I can manually enter data to the devices with going directly to https://<myurl>.ddns.net/json.htm?type=command¶m=udevice&idx=429&nvalue=1&svalue=1,2,3
If data is not at all in the Domoticz RawData device it should be GPSLogger cannot connect to Domoticz, did you validate the SSL certificate in GPSLogger? See https://gpslogger.app/#customsslcertificatesCustom URL: maximum attemps failed: giving up
Custom URL: Kon het bestand niet uploaden (Coulnd't upload the file)
Did you enter in the "HTTP Headers" section of GPSLogger:
Content-Type: application/json
Authorization: Basic <base64>
where <base64> is the decoded base64 of <username>:<password> (including the colon).
See below setup:
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
- EdwinK
- Posts: 1820
- Joined: Sunday 22 January 2017 21:46
- Target OS: Raspberry Pi / ODroid
- Domoticz version: BETA
- Location: Rhoon
- Contact:
Re: Python Plugin: GPSLogger
This is what I have in the raw data
So that works. I already had validated the certificate, but will go through all this again.
So that works. I already had validated the certificate, but will go through all this again.
Running latest BETA on a Pi-3 | Toon® Thermostat (rooted) | Hue | Tuya | IKEA tradfri | Dashticz V3 on Lenovo Huawei Tablet | Conbee
- EdwinK
- Posts: 1820
- Joined: Sunday 22 January 2017 21:46
- Target OS: Raspberry Pi / ODroid
- Domoticz version: BETA
- Location: Rhoon
- Contact:
Re: Python Plugin: GPSLogger
Seems that it is something with some security, I tried the same url on another laptop and then the result was a 401 error.
Running latest BETA on a Pi-3 | Toon® Thermostat (rooted) | Hue | Tuya | IKEA tradfri | Dashticz V3 on Lenovo Huawei Tablet | Conbee
- waltervl
- Posts: 5842
- Joined: Monday 28 January 2019 18:48
- Target OS: Linux
- Domoticz version: 2024.7
- Location: NL
- Contact:
Re: Python Plugin: GPSLogger
You probably have to add your user credentials to the link.
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
- 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: GPSLogger
Perhaps try with HTTP instead of HTTPS to at least get it up and running?
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
- EdwinK
- Posts: 1820
- Joined: Sunday 22 January 2017 21:46
- Target OS: Raspberry Pi / ODroid
- Domoticz version: BETA
- Location: Rhoon
- Contact:
Re: Python Plugin: GPSLogger
Going to try tomorrow (or the day after). Now time for some rest 

Running latest BETA on a Pi-3 | Toon® Thermostat (rooted) | Hue | Tuya | IKEA tradfri | Dashticz V3 on Lenovo Huawei Tablet | Conbee
- 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: GPSLogger
Updated functionality of the plugin (v3.0.0) by adding Map device showing the actual location in either Google Maps or Open Streetmap. Map will be opened in a new window.
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
- capman
- Posts: 153
- Joined: Friday 12 July 2013 20:48
- Target OS: Raspberry Pi / ODroid
- Domoticz version: Beta
- Location: Belgium
- Contact:
Re: Python Plugin: GPSLogger
A still get this error in the log
Code: Select all
2024-03-30 11:48:47.190 Error: Location: Call to function 'onHeartbeat' failed, exception details:
2024-03-30 11:48:47.190 Error: Location: Traceback (most recent call last):
2024-03-30 11:48:47.190 Error: Location: File "/home/pi/domoticz/plugins/Domoticz-GPSLogger-Plugin/plugin.py", line 313, in onHeartbeat
2024-03-30 11:48:47.190 Error: Location: _plugin.onHeartbeat()
2024-03-30 11:48:47.190 Error: Location: File "/home/pi/domoticz/plugins/Domoticz-GPSLogger-Plugin/plugin.py", line 210, in onHeartbeat
2024-03-30 11:48:47.190 Error: Location: Domoticz.Debug('Processing '+str(member)+' RawData: '+Devices[member*self.numberDevicesPerMember+self.devRawData].Name+' = "'+Devices[member*self.numberDevicesPerMember+self.devRawData].sValue+'"')
2024-03-30 11:48:47.190 Error: Location: KeyError: 27
- 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: GPSLogger
What version did you install (and started with an earlier version)? Please show the input fields (specific the "Users GPSLogger" entry). And please show overview of the devices created (so <user> Location, <user> RawData, ...) from the Setup/Devices menu.
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
- capman
- Posts: 153
- Joined: Friday 12 July 2013 20:48
- Target OS: Raspberry Pi / ODroid
- Domoticz version: Beta
- Location: Belgium
- Contact:
Re: Python Plugin: GPSLogger
Thanks 4 the reply.
Started direct with the latest version , of the moment, v3.
See screenshots.
Started direct with the latest version , of the moment, v3.
See screenshots.
- 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: GPSLogger
The last semi colon after Milan should not be there. So entry should be:
Kris;Sabine;Milan
Will process this as an issue to be validated as well.
Edit: https://github.com/TurnOfAFriendlyCard/ ... n/issues/5
Kris;Sabine;Milan
Will process this as an issue to be validated as well.
Edit: https://github.com/TurnOfAFriendlyCard/ ... n/issues/5
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
- 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: GPSLogger
Issue resolved in v3.0.1.
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
Who is online
Users browsing this forum: No registered users and 1 guest