-
Notifications
You must be signed in to change notification settings - Fork 113
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
#offAtNight = 0 shows #offAtNight = NULL in Console output #459
Comments
Can you check this binary: https://github.com/IgorYbema/HeishaMon/actions/runs/7460559421 |
My workaround renaming the variable fixed my problem. I have only one production system here and no test factory, so no, sorry, I can not run test binaries here. If that binary includes a fix I can give feedback as soon as the fix makes it into a release. |
Your code itself is not the problem. I tested it and couldn't detect the malfunction you described. See console footage below. Is there perhaps another context in which this error occurs? The internally constructed variable table of Rules is very unstable. Therefore I don't use more than 12 global variables. Recently I even had the case that after calling up several content changes to global variables from a timer rule, the entire table was destroyed and only 2 of my 12 variables remained. Rules has many limitations, none of which are documented. All that remains is trial and error and a lot of time. Especially when uploading rules, it can happen that the code is only accepted after changing the name of a variable, for example. The previously used variable table is probably not deleted cleanly and the new upload is then discarded. I then reboot before uploading the new rule. rule #1 was prepared in 1803 microseconds ==== SYSTEM#BOOT ====
Sat Jan 20 11:40:46 2024 (45881068): Closing webserver client: 192.168.178.44:64891 ..... Sat Jan 20 11:41:26 2024 (45920749): Measured Watthour on S0 port 1: 3.00 .... rule_function_set_timer_callback set timer #10 to 15 seconds
4 #offAtNight = 0 Sat Jan 20 11:41:31 2024 (45925750): Measured Watthour on S0 port 1: 2.00 |
This is 99.9% not an issue of the rules library but of the webserver. If you encounter such situations, let me know, then i can look for the issue in the webserver.
If you encounter other issues let me know or try the latest library updates that are ready for beta testing to see if it's already fixed. Besides that, the rules library in the Heishamon is already pretty old in a relative sence. A library update is on it's way, but that doesn't work properly due to something inside the Heishamon itself, not due the rules library. That works as expected. |
In this file from an excerpt from the Consol you can see that the variable message is displayed two times correctly. Is there a limit? |
@McMagellan Please help test the latest build with the latest rules code. Then we'll see if the issue persists: |
Got it. |
Can you join that thread and post the ruleset you tried there? |
I tried several long, short rules and none could load. |
@McMagellan Can you join this thread with your findings? IgorYbema#121 Please post the ruleset that you couldn't get to load there. |
My rule set is of course bigger than just that example above... I just boiled it down to that excerpt as I still could reproduce that NULL value after removing everything else. So yes, it might be that I got that problem based on using too many variables in the beginning... |
Ich habe mal über deine Rule geschaut.
z.B.: Timer1: |
Zu 1.) Ja, das kann bei einem Neustart der WP oder Heishamons passieren - nach einer Minute löst sich das dann aber auf. Beim Regeln neu abspeichern sorgt das aber dafür, das weiterhin der aktuelle Wert verwendet wird. |
Hi @CurlyMoo,
came across a strange behaviour in my code. Sample Code:
The output in the Console shows "#offAtNight = NULL".
After changing the variable name to #sleepAtNight it shows in the Console "#sleepAtNight = 0"...
The text was updated successfully, but these errors were encountered: