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:
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?
How do I create a Timer(schedule) on a Thermostat using the API
Moderators: leecollings, remb0
-
johnrwoods
- Posts: 15
- Joined: Thursday 12 December 2019 11:49
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 2022.2
- Location: UK
- Contact:
- jvdz
- Posts: 2441
- Joined: Tuesday 30 December 2014 19:25
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 4.107
- Location: Netherlands
- Contact:
Re: How do I create a Timer(schedule) on a Thermostat using the API
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
More info available in the forum: viewtopic.php?t=44249
-
johnrwoods
- Posts: 15
- Joined: Thursday 12 December 2019 11:49
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 2022.2
- Location: UK
- Contact:
Re: How do I create a Timer(schedule) on a Thermostat using the API
Many thanks for that.
There is an undocumented API call (AddSetpointTimer) which does everything I need.
Your help much appreciated.
There is an undocumented API call (AddSetpointTimer) which does everything I need.
Your help much appreciated.
-
johnrwoods
- Posts: 15
- Joined: Thursday 12 December 2019 11:49
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 2022.2
- Location: UK
- Contact:
Re: How do I create a Timer(schedule) on a Thermostat using the API
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
The Wiki appears to be out of date - I am looking at this https://wiki.domoticz.com/Domoticz_API/JSON_URL%27s
- jvdz
- Posts: 2441
- Joined: Tuesday 30 December 2014 19:25
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 4.107
- Location: Netherlands
- Contact:
Re: How do I create a Timer(schedule) on a Thermostat using the API
I always look at the source when I need a true complete list. 
- waltervl
- Posts: 6677
- Joined: Monday 28 January 2019 18:48
- Target OS: Linux
- Domoticz version: 2025.1
- Location: NL
- Contact:
Re: How do I create a Timer(schedule) on a Thermostat using the API
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).
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
-
johnrwoods
- Posts: 15
- Joined: Thursday 12 December 2019 11:49
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 2022.2
- Location: UK
- Contact:
Re: How do I create a Timer(schedule) on a Thermostat using the API
Good advice!jvdz wrote: Thursday 29 January 2026 18:59 I always look at the source when I need a true complete list.![]()
I was hoping for a lazy option
-
johnrwoods
- Posts: 15
- Joined: Thursday 12 December 2019 11:49
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 2022.2
- Location: UK
- Contact:
Re: How do I create a Timer(schedule) on a Thermostat using the API
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.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).
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.
Who is online
Users browsing this forum: No registered users and 1 guest