Send lots of commands quiclky? (solved)

When I reboot my hub, I have a rule machine that goes through and sets all switches, dimmers to off, and sets thermostats.

I can imagine flooding the Zigbee and Z-Wave networks with a lot of commands all at once. Should I put a delay in between each command to let things settle out?

Thanks, Mark.

Best way to answer is to try it and see if you have problems. :smiley:

But personally, it's something I'd avoid. For some Zigbee devices, adding them to a Zigbee group (an option in Room Lighting and Groups and Scenes) can help reduce traffic, speed things up, and improve reliability. For other kinds of devices, adding delays yourself may help if you have trouble. A tip for RM specifically: if you're doing the same thing to a lot of devices, the "custom action" allows you to specify a metering delay, basically the same thing without you needing to write delays yourself.

The underlying implementation is supposed to handle this at the hub level, at least in terms of making sure nothing is lost getting sent out; what happens after that is largely up to your network and will depend on the kind of devices you have.

If you don't do this, Command Retry is an option you can explore for supported devices/commands if you end up having troubles and don't want to see if spacing out the commands would work better.

2 Likes

I do the same thing but in WebCore.
On a restart I turn all the activators and devices off; who knows how the interuption left them.
I meter the commands with loops and delays so as to not overun the radios though.

Add the like-devices to a group/groups, enable metering, and then control the group switches in your startup rule. This approach will allow you to rapidly change the delay between commands in one go, eliminate the runtime performance of Rule Machine delays, simplify adding/removing devices, and let you experiment with whether the meter/delay is necessary or not.

For my network, large groups of Z-Wave devices work better when metered. I typically use 100ms though the factors that led me to arrive at that number have been lost to time and my ailing memory.

I have a scene activator app I wrote to control all my scenes in a room, and it loops through a map of the room devices that contain the switch and level settings for each device in the scene.

I also use a 100m/s delay in the loop between device commands when activating a scene to avoid any misses. I don't mind the effect of lights turning on in a quick progression, since it all still happens within a second.

I actually have 350ms in my loop.
I found I can still get JS to go Jammed even at that speed.
ZIP is probably no issue.

So, the common thread here is, "yes, give the radios some time in between commands to prevent commands and responses from stepping all over each other."

I assume I can send a Zigbee and Z-Wave without delay, but I don't want to remember what each device is using.

Thanks,
Mark.

... then use a group with a meter and it won't care.