Multicast best practises #1563
-
@hanskroner I've implemented multicast support a while back and users are starting to test it. From zwave-js/zwave-js-ui#25 (comment):
The part about remaining on in HA is because we don't poll after a multicast (for obvious reasons). I'm wondering about the part that some devices don't go fully off. I remember that the specs mentioned something about singlecast followup after the multicast, but that seems like it defeats the purpose of using multicast. I know you're not used to the log format (and this time there's no serial data), but these are the messages that are being exchanged:
Do you have any best practises related to multicast? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
Without actual Z-Wave traffic traces, all I'd be going is guessing 😞
The specs. mention that it's a good idea to follow a multicast with singlecasts to each node in the multicast. Because there's no It might be a little easier to visualize an example: the typical, exaggerated one is a room with 9 roller shutters (blinds) - but it works just as well imagining they're lights. In this scenario, you want to bring the rollers down 80% all together, at the same time, either by setting a scene or using the Multilevel Switch Command Class. If you singlecast each of them, by the time you get to the last shutter the rest will have been moving for a while - leading to a "waterfall" effect, which is not what you wanted. The effect will be even more pronounced if you're polling for state changes with Instead, you can multicast the command to all 9 shutters, so they receive it at almost exactly the same time. But what if one of the nodes was out of range? Or was jammed temporarily, maybe by another node it's neighbors with (but none of the other nodes are)? That's what the single cast follow-up is for. That one shutter will lag slightly behind the rest, but at least it will go down. The multicast tries to give the desired user experience while the singlecast tries to ensure the desired outcome.
From a protocol perspective, the specs. give you the right guidance: follow-up with singlecasts if you want delivery confirmations; there's not much else to it than that. From a usability perspective, you're in a very tough spot because multicasts aren't routed in Z-Wave. As the controller, you'll be able to multicast only to nodes that are in direct range. If the controller is centrally located in a small network, that'll likely work out fine - this isn't the case for the majority of deployments though. One approach you can take is to provide clients the ability to create multicast "groups." The library, knowing which nodes it can reach directly, limits which nodes can be members of these groups. This severely limits the usability of groups, but it aligns well with the reality of what multicast can do in Z-Wave. |
Beta Was this translation helpful? Give feedback.
Without actual Z-Wave traffic traces, all I'd be going is guessing 😞
The specs. mention that it's a good idea to follow a multicast with singlecasts to each node in the multicast. Because there's no
ACK
to a multicast, you use the follow-ups to get individual delivery confirmations. Z-Wave, for the most part, avoids "relative" changes, so the singlecast follow-up shou…