I am having some problems with an AIO Raspberry Pi. I used one of the demo scripts and adjusted for my sensor a Si7024. Works well until the WiFi falls offline. The Pi is in a outdoor greenhouse, so connection is mostly stable... Able to VNC with the occasional drop. But every 3-5 minutes AIO fails and the script crashes. I only need to poll the device once a minute or maybe even once every 5 minutes. We are just tracking grow cycles. In my limited knowledge I was thinking there could be a way to error handle the connection loss or maybe even Stop and Restart the script every 5-30 minutes just to keep data flowing even if a gap of Wifi coverage happens. Cron job? In code?

Works well until the WiFi falls offline. The Pi is in a outdoor greenhouse, so connection is mostly stable... Able to VNC with the occasional drop. But every 3-5 minutes AIO fails and the script crashes. I only need to poll the device once a minute or maybe even once every 5 minutes.

Do you have an example of the error you get when you lose WiFi connection? Could you please copy and paste it below, thanks