Page 1 of 1

updating timers for setpoints

Posted: Thursday 01 January 2026 19:19
by JanJaap
Hi,

I've got a set of home batteries controlled from domoticz. I want to schedule (at least in winter when the solar panels don't fill up the battery entirely) every night a run of 3 hours at the cheapest moment to fill them up for use during daytime. I need to control 2 domoticz devices
- a multi level switch to set the mode to 'open APi' to allow external setpoint
- a thermostat to provide the charging power level

I'm making a script to run around 23:00 to set the charging schedule for the next night by updating the timers for these 2 devices. Using below URL's:

Code: Select all

 http://<ip>:8080/json.htm?type=command&param=updatetimer&idx=33&hour=2&min=0&randomness=false&timertype=2&days=1234567&command=0&active=true&level=30
 http://<ip>:8080/json.htm?type=command&param=updatetimer&idx=12&hour=2&min=1&randomness=false&timertype=2&days=1234567&command=0&active=true&temperature=-3500
Problem is that the timerID (that's provided here via the idx) is not unique. So the timerID 12 for the thermostat is also used for another swtich and I effectively cannot update the timers for the thermostats. The documentation gives the option to enabe/disable timers for setpoints via the enablesetpointtimer param. However, the updatesetpointtimer param seems to be missing. Can this be added?

Additionally it would be nice to make all parameters for the update optional so we're not forced to provide all timer parameters even when we don't want to change them

Re: updating timers for setpoints

Posted: Thursday 01 January 2026 19:59
by jvdz
Read the post i made a couple of days ago for the answer: viewtopic.php?t=44243
😀

Re: updating timers for setpoints

Posted: Tuesday 06 January 2026 21:17
by JanJaap
OK I read your post but that doesn't answer me..... You do refer to the updatesetpointimer. Does it work with these parameters provided?

Re: updating timers for setpoints

Posted: Tuesday 06 January 2026 21:33
by jvdz
The post shows the exact json api call supported, so please check again and give those a try. :-)

Re: updating timers for setpoints

Posted: Monday 12 January 2026 22:12
by JanJaap
ok, I've got the URLs right. So I created a script to set the timer every day at 22:00. After a few days, the result is OK but the timer is not updated.... Any ideas?

Code: Select all

 http://<ipadress>:8080/json.htm?type=command&param=updatetimer&idx=602&timerid=28&hour=3&min=0&randomness=false&timertype=2&days=1234567&command=0&level=10&active=true
 
result:

Code: Select all

{
	"status" : "OK",
	"title" : "UpdateTimer"
}
edit: never mind, the timerId and idx should not both be in there