-
Notifications
You must be signed in to change notification settings - Fork 11
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
Additional fixes to rules and docs #133
Conversation
13bcc31
to
a7f2dfb
Compare
Running with Alpha-0776a05 currently. Problem:
Check logfile starting at 12:59:59. And at 12:57:19 is the last Z1_Heat_Curve_Target_High_Temp: 40 value display. |
Next step would be printing the actual values of the curves to see if they are not the issue. print('Activating DHW production.');
+ print(@Z1_Heat_Curve_Target_Low_Temp, ' - ', @Z1_Heat_Curve_Target_High_Temp); |
What is also see is a delayed
|
And @McMagellan is a lot better in finding issues in the rulesets. |
@stumbaumr About the error: It would now be interesting to know how these lines are stored in memory after parsing. @CurlyMoo |
Not easily at the moment. But here you go:
|
@McMagellan , I reduced the logfile to the interesting places. Here is the longer log. The error itself has been happening for a while now. So yes - reproducible in my complete rule set, but not as a separate shrinked down rule... |
I don't see the additional log entry i suggested. |
And again, is has a buffered SetCurves waiting to be executed:
|
If you change something the error goes away. Therefore it would be a real coincidence if you still had the criteria by expanding a print line with the same calculation. In addition, the parallel print calculation is not the same as in the original code. For the log file: The parameter "#targetHighBeforeDHW" did not need to be changed at all because it already had the value 40. |
Yep, that is the biggest question here... |
You could test what the entire rule would look like if you just changed the old value of "@Z1_Heat_Curve_Target_Low_Temp" from 32 to 33. Then you could see whether this 33 from the parameter is now also in the #targetHighBeforeDHW. |
So I added a print statement and changed @Z1_Heat_Curve_Target_Low_Temp to 33 and @Z1_Heat_Curve_Target_High_Temp zu 39. And after turning of airplane mode and reloading the HeishaMon WebGUI the usual reboot... |
And this is the end of DHW production after reboot and fixing the heat curve settings... |
Maybe I expressed myself incorrectly, but my suggestion was to change the value 32 in the heating curve using the cable remote control so that not a single byte in the rule is changed. By inserting another line into Rules you have the opportunity to find the error by destroying the reproduction. The error is still there, we just no longer see the effects or there just happen to be no effects in this constellation. As far as I have seen, the rule is now working correctly. |
So the print statement seemed to have fixed it... - next test window is this coming friday. Have to make sure the familiy has DHW the next days as I am travelling. |
You can also see if they are active on the stats page. |
My question wasn't about the number of loaded rules in the ruleset but about the maximum size in bytes. |
Can you post that specific long rule? |
Attached is the old ruleset with the long Rule10 (timer2). Here is the new version in which Rule10 was divided into Rule 10, Rule11 and Rule12. (timer2 + Heizbetrieb() + Heizpause()) But my priority would be the error in connection with the web server. |
Here is the debug file of what happens when the old ruleset is loaded. Line 8: Rules are loaded normally via the Rules window with the Save button, OK. |
Shall we first focus on the stability of the whole besides the rules length? In doing so, please check the last commit. |
Which version of #564 should I test? HeishaMon_ESP8266-alpha-dc447760cbfe9b6ccee15efbeca01689 or HeishaMon_ESP8266-debug-f8cfdc9e1659b0e59b324a66fb89262c |
I don't know which hash belongs to what repo, but you should first pick the one from my repo. |
I've now https://github.com/IgorYbema/HeishaMon/actions/runs/10476556300 running successfully with my adapted rules set for 8 hours, the adaptation is a split of rule 2: |
As this is not getting any further I would ask to split this PR into multiple smaller ones where it is logicaly to do so. I understand that the PR includes rules changes but also websocket changes |
Done. Let's continue the websocket debugging here: #136 Waiting for test results by @McMagellan |
Just checked the remaining changes and they seem right. If the tests are ok also I can opt for a merge into main |
First of all, I would like to say that the interaction between Heishamon and the Rules Engine is not working well at the moment. Therefore, I strongly advise against releasing a new version. Or remove the Rules button from the main menu in the new version. I'll give you an example but I need a while to comment. |
I am not in a hurry ;-) |
The rules work fine. The main issue is that the new rule parser allows for a lot larger rulesets than the older one. To the extend we enter the limit to what the ESP8266 Heishamon can handle. At least with the other services running as well. There are some optimalizations left on the webserver side, but that's it. The most safe option for now would be setting a hard limit on how big the rulesets can be to keep enough spare memory. |
I test the Version 3.62 Repo Igor #576 for ESP8266. The Logfile is from Debug Port. Numbers are the Lines in the File. I start with clearing the Rulesset (not in File). 17 Upload new Firmware I can load this Rulesset without Problems in FW #544. This shown Error has CurlyMoo fixed. 669 loading modified Rule Is this an Error in my Rulesset when i fix this changing the Rule position? 987 Lost MQTT unknown why. Next is a Test what happens after a Reboot startet from Browser io the WebIF. 1436 Heishamon starts. This is the Situation when after a reboot the rules no longer are runnung. Stats: Rules active: 0. 1940 Next try with a Reboot from Browser. But there is a new annomally seen for the first Time. Test what happens after a Power off situation 4582 Power Off Simulation 4902 Setcurves failed The Error #Delta = NULL is only after a Restart phase from Heishamon when the Rulesset is present in the Memory. Not after Load Rules during Save Button. Here is my Rulesset. If you Test it note that the Rule will change your Heatcurve Parameters. |
@McMagellan We already know that a lot of rule fixes are not yet present in 3.62. So although it's great you have been testing it, but is also somewhat working towards the obvious conclusion for a large part. So, can we continue the testing here: #136 with build 564 here: https://github.com/IgorYbema/HeishaMon/actions/runs/10409672704 |
Yes the main idea for splitting the PR is to implement the latest rules fixes without the memory improvement from the websocket changes. So if build #577 (https://github.com/IgorYbema/HeishaMon/actions/runs/10485393767) works with the ruleset but only crashes due to memory issue it is 'fine'. |
I updated the HeishaMon to the build from https://github.com/IgorYbema/HeishaMon/actions/runs/10485393767. Hopefully stable to get this PR merged... |
This has been merged into branch v3.7 for release testing |
I just updated to the latest build from v3.7 now... |
I'm running that version as well since yesterday 21:00u without issue yet. |
I'm having another problem loading a ruleset. I use the version (V3.8 138 Alpha 550efd7) The first line in the System#Boot Rule contains the code: Attached is also the debug log file of the two different loading processes.
Then I also saw that print sometimes isn't executed at all. Example:
|
@IgorYbema Can you maybe check if you can catch the exception for the failing ruleset. I can't easily reproduce it. |
Can the Rule be started for you? For me the error is permanent. Previously, you could trix the error by adding more lines until the rule was accepted. It was probably due to the key points in memory usage or transmission that didn't fit together. It seems to be similar here. By omitting the first line, the entire rule moves and the incorrect store point is avoided. |
I only have unittest environments, not real Heishamons to test on. |
No description provided.