Instant Notifications All Switches Using Multicast on HA

I’m going to try your suggestion again, and reduce the chattiness for a bit longer…because I have been seeing communication time outs on my network for a long time!

Most of the time, they don’t really get in the way though.

I have an automation that turns the LEDs on the dimmers and switches Orange when my garage door is open…I was doing this with a script that sent one command to the dimmers to turn orange, and another command to the switches to turn orange (script below). I’ve moved this into node red recently…but there has always been an error in the logs either way on occasion. I’ll try to reproduce it and post it.

When I run this script, it will occasionally throw an error (say, 1 out of 3 or 4 times), and a few LEDs will not have turned orange. I can’t pin it to the same switche(s) each time.

I thought it was interference for a long time, which is why i moved the dongle to the front of my rack. Made no difference. Maybe giving these settings another try will help.

alias: "SCRIPT LED INDICATOR COLOR: Garage is Open (Orange)"
sequence:
  - service: zwave_js.multicast_set_value
    data:
      command_class: "112"
      value: 100600329
      property: "8"
      endpoint: "0"
    target:
      entity_id:
        - group.red_series_on_off_switches
  - service: zwave_js.multicast_set_value
    data:
      value: 50268681
      command_class: "112"
      property: "16"
      endpoint: "0"
    target:
      entity_id: group.red_series_dimmers
    enabled: false
mode: single
max_exceeded: silent
icon: mdi:garage-open-variant

Oh ok, one more thing to try is I would definitely upgrade the red series dimmer firmware if they are not on the absolute latest. That firmware does include a fix for the dimmer sending duplicate reports. https://support.inovelli.com/portal/en/kb/articles/firmware-change-log-lzw31-sn-dimmer-switch-red-series

I will definitely try that. I’m on 1.57 firmware for the dimmers right now.

Here’s the error from that script btw (doesn’t always occur):

I think if you check the logs in the zwaveUI add on it should say what number node failed. Quick question, I see the script is “LED notifications off”. Is there any chance you are turning off the LED notifications AND issuing a command to turn off all switches/dimmers? I had issues where I was “clobbering” myself by running two scripts simultaneously, one to set the LED bar notification and one to turn off all light switches/dimmers. I had to add a 1 second pause between them and saw much more reliable execution for me. The LED bar notifications completes faster. I also had luck cutting down the dimming speed of dimmers. I think the dimmer switches would receive the dim command and then take 3 seconds to dim and finally report back they were done dimming and I believe this would slow the script execution. Sorry I know I’m throwing a lot of “this might work” ideas at you, I’ve spent a lot of time trying to get better reliability and speed and I’m hoping some of this helps

Unrelated to notifications, but hot tip to speed up your “all lights off” commands, or any combination of multiple lights.

First create a group helper, in this case one with all lights. Then in your automation action, use this.

service: light.turn_off
data:
  transition: 1
target:
  entity_id: >
    {{
    expand('light.all_lights')|selectattr('state','eq','on')|map(attribute='entity_id')|join(',
    ') }}

What this does is expand all the entities in your all lights group, checks which ones are actually on and creates a comma seperated list, and then it only sends the off command to the lights that need to be turned off. So instead of sending 50 “off” commands it may send 5. HUGE reduction in traffic and made a massive speed difference. I use a transition because I like the fade, but it’s not needed.

5 Likes

THIS is awesome! Thanks MRobi I will implement this tomorrow! Unrelated question, how is your aqara only zigbee network working out?

It’s aqara and ikea since they play nice together but neither play well with others. It’s been rock solid since I’ve done that with the exception of the Ikea Tradfri blinds. They will randomly drop off every 3 or 4 months OR they start going crazy and going up 1/4" then back down 1/4" and repeating for hours and even days. They did this on the other network as well but way more often. So I blame the device not the network on this.

1 Like

This is absolutely brilliant.

flipon, I appreciate the ideas very much.
Unfortunately, the failed node isn’t always the same one. Sometimes it’s just one node, sometimes it’s 3 nodes…and sometimes it works just fine.

The command is just to change the LED, not anything extra like on/off. I’ve even added a pause between the command for the dimmers, followed a few seconds later for the command for the switches. No improvement.

The one thing I haven’t tried is a rebuild of the z-wave network. I bought these switches a few at a time, and I think you’re really supposed to start installing them closest-to-the-dongle first. I didn’t do that when I built the network, I figured healing it periodically might take care of that (have healed it many times). So I might try a rebuild/reset at some point when I can’t take it anymore.

1 Like

Once I re-included my switches without security, the multicast call to set light bars is effectively instant across my 15 switches.

Woke up this morning and the configs on a few switches are gone! It has been working so well.

Re-interviewed the nodes. Nothing.
Excluded and re-included. Still missing configs.

Screenshot below. Would anyone have any ideas? I still have the lzw30-sn.json and lzw31-sn.json files in a config folder within the store in the Z-wave JS HA addon.

Multicast is dead until I can fix these nodes…because you can’t have some nodes with configs, and others without (obviously). Here’s a screenshot:

I FIXED IT!!!

for anyone who cares…here are the steps:

  1. deleted the lzw30-sn.json and the lzw31-sn.json files in the config store within the addon
  2. went to github and copied the json files there and added them back to the config store (basically refreshed what was in those two files, what I had must have had an error somewhere).
  1. reinterviewed the nodes

FIXED!

And multicast works faster now!!

1 Like

I would highly recommend deleting the custom files from the store for any device in the database. The latest ones are always shipped with Z-Wave JS and if you have custom ones they will override the defaults. The defaults do change over time as Z-Wave JS refractors code so it’s important to stay up to date.

Ok, i did that. Thanks, Rohan - I was always worried about those files.

Now, after re-interviewing the dimmers, I’m getting “Unknown product 0x0001” in the list. Any idea why?

Have you updated to the latest version of Z-Wave JS?

After deleting the files you’ll need to restart Z-Wave JS and then a reinterview should find everything.

Rohan,

you.
are.
the.
man.

thank you.