• Professional advice
  • Order before 23.59 uur shipped today
  • Almost always available (+31 73 762 0 762)
  • Monday open late

Fibaro:getModificationTime command

fibaro:getModificationTime()

 

Action :

Recieve the 'time last modified' time from a device 
This function is part of the following group of functions.
 These functions differ only by the returned value.

 

Usage and parameters  :

fibaro:getGlobalModificationTime(DeviceId, property)

  • DeviceID of which you want to recieve data from
  • Property of the device you want to know the value off.


 

Returned value :

A timestamp of when the device was last changed. The returned value is in string-format. Use the tonumber() command if you want to convert it to a number.

 

Programming example :

-- make a request for the time device 11 was last changed
local lastchange = fibaro:getModificationTime(11, 'value');

-- perform an action if this is more than 10 seconds ago.
if ((os.time()) tonumber(lastchange) >= 10 then
   fibaro:debug('its more than 10 seconds ago');
else 
   fibaro:debug('its less than 10 seconds ago');
end 

 

SeeAlso 

fibaro:getValue()

fibaro:getModificationTime()

 
Customer Service Phone

+31737620762
mon-fri: 10am-5pm and sat 10am-3pm

 
Adress

Gerstakker 16 5236 VG Empel Netherlands

Google maps