Difference between revisions of "String devices.system.output1 consumptionStart"
Jump to navigation
Jump to search
(Založena nová stránka s textem „{{DISPLAYTITLE:string devices.system.output1_consumptionStart}} Date and time since the last reset of the consumption counter. See Number devices.system.…“) |
(No difference)
|
Revision as of 11:04, 15 April 2017
Date and time since the last reset of the consumption counter. See devices.system.output1 cumulatedConsumption. The property is read only!
last consumption counter reset of outlet 1:
string devices.system.output1_consumptionStart
last consumption counter reset of outlet 2:
string devices.system.output2_consumptionStart
last consumption counter reset of outlet 3:
string devices.system.output3_consumptionStart
last consumption counter reset of outlet 4:
string devices.system.output4_consumptionStart
Value
The format is space separated date and time
YYYY-MM-DD hh:mm:ss
Usage
local cs = devices.system.output1_consumptionStart local date,time = string.match(cs,"(%S+) (%S+)") local dateValues = {} for value in string.gmatch(date,"(%d+)") do table.insert(dateValues,tonumber(value)) end local timeValues = {} for value in string.gmatch(time,"(%d+)") do table.insert(timeValues,tonumber(value)) end logf("Minute of last consumption counter reset: %d",timeValues[2])