Page 1 of 1

How do I create a Timer(schedule) on a Thermostat using the API

Posted: Thursday 29 January 2026 18:30
by johnrwoods
I would like to add a timer to a Thermostat Setpoint using the api but the "addtimer" api command does not an to

When a Timer is created on a Thermostat Setpoint device through the UI it is possible to include a setpoint in the values:
Timer.png
Timer.png (11.5 KiB) Viewed 63 times
I can inspect the timer information that has been created using the "getschedules" API command:
"Active" : "true",
"Date" : "",
"Days" : 128,
"DevName" : "Test Setpoint",
"DeviceRowID" : 607,
"IsThermostat" : "true",
"MDay" : 0,
"Month" : 0,
"Occurence" : 0,
"ScheduleDate" : "2026-01-30 14:48:00",
"Temperature" : "25.0",
"Time" : "06:00",
"TimerID" : 1,
"TimerType" : 2,
"TimerTypeStr" : "On Time",
"Type" : "Device"

When I compare this data to the data from a timer created on a switch, I can see differences with the available properties:
"IsThermostat" is set to false for the switch
"Temperature" does not exist for a switch
A switch timer has options for "Level" and "TimerCmd" that are not available to the Thermostat timer

When I create a timer for this Thermostat Setpoint device using the "addtimer" API call, the timer is created with the "IsThermostat" value set to false and no option for adding a value for "Temperature".

Is there a way to create a timer on a Thermostat Setpoint device, which sets the temperature, using API?

Re: How do I create a Timer(schedule) on a Thermostat using the API

Posted: Thursday 29 January 2026 18:34
by jvdz
Normally do an task via the standard webinterface triggers all the info you need! Go into dev mode (f12) on your browser, perform the task and check under the network tab the url performed for that task.

More info available in the forum: viewtopic.php?t=44249

Re: How do I create a Timer(schedule) on a Thermostat using the API

Posted: Thursday 29 January 2026 18:54
by johnrwoods
Many thanks for that.
There is an undocumented API call (AddSetpointTimer) which does everything I need.

Your help much appreciated.

Re: How do I create a Timer(schedule) on a Thermostat using the API

Posted: Thursday 29 January 2026 18:58
by johnrwoods
Does anyone know where I can find a full and up to date list of all API commands?

The Wiki appears to be out of date - I am looking at this https://wiki.domoticz.com/Domoticz_API/JSON_URL%27s

Re: How do I create a Timer(schedule) on a Thermostat using the API

Posted: Thursday 29 January 2026 18:59
by jvdz
I always look at the source when I need a true complete list. :roll:

Re: How do I create a Timer(schedule) on a Thermostat using the API

Posted: Thursday 29 January 2026 21:17
by waltervl
Just wondering why you would program a timer with an API call when you also could just set the setpoint value on the wanted time with a script (or API call).

Re: How do I create a Timer(schedule) on a Thermostat using the API

Posted: Saturday 31 January 2026 13:28
by johnrwoods
jvdz wrote: Thursday 29 January 2026 18:59 I always look at the source when I need a true complete list. :roll:
Good advice!
I was hoping for a lazy option ;)

Re: How do I create a Timer(schedule) on a Thermostat using the API

Posted: Saturday 31 January 2026 13:41
by johnrwoods
waltervl wrote: Thursday 29 January 2026 21:17 Just wondering why you would program a timer with an API call when you also could just set the setpoint value on the wanted time with a script (or API call).
The issue is that the "wanted time" is based on other timers, which switch a heating system on and off. These and are different dependant on the season and occupancy. In addition the Setpoint is different for each room and time.
I therefore need to set the "wanted time" dynamically. The only way I can see of doing this is by creating a Timer on the Thermostat device.

I hope this clarifies my use case, but thank you for your input as it did make me question my process and logic. :D