@waaren: great script BUT, I have a bunch of zwave door sensors that have a 12h wakeup. Unfortunately, lastupdate does not reflect the wakeup but the door state. When querying domoticz, I see both dates but your script (i.e. dzventz) only reports the update state.
Ideally, I would want to monitor all battery devices. Whilst I already monitor battery states, these sometimes drop too fast in order to be correctly reported on
.
Here's the device response from domoticz. If we could get the first lastupdate from dzvents then would that be the device wakeup timer?
Code: Select all
{
"Description" : "BeNext Door Sensor",
"HaveUserCodes" : false,
"HomeID" : 3663738776,
"IsPlus" : false,
"LastUpdate" : "2018-03-31 12:33:14",
"Manufacturer_id" : "0x008a",
"Manufacturer_name" : "BeNext",
"Name" : "Zijdeur Sensor",
"NodeID" : 33,
"PollEnabled" : "false",
"Product_id" : "0x0101",
"Product_name" : "Door Sensor",
"Product_type" : "0x0004",
"State" : "Sleeping",
"Version" : 4,
"config" : [
{
"LastUpdate" : "2018-03-29 21:27:17",
"help" : "Set all configuration values to default values (factory settings).",
"index" : 1,
"label" : "Set to Default",
"type" : "byte",
"units" : "",
"value" : "255"
},
{
"LastUpdate" : "2018-03-29 21:27:17",
"help" : "Configure what the external contact sends when triggered. (Default: 0)",
"index" : 2,
"label" : "External Contact",
"list_items" : 2,
"listitem" : [
"Send a alarm report with type 2.",
"Send a Basic set frame to all nodes in association group 2."
],
"type" : "list",
"units" : "",
"value" : "Send a alarm report with type 2."
},
{
"LastUpdate" : "2018-03-29 21:27:17",
"help" : "Is not used but can still be set and requested.",
"index" : 3,
"label" : "Not used",
"type" : "byte",
"units" : "",
"value" : "0"
},
{
"LastUpdate" : "2018-03-29 21:27:17",
"help" : "Is not used but can still be set and requested.",
"index" : 4,
"label" : "Not used",
"type" : "byte",
"units" : "",
"value" : "0"
},
{
"LastUpdate" : "2018-03-29 21:27:17",
"help" : "To configure the operating mode. (Default: 1)",
"index" : 5,
"label" : "The Mode",
"type" : "byte",
"units" : "",
"value" : "1"
},
{
"LastUpdate" : "2018-03-29 21:27:17",
"help" : "A signed integer to determine the offset of the temperature. (Default: 0)",
"index" : 6,
"label" : "Temperature offset",
"type" : "int",
"units" : "",
"value" : "0"
},
{
"LastUpdate" : "2018-03-29 21:27:17",
"help" : "Debounce time when the external contact is opened. (Default: 0)",
"index" : 7,
"label" : "Extern Contact Debounce ON",
"type" : "byte",
"units" : "",
"value" : "0"
},
{
"LastUpdate" : "2018-03-29 21:27:17",
"help" : "Debounce time when the external contact is opened. (Default 0)",
"index" : 8,
"label" : "Extern Contact Debounce OFF",
"type" : "byte",
"units" : "",
"value" : "0"
},
{
"LastUpdate" : "2018-03-29 21:27:17",
"help" : "A delay from the wake up time to give the external contact a chance to change his status. (Default 0, value * 100 ms, 0 - 25,5 seconds)",
"index" : 9,
"label" : "Wake up delay",
"type" : "byte",
"units" : "",
"value" : "0"
},
{
"LastUpdate" : "2018-03-29 21:35:08",
"help" : "",
"index" : 2000,
"label" : "Wake-up Interval",
"type" : "int",
"units" : "Seconds",
"value" : "7200"
}
],
"idx" : "18"
},