trigger on GPIO or task, does it matter

Moderators: grovkillen, Stuntteam, TD-er

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

trigger on GPIO or task, does it matter

#1 Post by GravityRZ » 14 Mar 2020, 14:18

in my current rules i trigger a task by monitoring a change of that task value.

does it make a difference to monitor a gpio pin instead and run a task, based on that change.

eg, is there a difference in responsetime, cpu overhead

i know when i want to monitor a gpio pin i need to add a monitor command at startup and i can imagine this takes extra cpu cycles
Also i can imagine that the GPIO status is totally unfiltered so jitter can occur were as using the plugin might avoid things
thanks

so in my case

Code: Select all

On Watermeter#Count do	
	if [Watermeter#Count] > 0 and [Watermeter#Time] > 2500
or

Code: Select all

On  GPIO#14=0 do					
	if [Watermeter#Time] > 2500

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

Re: trigger on GPIO or task, does it matter

#2 Post by GravityRZ » 17 Mar 2020, 19:56

i am testing this at the moment to see if it is more accurate when used with the generic pulsecounter.

The pulsecounter only triggers on an interval base.
When you set the interval to 1 second it is workable but then you can get to a situation that when the counter is triggered and the 1 second timer resets(because the timer does not start when triggered but has it's own schedule) the counter is triggered again thus causing an extra count

i currently have the rules triggered by GPIO.
this way it is instantly

downside might be that in case of jitter on the GPIO pin (proximity sensor is stuck in trigger mode) i might get multiple readings

so far so good

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

Re: trigger on GPIO or task, does it matter

#3 Post by GravityRZ » 19 Mar 2020, 18:18

tested it and it makes no difference. changd things back to use only the variables from the plugin to get a more consistent flow value

Post Reply

Who is online

Users browsing this forum: No registered users and 5 guests