Push button state without toggle

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
ajtofelfa
Normal user
Posts: 6
Joined: 24 Sep 2018, 21:14

Push button state without toggle

#1 Post by ajtofelfa » 24 Sep 2018, 21:46

I'm working on getting my garage door into Domoticz. I can already activate the door using the physical button connector on the door module, but I'd also read the open/close state. There's a port on the door module with a two pin connection that shows the door status, I'd like to read this with a Wemos D1 that I also use to control the relay. I did a little testing with setting up a switch device in ESPEasy but I couldn't get it to operate like a push button, it only toggles the switch on and off. Is there a way to set up a device that is only on while the dummy button is pressed (e.g. the GPIO is grounded)? That's my device page. Thanks!

Capture.PNG
Capture.PNG (33.43 KiB) Viewed 2127 times

xury
Normal user
Posts: 44
Joined: 02 Apr 2018, 12:54

Re: Push button state without toggle

#2 Post by xury » 24 Sep 2018, 21:56

Did you marked internal pull-up?
And set to "Push button active low"

ajtofelfa
Normal user
Posts: 6
Joined: 24 Sep 2018, 21:14

Re: Push button state without toggle

#3 Post by ajtofelfa » 24 Sep 2018, 22:01

Yup, the toggle action is the same with and without the internal pull up checked.

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

Re: Push button state without toggle

#4 Post by grovkillen » 25 Sep 2018, 05:45

You should give your task/switch a name.
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:

ajtofelfa
Normal user
Posts: 6
Joined: 24 Sep 2018, 21:14

Re: Push button state without toggle

#5 Post by ajtofelfa » 25 Sep 2018, 17:20

OK, I've named the switch, here's how the device page looks like now. Still working in toggle mode. It must be some simple trick but I can't find it.
Capture.PNG
Capture.PNG (25.59 KiB) Viewed 2073 times

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

Re: Push button state without toggle

#6 Post by grovkillen » 25 Sep 2018, 17:37

Spaces in names are not recommended.
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:

ajtofelfa
Normal user
Posts: 6
Joined: 24 Sep 2018, 21:14

Re: Push button state without toggle

#7 Post by ajtofelfa » 25 Sep 2018, 18:08

Finally got it working. Should be a normal switch type, not a push button and inversed logic should be checked. :oops:

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

Re: Push button state without toggle

#8 Post by grovkillen » 25 Sep 2018, 18:44

Good job :)
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 12 guests