Page 1 of 1

using last seen time

Posted: Monday 14 December 2015 21:17
by JuanUil
Hi all,

I would like to calculate the time a dummy device (telephone pinged) is last seen till now in a LUA script.
Does anybody know how I can get the timestamp when the device is last seen?

thanks in advance

Jan

Re: using last seen time

Posted: Monday 14 December 2015 22:49
by simonrg
JuanUil wrote:Hi all,

I would like to calculate the time a dummy device (telephone pinged) is last seen till now in a LUA script.
Does anybody know how I can get the timestamp when the device is last seen?

thanks in advance

Jan
The wiki is normally a good place to start and it is for this one - http://www.domoticz.com/wiki/Events

What you want is otherdevices_lastupdate['your device name'] - you can see it used extensively here - http://www.domoticz.com/wiki/Smart_Lua_Scripts