node-zwave-js icon indicating copy to clipboard operation
node-zwave-js copied to clipboard

MCOHome S512/S513 report incorrect Central Scene attributes during interview

Open AlCalzone opened this issue 1 year ago • 0 comments

Discussed in https://github.com/zwave-js/node-zwave-js/discussions/6562

Originally posted by @andrewpc December 20, 2023

Checklist

  • [X] I have read and followed the above instructions

  • [X] I have checked the troubleshooting section and my problem is not described there.

  • [X] I have read the changelog and my problem was not mentioned there or the fix did not work.

Describe the issue

During Central Scene interview of MCOHome switch devices they only report one state attribute "KeyPressed". Per the documentation they actually support 6 different states. My devices seem to be sending 'KeyReleased" as default behaviour.

Event ID | Event Description 0 | Single key press 1 | Key released 2 | Key held down 3 | Double keypress 4 | Tripple keypress 5 | 4 x keypress 6 | 5 x keypress

This causes a problem with Home Assistant which errors out due to the event mapping

2023-12-20 11:11:21.337 ERROR (MainThread) [homeassistant.components.zwave_js] Unexpected exception: Invalid event type Central scene scene 002 for event.back_bathroom_main_switch_scene_002
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/zwave_js/__init__.py", line 888, in client_listen
    await client.listen(driver_ready)
  File "/usr/local/lib/python3.11/site-packages/zwave_js_server/client.py", line 284, in listen
    await self.receive_until_closed()
  File "/usr/local/lib/python3.11/site-packages/zwave_js_server/client.py", line 443, in receive_until_closed
    self._handle_incoming_message(data)
  File "/usr/local/lib/python3.11/site-packages/zwave_js_server/client.py", line 532, in _handle_incoming_message
    self.driver.receive_event(event)  # type: ignore
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/zwave_js_server/model/driver.py", line 86, in receive_event
    self.controller.receive_event(event)
  File "/usr/local/lib/python3.11/site-packages/zwave_js_server/model/controller/__init__.py", line 841, in receive_event
    node.receive_event(event)
  File "/usr/local/lib/python3.11/site-packages/zwave_js_server/model/node/__init__.py", line 462, in receive_event
    self.emit(event.type, event.data)
  File "/usr/local/lib/python3.11/site-packages/zwave_js_server/event.py", line 64, in emit
    listener(data)
  File "/usr/src/homeassistant/homeassistant/components/zwave_js/event.py", line 96, in <lambda>
    lambda event: self._async_handle_event(event["value_notification"]),
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/zwave_js/event.py", line 87, in _async_handle_event
    self._trigger_event(event_name, {ATTR_VALUE: notification_value})
  File "/usr/src/homeassistant/homeassistant/components/event/__init__.py", line 146, in _trigger_event
    raise ValueError(f"Invalid event type {event_type} for {self.entity_id}")
ValueError: Invalid event type Central scene scene 002 for event.back_bathroom_main_switch_scene_002

Interview Log extract below:

2023-12-20T01:59:09.842Z CNTRLR   [Node 046] Interviewing Central Scene...
2023-12-20T01:59:09.842Z CNTRLR » [Node 046] Querying supported scenes...
2023-12-20T01:59:09.846Z SERIAL » 0x010900132e025b01259c2a                                            (11 bytes)
2023-12-20T01:59:09.846Z DRIVER » [Node 046] [REQ] [SendData]
                                  │ transmit options: 0x25
                                  │ callback id:      156
                                  └─[CentralSceneCCSupportedGet]
2023-12-20T01:59:09.889Z SERIAL « [ACK]                                                                   (0x06)
2023-12-20T01:59:09.890Z SERIAL « 0x0104011301e8                                                       (6 bytes)
2023-12-20T01:59:09.890Z SERIAL » [ACK]                                                                   (0x06)
2023-12-20T01:59:09.891Z DRIVER « [RES] [SendData]
                                    was sent: true
2023-12-20T01:59:09.891Z SERIAL « 0x010700139c00000275                                                 (9 bytes)
2023-12-20T01:59:09.892Z SERIAL » [ACK]                                                                   (0x06)
2023-12-20T01:59:09.892Z DRIVER « [REQ] [SendData]
                                    callback id:     156
                                    transmit status: OK
2023-12-20T01:59:09.894Z SERIAL « 0x010b0004002e055b0202030182                                        (13 bytes)
2023-12-20T01:59:09.894Z SERIAL » [ACK]                                                                   (0x06)
2023-12-20T01:59:09.895Z CNTRLR   [Node 046] [+] [Central Scene] sceneCount: 2           [Endpoint 0] [internal]
2023-12-20T01:59:09.895Z CNTRLR   [Node 046] [+] [Central Scene] supportedKeyAttributes: [Endpoint 0] [internal]
                                   [object Map]
2023-12-20T01:59:09.896Z CNTRLR   [Node 046] [Central Scene] scene[001]: metadata updated           [Endpoint 0]
2023-12-20T01:59:09.897Z CNTRLR   [Node 046] [Central Scene] scene[002]: metadata updated           [Endpoint 0]
2023-12-20T01:59:09.898Z DRIVER « [Node 046] [REQ] [ApplicationCommand]
                                  └─[CentralSceneCCSupportedReport]
                                      scene count:                     2
                                      supports slow refresh:           undefined
                                      supported attributes (scene #1):
                                      · KeyPressed
                                      supported attributes (scene #2):
                                      · KeyPressed
2023-12-20T01:59:09.899Z CNTRLR « [Node 046] received supported scenes:
                                  # of scenes:           2
                                  supports slow refresh: undefined
2023-12-20T01:59:09.899Z CNTRLR   [Node 046] [+] [Central Scene] interviewComplete: true [Endpoint 0] [internal]

Can this be overridden in device config?

Thanks

Software versions

zwave-js-ui: 9.3.2 zwave-js: 12.3.0

Home Assistant Z-Wave Integration: default in version 12.3

Device information

Manufacturer: MCOHome Model name: S512/S513 Node ID: 46

Checklist

  • [X] I made sure to provide a driver log on level debug.

  • [X] The log includes a re-interview of the problematic device (if applicable).

  • [ ] The log includes the problematic interaction with the device (if applicable).

  • [ ] I provided the node ID of the problematic device (if applicable).

Upload Logfile

zwavejs_current.log

AlCalzone avatar Jan 12 '24 21:01 AlCalzone