hi, Im using two power supplies . one for esp32 and other power supply to the leds. i have connected relay in such a way that , when triggered relay can turn ON and OFF the power supply(which controls the leds).
My question is, I want to add a momentary button in esp32 to control the relay (to turn on and off the power supply) and also update it in UI.
this could be really helpful that. I dont have to open UI every time to turn on or off the relay, rather the push button can turn on and off the relay manually and also it would be great if it updates the status in UI too.
In the LED Preferences, you should see Hardware setup. Under there, you should see options to set the pin for your momentary button and another to choose a relay pin. This should allow you get the setup you are looking for. After you set the pins, you can go to Settings → Time & macros where you should see Button actions. Where you can choose what happens for the various button presses (short, long, double). You can set each action to a preset number. To toggle the power via the relay, you should create a preset with &T=2 and set that preset number to the desired button action. That should toggle the power on/off.
I am trying to activate a audio player module by using the relay function.
It already works with the standard way of triggering the relay when the leds are on.
But I need a functionalty triggering the relay when a certain preset is used.
I guess the solution is here but what does “create a preset with &T=2” exactly mean?
I use the web GUI to create presets - where do I have to add the &T=2 ?