Bruce -- I'll take a look at this, it looks interesting. Thanks for taking the time to work on this.
You say "it is OK to issue some commands twice, like turning on a light". You'd think so. I sure did. But really the only rules I have are for turning on lights, and they are the ones I'm having trouble with. I've seen three behaviors from my Zooz switches when they get multiple "turn on" commands (probably depending on how quickly they come in succession):
1 - the light comes on and everything is fine
2 - the light comes on and quickly goes back off again
3 - the light never comes on (possibly an extreme case of 2?)
Now, the very strange thing about (3) is that the SWITCH thinks the light is on! I have the LED on the switch on when the light is on, and off when it is off. But when the light never comes on at all, the LED does come on and stay on. It is very strange, and perhaps an issue specific to the Zooz switches?
I'll try to get time this weekend to try your app for the contact sensors that are causing me problems.
And then maybe look at the motion sensors also. Two of my three problem rules are motion triggered, and misbehave when the motion sensor fires twice very quickly.
The fact that my motion sensors are sometimes registering multiple events in quick succession still has me leaning toward a Zwave network issue, but if so I have no idea what to do about it. Except hope things settle down and it all goes away? My last network modifications were 2-3 weeks ago with some new switches then the contact sensors. I'd think the network would have straightened itself out by now.