See the attachment
Since you are using a electro-mechanical switch a
De-bounce value is needed. For your magnetic reed switch application I suggest changing the 0mS value to 100mS.
The settings at the bottom of the plugin's screenshot are missing. So I cannot see the
Values name. Your rules use "door#state" for the switch so please confirm that "state" is what is entered as the Values name.
This is a test setup: the wires are 10 cm at max.
The GPIO's internal PullUp should be fine for the reed switch's short 10cm wires. An external pull-up resistor (with a low R value) will be needed on installations with long wire leads.
Your remarks made me double check the wiki; I connected the switch to ground. After connecting to 3v, nothing is happening at all...
One wire of the switch should go to GPIO-14. The switch's other wire should go to ground (not 3V).
Keep in mind that if the door is opened, then quickly shut, there is the possibility that the light may never turn on. And vice versa. So allow sufficient open and close times during the tests.
Does the relay reliably turn on too? For example:
http://192.168.1.62/control?cmd=GPIO,16,1
If you are experiencing issues with GPIO control of the 4-channel relay then please post a vendor link to it.
Generally speaking, I don't recommend directly controlling GPIO from the http URI. Instead create a RelayOn and RelayOff rule and http control it using the "event" command. See Event:
https://www.letscontrolit.com/wiki/inde ... _Reference
- Thomas