Thanks for posting this. I’d like to add a few details to this thread as recently (within the last month or two) an update to either Home Assistant, zwavejs, or something else started triggering this NotFoundError on all 11 of my VZW31-SN switches. Very frustrating!
I have 3 components to my scripting that changes the LED colours:
- An automation that is simply a list of triggers for what might change the colours of the LEDs, which calls script #2
- A colour decision tree script/sequence (if doors are open then flashing red, if garage is open then flashing yellow, etc.) that sets a variable called
led_setpoint_word and passes it along to script #3
- A script that calls
zwave_js.set_value to assign the led_setpoint_word to all of the switches.
Breaking the automation up into these three components was good for maintainability - I think the inspiration was an old reddit post.
Anyway, this recent update caused the script #3 to start throwing the NotFoundError on all 11 devices. Here is the old, now not-working logic:
sequence:
- action: zwave_js.set_value
metadata: {}
data:
property: "99"
value: "{{ led_setpoint_word }}"
entity_id:
- light.light_basement_bulkhead
... 10 other devices
command_class: "112"
enabled: false
Some weeks ago using ChatGPT I had figured out an absolute kludge of a solution, which required breaking the led_setpoint_word into its 4 bytes and writing those individually using zwave_js.set_value. It looked something like this:
fields:
led_setpoint_word:
required: true
selector:
number:
min: -2147483648
max: 2147483647
sequence:
- variables:
byte_0: "{{ led_setpoint_word % 256 }}"
byte_1: "{{ (led_setpoint_word // 256) % 256 }}"
byte_2: "{{ (led_setpoint_word // 65536) % 256 }}"
byte_3: "{{ (led_setpoint_word // 16777216) % 256 }}"
targets:
- light.light_basement_north_stair_nook
... 10 other devices
- repeat:
for_each: "{{ targets }}"
sequence:
- data:
entity_id: "{{ repeat.item }}"
command_class: 112
property: "99"
property_key: 255
value: "{{ byte_0 }}"
action: zwave_js.set_value
- data:
... repeated config for each of the other 3 bytes
While this got my colours back, the downside was the execution time. Calling zwave_js.set_value 4 times in a row (and often 8 times or more times, if you imagine opening and closing a door quickly) slowed down my zwave network and the execution time on this script was about 4-8 seconds.
The other interesting thing about 4-byte zwave_js.set_value breaking and 1-byte zwave_js.set_value working is this implies there is a recent change somewhere in the stack around the length of the data you’re allowed to sent to parameter 99 that causes zwave_js.set_value to return the NotFoundError…
This thread helped me get things working again with zwave_js.bulk_set_partial_config_parameters, which is probably what I should have been using in the first place.
sequence:
- action: zwave_js.bulk_set_partial_config_parameters
metadata: {}
data:
endpoint: "0"
entity_id:
- light.light_basement_bulkhead
... 10 other devices
parameter: "99"
value: "{{ led_setpoint_word }}"
tl;dr If anyone starts seeing the NotFoundError and they’re using zwave_js.set_value, try again with zwave_js.bulk_set_partial_config_parameters. Thanks OP for following up on your own thread!