using last seen time

Topics (not sure which fora)
when not sure where to post, post here and mods will move it to right forum.

Moderators: leecollings, remb0

Post Reply
JuanUil
Posts: 500
Joined: Friday 22 May 2015 12:21
Target OS: Raspberry Pi / ODroid
Domoticz version: 4.11083
Location: Asten NB Nederland
Contact:

using last seen time

Post 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
Your mind is like a parachute,
It only works when it is opened!

RPI4 several Fibaro, KaKu, Neocoolcam switches, Z-Wave, Zigbee2Mqtt, Ikea bulbs and remote, Zigbee temp nodes
simonrg
Posts: 329
Joined: Tuesday 16 July 2013 22:54
Target OS: Raspberry Pi / ODroid
Domoticz version: 3.8807
Location: North East England
Contact:

Re: using last seen time

Post 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
Raspberry Pi 2 B - 2A@5V PSU - Raspbian + Domoticz + RFXtrx(89), LightwaveRF House(dimmers, sockets, wireless/mood switches), Owl CM113, 4 LaCross Temp / Humidity Sensors, 4 Siemens PIR, Smappee, Solaredge, ESP8266
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest