Relay status state?

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
datadecimal
New user
Posts: 3
Joined: 14 Aug 2018, 07:53

Relay status state?

#1 Post by datadecimal » 14 Aug 2018, 07:55

I am using a Sonoff Switch and i wanted to know if there was a way i could setup if the power is on or off on my gpio pin. i needed to setup something to tell on my website if the light is on or off. not sure on what to research as far as the method to do so

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

Re: Relay status state?

#2 Post by grovkillen » 14 Aug 2018, 09:18

Easiest way of doing this is to create a switch input of that GPIO. It will then monitor that GPIO as if it was a simple latching button.
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:

datadecimal
New user
Posts: 3
Joined: 14 Aug 2018, 07:53

Re: Relay status state?

#3 Post by datadecimal » 14 Aug 2018, 18:30

grovkillen wrote: 14 Aug 2018, 09:18 Easiest way of doing this is to create a switch input of that GPIO. It will then monitor that GPIO as if it was a simple latching button.
Do you have an example of this being done with anything? I can do it myself just need a sample of it being done with anything.

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

Re: Relay status state?

#4 Post by grovkillen » 14 Aug 2018, 19:50

If you read on the wiki regarding that plugin (Switch input) you'll see how it's done.
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:

datadecimal
New user
Posts: 3
Joined: 14 Aug 2018, 07:53

Re: Relay status state?

#5 Post by datadecimal » 14 Aug 2018, 20:27

grovkillen wrote: 14 Aug 2018, 19:50 If you read on the wiki regarding that plugin (Switch input) you'll see how it's done.
Awesome i figured it out thanks a ton

Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot] and 30 guests