Hardware Switches for Wemos Mini D1 to control relay

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
jacob87
New user
Posts: 1
Joined: 11 Jul 2018, 10:54

Hardware Switches for Wemos Mini D1 to control relay

#1 Post by jacob87 » 11 Jul 2018, 11:39

I would like to control my four relays connected to the Wemos Mni D1 using a push button(Tactile) switch for each relay(Just like the tactile switches in Sonoff 4-channel). I couldn't find a proper answer for this over the internet. All I got was, I should use rules to activate via push switch. I tried but couldn't succeed. I can control my relays over OpenHAB so I need the update in OpenHAb after using the hardware buttons. I feel like hardware switches are must at home for others to use. Preferably GPIOs 5,4,0,2 for the relays and GPIOs 16,14,12,13 for the switches.I need the rules files and device configuration for EspEasy
Attachments
Relay Device in ESPEASY.PNG
Relay Device in ESPEASY.PNG (19.85 KiB) Viewed 3018 times

TD-er
Core team member
Posts: 8729
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: Hardware Switches for Wemos Mini D1 to control relay

#2 Post by TD-er » 14 Jul 2018, 07:20

Here is some description about the switch/relay binding: https://www.letscontrolit.com/wiki/inde ... noff_basic
And you have to take a good look at GPIO 0 and 16.
Those are special.
Just out of my head, GPIO 16 is not connected to an interrupt, so using it for a switch is probably not a good idea.
GPIO-0 must have a specific state at boot.
Set to GND will make it enter flash mode at boot and otherwise a normal boot.
On NodeMCU boards, the GPIO-0 pin is connected to the "flash" button, which should be held pressed to enter flash mode.

Post Reply

Who is online

Users browsing this forum: Bing [Bot] and 6 guests