Page 1 of 1

Use switch to disable setpoint timers

Posted: Saturday 15 June 2019 7:40
by broxtor
I have a couple of Eurotronic Z-wave radiator thermostats. These thermostats have devices for setting the desired temperature. These can be found on the "Utility" tab in Domoticz. There you can set various timers for these devices. I have used these timers to change the setpoint throughout the day. However, in summer there's no need for heating, thus setting the setpoints is pointless but does drain the batteries of the thermostats.
I already have a switch that disables the central heating during summer. I would also like this switch to disable the timers on the thermostats, but I can't figure out how to do this. I can't find anything on these timers on the dzEvents wiki. Does somebody know how to do this?

Re: Use switch to disable setpoint timers

Posted: Saturday 15 June 2019 8:15
by philchillbill
In the menu Settings --> Setup --> Other there is a selector for Timer Plan. You can change to a different plan there and all the timers in the previously active plan will be disabled. It's not a switch as such but if you're only doing it once a year for summer it's an easy way to achieve what you want.

Re: Use switch to disable setpoint timers

Posted: Saturday 15 June 2019 8:32
by waaren
philchillbill wrote: Saturday 15 June 2019 8:15 In the menu Settings --> Setup --> Other there is a selector for Timer Plan. You can change to a different plan there and all the timers in the previously active plan will be disabled. It's not a switch as such but if you're only doing it once a year for summer it's an easy way to achieve what you want.
If you use this timerplan approach more frequent and want to automate the switch between various timerplans you can use function below.
For example; I use this based on the absence of certain keywords in my Google calendar.

Code: Select all

        local function setTimerplan(timerPlan)
            local url  = dz.settings['Domoticz url'] ..  "/json.htm?type=command&param=setactivetimerplan&ActiveTimerPlan=" .. tostring(timerPlan)
            dz.openURL(url)
        end

Re: Use switch to disable setpoint timers

Posted: Sunday 16 June 2019 15:42
by philchillbill
Good point @waaren. That JSON command can even be used in the HTTP on/off action for a switch so that @broxtor can have his exact wish realised.

Re: Use switch to disable setpoint timers

Posted: Thursday 20 June 2019 21:31
by broxtor
Thank you both! Very helpful.
Although I don't get the function working. Also tried the json url in the "on" and "off" action of the switch like this:

Code: Select all

http://127.0.0.1:8080/json.htm?type=command&param=setactivetimerplan&ActiveTimerPlan=0
(As suggested here)
But that doesn't work. Also tried with timer plan name like:

Code: Select all

http://127.0.0.1:8080/json.htm?type=command&param=setactivetimerplan&ActiveTimerPlan="summer"
http://127.0.0.1:8080/json.htm?type=command&param=setactivetimerplan&ActiveTimerPlan="winter"
Also no luck there. Any pointers on how to do this?

Re: Use switch to disable setpoint timers

Posted: Thursday 20 June 2019 21:46
by waaren
broxtor wrote: Thursday 20 June 2019 21:31 Although I don't get the function working. Also tried the json url in the "on" and "off" action of the switch like this:

Code: Select all

http://127.0.0.1:8080/json.htm?type=command&param=setactivetimerplan&ActiveTimerPlan=0
Any pointers on how to do this?
Do you see anything in the log ? if not what do you see if you try this from the CLI with curl ?

Re: Use switch to disable setpoint timers  [Solved]

Posted: Friday 21 June 2019 20:21
by broxtor
The log only shows that the switch is switched:

Code: Select all

2019-06-21 20:13:57.389 Status: User: Admin initiated a switch command (142/CV zomerstand/Off)
When using curl on the CLI:

Code: Select all

pi@MediaPi:~ $ curl http://127.0.0.1:8080/json.htm?type=command&param=setactivetimerplan&ActiveTimerPlan=0
[1] 24848
[2] 24849
pi@MediaPi:~ $ {
   "status" : "ERR"
}
Edit: Got it working now. I tried entering the url directly in the browser with the LAN IP instead of 127.0.0.1. And besides that it seems that Timerplan 0 does not exist. Using timerplan=1 and timerplan=2 does work now. So to recap what works:

Code: Select all

http://192.168.0.5:8080/json.htm?type=command&param=setactivetimerplan&ActiveTimerPlan=1
http://192.168.0.5:8080/json.htm?type=command&param=setactivetimerplan&ActiveTimerPlan=2
Thanks again for the help!