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

"value updated" generated with equal prevValue and newValue for Configuration CC values

Open AlCalzone opened this issue 5 months ago • 7 comments

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

Originally posted by claudiucismaru August 13, 2025

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

What is happening?

Setting a Configuration CC value. Have the disableOptimisticValueUpdate turned to true, emitValueUpdateAfterSetValue set to false. When the "value updated" event is emitted, the prev and new values are the same. No previous events for the operation is emitted.

Here's the content of ZWaveNodeValueUpdatedArgs parameter when the event is emitted: {"commandClassName":"Configuration","commandClass":112,"endpoint":0,"property":2,"newValue":255,"prevValue":255,"propertyName":"Auto Relock"}

Before the set, the value was 0 in the cache db.

If I set emitValueUpdateAfterSetValue to true, there are 2 events emitted: {"commandClassName":"Configuration","commandClass":112,"endpoint":0,"property":2,"newValue":255,"prevValue":0,"propertyName":"Auto Relock"} which is emitted immediately, and has the prev and new values correct: 0 and 255 and the second one is emitted when the ConfigurationCCReport is received, and has the same issue: prev value is equal with new value.

What did you expect to happen instead?

When emitValueUpdateAfterSetValue is set to false, the event to be emitted with prev values as being the old value and new value to be the new one.

Steps to reproduce the behavior:

  1. use Node's setValue API to set a ValueID to a new value.
  2. have a event handler installed on "value updated".

Anything else we should know?

Software versions

Driver (zwave-js): 15.10.0

Z-Wave JS UI: n.a.

Home Assistant Z-Wave Integration: n.a.

Home Assistant Z-Wave JS Addon: n.a.

ioBroker.zwave2 Adapter: n.a.

If you are using something non-standard, tell us here: custom node application.

Z-Wave Controller (Stick/Dongle/...)

'Silicon Labs', '700/800 Series', 'Bridge Controller',

Device information

Manufacturer: ... Model name: ... Node ID: ...

Checklist

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

  • [ ] 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

driver_2025-08-13.log

AlCalzone avatar Aug 13 '25 13:08 AlCalzone

@claudiucismaru is this still happening for you? I cannot reproduce with these options:

			disableOptimisticValueUpdate: true,
			emitValueUpdateAfterSetValue: false,

AlCalzone avatar Nov 24 '25 15:11 AlCalzone

@AlCalzone , what version are you testing with? I'll upgrade to the latest release and recheck. Maybe today or tomorrow.

claudiucismaru avatar Nov 27 '25 08:11 claudiucismaru

I tested on the master branch, which is roughly equivalent to the latest release.

AlCalzone avatar Nov 27 '25 08:11 AlCalzone

It's not resolved. The event comes in with prev value equal with the new value. Setting the value to 0:

value updated on node 45: {"commandClassName":"Configuration","commandClass":112,"endpoint":0,"property":2,"newValue":0,"prevValue":0,"propertyName":"Auto Relock"}

Setting it to new value (255): value updated on node 45: {"commandClassName":"Configuration","commandClass":112,"endpoint":0,"property":2,"newValue":255,"prevValue":255,"propertyName":"Auto Relock"}

It should have been: prevValue: 0, newValue: 255

claudiucismaru avatar Nov 28 '25 19:11 claudiucismaru

The device is:

"GenericType": 64,
"ManufacturerID": "0129",
"ManufacturerName": "Yale",
"NodeBasic": 4,
"NodeRole": 7,
"NodeType": "Entry Control",
"ProductDecription": "Assure Touchscreen Deadbolt",
"ProductID": "0600",
"ProductName": "YRD226 / YRC226 / YRC246 / YRD256 / YRC256 / YRD446",
"ProductType": "8002",

claudiucismaru avatar Nov 28 '25 19:11 claudiucismaru

Could you record a driver log from inclusion to triggering the issue and mention the exact driver options (minus your keys ofc) you're using?

I'd like to make sure I have the full picture.

AlCalzone avatar Nov 29 '25 07:11 AlCalzone

Steps performed:

  • Included a Yale Lock
  • At interview time, the parameter no. 2 of 112 CC was reported as being 255
  • Sent command to set it to 0
  • Issue reproduced, the event came with prevValue 0 and newValue 0
  • Sent command to set it to 255
  • Issue reproduced again, event came with prevValue 255 and newValue 255

Attached are the driver log and configuration file.

driver_current.log

zwave.json

claudiucismaru avatar Nov 29 '25 12:11 claudiucismaru