Hello all Ladies and Gents
Firstly I would like to say HELLO because it is my first post on this forum.
Secondly I've got a question for you:
Now I try to do some simple remote activate alarm with ESP Easy.
unfortunately switch don't show any state change on devices site, and also Events are not activated.
Can you help me please?
Hardware:
ESP with switch connected to gpio 16 and GND
Configuration:
Config -> Protocol Standalone
Hardware ->GPIO 16 as Default Value
Devices -> Switch
|-> Device - Switch Input
|-> Name - Lewy
|-> Delay - 0
|-> IDX -> Value not 0
|-> 1St GPIO -> 16
|-> Pullup -> no (yes also checked)
|-> Inversed -> no (yes also checked)
|-> Switch type - Switch
|-> Send boot state - no (What do this option?)
|-> Send Data - match (What do this option?)
|-> Value Name - Switch
Rules ->
On Lewy#Switch =1 do
SendToHTTP 192.168.1.160,80,/control?cmd=event,A //Activate event on remote ESP
endon
Any Ideas why button doesn't work?
Thanks in advance
Switch doesn't work?
Moderators: grovkillen, Stuntteam, TD-er
Re: Switch doesn't work?
Don't forget a current limiting resistor(1k) in line with the switch.
Your post isn't clear, you write switch at first and later button. For a momentary pushbutton configure the switch type accordingly.
Then the pin isn't set as input but anyhow - gpio 16 is somewhat special, I'd try to pull it high instead of low or simply use a different pin.
More info on gpio's: https://blog.falafel.com/programming-gp ... h-nodemcu/
tl;dr: gpio 16 can be used as input but it has an internal pull down (opposed to 0-15 with pull ups). ESPEasy doesn't reflect this and still presents the "pull up" option. Maybe you've found a bug.
Your post isn't clear, you write switch at first and later button. For a momentary pushbutton configure the switch type accordingly.
Then the pin isn't set as input but anyhow - gpio 16 is somewhat special, I'd try to pull it high instead of low or simply use a different pin.
More info on gpio's: https://blog.falafel.com/programming-gp ... h-nodemcu/
tl;dr: gpio 16 can be used as input but it has an internal pull down (opposed to 0-15 with pull ups). ESPEasy doesn't reflect this and still presents the "pull up" option. Maybe you've found a bug.
Re: Switch doesn't work?
Thanks for quick response.
I will try your suggest and let you know.
I will try your suggest and let you know.
Re: Switch doesn't work?
Thanks it works now .
By the way is possible to define and condition on rules eg.
if gpio12=1 and gpio10=1 then...
?
By the way is possible to define and condition on rules eg.
if gpio12=1 and gpio10=1 then...
?
Re: Switch doesn't work?
Mind to share your solution? ;)
Sadly no AND. From rules tutorial:
GPIO is a command, not a value so you can't check directly for that. Instead create a switch device with the respective pin as input and use
Sadly no AND. From rules tutorial:
But there's a workaround:Also simple if ... else ... endif statements are possible, but nesting and Boolean logic are not supported.
Code: Select all
...
if condition1
event checkAND
endif
...
on checkAND do
if condition2
desired action
endif
endon
Code: Select all
if [devicename#valuename]=1
Who is online
Users browsing this forum: Google [Bot] and 23 guests