Automated reboot?

My Airgradient works great except that every day or two it freezes and requires unplugging and plugging back in. Is there code I can add to have the device automatically restart on some given frequency? Thanks

If you know how to program, seems like it wouldn’t be too difficult to modify the provided code to set either a countdown or a time of day check to do a software reset, like described here.

If not, the easiest solution might be to get a timer switch to power cycle daily, either smart or dumb.

It is very untypical that you have this problem with our default code. What software are you using it with?

My apologies, I forgot that I’m running a branched version of code from an author on the Home Assistant forum. This post can be closed since it is not directly related to the AirGradient supported code.

If you are using it with Home Assistant, you may consider ESPHome as well. I find it very easy to work with and with the original DIY kit, it has been working great. Just waiting for my new conversion kit to arrive.

I’m seeing the same running ESPHome on my AG PCB v2. Every couple of days the OLED display freezes, showing all white until I power cycle the device. I’ve built 2 AGs using PCB v2 and both do it. It’s usually just the display having the issue though as sensor data is usually still coming through to Home Assistant. Sometimes the Senseair data stops too. (FWIW, I’m not yet seeing this issue on my AG Pro DIY device, also running ESPHome.)

In ESPHome, you can add a virtual restart switch to the device and create an automation to have it restart as often as desired: Restart Switch — ESPHome This method mitigates the issue for me.