wlevels wrote:I'm still getting errors on my Domoticz V3.4834 installation on my Raspberry.
I tried all the previous possible solutions, I added some print commands in the lua script and I can see my iphone gets tracked as expected, however line 55 keeps giving me an error:
Code: Select all
2016-09-16 14:50:03.684 LUA: 5.6282889499935
2016-09-16 14:50:03.684 LUA: 51.485975960002
2016-09-16 14:50:03.685 LUA: 4609.870379533
2016-09-16 14:50:05.629 LUA: Rode Beemden 27, 5708 AW Helmond, Netherlands
2016-09-16 14:50:05.630 Error: EventSystem: in /home/pi/domoticz/scripts/lua/script_time_checkphones.lua: /home/pi/domoticz/scripts/lua/script_time_checkphones.lua:55: bad argument #1 to 'match' (string expected, got nil)
Line 55 is:
Code: Select all
prev_distance_str = string.match(otherdevices['Position ' .. user], '%(.*%)') or '(1000 km)'
Tried changing it to otherdevices_svalues but no joy.
Thanks!
I notice two things:
First of all, I assume the large numer (4609.870379533) is the result of a print(distance), right? You seem to be a very long way from home then... Are you sure you filled in the homelongitude and homelatitude correctly? Did you maybe reverse them by any chance?
Secondly, if this line gives an error, then this means otherdevices['Position ' .. user] is not a string. Are you sure you have dummy text devices for every user named "Position Person1", "Position Person2" etc.? Obviuosly Replacing "Person1" etc. with what you replaced "Person1" etc. with in the definition of the "user" array in the top of the script. So if your user array is
Code: Select all
users = {
Henk = {username = '[email protected]' ; password = 'datzegiklekkerniet' ; devicename = 'iPhone van Henk'};
Ingrid = {username = '[email protected]' ; password = 'wachtwoord' ; devicename = 'iPhone van Ingrid'};
}
Then your text devices should be named "Position Henk" and "Position Ingrid".
Hope this brings you a step further. I think you're almost there.
Raspberry Pi 4 - RFXtrx433 - CC2531 Zigbee - Opentherm Gateway - P1 smart meter - Netatmo - Philips Hue - ELV Max! - ESP8266 DIY water meter - 6 x Sonos - 4 x IP cameras - Wall mounted tablet + Dashticz - Google Home integration - MANY switches/sensors