Terry linked to my note on scheduling, which explains the general problem, but when the issue is two messages from the same sender, which sounds like your issue, then it pretty much has to be that the messages are taking two different paths to the hub. Or that you’re losing a message in transit and it has to be resent.
(In a mesh network, messages are “issue once, try many,” so the device will try different paths or a total resend if needed. This cam cause messages to arrive out of sequence.)
The two easy things you can do is increase the signal strength and route options by adding a repeater device near the door, and “healing” the network to make sure the routing table is up to date.
Battery powered devices can’t act as repeaters, so you need to plug in the repeater. But pretty much any plugged in device will work as long as it matches the protocol of the one you want to improve. Zwave for zwave, zigbee for zigbee.
Once you’ve plugged in the repeater, it’s best to heal the network to repair the routing table.
REBUILDING THE ROUTING TABLE
Ideally, unplug the hub for at least 15 minutes to repair the zigbee mesh. Then restart the hub and use the zwave utilities to heal the zwave.
If you have over 50 devices and/or a lot of battery powered devices, some may be asleep when you do the repair. this has nothing to do with ST, it’s just how mesh protocols work.
So a lot of field techs will do a heal, wait 15 minutes for the table updates to propagate, then repeat the heal (you don’t need to reboot), wait another 15 minutes after the log shows the heal finished, then repeat the heal a third time, wait another 15 minutes. That should mean the entire routing table gets rebuilt including all the battery operated devices.
(Some field techs then unplug the hub and wait another 15 minutes and reboot, but I personally think that last step is just superstition. Can’t hurt, but I don’t think it helps either.)
So include the repeater, unplug hub for 15 minutes, reboot, heal, wait at least 15 minutes after log says the heal finished, heal again, again wait 15 minutes after log says heal completed, heal a third time.
You may never know exactly what was wrong, but this can greatly improve sequencing from a single device. The repeater improves signal strength and adds a new routing path at the same time.
(There’s another way to approach this that involves intentional bottlenecks to try to force the messages to go at least jam up on the same route, but I can’t recommend that. If you’re that desperate, better to just hardwire a direct connection.)
There’s also the possibility that there’s intermittent local interference causing some messages to get lost and have to be resent. But adding a repeater to increase the signal strength often solves that as well before you even get around to testing for it.
So If you can live with typical mesh issues, i’d add a repeater, rebuild the routing table, and reassess.
If you absolutely have to have almost perfect sequencing, I’d consider adding some hardwired devices.