Sonoff 4ch Pro, ESPeasy button/rule problem

Moderators: grovkillen, Stuntteam, TD-er

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

Re: Sonoff 4ch Pro, ESPeasy button/rule problem

#11 Post by grovkillen » 15 Mar 2018, 15:49

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:

User avatar
Methuselah
Normal user
Posts: 45
Joined: 04 Feb 2018, 01:39
Location: Boston, MA

Re: Sonoff 4ch Pro, ESPeasy button/rule problem

#12 Post by Methuselah » 15 Mar 2018, 23:38

I use a Sonoff 4CH Pro to control a remote antenna switch. Either by sending an event to the controller, or via the buttons. When I press a button, my state changes from 0 to 1 or 1 to 0 and stays that way until I change it again (or a reset).

My configuration:

Image

My rules:

Code: Select all


on Button1#Press do
   if [GPIO12#State] = 0
      GPIO,12,1
   else
      GPIO,12,0
   endif
endon

N00b to the world of ESPEasy, but I've been programming since the days of punch cards and paper tape :)

hacimsenigma
New user
Posts: 1
Joined: 22 Apr 2019, 13:50

Re: Sonoff 4ch Pro, ESPeasy button/rule problem

#13 Post by hacimsenigma » 22 Apr 2019, 13:52

Old post I know,

Change the Value from "State" to "Switch"

Post Reply

Who is online

Users browsing this forum: No registered users and 39 guests