updating timers for setpoints

Subforum for general discussions. Do not dump your questions/problems here, but try to find the subforum where it belongs!

Moderators: leecollings, remb0

Post Reply
JanJaap
Posts: 229
Joined: Thursday 12 October 2017 20:46
Target OS: Raspberry Pi / ODroid
Domoticz version: Dev
Location: the Netherlands
Contact:

updating timers for setpoints

Post 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
RPi 3, Domoticz dev version, Aeon ZWave stick (with a whole bunch of slaves), Zigbee using Zigbee2MQTT, Nest thermo, P1 smart meter on RPi Zero
User avatar
jvdz
Posts: 2441
Joined: Tuesday 30 December 2014 19:25
Target OS: Raspberry Pi / ODroid
Domoticz version: 4.107
Location: Netherlands
Contact:

Re: updating timers for setpoints

Post by jvdz »

Read the post i made a couple of days ago for the answer: viewtopic.php?t=44243
😀
JanJaap
Posts: 229
Joined: Thursday 12 October 2017 20:46
Target OS: Raspberry Pi / ODroid
Domoticz version: Dev
Location: the Netherlands
Contact:

Re: updating timers for setpoints

Post 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?
RPi 3, Domoticz dev version, Aeon ZWave stick (with a whole bunch of slaves), Zigbee using Zigbee2MQTT, Nest thermo, P1 smart meter on RPi Zero
User avatar
jvdz
Posts: 2441
Joined: Tuesday 30 December 2014 19:25
Target OS: Raspberry Pi / ODroid
Domoticz version: 4.107
Location: Netherlands
Contact:

Re: updating timers for setpoints

Post by jvdz »

The post shows the exact json api call supported, so please check again and give those a try. :-)
JanJaap
Posts: 229
Joined: Thursday 12 October 2017 20:46
Target OS: Raspberry Pi / ODroid
Domoticz version: Dev
Location: the Netherlands
Contact:

Re: updating timers for setpoints

Post 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
RPi 3, Domoticz dev version, Aeon ZWave stick (with a whole bunch of slaves), Zigbee using Zigbee2MQTT, Nest thermo, P1 smart meter on RPi Zero
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest