Start an Automation using the API

An automation in Hue Essentials can be started manually using the API. This requires the automation to be saved on a Philips Hue bridge, deCONZ gateway, or a diyHue emulator.

The automation can be started by using the API. You need to read the developer documentation on how to acquire an API key. You also need to be familiar with REST API requests.

You need an identifier of the automation to be able to start it. So first you need to create an automation. Create an automation in Hue Essentials with an External event and configure some conditions/actions. Then save the automation. After saving, reopen the automation. Now there should appear something like /sensors/<sensor-id> under the External event. You will need this identifier in the next step.

To start the Automation using the REST API, use the information below:

Address http://<bridge-ip>/api/<api-key>/sensors/<sensor-id>/state
Method PUT
Body {"status":1}

Replace the <...> values above. Example address: http://192.168.86.123/api/123456789/sensors/123/state

Note that on a Hue bridge you may need to use HTTPS and disable certificate validation.

After sending the request above, the automation should start. Note that if you edit the automation, the sensor ID may change so you will need to update your request code.

For more information about the automations, see: Automation in Hue Essentials

For more information about the API, see: