-
PROBLEM DESCRIPTIONA clear and concise description of what the problem is. I have a very simple rule instruction which looks like: If I change the rule instruction to: This means that operations priority is not working fine in the latest Tasmota version. In in user_config_override.h, I have set: REQUESTED INFORMATIONMake sure your have performed every step and checked the applicable boxes before submitting your issue. Thank you!
Configuration output here:
Rules output here:
20:49:43.847 CMD: Backlog Rule1; Rule2; Rule3
20:49:43.862 RSL: RESULT = {"Rule1":{"State":"ON","Once":"OFF","StopOnError":"OFF","Length":72,"Free":439,"Rules":"ON VAR1#State DO IF (%uptime%>1) MEM1=(59*%MEM1%+%value%)/60 ENDIF ENDON"}}
20:49:44.095 RSL: RESULT = {"Rule2":{"State":"OFF","Once":"OFF","StopOnError":"OFF","Length":0,"Free":511,"Rules":""}}
20:49:44.295 RSL: RESULT = {"Rule3":{"State":"OFF","Once":"OFF","StopOnError":"OFF","Length":0,"Free":511,"Rules":""}}
STATUS 0 output here:
Console output here:
21:05:48.135 CMD: mem1 10
21:05:48.136 SRC: WebConsole from 192.168.XXX.XXX
21:05:48.138 CMD: Grp 0, Cmd 'MEM', Idx 1, Len 2, Pld 10, Data '10'
21:05:48.139 CFG: CR 402/699, Busy 0
21:05:48.141 RSL: RESULT = {"Mem1":"10"}
21:05:48.339 CFG: Saved, Count 2961, Bytes 4096
21:05:51.645 CMD: var1 10
21:05:51.647 SRC: WebConsole from 192.168.XXX.XXX
21:05:51.648 CMD: Grp 0, Cmd 'VAR', Idx 1, Len 2, Pld 10, Data '10'
21:05:51.651 RSL: RESULT = {"Var1":"10"}
21:05:51.676 RUL: VAR1#STATE performs 'IF (17>1) MEM1=(59*10+10)/60 ENDIF'
21:05:51.677 SRC: Rule
21:05:51.679 CMD: Grp 0, Cmd 'IF', Idx 1, Len 31, Pld -99, Data '(17>1) MEM1=(59*10+10)/60 ENDIF'
21:05:51.682 RSL: RESULT = {"If":"Done"}
21:05:51.892 SRC: Backlog
21:05:51.894 CMD: Grp 0, Cmd 'MEM', Idx 1, Len 14, Pld -99, Data '=(59*10+10)/60'
21:05:51.896 CFG: CR 406/699, Busy 0
21:05:51.897 RSL: RESULT = {"Mem1":"98.333"}
21:05:52.322 CFG: Saved, Count 2962, Bytes 4096
TO REPRODUCESteps to reproduce the behavior: EXPECTED BEHAVIOURA clear and concise description of what you expected to happen. SCREENSHOTSIf applicable, add screenshots to help explain your problem. ADDITIONAL CONTEXTAdd any other context about the problem here. (Please, remember to close the issue when the problem has been addressed) |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 1 reply
-
Looks like an issue is referencing var1 for the calculation, with very varied numbers being used. On an ESP32-C3, I'm getting output like:
Same happens if I try to reference Hence, it does not look like a question of priority, but instead some issue with getting the value at all. Note that since some time now, you do not need to build with explicit |
Beta Was this translation helpful? Give feedback.
-
Nice find. On ESP32: Apparently the second 10 is not added but multiplied! On ESP8266 it performs as expected and results in mem1 being 10.000 So it's not so much an operation priority issue but for some reason an addition is changed into a multuplication. Let me see where this fails... |
Beta Was this translation helpful? Give feedback.
-
Got it. Code Will fix ASAP. |
Beta Was this translation helpful? Give feedback.
-
Fixed in latest dev. |
Beta Was this translation helpful? Give feedback.
Fixed in latest dev.
620fade