nebhead / PiFire

PiFire is a Smart WiFi enabled controller for your pellet smoker / grill.
https://nebhead.github.io/PiFire-Pages
MIT License
82 stars 31 forks source link

Control process script expericed a timeout. Webapp has no error notifcation and temperature values displayed are stale #202

Closed maihde closed 1 month ago

maihde commented 1 month ago

Describe the bug During a cook, PiFire stopped responding but the webapp continued to display valid temperature values and did not show an error. When looking at the logs, this message was present:

The control process experienced a timeout event (no heartbeat detected in 30 seconds) and is being reset.

Although the log says the control process was being reset, it did not appear to reset and the webapp continued to show stale temperature values (making it difficult to recongize that this condition occured).

Other logs aren't timestamped, but here are some potentially concerning lines:

In control.out.log:

error: <class 'PermissionError'>, [Errno 13] Permission denied: file: /usr/lib/python3/dist-packages/supervisor/xmlrpc.py line: 557

In control.err.log:

TabError: inconsistent use of tabs and spaces in indentation
  File "/usr/local/bin/pifire/control.py", line 1093
    controlLogger.info(f"OUTPUTS {settings['outpins']}")

To Reproduce Unknown. This is the only time it has happend.

Expected behavior In the event the control processe hangs or doesn't restart, the webapp should ideally show and error notification and set the temperature values to zero.

PiFire Version:

nebhead commented 1 month ago

Thanks for submitting this issue! I'll look into this soon and hopefully get it fixed up.

nebhead commented 1 month ago

I believe this line of code is removed in the latest release, as I can't find it. Also, there is new code to check the health of the control script and report if the script is unresponsive on the dashboard. Let me know if you face this one again. For now, I'm going to close this issue but feel free to reopen if you see it on v1.8.x.