state;

<< Click to Display Table of Contents >>

Navigation:  The API > Simple API > Commands to Gateway >

state;

State

The ‘state’ command returns the actual or last known state of the saved devices. Unlike in other cases, e.g. ‘device’ or ‘telegram’ where one line contains all information about one object, the ‘state’ response is slightly different.  Here all functions are separated into different lines. The reason for this is that a complicated device might have different “ages” for different “last states”. This means, that different functions of a (complicated) device are sent by the device at different times. For instance an A5-12-XX profile is sending either actual or cumulative values. This way the different functions and corresponding values have different timestamps.

 

User Command/Request

State

Gateway Response Example

state;deviceId=1859038;friendlyId=OfficeTemperature;SetPoint=213[N/A];timestamp=2015-04-22T16:45:46.150+0200;age=8543

state;deviceId=1859038;friendlyId=OfficeTemperature;SlideSwitch0I=1(Slide switch On/Day);timestamp=2015-04-22T16:45:46.150+0200;age=8543

state;deviceId=1859038;friendlyId=OfficeTemperature;Temperature=23.53[°C];timestamp=2015-04-22T16:45:46.150+0200;age=8543

 

Response formatting
 

String

Meaning

Possible values/Examples

state

Result of the command by the Gateway

state

deviceId

The ID of the device

1859038

friendlyId

String name of the device

OfficeTemperature

function

Function names and their values

SetPoint=213[N/A]

Temperature=23.53[°C]

SupplyVoltage

timestamp

The time when the telegram and state received, saved

2015-04-22T16:45:46.150+0200