home-automationz-wave

polling and state machine in Z-Wave


Good afternoon, seniors.

I'm learning about Z-Wave and have some Z-Wave specifications.

But they are not sufficient to understand Open-Zwave concept..

Especially, the principle of Polling and State machine in Open-Zwave is so hard for me to understand..

Could you explain to me about it? or Could I get some documents or pictures for it?


Solution

  • Polling Polling is simply when the controller sends a message to a device requesting its current status (on/off, current temperature, etc.). When a controller first starts up, it polls all the devices that are present in its configuration file. After startup, it's often no longer necessary to poll a device unless it's an older Z-Wave device or the manufacturer is concerned about implementing functionality that is patented by another company. Most current Z-Wave devices are configured to automatically report their statuses at regular user-defined intervals. Battery-powered Z-Wave devices that sleep a majority of the time, such as a motion/temperature/humidity sensor, cannot be polled when they're asleep. Most wake up at scheduled (user-defined) intervals and send a message to the controller that they are awake. They typically report their current status at that time. If the controller sends a polling request to a sleeping device,it's added to the queue of messages that are transmitted to the device when it informs the controller that it is awake. Some battery-powered devices don't always sleep and can be polled, such as some door locks.

    State Machine The Z-Wave state machine is the method used by Z-Wave to enable devices to be polled. When the controller wants to communicate with a device, it passes the Z-Wave frame to be sent, which sets the machine in the BEGIN state. The controller transmits the frame and enters the WAIT state. If the controller receives a valid response to its transmission, it enters the END state and begins communicating with the device. If no response is received after a timeout period, it enters the ERR state and retries the transmission. After a maximum of three ERR states, Z-Wave returns a NULL. it looks something like this:

    Z-Wave State Machine

    In August 2016, Sigma Designs released most of the Z-Wave specification to the public, with resources for developers who want to include Z-Wave in their applications. Prior to August 2016, the specification was closely guarded. You can read more about the Z-Wave Public Specification here.