HTTP GPIO Monitor

Moderators: grovkillen, TD-er, Stuntteam

Post Reply
Message
Author
vampo
Normal user
Posts: 2
Joined: 06 May 2020, 16:11

HTTP GPIO Monitor

#1 Post by vampo » 06 May 2020, 18:28

Hi.
I am searching for a way to read the state of GPIO pin.
In the command referencehttps://espeasy.readthedocs.io/en/lates ... mmand.html I see there is a "Monitor" command, which should to just that.
Monitor,<GPIO>

GPIO: 0 … 16

To monitor a GPIO state. By the use of the command you will receive events when the GPIO state of that pin is changed from 1 to 0 and from 0 to 1.
I am using ESPEasy version "mega-20200426", but I get "Unknown or restricted command" and "Command not found".

Why the command is not working, or how can I get the GPIO input value otherwise?
Thanks a lot!

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

Re: HTTP GPIO Monitor

#2 Post by grovkillen » 06 May 2020, 18:57

How do you use the command?

Code: Select all

Monitor,GPIO,14
When the GPIO state change is detected you get this event:

Code: Select all

On GPIO#14 Do
  //%eventvalue% will have the state 1 or 0
EndOn
8-)
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:

vampo
Normal user
Posts: 2
Joined: 06 May 2020, 16:11

Re: HTTP GPIO Monitor

#3 Post by vampo » 08 May 2020, 17:38

Thanks!!!

I was trying like that:

Code: Select all

Monitor,14
Maybe the documentation is old?

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

Re: HTTP GPIO Monitor

#4 Post by grovkillen » 08 May 2020, 17:54

Yes it seems to be incorrect. Thanks for that.
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 13 guests