Code: Select all
{
"ActTime" : 1646222947,
"AstrTwilightEnd" : "20:07",
"AstrTwilightStart" : "05:24",
"CivTwilightEnd" : "18:48",
"CivTwilightStart" : "06:43",
"DayLength" : "10:57",
"NautTwilightEnd" : "19:27",
"NautTwilightStart" : "06:04",
"ServerTime" : "2022-03-02 13:09:07",
"SunAtSouth" : "12:45",
"Sunrise" : "07:17",
"Sunset" : "18:14",
"app_version" : "2022.1",
"result" :
[
{
"AddjMulti" : 1.0,
"AddjMulti2" : 1.0,
"AddjValue" : 0.0,
"AddjValue2" : 0.0,
"BatteryLevel" : 255,
"Counter" : "41302.327",
"CounterDeliv" : "30324.101",
"CounterDelivToday" : "3.904 kWh",
"CounterToday" : "10.114 kWh",
"CustomImage" : 0,
"Data" : "26879169;14423158;8768692;21555409;0;2900",
"Description" : "",
"Favorite" : 0,
"HardwareDisabled" : false,
"HardwareID" : 4,
"HardwareName" : "P1 smart meter",
"HardwareType" : "P1 Smart Meter USB",
"HardwareTypeVal" : 4,
"HaveTimeout" : false,
"ID" : "0001",
"LastUpdate" : "2022-03-02 13:09:02",
"Name" : "Power",
"Notifications" : "false",
"PlanID" : "0",
"PlanIDs" :
[
0
],
"Protected" : false,
"ShowNotifications" : true,
"SignalLevel" : "-",
"SubType" : "Energy",
"SwitchTypeVal" : 0,
"Timers" : "false",
"Type" : "P1 Smart Meter",
"TypeImg" : "counter",
"Unit" : 1,
"Usage" : "0 Watt",
"UsageDeliv" : "2900 Watt",
"Used" : 1,
"XOffset" : "0",
"YOffset" : "0",
"idx" : "15"
}
],
"status" : "OK",
"title" : "Devices"Code: Select all
"Usage" : "0 Watt",
"UsageDeliv" : "2900 Watt",Code: Select all
local power_usage = dz.devices(POWER).usage
Code: Select all
local power_delivery = dz.devices(POWER).usagedelivCode: Select all
dz.log('Delivery : ' .. power_delivery, dz.LOG_DEBUG)The usage gives me values from 0 up to 3000 and more
The delivery, indicated as 2900 gives me this NIL value.
What is the secret code to use other than usagedeliv or change that NIL value bug.