Last States

<< Click to Display Table of Contents >>

Navigation:  The API > API Overview >

Last States

Last States

This API function is used regulate the output of the API according to device states when using streaming API. A state is a set of key values describing the last known state of a device. For each key, API streaming output can be influenced by three different attributes (TransmitOnConnect, TransmitOnEvent or TransmitOnDuplicate). Influencing means, whether a state or telegram will be transmitted or not when connecting or streaming.

 

TransmitOnConnect

If this attribute is set, API streaming output transmits this key-value pair among others when a client connects to the streaming API. This information is used to retrieve a database of values of every single learned-in EnOcean device to initialize device values in third party systems, while concurrently start streaming device telegrams. Each value contains an age (a value in milliseconds) as well as an UTC timestamp. After delivering the “states”, the Interface atomically starts with transferring events from the EnOcean radio.

Default for all devices: On

 

TransmitOnEvent

If this attribute is set, the value is being transmitted via API streaming output. Activate this attribute for every key that won't be used in your system. For example, a device uses an EEP (e.g. a5-04-01) that forsees the transmission of temperature and humidity, but your system doesn't require temperature information, or the device has no measuring unit included. This value of “Temp 0 degree” can be suppressed on API streaming output.

Default for all devices: On

 

TransmitOnDuplicate

If this attribute is set, then the Interface even transmits received values ​​of devices, whose value that has not been changed since last transmission. For example, a window sensor periodically transmits every 10 minutes its "closed" state. If TransmitOnDuplicate is not set, then the Interface suppresses the output of the API. If set, the Interface transmits this key-value, although there is no change in the information.

Since in many cases, the cyclical sending of equal value is a tribute to the EnOcean protocol in terms of energy harvesting, it is sufficient to transmit in most cases a value only when it changes. Alternatively, the Interface can be asked at any time for a value of a device via the API. An exception may exist on mapping of security-related functions, in which it can be seen as a malfunction or a defect when a value is not repeated.

Default for all devices: Off