home-assistant / core

:house_with_garden: Open source home automation that puts local control and privacy first.
https://www.home-assistant.io
Apache License 2.0
73.41k stars 30.65k forks source link

ZHC5010 button clicks not recognized in HA #5233

Closed kibs closed 7 years ago

kibs commented 7 years ago

Home Assistant release (hass --version):: 0.35.3

Python release (python3 --version):: 3.4.2

Component/platform:: switch/zwave

Description of problem:: I have added a ZHC5010 (http://logichome.dk/index.php/products/3-zhc5010-z-wave-switch-module-for-fuga-installations) which is being recognized by OZW and HA just fine. In HA the switch will turn up as 5 switches, 1 master & 4 logical which represents the 4 buttons. The device has 1 internal relay which can be toggled by turning on/off the master switch (or the button associated with the relay, if that is the case)

When toggling the switches using HA, the buttons are "clicked" and the LED is lighting just fine. But if clicking the physical button, HA state is not updated, switch is marked off on HA even though the button state really is ON.

When looking through the logs, an zwave.node_event is received when a button is clicked, but the object id are all the same (this is a bug right?), so I can't make an automation setting the internal state in HA.

Expected:: That the switch state in HA is updated when the button are clicked, and that object_id is different for each of the buttons when receiving a node_event.

Additional info:

log when all 4 buttons where clicked. object id all the same even though that is 4 different buttons.

jan 08 23:46:13 raspberrypi hass[9186]: INFO:homeassistant.core:Bus:Handling <Event zwave.node_event[L]: object_id=logic_soft_zhc5010_wall_switch_4, basic_level=0>
jan 08 23:46:13 raspberrypi hass[9186]: INFO:homeassistant.core:Bus:Handling <Event zwave.node_event[L]: object_id=logic_soft_zhc5010_wall_switch_4, basic_level=0>
jan 08 23:46:14 raspberrypi hass[9186]: INFO:homeassistant.core:Bus:Handling <Event zwave.node_event[L]: object_id=logic_soft_zhc5010_wall_switch_4, basic_level=0>
jan 08 23:46:14 raspberrypi hass[9186]: INFO:homeassistant.core:Bus:Handling <Event zwave.node_event[L]: object_id=logic_soft_zhc5010_wall_switch_4, basic_level=0>

log from OZW when two different buttons were clicked.

2017-01-08 23:51:58.064 Detail, Node004,   Received: 0x01, 0x0b, 0x00, 0x04, 0x00, 0x04, 0x05, 0x5b, 0x03, 0x18, 0x00, 0x04, 0xb5
2017-01-08 23:51:58.064 Detail,
2017-01-08 23:51:58.065 Info, Node004, Received Central Scene set from node 4: scene id=4 in 0 seconds. Sending event notification.
2017-01-08 23:51:58.065 Warning, Node004, No ValueID created for Scene 4
2017-01-08 23:51:58.084 Detail, Node004,   Received: 0x01, 0x09, 0x00, 0x04, 0x00, 0x04, 0x03, 0x20, 0x03, 0x00, 0xd6
2017-01-08 23:51:58.085 Detail,
2017-01-08 23:51:58.085 Info, Node004, Received Basic report from node 4: level=0
2017-01-08 23:51:58.085 Detail, Node004, Queuing (Send) SwitchBinaryCmd_Get (Node=4): 0x01, 0x09, 0x00, 0x13, 0x04, 0x02, 0x25, 0x02, 0x25, 0x87, 0x66
2017-01-08 23:51:58.085 Detail,
2017-01-08 23:51:58.085 Info, Node004, Sending (Send) message (Callback ID=0x87, Expected Reply=0x04) - SwitchBinaryCmd_Get (Node=4): 0x01, 0x09, 0x00, 0x13, 0x04, 0x02, 0x25, 0x02, 0x25, 0x87, 0x66
2017-01-08 23:51:58.094 Detail, Node004,   Received: 0x01, 0x04, 0x01, 0x13, 0x01, 0xe8
2017-01-08 23:51:58.095 Detail, Node004,   ZW_SEND_DATA delivered to Z-Wave stack
2017-01-08 23:51:58.104 Detail, Node004,   Received: 0x01, 0x09, 0x00, 0x04, 0x00, 0x04, 0x03, 0x20, 0x01, 0x00, 0xd4
2017-01-08 23:51:58.104 Detail,
2017-01-08 23:51:58.104 Info, Node004, Response RTT 18 Average Response RTT 32
2017-01-08 23:51:58.104 Info, Node004, Received Basic set from node 4: level=0.  Sending event notification.
2017-01-08 23:51:58.104 Detail, Node004, Notification: NodeEvent
2017-01-08 23:51:58.125 Detail, Node004,   Received: 0x01, 0x07, 0x00, 0x13, 0x87, 0x00, 0x00, 0x04, 0x68
2017-01-08 23:51:58.125 Detail, Node004,   ZW_SEND_DATA Request with callback ID 0x87 received (expected 0x87)
2017-01-08 23:51:58.125 Info, Node004, Request RTT 39 Average Request RTT 41
2017-01-08 23:51:58.125 Detail,   Expected callbackId was received
2017-01-08 23:51:58.136 Detail, Node004,   Received: 0x01, 0x09, 0x00, 0x04, 0x00, 0x04, 0x03, 0x25, 0x01, 0x00, 0xd1
2017-01-08 23:51:58.136 Detail,
2017-01-08 23:51:58.138 Info, Node004, Response RTT 52 Average Response RTT 42
2017-01-08 23:51:58.138 Detail, Node004,   Expected reply and command class was received
2017-01-08 23:51:58.139 Detail, Node004,   Message transaction complete
2017-01-08 23:51:58.139 Detail,
2017-01-08 23:51:58.139 Detail, Node004, Removing current message
2017-01-08 23:51:58.156 Detail, Node004,   Received: 0x01, 0x08, 0x00, 0x04, 0x00, 0x04, 0x02, 0x28, 0x01, 0xdc
2017-01-08 23:51:58.156 Detail,
2017-01-08 23:51:58.175 Detail, Node004,   Received: 0x01, 0x0a, 0x00, 0x04, 0x00, 0x04, 0x04, 0x26, 0x01, 0x00, 0x00, 0xd6
2017-01-08 23:51:58.175 Detail,
2017-01-08 23:51:58.195 Detail, Node004,   Received: 0x01, 0x09, 0x00, 0x04, 0x00, 0x04, 0x03, 0x25, 0x03, 0xff, 0x2c
2017-01-08 23:51:58.195 Detail,
2017-01-08 23:51:58.195 Info, Node004, Received SwitchBinary report from node 4: level=On
2017-01-08 23:51:58.195 Detail, Node004, Refreshed Value: old value=true, new value=true, type=bool
2017-01-08 23:51:58.195 Detail, Node004, Changes to this value are not verified
2017-01-08 23:51:58.196 Detail, Node004, Notification: ValueChanged

2017-01-08 23:52:05.925 Detail, Node004,   Received: 0x01, 0x0b, 0x00, 0x04, 0x00, 0x04, 0x05, 0x5b, 0x03, 0x19, 0x00, 0x03, 0xb3
2017-01-08 23:52:05.925 Detail,
2017-01-08 23:52:05.925 Info, Node004, Received Central Scene set from node 4: scene id=3 in 0 seconds. Sending event notification.
2017-01-08 23:52:05.925 Warning, Node004, No ValueID created for Scene 3
2017-01-08 23:52:05.944 Detail, Node004,   Received: 0x01, 0x09, 0x00, 0x04, 0x00, 0x04, 0x03, 0x20, 0x03, 0x00, 0xd6
2017-01-08 23:52:05.944 Detail,
2017-01-08 23:52:05.944 Info, Node004, Received Basic report from node 4: level=0
2017-01-08 23:52:05.944 Detail, Node004, Queuing (Send) SwitchBinaryCmd_Get (Node=4): 0x01, 0x09, 0x00, 0x13, 0x04, 0x02, 0x25, 0x02, 0x25, 0x88, 0x69
2017-01-08 23:52:05.945 Detail,
2017-01-08 23:52:05.945 Info, Node004, Sending (Send) message (Callback ID=0x88, Expected Reply=0x04) - SwitchBinaryCmd_Get (Node=4): 0x01, 0x09, 0x00, 0x13, 0x04, 0x02, 0x25, 0x02, 0x25, 0x88, 0x69
2017-01-08 23:52:05.953 Detail, Node004,   Received: 0x01, 0x04, 0x01, 0x13, 0x01, 0xe8
2017-01-08 23:52:05.953 Detail, Node004,   ZW_SEND_DATA delivered to Z-Wave stack
2017-01-08 23:52:05.976 Detail, Node004,   Received: 0x01, 0x07, 0x00, 0x13, 0x88, 0x00, 0x00, 0x03, 0x60
2017-01-08 23:52:05.976 Detail, Node004,   ZW_SEND_DATA Request with callback ID 0x88 received (expected 0x88)
2017-01-08 23:52:05.977 Info, Node004, Request RTT 31 Average Request RTT 36
2017-01-08 23:52:05.977 Detail,   Expected callbackId was received
2017-01-08 23:52:06.012 Detail, Node004,   Received: 0x01, 0x09, 0x00, 0x04, 0x00, 0x04, 0x03, 0x20, 0x01, 0x00, 0xd4
2017-01-08 23:52:06.012 Detail,
2017-01-08 23:52:06.012 Info, Node004, Response RTT 67 Average Response RTT 54
2017-01-08 23:52:06.012 Info, Node004, Received Basic set from node 4: level=0.  Sending event notification.
2017-01-08 23:52:06.012 Detail, Node004, Notification: NodeEvent
2017-01-08 23:52:06.032 Detail, Node004,   Received: 0x01, 0x09, 0x00, 0x04, 0x00, 0x04, 0x03, 0x25, 0x01, 0x00, 0xd1
2017-01-08 23:52:06.032 Detail,
2017-01-08 23:52:06.033 Info, Node004, Response RTT 88 Average Response RTT 71
2017-01-08 23:52:06.033 Detail, Node004,   Expected reply and command class was received
2017-01-08 23:52:06.033 Detail, Node004,   Message transaction complete
2017-01-08 23:52:06.033 Detail,
2017-01-08 23:52:06.033 Detail, Node004, Removing current message
2017-01-08 23:52:06.051 Detail, Node004,   Received: 0x01, 0x08, 0x00, 0x04, 0x00, 0x04, 0x02, 0x28, 0x01, 0xdc
2017-01-08 23:52:06.051 Detail,
2017-01-08 23:52:06.070 Detail, Node004,   Received: 0x01, 0x0a, 0x00, 0x04, 0x00, 0x04, 0x04, 0x26, 0x01, 0x00, 0x00, 0xd6
2017-01-08 23:52:06.071 Detail,
2017-01-08 23:52:06.091 Detail, Node004,   Received: 0x01, 0x09, 0x00, 0x04, 0x00, 0x04, 0x03, 0x25, 0x03, 0xff, 0x2c
2017-01-08 23:52:06.091 Detail,
2017-01-08 23:52:06.091 Info, Node004, Received SwitchBinary report from node 4: level=On
2017-01-08 23:52:06.091 Detail, Node004, Refreshed Value: old value=true, new value=true, type=bool
2017-01-08 23:52:06.091 Detail, Node004, Changes to this value are not verified
2017-01-08 23:52:06.091 Detail, Node004, Notification: ValueChanged
kibs commented 7 years ago

I think it is somewhat related to the scene stuff, the unit is sending a scene id which is different for each button

kibs commented 7 years ago

problem was solved using help in this issue https://github.com/OpenZWave/open-zwave/pull/1025#issuecomment-271178707