Timerplan switch button Topic is solved

Use this forum to discuss possible implementation of a new feature before opening a ticket.
A developer shall edit the topic title with "[xxx]" where xxx is the id of the accompanying tracker id.
Duplicate posts about the same id. +1 posts are not allowed.

Moderators: leecollings, remb0

Post Reply
ocean123

Timerplan switch button

Post by ocean123 »

Hi,

How can I make a switch button to set vacation-timerplan on and off. The only way I found at the moment is by settings to switch between two plans. We just want a simple button to switch on/off.

When switch is "on" then follow timer plan X. When switch is "off" follow timer plan Y. We do not want a Google calendar connection.

Does someone has any suggestions how?

In the future there will be a physical button connected to the gpio-pin or by z-wave
User avatar
felix63
Posts: 244
Joined: Monday 07 December 2015 9:30
Target OS: Raspberry Pi / ODroid
Domoticz version: 2020.1
Location: Gouda
Contact:

Re: Timerplan switch button

Post by felix63 »

Hi,

You can make a virtual switch and attach this action to it:

Code: Select all

http://127.0.0.1:8080/json.htm?type=command&param=setactivetimerplan&ActiveTimerPlan=0
ocean123

Re: Timerplan switch button

Post by ocean123 »

Thanks for your suggestion.
Greats
Ocean
Ron
Posts: 82
Joined: Friday 27 December 2013 23:29
Target OS: Raspberry Pi / ODroid
Domoticz version: 2.2284
Location: Nederland, Den Bosch
Contact:

Re: Timerplan switch button

Post by Ron »

I was struggeling a little with this, but its not complicated:
Create a dummy switch
Settings dummy switch, On action:

Code: Select all

http://127.0.0.1:8080/json.htm?type=command&param=setactivetimerplan&ActiveTimerPlan=2
Settings dummy switch, Off action:

Code: Select all

http://127.0.0.1:8080/json.htm?type=command&param=setactivetimerplan&ActiveTimerPlan=1
ActiveTimerPlan=2 --> Holiday timer plan with ID 2 (Second timer plan with Idx 2)
ActiveTimerPlan=1 --> Default timer plan with ID 1 (Standard/default timer plan with Idx 1)

If switch is on timerplan Holiday/2 is activated, if switch is off timerplan Default/1 is activated.
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest