node-zwave-js: Setting configuration parameter 83 results in error for ZW096/ZW099

Is your problem within Home Assistant (Core or Z-Wave JS Integration)?

YES, BUT a Home Assistant developer has told me to come here

Is your problem within ZWaveJS2MQTT?

NO, my problem is NOT within ZWaveJS2MQTT

Checklist

Describe the bug

What causes the bug? Setting the value for parameter 83 causes an error. This seems to have a relation with issue: https://github.com/zwave-js/node-zwave-js/issues/3036

Trying to run the same YAML as in issue 3036, leads to an error.

service: zwave_js.bulk_set_partial_config_parameters
target:
  entity_id: light.nachtlamp
data:
  parameter: '83'
  value:
    'Night Light: Red Color': 200
    'Night Light: Green Color': 100
    'Night Light: Blue Color': 50

What do you observe? When changing any of the three night light paremeters in Home assistant, it fails and shows in the GUI: Unable to set value, refer to https://zwave-js.github.io/node-zwave-js/#/api/node?id=setvalue for possible reasons

No error is present in the Home Assistant Log however. The Zwave log shows an error (see below). When trying to set 255,255,255 it does want to set -256, which is correct for this value:

Trying to set it manually with the above YAML: Error in Home Assistant log:

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 371, in _async_step
    await getattr(self, handler)()
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 571, in _async_call_service_step
    await service_task
  File "/usr/src/homeassistant/homeassistant/core.py", line 1495, in async_call
    task.result()
  File "/usr/src/homeassistant/homeassistant/core.py", line 1530, in _execute_service
    await handler.job.target(service_call)
  File "/usr/src/homeassistant/homeassistant/components/zwave_js/services.py", line 381, in async_bulk_set_partial_config_parameters
    cmd_status = await async_bulk_set_partial_config_parameters(
  File "/usr/local/lib/python3.9/site-packages/zwave_js_server/util/node.py", line 148, in async_bulk_set_partial_config_parameters
    raise SetValueFailed(
zwave_js_server.exceptions.SetValueFailed: Unable to set value, refer to https://zwave-js.github.io/node-zwave-js/#/api/node?id=setvalue for possible reasons

Error in Zwave log is similar to below.

What did you expect to happen? The night light should change color.

Steps to reproduce the behavior:

  1. Go to the device.
  2. Click on Configure device.
  3. Scroll down to parameter 83 and try to change either one of the colors.
  4. See error

Device information

Manufacturer: AEON Labs Model name: ZW096 (I have a ZW099 which exhibits the same issue) Node ID in your network: 11

How are you using node-zwave-js?

  • zwavejs2mqtt Docker image (latest)
  • zwavejs2mqtt Docker image (dev)
  • zwavejs2mqtt Docker manually built (please specify branches)
  • ioBroker.zwave2 adapter (please specify version)
  • HomeAssistant zwave_js integration (please specify version)
  • pkg
  • node-red-contrib-zwave-js (please specify version, double click node to find out)
  • Manually built from GitHub (please specify branch)
  • Other (please describe)

Which branches or versions?

Version 0.1.49 (Z-Wave JS 8.7.7, Z-Wave JS Server 1.12.0)

Did you change anything?

no

If yes, what did you change?

No response

Did this work before?

Yes (please describe)

If yes, where did it work?

With OZW this worked fine.

Attach Driver Logfile

Error in driver ZWaveError: The value -256 is invalid for configuration parameter 83 (size = 4, format = UnsignedInteger)! (ZW0322)
    at throwInvalidValueError (/usr/src/node_modules/zwave-js/src/lib/commandclass/ConfigurationCC.ts:2441:8)
    at Proxy.ConfigurationCCAPI.<computed> (/usr/src/node_modules/zwave-js/src/lib/commandclass/ConfigurationCC.ts:399:4)
    at ZWaveNode.setValue (/usr/src/node_modules/zwave-js/src/lib/node/Node.ts:827:14)
    at Function.handle (/usr/src/node_modules/@zwave-js/server/dist/lib/node/message_handler.js:19:44)
    at Object.node (/usr/src/node_modules/@zwave-js/server/dist/lib/server.js:39:91)
    at Client.receiveMessage (/usr/src/node_modules/@zwave-js/server/dist/lib/server.js:95:99)
    at WebSocket.<anonymous> (/usr/src/node_modules/@zwave-js/server/dist/lib/server.js:48:45)
    at WebSocket.emit (events.js:400:28)
    at WebSocket.emit (domain.js:475:12)
    at Receiver.receiverOnMessage (/usr/src/node_modules/ws/lib/websocket.js:1093:20) {
  code: 322,
  context: undefined,
  transactionSource: undefined
}

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Comments: 38 (26 by maintainers)

Most upvoted comments

Ok I can reproduce it by doctoring the config file for my ZW100.

Ok the problem is that our config file only defines partial parameters (param 83+bitmasks), but the setValue call is done for a non-partial (83) that does not exist in the config files - and by extension for a non-existant value ID, which should not happen. This causes the lookup for the param definition to fail and use default values which aren’t compatible with a 4-byte unsigned value.

Since fixing this will require an update anyways, I think the correct way forward would be to change the HA service call to use the setBulk method instead, followed by a getBulk to validate the changes.