SONOFF S20 : how to connect a reed switch

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
Gilles
Normal user
Posts: 101
Joined: 21 Dec 2017, 11:09

SONOFF S20 : how to connect a reed switch

#1 Post by Gilles » 30 May 2019, 18:49

Hello,
I would like to use a SONOFF S20 along with a reed switch to check if the window is opened or closed. Then I will add rules to send a mail if the window is open for more than 10 minutes.

I have read some examples in the forum where LisaM said that using the gpio 1,3 ,13 and 15 is not good, because they are used at boot time, so should not be used. (viewtopic.php?t=3263).

Somewhere else, I have noted that I could use the GPIO 14.
I have no idea how to know where to locate these GPIOs.
I have attached a pix of my SONOFF S20.
I have 2 questions:
1) Is it possible to connect a reed switch to the SONOFF S20?
2) Does someone know where to connect the reed switch to the SONOFF S20 ?
IMG_20190530_181853.jpg
IMG_20190530_181853.jpg (3.13 MiB) Viewed 8958 times
The SONOFF S20 runs Espeasy:
Build: 20000 - Mega
GIT version: v2.0-20180126

Thanks
Gilles

User avatar
grovkillen
Core team member
Posts: 3621
Joined: 19 Jan 2017, 12:56
Location: Hudiksvall, Sweden
Contact:

Re: SONOFF S20 : how to connect a reed switch

#2 Post by grovkillen » 30 May 2019, 18:58

If you turn off the serial you may use the RX or TX as GPIO.
ESP Easy Flasher [flash tool and wifi setup at flash time]
ESP Easy Webdumper [easy screendumping of your units]
ESP Easy Netscan [find units]
Official shop: https://firstbyte.shop/
Sponsor ESP Easy, we need you :idea: :idea: :idea:

Gilles
Normal user
Posts: 101
Joined: 21 Dec 2017, 11:09

Re: SONOFF S20 : how to connect a reed switch

#3 Post by Gilles » 30 May 2019, 19:12

Thanks
I assume that :
GPIO 1 if I use the TX
or
GPIO 3 if I use the RX.

For the record, to disable the serial port , go to Tools, Advanced, and untick the "Enable Serial port:" in the "Serial Settings" section.

User avatar
grovkillen
Core team member
Posts: 3621
Joined: 19 Jan 2017, 12:56
Location: Hudiksvall, Sweden
Contact:

Re: SONOFF S20 : how to connect a reed switch

#4 Post by grovkillen » 30 May 2019, 20:38

Yes correctly.
ESP Easy Flasher [flash tool and wifi setup at flash time]
ESP Easy Webdumper [easy screendumping of your units]
ESP Easy Netscan [find units]
Official shop: https://firstbyte.shop/
Sponsor ESP Easy, we need you :idea: :idea: :idea:

Post Reply

Who is online

Users browsing this forum: No registered users and 65 guests