<< Click to Display Table of Contents >> Navigation: The API > JSON API > REST Resources > Devices > GET > GET /devices/{deviceId}/state |
Overview
Get last saved states of a device, depending on transmit settings in webinterface
Last function states of a single device
Client to Gateway:
Resource Path |
HTTP method |
/devices/{deviceId}/state |
GET |
necessary additional call parameters:
parameter |
valid values |
call option |
functionality |
deviceId |
valid deviceID or friendlyId 4 byte hex valueor friendlyId |
required |
SenderID of Enocean device, EnOcean modules usually send telegrams with their unique 32-bit Chip ID. In the other case, these are the Base ID of the EnOcean device. |
response Gateway to Client:
parameter |
datatype |
value / formatting |
description |
||
header |
object |
{} |
|
||
states |
array of objects |
[{}] |
|
||
|
deviceId |
string |
4 byte hex value |
SenderID of Enocean device, EnOcean modules usually send telegrams with their unique 32-bit Chip ID. In the other case, these are the Base ID of the EnOcean device. |
|
|
friendlyId |
string |
|
User-assigned name of EnOcean device. Must be unique. |
|
|
physicalDevice (optional) |
string |
|
User-assigned name to group actuators and sensors |
|
|
functions |
array of objects |
[{}] |
|
|
|
key |
string |
|
Technical key of function. |
|
|
channel (optional) |
integer |
|
Channel if supported by this device. |
|
|
value |
float |
|
Value of the function. |
|
|
unit (optional) |
string |
[unit] |
Unit ISO. |
|
|
meaning (optional) |
string |
|
Description of value in English. |
|
|
timestamp |
string |
yyyy-mm-ddT hh:mm:ss.sss+ hhmm |
Timestamp function value was received in case of last state functions. |
|
|
age |
integer |
|
Age of function value in case of last state functions in milli seconds. |
Example:
Here we see the actual state of our example device. As you can see, the gateway stored all function states received in different telegrams. Because of that, the age of the functions are varying.
Basic structure of gateway response:
|
http://hostname:api_port/devices/weatherstation/state { |