I am using a Raspberry Pi PICO W to run code in a loop accessing the Ecobee API for my furnace's status. I got this code to run most of the time now, but once in a while, like after several thousand loops spanning 12+ hours, the code will crash with OSError 103 on the line for urequest.get. I added a try...except block to trap this error so I can restart the loop. Now what I am encountering is this OSError 103 turning persistant over time such that every successive urequest.get will hang for ~30 minutes and then crash with the OSError 103 again. I have garbage collect in the loop and monitoring free memory in various points in the loop. That does not seem to be the issue. So I am resorting to checking for OSError 103 on successive callls to urequest.get and reboot the syctem with machine.reset to restart the whole program to continue running the loop.
This works fine except that I lose connection to the print output after the reboot. I am using Thornny and the shell is no longer connected after the machine.reset. So I can no longer monitor what is going on.
I would appreciate an suggestions on how to get around this issue. BTW, if you have any insight into the OSError 103 issue, I am all ears too.
This works fine except that I lose connection to the print output after the reboot. I am using Thornny and the shell is no longer connected after the machine.reset. So I can no longer monitor what is going on.
I would appreciate an suggestions on how to get around this issue. BTW, if you have any insight into the OSError 103 issue, I am all ears too.
Statistics: Posted by nanowizz — Mon Jan 15, 2024 4:53 am