I am new to WLED and I would like to build a cabinet light.
My WLED version 0.12.0 “Hikari”, build 2104020 runs on a Wemos D1 mini and a WS2812E, connected to GPIO2.
Everything is running as desired.
Now I want to switch WLED on and off via a reed relay (contact) as follows:
- Door will be opened, reed contact will be opened → light should be switched on.
- Door will be closed, reed contact will be closed → light should be switched off.
The reed contact is connected to GPIO0(zero) with a 10K pull-up resistor, as described in the Wiki under Macros and Buttons.
The wiki describes that 2 presets should be created, which are activated by Switch Low2High or Switch High2Low.
- Preset 1 contains T=1
- Preset 2 contains T=0
However, I do not know how to correctly assign the button states to the presets so that the light is switched as described above!
I have already tried to assign the presets Long and Short Clicks, but I can only switch on the light when closing the reed contact. Nothing happens when I open it.
Maybe someone can help me by posting a small tutorial.
Many thanks for your help