Egyras / HeishaMon

Panasonic Aquarea air-water H, J, K and L series protocol decrypt
217 stars 113 forks source link

Can the value of a 1Wire sensor destroy the rules variables? #462

Open McMagellan opened 5 months ago

McMagellan commented 5 months ago

I used the last cold days to improve my rule. There were rule crashes every day in which the global variables disappeared during program execution. During my analysis, I discovered that an irregularity occurred in the 1Wire sensors shortly nearby the crashes.

I installed a sensor behind the evaporator to see data from the refrigeration circuit. There are large temperature fluctuations from -15°C to 40°C on this sensor during a defrost. I recorded such an outage in the console in about 12 minutes. The complete file is attached.
Crash 12Minuten Console.txt

I have briefly presented the relevant events in the following image.

It can be seen that a 1Wire sensor value is apparently questioned by Heishamon because the temperature jump (between 10 seconds) is too high. Afterwards, a randomly triggered trigger outputs the complete list of global variables. As a result, the list is destroyed and only 1 parameter is output. This means that a regulated rules program flow is no longer possible.

The second picture shows the history of this sensor. The marked line causes the crash and is summarized in the first image.

To me it looks like the firmware of the 1Wire sensor is not compatible with the rules engine.

IMG_7987b

Bild 2024-01-22 10_31_14a

CurlyMoo commented 1 month ago

I believe this is fixed right?

McMagellan commented 1 month ago

I can't say today whether the problem still exists. No program can work with variables that are sporadically lost, which is why I gave up programming in Rules and successfully switched to iobroker/Blockly. The error described above is probably not causally related to the described internal correction of the 1Wire measured values. The error occurred in connection with defrosting processes with the rules code becoming increasingly larger. Up to 18 TOP values ​​changed within a 10 second query window.

I suspect a runtime problem with too much traffic. I now hope that after switching to async this problem no longer occurs. That's why I've now started working with Rules again because I see it as a good system, but there are start developing problems. However, a real test is only possible again during defrosting processes with many parameters changed at the same time.

When the error occurred there were 3 different reactions, not reproducible but recorded in the console. 1) Rules continues to run incorrectly if some variables are lost. 2) Uptime restarts without rules. 3) Heishamon blocks and can only be used again by turning off the power.