I am now using the gateway and the motion sensors 24/7. The connection is stable, and the motion detection works great.
There is an issue though. Normally, the sensor sends so called “reports” when it detects a motion. It looks like this
{'data': '{"status":"motion"}', 'cmd': 'report', 'short_id': 1418, 'model': 'sensor_motion.aq2', 'sid': '158d0001656f6f'}
After it detects a motion, it sends no_motion reports, starting at two minutes, stopping at 30 minutes with increasing intervals
{'data': '{"no_motion":"120"}', 'cmd': 'report', 'short_id': 1418, 'model': 'sensor_motion.aq2', 'sid': '158d0001656f6f'}
But, it also sends “heartbeats”, which look like this
{'data': '{"voltage":3025,"status":"motion","lux":"2"}', 'cmd': 'heartbeat', 'short_id': 1418, 'model': 'sensor_motion.aq2', 'sid': '158d0001656f6f'}
The problem with those heartbeats is, that there is no motion, and that they look the same in MQTT. How can I identify those as false alarms in pimatic? Is there a way to access the “cmd” part of the data?