Difference between revisions of "String devices.system.output1 consumptionStart"

From wiki.netio-products.com
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.…“)
 
Line 1: Line 1:
 
{{DISPLAYTITLE:string devices.system.output1_consumptionStart}}
 
{{DISPLAYTITLE:string devices.system.output1_consumptionStart}}
Date and time since the last reset of the consumption counter. See [[Number devices.system.output1 cumulatedConsumption| devices.system.output1 cumulatedConsumption]]. <b>The property is read only!</b>  
+
Date and time since the last reset of the consumption counter. See [[Number devices.system.output1 cumulatedConsumption| devices.system.output1_cumulatedConsumption]]. <b>The property is read only!</b>  
  
 
last consumption counter reset of outlet 1:
 
last consumption counter reset of outlet 1:

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])

See also