GPIO triggering all the time

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
GravityRZ
Normal user
Posts: 206
Joined: 23 Dec 2019, 21:24

GPIO triggering all the time

#1 Post by GravityRZ » 04 Apr 2023, 15:51

i use GPIO 5 as a switch(i use it to control a relais)
gpio5.JPG
gpio5.JPG (23.28 KiB) Viewed 828 times
i use a HTTP command to set this GPIO 5 to either 0 or 1 (set to 1 will trigger the relais)

in rules i use

on Brink#Ventilator=1 do
xxxxxx


now i was expecting that this rule was only triggered on change but it seems it is being triggered all the time

eg when gpio 5 =1 this rules gets executed everytime instead on only a change

is this normal for GPIO ports

should i use monitor GPIO5 to avoid this

the reason i want to use the eventhasndler is that monitor is resource intensive
at the moment i am not monitoring GPIO5 but i am checking the Brink device

TD-er
Core team member
Posts: 8756
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: GPIO triggering all the time

#2 Post by TD-er » 04 Apr 2023, 17:44

You should either use it as shown for an input (e.g. with a button connected to it) or solely interact with the GPIO via rules.

To receive events when acting on it via rules, you should indeed call "monitor" for that GPIO pin.

GravityRZ
Normal user
Posts: 206
Joined: 23 Dec 2019, 21:24

Re: GPIO triggering all the time

#3 Post by GravityRZ » 04 Apr 2023, 17:48

ok, clear. i thought i fgured out something smart (which it is becauswe i can monitor a gpio state without using monitoring) but aparently it does not work all the way.

i will implement the monitor function which should do the trick

Post Reply

Who is online

Users browsing this forum: No registered users and 36 guests