Use switch to disable setpoint timers  [Solved]

Easy to use, 100% Lua-based event scripting framework.

Moderator: leecollings

Post Reply
broxtor
Posts: 5
Joined: Sunday 21 October 2018 10:29
Target OS: Raspberry Pi / ODroid
Domoticz version: v4.10007
Location: NL
Contact:

Use switch to disable setpoint timers

Post 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?
User avatar
philchillbill
Posts: 399
Joined: Monday 12 September 2016 13:47
Target OS: Linux
Domoticz version: beta
Location: Eindhoven. NL
Contact:

Re: Use switch to disable setpoint timers

Post 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.
Alexa skills author: EvoControl, Statereport, MediaServer, LMS-lite
User avatar
waaren
Posts: 6028
Joined: Tuesday 03 January 2017 14:18
Target OS: Linux
Domoticz version: Beta
Location: Netherlands
Contact:

Re: Use switch to disable setpoint timers

Post 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
Debian buster, bullseye on RPI-4, Intel NUC.
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
User avatar
philchillbill
Posts: 399
Joined: Monday 12 September 2016 13:47
Target OS: Linux
Domoticz version: beta
Location: Eindhoven. NL
Contact:

Re: Use switch to disable setpoint timers

Post 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.
Alexa skills author: EvoControl, Statereport, MediaServer, LMS-lite
broxtor
Posts: 5
Joined: Sunday 21 October 2018 10:29
Target OS: Raspberry Pi / ODroid
Domoticz version: v4.10007
Location: NL
Contact:

Re: Use switch to disable setpoint timers

Post 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?
User avatar
waaren
Posts: 6028
Joined: Tuesday 03 January 2017 14:18
Target OS: Linux
Domoticz version: Beta
Location: Netherlands
Contact:

Re: Use switch to disable setpoint timers

Post 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 ?
Debian buster, bullseye on RPI-4, Intel NUC.
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
broxtor
Posts: 5
Joined: Sunday 21 October 2018 10:29
Target OS: Raspberry Pi / ODroid
Domoticz version: v4.10007
Location: NL
Contact:

Re: Use switch to disable setpoint timers  [Solved]

Post 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!
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest