Streaming REST filter

<< Click to Display Table of Contents >>

Navigation:  The API > JSON API > Real Time Communication >

Streaming REST filter



Opening only one Streaming connection from the gateway to the client and parsing the messages according to their device-id and the corresponding modules is best practice approach. You start a stream from the client with a GET <IP-Gateway>:8080/devices/stream that returns the states of the devices and will continue in send continuously events of all devices.

There are also other possibilities to use the REST Implementation but they are more often use when debugging or testing.


Stream per device

You can open a connection just to a single device and start a stream which delivers only events of this single device. The REST call would be GET <IP-Gateway>:8080/device/{deviceid}/stream. The gateway will then first deliver the state of the device (if applicable) and then continue with the events of only this device. This can be helpful if you have a big environment and need only a look at specific device and its events.


From | to | Both

You can filter the direction of events that the gateway receives or sends. By default, the gateway will transmit events with origin "from" EnOcean sensors/actuators as well as events which destination "to" EnOcean actuators. "To" events are client issued and would be communicated to any connected client.