combine 2 switches inside one on/off

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
jeje77
Posts: 2
Joined: Wednesday 10 February 2016 0:48
Target OS: Raspberry Pi / ODroid
Domoticz version: 2.4031
Location: Paris, France
Contact:

combine 2 switches inside one on/off

Post by jeje77 »

Hello, :roll:

My electrical outlet needs to have 2 switches on my domoticz ... one to turn it on and one to turn it off ... :shock:
I would like if possible to combine this 2 switches inside one on/off ;)

I already try to create a script but for the way I found, my 2 switches have to stay where they are :cry:

=> I suggest (I think) that it can be good to have the possibility to combine the switches together.

thanks
stlaha2007
Posts: 370
Joined: Monday 05 October 2015 10:16
Target OS: -
Domoticz version:
Contact:

Re: combine 2 switches inside one on/off

Post by stlaha2007 »

Hi jeje77,

I think your half way...
One switch (domoticz way) can hold two different scripts (eventualy even one with parameter on or off if you like).

Another way, what comes to mind is the following. Domoticz devices can be hidden by naming them with a dollarsign as first character in there name.
So create new switch(or group) and call so to speak the hidden switch to turn it on and the other as off action.

I hope you understand what i mean and hopefully make you smile when that works :-)

Grtz,
Stephan
jeje77
Posts: 2
Joined: Wednesday 10 February 2016 0:48
Target OS: Raspberry Pi / ODroid
Domoticz version: 2.4031
Location: Paris, France
Contact:

Re: combine 2 switches inside one on/off

Post by jeje77 »

Thanks Stephan :D

Your second way work 8-)

Thanks for the tips "$" ..... that change everything ;)
tonse
Posts: 3
Joined: Friday 11 March 2016 13:55
Target OS: Raspberry Pi / ODroid
Domoticz version: 3.8771
Contact:

Re: combine 2 switches inside one on/off

Post by tonse »

How can i "call" a hidden switch?
stlaha2007
Posts: 370
Joined: Monday 05 October 2015 10:16
Target OS: -
Domoticz version:
Contact:

Re: combine 2 switches inside one on/off

Post by stlaha2007 »

Simple answer do a json call according to wiki as a script action.

i dont use hidden devices at the moment. All my devices are normally represented or triggering on/off action scripts.

Grtz,
Stephan
jannl
Posts: 673
Joined: Thursday 02 October 2014 6:36
Target OS: Raspberry Pi / ODroid
Domoticz version: 2022.2
Location: Geleen
Contact:

Re: combine 2 switches inside one on/off

Post by jannl »

You also can a an http json call to the on- and off action of a virtual switch, in this way you do not need to create a script
User avatar
bbqkees
Posts: 407
Joined: Sunday 17 August 2014 21:01
Target OS: Linux
Domoticz version: 4.1x
Location: The Netherlands
Contact:

Re: combine 2 switches inside one on/off

Post by bbqkees »

Maybe you can use the new selector switch for this.
Bosch / Nefit / Buderus / Junkers / Worcester / Sieger EMS bus Wi-Fi MQTT Gateway and interface boards: https://bbqkees-electronics.nl/
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest