-
Notifications
You must be signed in to change notification settings - Fork 4.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Rule Break Not Working as Expected #9245
Comments
Do you have set to trigger as ONE SHOOT in the rule? I mean Besides, please, could you be so kind to complete the troubleshooting template in order to have more information to debug this issue? Thanks. |
@ascillato2 Thank you for handle this. I completed the template as requested. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Updated at latest version, issue still remaining |
I can confirm the same behavior, I wondered the whole time what I was doing wrong. |
Yes! the break function is bugged when you try with three or more fields to trigger, no matter the order or the direcion. |
I'll try to understand the issue... |
The good thing is I can reproduce with the following rule and only with ONCE enabled:
It's ONCE related so I think I can solve this... |
Fixed rule Break not working as expected when ONCE is enabled (#9245)
I am not so sure, I will test, but in my case, it was not related with ONCE. I had the rule running on normally. |
I'll wait till the 9.0.0.3 release is available to test the changes |
Tested with http://ota.tasmota.com/tasmota/ The issue persists, but different.
When a value above 133cm it triggers the first action, but then inmidiatly triggers the second action. Example change from 85cm to 167cm and stay on 167cm
|
Cannot reproduce. Using the rule shown before:
it still works as designed. What you may encounter is a retrigger from the rule within 4 seconds which reports several distances due to "not so stable" sensor. |
You may emulate by entering different values on For stability its ok for integer values, but for decimal, it is very floating on a range +/- 0.3 |
for me "break" doesn't work with this rule too Rule1 the humidity is triggered 2 times a second ... 22:27:58 CMD: Rule1 ON system#boot DO Backlog RuleTimer1 10; Var1 255 ENDON ON rules#timer!=1 BREAK ON BME280#Humidity<65 DO Backlog SUB1 1 ENDON ON BME280#Humidity>70 DO Backlog ADD1 1 ENDON ON Var1#State < 0 DO Var1 0 ENDON ON Var1#State > 1023 DO Var1 1023 ENDON ON rules#timer=1 DO Backlog PWM5 %Var1%; Ruletimer1 5 ENDON or do i have a mistake in my rule or do i understand the break function incorrectly? Before I wanted to send this I thought to myself, I'd rather test again with the current develop version, so off to gitpod :) but I can't compile the current dev version with my config for esp32cam, the master version compiles without problems. Indexing .pio/build/tasmota32/libFrameworkArduino.a |
your rules have syntax errors, that is why they don't work. You have spaces where they shouldn't be and you have missing some DO. for example then, Please, re check the docs for syntax. Thanks. |
Sorry, I can not reproduce it either using the rule shown before. Seems that your sensor value is fluctuating. |
PROBLEM DESCRIPTION
When there is "BREAK" on rules, they doesnt work as expected when you try to trigger a value between a maximun or minimum.
Please this is just an example but this applies on most of configurations on this type. For example turn on a fan (maximum power, switch 2) when the temperature is above 20°C, turn on the same fan (minimum power, switch 1) when the temperature is between 10 and 20°C and turn off the fan when the temperature is lower 10°C.
Values are very floating so its necesary to set to
Rule1 5
option, to just read it once, otherwise it will be trigger rules all time like crazy.So reading the rules cookbook is just a simple rule, something like this.
just to simplify
Action "A" should be a backlog power1 0; power2 1 (maximum power)
Action "B" should be a backlog power1 1; power2 0 (minimum power)
Action "C" should be a backlog power1 0; power2 0 (all off)
THE ISSUE ITSELF
In the same example lets study what happen to the output if we input some values. Please follow the order, this is very important for the description of the issue.
Input: Sensor = 9°C
Output: Action "C" (thats fine)
Input: Sensor = 14°C
Output: Action "B" (thats fine)
Input: Sensor = 21°C
Output: Action "A" (thats fine)
Input: Sensor = 17°C
Output: Nothing happens (here is the issue, it should trigger Action "B")
Input: Sensor = 8°C
Output: Action "C"
In summary there are 6 combinations from one to another action. With that configuration
From "C" to "B" works
From "C" to "A" works
From "B" to "A" works
From "A" to "B" (this is not trigger)
From "A" to "C" works
EXPERIMENTING
I didnt stop and tried to figure what happen if i try another order or combine endon and break seems interesting what happen with this configuration.
To make it short this happens
From "C" to "B" works
From "C" to "A" works
From "B" to "A" (this is not trigger)
From "A" to "B" works
From "A" to "C" works
REQUESTED INFORMATION
Make sure your have performed every step and checked the applicable boxes before submitting your issue. Thank you!
Backlog Rule1; Rule2; Rule3
:Status 0
:(Please use
weblog 4
for more debug information)TO REPRODUCE
Set
Rule1 5
Make a rule with 3 fields:
A > X
X > B > Y
C < Y
While X is the maximum value and Y is the minimum value
A, B, C are the triggers
EXPECTED BEHAVIOUR
The expectation is to have a fluid trigger depending the value.
In the same example is Rule1 should trigger the condition in both directions.
From A to B // from B to C // from C to B // from B to A
A -> B -> C -> B -> A
And exeptional cases
From A to C // from C to A
A -> C
C -> A
SCREENSHOTS
ADDITIONAL CONTEXT
This is maybe a bug that have the function BREAK, it seems that it doesnt refresh values to trigger because at a big change of values, it should trigger if the value reach to the field that correspond.
(Please, remember to close the issue when the problem has been addressed)
The text was updated successfully, but these errors were encountered: