433mhz,Aqara sensors and CUBE sending "ghost" codes, triggering things when not supposed to in Node Red

Started with the Xiaomi Gateway and the door/motion sensors. With my flows in Node it would sometimes send a random On/Off code. I got around that by adding a trigger node in the beginning of the flow. So the door had to be open for more than 50 milliseconds before passing the message. That worked fine for stopping the false alarms. Chalked it up to maybe some sort of disconnect/reconnect issue with the Gateway.

Then I added a Sonoff Rf bridge Flashed with Tasmota and some cheap 2 code door sensors. Those also sent the ghost codes, so I ruled out it being a Xiaomi specific issue. THEN I got a Xiaomi cube… The states work in a much different way, so my previous work-around wont cut it this time. It also gets a few false alarms a day. Figure I might try and get to the bottom of why…

I dont know where to begin as far as if this would be seen in a log somewhere.

Still trying to figure out how to post pics. So I’ll get the flow pic up if that could help…

I find the Cube is quite sensitive and triggers a message when I walk past. I’ve got it paired to a Conbee, so I can see it shows up as button event 7000, or a rotation of only a few degrees.

With the door/motion sensors I found they occasionally re-send the state, so you get multiple ‘closed’ messages in a row over time. Until I catered for it, this was causing problems with actions that occurred when a door was closed. I’ve never had any instance where they incorrectly reported open followed by closed.

One rare occasions the motion sensors do not trigger when I walk into the room. However this may be related to reboots of the PC running deCONZ and/or HA.