PrusaConnect error state after PrusaLink error never reset
I have 3 printers up and running with PrusaLink, 2 with PI Zeros and 1 with a PI Zero 2. The PI Zero 2 seems to be causing some issues on the printer that throw Prusa Connect into an error state for that printer. I am unsure what the cause is but when printing from the SD card (printer not PI) at some point during the print Prusa Connect will show the printer as being in "Error" state. The log file in Prusa Connect shows:
STATE_CHANGED ERROR SERIAL new state from event
When I check PrusaLink on the printer it is still running as expected and showing print progress.
From looking at the syslog in PrusaLink something happens to the local connection that results in this error:
Got unexpected telemetry response (503): {"code": "SERVICE_UNAVAILABLE", "message": "Service is unavailable at this moment. Try again later."} {parse_command():567}
After that PrusaLink never recovers the connection to PrusaConnect properly and keeps issuing the error state, despite now working properly again. It doesn't look like there is anything to handle this reconnection with PrusaConnect from this state (at a total guess!). The only way out of this state is a complete hard reset of the printer (and therefore the PI).
I know it is the PI 2 causing the issue as I swapped it between printers and it follows the PI not the printer. It may just be a bad board since I do not have another to test with (stock in the UK sucks!). But at the very least I thought this may be useful in terms of the error handling code with the cloud portion of the connection.
Full syslog here:
P.s. other two printers running great and really liking a lot about the way this has been built.
Best Answer by Tojik:
Hi, yes. There is a bug in the serial readline function which tells it to wait negative time. Your log confirms this, thank you for including it. I've made a modified image with this specific thing fixed. More in this thread: https://forum.prusa3d.com/forum/bugs-errors/printer-status-changed-to-error-during-printjob/#post-580627
RE:
Hi, yes. There is a bug in the serial readline function which tells it to wait negative time. Your log confirms this, thank you for including it. I've made a modified image with this specific thing fixed. More in this thread: https://forum.prusa3d.com/forum/bugs-errors/printer-status-changed-to-error-during-printjob/#post-580627
RE: PrusaConnect error state after PrusaLink error never reset
Fantastic! I'll upload that to the offending printer and try it out.