TurnOfAFriendlyCard / Domoticz-GPSLogger-Plugin

Capture location data obtained via GPS Logger app in Domoticz devices.
https://www.buymeacoffee.com/turnofafriendlycard
MIT License
0 stars 0 forks source link

Semi colon Users field causes crash #5

Closed TurnOfAFriendlyCard closed 4 months ago

TurnOfAFriendlyCard commented 4 months ago

The field "Users GPSLogger" is defined to capture the users of the GPSLogger app. Data entry is defined to be separated with a semi colon, example: "John;Tom" (so two users are planned to be used). If data entry is done as "John;Tom;" two devices are created but during execution of the plugin next error crash is reported:

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[memberself.numberDevicesPerMember+self.devRawData].Name+' = "'+Devices[memberself.numberDevicesPerMember+self.devRawData].sValue+'"') 2024-03-30 11:48:47.190 Error: Location: KeyError: 27

Proposal is to validate the last character of the input is a semi colon (and if so, remove that from the data entry).

TurnOfAFriendlyCard commented 4 months ago

Solved in version 3.0.1

Sloeber71 commented 4 months ago

Hello, I had the same problem with the errors in the log file. These were generated at random. After the update they disappeared.

I plan to use the plugin as a replacement for LIfe360. I will test this further. Thanks in advance for the alternative to Life360

Using the latest beta version of domoticz on Debian 12 Bookworm Standard.