Page 1 of 1

button for indigo touch

PostPosted: Fri Nov 16, 2018 10:46 am
by Duchateau
I want to make 1 button to control my ventilation ,lo mid and hi
It is controlled by a dual relais lo is always on, lo+relais 1 is for mid and lo +relais 2 for hi
Do I need to make a variable? And how do I toggle through the variable?

Re: button for indigo touch

PostPosted: Fri Nov 16, 2018 12:54 pm
by jay (support)
What is the exact device type? What are the commands you send to the device to change it?

Re: button for indigo touch

PostPosted: Fri Nov 16, 2018 2:03 pm
by Duchateau
It's a TKBHome relay switch. The ventilation unit is controlled by 3 cables 1 low speed(always powered). For mid I switch the relay1 and hi relay1 off and relay 2on
I would like it on a control page
to toggle between lo mid hi

Re: button for indigo touch

PostPosted: Fri Nov 16, 2018 2:59 pm
by FlyingDiver
Can you control it from Indigo now? Can you make a control page with buttons for each speed?

If not, you need to get that working first, then worry about one button that cycles through the settings.

Re: button for indigo touch

PostPosted: Fri Nov 16, 2018 4:25 pm
by jay (support)
Duchateau wrote:
It's a TKBHome relay switch. The ventilation unit is controlled by 3 cables 1 low speed(always powered). For mid I switch the relay1 and hi relay1 off and relay 2on
I would like it on a control page
to toggle between lo mid hi


Guess I should have been clearer: exactly how do you control them? What are the exact Indigo actions you perform? I have no idea what a TKBHome relay switch does or how it's presented in Indigo (a single device, multiple Indigo relay devices, etc).

Re: button for indigo touch

PostPosted: Sat Nov 17, 2018 1:06 am
by Duchateau
I just let indigo turn on relays 1 or relays 2 (for mid en hi )on specific times
you can control the speeds with the power cable (perilex) putting power on specific cables
Ii use the TKBHome double relay ,in indigo it shows 3 devices : relay1, relay2, and both in one device
I thought there's maybe a way to toggle true a list(lo mid hi), set that to a variable and let the variable change the icons and switch the relays ?

Re: button for indigo touch

PostPosted: Sat Nov 17, 2018 3:27 am
by mat
Thats how I would do it.

A button that cycles a variable through the the three states and based on the variable changing, set the on/off to the correct settings.

You can change the image on the button using heuristic imaging. See the explanation https://wiki.indigodomo.com/doku.php?id ... m_images&s[]=heuristic

I think the guys above are just checking that you can actually control the unit at present, which it appears you can.

Cheers

Re: button for indigo touch

PostPosted: Sat Nov 17, 2018 4:07 am
by Duchateau
Thanks for the reply
How do I toggle through a variable?

Re: button for indigo touch

PostPosted: Sat Nov 17, 2018 5:03 am
by mat
I'm presuming you can control the unit from indigo aleady, as questioned above?



A simple script as an action group would be the simplest, actioned each time the button is pressed.

Or if you are not happy with python, you could just use triggers .... but its a little more in depth...

Create a variable for heating_mode and set its value to 1
On your control page, in the server action for the button, add an action to increase the variable by 1 when the button is pressed.

Then create 4 new triggers.

Set the first trigger type to variable change, select the variable you created and select the becomes greater than option - insert "3" into the box. Then in the action tab, do a variable type action and set the variable you created to a value of 1 - this trigger will stop your variable becoming greater than 3.

Now create three more triggers one of each of the modes.

so the first would be a variable change trigger, where the variable becomes equal to 1. The action would be to switch both of your switches off.
The second would be as above, but equal to 2, and would switch the appropriate switch on - say switch 1.
The third would be as above, but for 3, and would switch off switch 1 and switch the second on.

You could then set the image of the button, based on the variable value using the method in the link above.

Re: button for indigo touch

PostPosted: Sat Nov 17, 2018 6:40 am
by Duchateau
Thanks Mat
That was exactly what i needed