I’m using zwave_js.multicast_set_value to turn 11 switches on in parallel. And it works great the first time the automation is triggered - all the light switches turn on immediately. All are ZWave+.
However sometimes the switches don’t report back, which causes a 15-20 second hang before HA will process any other zwave requests. Very annoying if we are coming home and need to turn on a few different switches!
alias: All Lights - 1x Normal Lighting (Multicast)
description: ''
trigger:
- platform: event
event_type: zwave_js_value_notification
event_data:
node_id: 2
label: Scene 004
value: KeyPressed
- platform: event
event_type: zwave_js_value_notification
event_data:
node_id: 3
label: Scene 004
value: KeyPressed
- platform: event
event_type: zwave_js_value_notification
event_data:
node_id: 4
label: Scene 004
value: KeyPressed
- platform: event
event_type: zwave_js_value_notification
event_data:
node_id: 5
label: Scene 004
value: KeyPressed
- platform: event
event_type: zwave_js_value_notification
event_data:
node_id: 6
label: Scene 004
value: KeyPressed
- platform: event
event_type: zwave_js_value_notification
event_data:
node_id: 7
label: Scene 004
value: KeyPressed
- platform: event
event_type: zwave_js_value_notification
event_data:
node_id: 8
label: Scene 004
value: KeyPressed
- platform: event
event_type: zwave_js_value_notification
event_data:
node_id: 9
label: Scene 004
value: KeyPressed
- platform: event
event_type: zwave_js_value_notification
event_data:
node_id: 11
label: Scene 004
value: KeyPressed
- platform: event
event_type: zwave_js_value_notification
event_data:
node_id: 38
label: Scene 004
value: KeyPressed
- platform: event
event_type: zwave_js_value_notification
event_data:
node_id: 13
label: Scene 004
value: KeyPressed
- platform: event
event_type: zwave_js_value_notification
event_data:
node_id: 13
label: Scene 005
value: KeyPressed
- platform: state
entity_id: switch.light_switch_main_entrance
from: 'off'
to: 'on'
condition: []
action:
- service: zwave_js.multicast_set_value
target:
entity_id:
- switch.light_switch_baby_room
- switch.light_switch_baby_room_hallway
- switch.light_switch_kitchen_lights
- switch.light_switch_living_room_standing_lamp
- switch.light_switch_main_entrance
- switch.dining_table_lights
- switch.living_room_plant_light
- switch.bar_cart_light
- switch.couch_lights
- switch.tv_lights
- switch.track_lights
data:
command_class: '37'
property: targetValue
value: true
mode: single
max: 10
I also tried a similar automation but using homeassistant.turn_on instead of zwave_js.multicast_set_value. This took about 20 seconds as well for all the lights to turn on, except in a staggered fashion – not all at once.
alias: All Lights - 1x Normal Lighting (Unicast)
description: ''
trigger:
- platform: event
event_type: zwave_js_value_notification
event_data:
node_id: 2
label: Scene 004
value: KeyPressed
- platform: event
event_type: zwave_js_value_notification
event_data:
node_id: 3
label: Scene 004
value: KeyPressed
- platform: event
event_type: zwave_js_value_notification
event_data:
node_id: 4
label: Scene 004
value: KeyPressed
- platform: event
event_type: zwave_js_value_notification
event_data:
node_id: 5
label: Scene 004
value: KeyPressed
- platform: event
event_type: zwave_js_value_notification
event_data:
node_id: 6
label: Scene 004
value: KeyPressed
- platform: event
event_type: zwave_js_value_notification
event_data:
node_id: 7
label: Scene 004
value: KeyPressed
- platform: event
event_type: zwave_js_value_notification
event_data:
node_id: 8
label: Scene 004
value: KeyPressed
- platform: event
event_type: zwave_js_value_notification
event_data:
node_id: 9
label: Scene 004
value: KeyPressed
- platform: event
event_type: zwave_js_value_notification
event_data:
node_id: 11
label: Scene 004
value: KeyPressed
- platform: event
event_type: zwave_js_value_notification
event_data:
node_id: 38
label: Scene 004
value: KeyPressed
- platform: event
event_type: zwave_js_value_notification
event_data:
node_id: 13
label: Scene 004
value: KeyPressed
- platform: event
event_type: zwave_js_value_notification
event_data:
node_id: 13
label: Scene 005
value: KeyPressed
condition: []
action:
- service: homeassistant.turn_on
target:
entity_id:
- switch.light_switch_baby_room
- switch.light_switch_baby_room_hallway
- switch.light_switch_kitchen_lights
- switch.light_switch_living_room_standing_lamp
- switch.light_switch_main_entrance
- switch.dining_table_lights
- switch.living_room_plant_light
- switch.bar_cart_light
- switch.couch_lights
- switch.tv_lights
- switch.track_lights
mode: single
max: 10
When the multicast query gets delayed, I see this in the logs:
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 381, in _async_step
await getattr(self, handler)()
File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 584, 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 509, in async_multicast_set_value
success = await async_multicast_set_value(
File "/usr/local/lib/python3.9/site-packages/zwave_js_server/util/multicast.py", line 54, in async_multicast_set_value
result = await _async_send_command(
File "/usr/local/lib/python3.9/site-packages/zwave_js_server/util/multicast.py", line 29, in _async_send_command
return await client.async_send_command(cmd, require_schema)
File "/usr/local/lib/python3.9/site-packages/zwave_js_server/client.py", line 79, in async_send_command
return await future
zwave_js_server.exceptions.FailedZWaveCommand: Z-Wave error 202: One or more nodes did not respond to the multicast request (Status Fail) (ZW0202)
Since all the lights turn on w/ multicast, is there a way to force HA to move on and not wait for the ACKs? The delays are pretty annoying! Thanks in advance