I’m trying to understand how devices are supposed to behave and how they do behave.
I cannot find a specification for the state machine for the ZWave definition of a motion sensor, but I think that the normal states would be ‘motion detected’ (md) and ‘no motion detected’ (nmd), with two external event sources: movement and timeout. Starting in nmd, a movement event would change the state to md, spit out a CC message and a timeout event would have no effect, in md, a movement event would reset the timeout counter (without emitting any CC message) and a timeout would cause a transition to nmd, with a corresponding CC message. Is this correct/is there a specification in any of the documentation?
A characteristic of the above state machine is that it is not possible send multiple CC messages of the same value without an interleaved message of the opposite value.
I’ve got a small set of PIR motion sensors that are emitting CC Sensor Binary for motion detection and logging CC messages based on OpenZwave events received (Fibaro FGMS-001).
I am seeing the following behaviours that look odd at first glance:
1/ More than half of the CC messages detected are repeats occurring a short time (<1s) after a CC that could be emitted at a state transition.
2/ There are many instances of several messages of the same sense emitted over several minutes (8 in a row is the most, so far). These runs of CC messages are for both senses, ie, several motion detected events in a row with no intervening quiescence, and several ‘return to nmd’ CC messages with no intervening motion.
Should I expect to see these behaviours and if not, has anyone any hints as to where to find the cause? If the behaviours are to be expected, what is the best approach to handling them:
- detect and log the anomalies and use the data to drive future device type buying
- avoid making any assumptions about what ‘motion detection’ means
- something else?
thanks in advance