I'm getting lost
The device is a device with a slave. Maybe that is the strange thing about this device why it can't be detected as swithed.
It only triggers the script on opening the door, not on closing.
I have gone through the dump() and the debug but I cannot find any valua that is changing.
Very strange as I see the Open en Closed in Domoticz changing. It works in Domoticz GUI.
Also when I do a JSON call on the device I see states change. But not in Dzvents (Blocky doesn't switch on it as well)
What I tried for a test is to take action on an on and off state, just in the config of Domoticz.
Also not working. It seems that the state is handled differently as what Domoticz GUI tells me.
The JSON of both states, see InternalState and Data:
Code: Select all
{
"ActTime" : 1501699751,
"ServerTime" : "2017-08-02 20:49:11",
"Sunrise" : "06:04",
"Sunset" : "21:27",
"result" : [
{
"AddjMulti" : 1.0,
"AddjMulti2" : 1.0,
"AddjValue" : 0.0,
"AddjValue2" : 0.0,
"BatteryLevel" : 255,
"CustomImage" : 0,
"Data" : "Closed",
"Description" : "",
"Favorite" : 1,
"HardwareID" : 12,
"HardwareName" : "RFLink",
"HardwareType" : "RFLink Gateway USB",
"HardwareTypeVal" : 46,
"HaveDimmer" : false,
"HaveGroupCmd" : false,
"HaveTimeout" : false,
"ID" : "0003B2C0",
"Image" : "Light",
"InternalState" : "Closed",
"IsSubDevice" : true,
"LastUpdate" : "2017-08-02 20:46:05",
"Level" : 0,
"LevelInt" : 0,
"MaxDimLevel" : 100,
"Name" : "Achterdeur",
"Notifications" : "false",
"PlanID" : "0",
"PlanIDs" : [ 0 ],
"Protected" : false,
"ShowNotifications" : true,
"SignalLevel" : "-",
"Status" : "Closed",
"StrParam1" : "",
"StrParam2" : "",
"SubType" : "EV1527",
"SwitchType" : "Door Contact",
"SwitchTypeVal" : 11,
"Timers" : "false",
"Type" : "Light/Switch",
"TypeImg" : "door",
"Unit" : 10,
"Used" : 1,
"UsedByCamera" : false,
"XOffset" : "0",
"YOffset" : "0",
"idx" : "82"
}
],
"status" : "OK",
"title" : "Devices"
}
Code: Select all
{
"ActTime" : 1501704557,
"ServerTime" : "2017-08-02 22:09:17",
"Sunrise" : "06:04",
"Sunset" : "21:27",
"result" : [
{
"AddjMulti" : 1.0,
"AddjMulti2" : 1.0,
"AddjValue" : 0.0,
"AddjValue2" : 0.0,
"BatteryLevel" : 255,
"CustomImage" : 0,
"Data" : "Open",
"Description" : "",
"Favorite" : 1,
"HardwareID" : 12,
"HardwareName" : "RFLink",
"HardwareType" : "RFLink Gateway USB",
"HardwareTypeVal" : 46,
"HaveDimmer" : false,
"HaveGroupCmd" : false,
"HaveTimeout" : false,
"ID" : "0003B2C0",
"Image" : "Light",
"InternalState" : "Open",
"IsSubDevice" : true,
"LastUpdate" : "2017-08-02 21:51:35",
"Level" : 0,
"LevelInt" : 0,
"MaxDimLevel" : 100,
"Name" : "Achterdeur",
"Notifications" : "false",
"PlanID" : "0",
"PlanIDs" : [ 0 ],
"Protected" : false,
"ShowNotifications" : true,
"SignalLevel" : "-",
"Status" : "Open",
"StrParam1" : "",
"StrParam2" : "",
"SubType" : "EV1527",
"SwitchType" : "Door Contact",
"SwitchTypeVal" : 11,
"Timers" : "false",
"Type" : "Light/Switch",
"TypeImg" : "door",
"Unit" : 10,
"Used" : 1,
"UsedByCamera" : false,
"XOffset" : "0",
"YOffset" : "0",
"idx" : "82"
}
],
"status" : "OK",
"title" : "Devices"
}
I'm now looking in to fetching these JSON call and switch on this data. Not very clean solution I guess.