Page 1 of 1

ZD 2102 secondary input

Posted: 07 Nov 2015 14:42
by maros
The Vision ZD2102 (and probably also the ZD2102-5, which i do not own) sensor has an additional input for a secondary external reed-sensor (just like the Fibaro door/window sensor). Here's a quote from the manual:
External Switch: If your window need two sensors for fully monitoring. You could use an external switch to connect with the ZD2102 for extending detection. The ZD2102 has 2 normally closed contact terminals. These can be used for additional external switch wired contacts.
However the zway software does not create a device for accessing the status of the external sensor. The logs clearly show that the secondary sensor reports something. At least an alarm frame is sent which can be used to distinguish between the sources of the alarm command (secondard: event = 254, primary: event=2)

Open external sensor:

Code: Select all

[2015-11-07 12:35:40.829] [D] [zway] RECEIVED: ( 01 10 00 04 00 0F 0A 71 05 07 FF 00 FF 07 FE 00 00 64 )
[2015-11-07 12:35:40.829] [D] [zway] SENT ACK
[2015-11-07 12:35:40.829] [D] [zway] SETDATA devices.15.data.lastReceived = 0 (0x00000000)
[2015-11-07 12:35:40.829] [D] [zway] SETDATA devices.15.instances.0.commandClasses.113.data.V1event.alarmType = 7 (0x00000007)
[2015-11-07 12:35:40.830] [D] [zway] SETDATA devices.15.instances.0.commandClasses.113.data.V1event.level = 255 (0x000000ff)
[2015-11-07 12:35:40.830] [D] [zway] SETDATA devices.15.instances.0.commandClasses.113.data.V1event = Empty
[2015-11-07 12:35:40.830] [D] [zway] SETDATA devices.15.instances.0.commandClasses.113.data.7.eventParameters = byte[0]
[2015-11-07 12:35:40.830] [D] [zway]   ( zero-length buffer )
[2015-11-07 12:35:40.830] [D] [zway] SETDATA devices.15.instances.0.commandClasses.113.data.7.event = 254 (0x000000fe)
[2015-11-07 12:35:40.832] [D] [zway] SETDATA devices.15.instances.0.commandClasses.113.data.7.eventString = "unknown"
[2015-11-07 12:35:40.832] [D] [zway] SETDATA devices.15.instances.0.commandClasses.113.data.7.status = 255 (0x000000ff)
[2015-11-07 12:35:40.832] [D] [zway] SETDATA devices.15.instances.0.commandClasses.113.data.7 = Empty
Close external sensor

Code: Select all

[2015-11-07 12:35:45.241] [D] [zway] RECEIVED: ( 01 10 00 04 00 0F 0A 71 05 07 00 00 FF 07 FE 00 00 9B )
[2015-11-07 12:35:45.242] [D] [zway] SENT ACK
[2015-11-07 12:35:45.242] [D] [zway] SETDATA devices.15.data.lastReceived = 0 (0x00000000)
[2015-11-07 12:35:45.242] [D] [zway] SETDATA devices.15.instances.0.commandClasses.113.data.V1event.alarmType = 7 (0x00000007)
[2015-11-07 12:35:45.243] [D] [zway] SETDATA devices.15.instances.0.commandClasses.113.data.V1event.level = 0 (0x00000000)
[2015-11-07 12:35:45.243] [D] [zway] SETDATA devices.15.instances.0.commandClasses.113.data.V1event = Empty
[2015-11-07 12:35:45.243] [D] [zway] SETDATA devices.15.instances.0.commandClasses.113.data.7.eventParameters = byte[0]
[2015-11-07 12:35:45.243] [D] [zway]   ( zero-length buffer )
[2015-11-07 12:35:45.244] [D] [zway] SETDATA devices.15.instances.0.commandClasses.113.data.7.event = 254 (0x000000fe)
[2015-11-07 12:35:45.246] [D] [zway] SETDATA devices.15.instances.0.commandClasses.113.data.7.eventString = "unknown"
[2015-11-07 12:35:45.246] [D] [zway] SETDATA devices.15.instances.0.commandClasses.113.data.7.status = 255 (0x000000ff)
[2015-11-07 12:35:45.246] [D] [zway] SETDATA devices.15.instances.0.commandClasses.113.data.7 = Empty
Open internal sensor:

Code: Select all

[2015-11-07 12:38:36.875] [D] [zway] RECEIVED: ( 01 09 00 04 00 0F 03 20 01 FF 20 )
[2015-11-07 12:38:36.875] [D] [zway] SENT ACK
[2015-11-07 12:38:36.876] [D] [zway] SETDATA devices.15.data.lastReceived = 0 (0x00000000)
[2015-11-07 12:38:36.876] [D] [zway] SETDATA devices.1.instances.0.commandClasses.32.data.srcNodeId = 15 (0x0000000f)
[2015-11-07 12:38:36.876] [D] [zway] SETDATA devices.1.instances.0.commandClasses.32.data.srcInstanceId = 0 (0x00000000)
[2015-11-07 12:38:36.876] [D] [zway] SETDATA devices.1.instances.0.commandClasses.32.data.level = 255 (0x000000ff)
[2015-11-07 12:38:36.877] [D] [zway] SETDATA devices.15.instances.0.commandClasses.48.data.1.level = True
[2015-11-07 12:38:36.877] [D] [zway] SETDATA devices.15.instances.0.commandClasses.48.data.1 = Empty
[2015-11-07 12:38:36.956] [D] [zway] RECEIVED: ( 01 10 00 04 00 0F 0A 71 05 07 FF 00 FF 07 02 00 00 98 )
[2015-11-07 12:38:36.956] [D] [zway] SENT ACK
[2015-11-07 12:38:36.957] [D] [zway] SETDATA devices.15.data.lastReceived = 0 (0x00000000)
[2015-11-07 12:38:36.957] [D] [zway] SETDATA devices.15.instances.0.commandClasses.113.data.V1event.alarmType = 7 (0x00000007)
[2015-11-07 12:38:36.957] [D] [zway] SETDATA devices.15.instances.0.commandClasses.113.data.V1event.level = 255 (0x000000ff)
[2015-11-07 12:38:36.957] [D] [zway] SETDATA devices.15.instances.0.commandClasses.113.data.V1event = Empty
[2015-11-07 12:38:36.958] [D] [zway] SETDATA devices.15.instances.0.commandClasses.113.data.7.eventParameters = byte[0]
[2015-11-07 12:38:36.958] [D] [zway]   ( zero-length buffer )
[2015-11-07 12:38:36.958] [D] [zway] SETDATA devices.15.instances.0.commandClasses.113.data.7.event = 2 (0x00000002)
[2015-11-07 12:38:36.960] [D] [zway] SETDATA devices.15.instances.0.commandClasses.113.data.7.eventString = "Intrusion, location unknown"
[2015-11-07 12:38:36.961] [D] [zway] SETDATA devices.15.instances.0.commandClasses.113.data.7.status = 255 (0x000000ff)
[2015-11-07 12:38:36.961] [D] [zway] SETDATA devices.15.instances.0.commandClasses.113.data.7 = Empty
Close internal sensor:

Code: Select all

[2015-11-07 12:38:41.591] [D] [zway] RECEIVED: ( 01 09 00 04 00 0F 03 20 01 00 DF )
[2015-11-07 12:38:41.592] [D] [zway] SENT ACK
[2015-11-07 12:38:41.592] [D] [zway] SETDATA devices.15.data.lastReceived = 0 (0x00000000)
[2015-11-07 12:38:41.592] [D] [zway] SETDATA devices.1.instances.0.commandClasses.32.data.srcNodeId = 15 (0x0000000f)
[2015-11-07 12:38:41.593] [D] [zway] SETDATA devices.1.instances.0.commandClasses.32.data.srcInstanceId = 0 (0x00000000)
[2015-11-07 12:38:41.593] [D] [zway] SETDATA devices.1.instances.0.commandClasses.32.data.level = 0 (0x00000000)
[2015-11-07 12:38:41.593] [D] [zway] SETDATA devices.15.instances.0.commandClasses.48.data.1.level = False
[2015-11-07 12:38:41.594] [D] [zway] SETDATA devices.15.instances.0.commandClasses.48.data.1 = Empty
[2015-11-07 12:38:41.611] [D] [zway] RECEIVED: ( 01 10 00 04 00 0F 0A 71 05 07 00 00 FF 07 02 00 00 67 )
[2015-11-07 12:38:41.611] [D] [zway] SENT ACK
[2015-11-07 12:38:41.612] [D] [zway] SETDATA devices.15.data.lastReceived = 0 (0x00000000)
[2015-11-07 12:38:41.612] [D] [zway] SETDATA devices.15.instances.0.commandClasses.113.data.V1event.alarmType = 7 (0x00000007)
[2015-11-07 12:38:41.612] [D] [zway] SETDATA devices.15.instances.0.commandClasses.113.data.V1event.level = 0 (0x00000000)
[2015-11-07 12:38:41.613] [D] [zway] SETDATA devices.15.instances.0.commandClasses.113.data.V1event = Empty
[2015-11-07 12:38:41.613] [D] [zway] SETDATA devices.15.instances.0.commandClasses.113.data.7.eventParameters = byte[0]
[2015-11-07 12:38:41.614] [D] [zway]   ( zero-length buffer )
[2015-11-07 12:38:41.614] [D] [zway] SETDATA devices.15.instances.0.commandClasses.113.data.7.event = 2 (0x00000002)
[2015-11-07 12:38:41.617] [D] [zway] SETDATA devices.15.instances.0.commandClasses.113.data.7.eventString = "Intrusion, location unknown"
[2015-11-07 12:38:41.617] [D] [zway] SETDATA devices.15.instances.0.commandClasses.113.data.7.status = 255 (0x000000ff)
[2015-11-07 12:38:41.618] [D] [zway] SETDATA devices.15.instances.0.commandClasses.113.data.7 = Empty
Furthermore no zway device is created that handles the reports of the tamper switch. In contrast Fibaro door/window sensor is implemented correctly: External-, internal- and tamper-sensor create one device each.

Would be great if this could be fixed.

Re: ZD 2102 secondary input

Posted: 10 Nov 2015 01:21
by maros
After a bit of investigating, this seems to be very hard to fix in a generic fashion. Therefore I created an automation module to handle the quirks of this device. https://github.com/maros/Zway-VisionZD2102 However, it'm running into problems when binding events to data holders:

Binding to device[d].instance.commandClasses[0x71].data does not fire any events. On the other hand
device[d].instance.commandClasses[0x71].data.V1event works. Any idea why?

Re: ZD 2102 secondary input

Posted: 15 Nov 2015 02:42
by PoltoS
Strange, I remember I wrote the answer, but can't find it....

Again:
In latest (rc15) we have added handling of event 0xfe (254) used for external open/close. So, you will have two widgets.

But! The device is wrong, so it reports value "off/close" not by clearing the event as expected, but by using V1 level field. This is not legal... So your module is probably good to have.

[2015-11-07 12:38:41.618] [D] [zway] SETDATA devices.15.instances.0.commandClasses.113.data.7 = Empty
This line should trigger update of binding to "7" field. May be you troed to bind to something else?

Re: ZD 2102 secondary input

Posted: 18 Jul 2016 14:22
by pz1
Maros,

After adding your ZD2102 app, I got the element on the left as a new device in my existing (v2.2.3) installation. (don't have a reed switch connected to it yet)
ZD2102EU.PNG
ZD2102EU.PNG (14.1 KiB) Viewed 6941 times
Is that intended behaviour?