Documentation

← Back to site

Create a new timer

Last updated on April 27, 2015 10:10

This method will create a new timer associated with a subdevice.

URL

/api/v1/timers/create

Parameters

  • subdevice_id - the ID of the subdevice whose timers we should manage.
  • action - The action to run, normally set_target_temperature
  • value - The value to send to the action, for example temperature in degrees C, always a string
  • run_at - The time of the day to run, "hh:mm" (UK Time)
  • days_active - A bitmap of days of the week. 1=Monday, 2=Tuesday, 4=Wednesday, 64=Sunday

Response

The created timer object will be returned, or a validation error.

[
  {
    "subdevice_id": 69,
    "id": 1,
    "parent_id": null,
    "run_at": "2000-01-01T14:09:52.000Z",
    "last_run_at": "2015-04-24T13:13:24.000Z",
    "days_active": 1,
    "action": "set_target_temperature",
    "value": "20"
  }
]