Hi,
is it possible too get the Interval of a pulse counter a the rules?
pulse interval in rules
Moderators: grovkillen, Stuntteam, TD-er
Re: pulse interval in rules
You can let the task send a combined event, of all task values. Then you have the values as shown also on the devices page.
Or you enable monitoring (see: https://espeasy.readthedocs.io/en/lates ... ore-events )
and then when the event is triggered for a state change you can store the time (%uptime_ms%) in a variable and compute the difference.
However you cannot do that at "high" frequencies (over a few Hz) as rules parsing isn't that fast.
Also it may take a while before you process the event, so the timing isn't that accurate. (typical 100 msec resolution at best)
Or you enable monitoring (see: https://espeasy.readthedocs.io/en/lates ... ore-events )
and then when the event is triggered for a state change you can store the time (%uptime_ms%) in a variable and compute the difference.
However you cannot do that at "high" frequencies (over a few Hz) as rules parsing isn't that fast.
Also it may take a while before you process the event, so the timing isn't that accurate. (typical 100 msec resolution at best)
Re: pulse interval in rules
Thanks for your reply
Could you give me some hint please?
seems a bit complicated for what I need: just to avoid hard coding...compute the difference...
seems better but I don't understand how to let "the task send a combined event"combined event
Could you give me some hint please?
Re: pulse interval in rules
In the task configuration, you can check:
"Single event with all values:"
This will send a single event with all values of the task. See: https://espeasy.readthedocs.io/en/lates ... all-values
"Single event with all values:"
This will send a single event with all values of the task. See: https://espeasy.readthedocs.io/en/lates ... all-values
Re: pulse interval in rules
What I understand is that if I check this, for all the task concerned, I'll have a single event with all the values. With witch interval?In the task configuration, you can check:
"Single event with all values:"
I've read this could a good for performance issue, but I don't understand how it will be usefull to get the interval of the device.
Perhaps I wasn't clear...
What I'd like is to use in the rules some values given by Show Json
Re: pulse interval in rules
Ah OK, then I completely misunderstood your question.
I thought you wanted to get the "period" of the pulse you got from the pulse counter task, did not think of the set "interval" in the task.
That's never been asked before, but I get why you would want that.
For that I guess we need to implement a new variable.
Something like %intervalN% where N is the task index (starting at 1)
I thought you wanted to get the "period" of the pulse you got from the pulse counter task, did not think of the set "interval" in the task.
That's never been asked before, but I get why you would want that.
For that I guess we need to implement a new variable.
Something like %intervalN% where N is the task index (starting at 1)
Re: pulse interval in rules
Made an issue for it on GitHub: https://github.com/letscontrolit/ESPEasy/issues/3792
Re: pulse interval in rules
Thanks!
Who is online
Users browsing this forum: No registered users and 18 guests