Sending commands

1. HTTP: by entityKey and deviceKey:

POST ${THINGOO_INSTANCE}/api/entities/{id}/command

Example request body:

{
    "value": "255"
}

Receiving commands on device

1. MQTT

MQTT

To listen for commands on actuator entities, you must subscribe the following MQTT topic:

/devices/${deviceKey}/entities/${*entityKey*}/command
${deviceKey} <- variable
${*entityKey*} <- variable

with the optional command's value as plain text.

Example:

24.1

Important! If the received command alters device's state (for example, the command was to turn ON the light) you should send a reading with the new state from corresponding sensor entity.