I’d actually connect one side to 0V and the other to a GPIO connected to 3V3 via a pullup resistor but, otherwise, yes. As the contact is NC it would be switch1i
If you want it to ‘fail safe’ connect 3V3 to one side of the switch and a pull down resistor between the GPIO and 0V. It would then be switch1.
Regards
Phil K
Sent from Mail for Windows 10
--
You received this message because you are subscribed to the Google Groups "TasmotaUsers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sonoffusers...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/sonoffusers/ed995bff-71aa-4479-a2f9-a852c63f9cc7n%40googlegroups.com.
4k7 or higher. It’s just to ensure that the GPIO is either high or low and not ‘floating’ – helps prevent nuisance tripping.
The NC contact will keep it at 0V. If the contact opens (or you lose the wire) then the GPIO will go high.
Regards
Phil K
Sent from Mail for Windows 10
From: Michael Ingraham
Sent: 17 November 2020 16:01
To: TasmotaUsers
Subject: Re: Alarm Relay Contact Detection
This?
--
You received this message because you are subscribed to the Google Groups "TasmotaUsers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sonoffusers...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/sonoffusers/37b58cb1-b63c-4102-b943-e06b9e6dee9cn%40googlegroups.com.