Skip to content

Reading state

Thing Edges keeps the last state each device reported. Reading it does not wake the device.

Route Gives
GET /iot-core/state/devId/<deviceId> One device
GET /iot-core/state/<locationId> Every device of a home
GET /iot-core/state/<locationId>/<mac> One device of a home, by its MAC

The state field has the same shape as in state messages: { "<element>": { "<attribute>": [attribute, values…] } }.

GET /iot-core/thing-status/<userId> lists whether each of the user’s devices is online, and since when.

To ask the device itself, see Asking the device.

To keep your own copy of every device’s state, use Data Streaming instead of reading state in a loop: changes arrive as they happen, and they do not count towards IoT Core usage.