blog-eivindgl-com / netatmo-pyportal-display

CircuitPython project to use PyPortal as display for a Netatmo weather station
MIT License
1 stars 0 forks source link

Fix issue #10 with crashes and hangs #37

Closed eloekset closed 1 year ago

eloekset commented 1 year ago

Fix issue #10 with catch of several exceptions and doing some resets and reconnect:

        except (ValueError, RuntimeError, ConnectionError, OSError) as e:
            print("Some error occured, retrying! -", e)
            esp.reset()
            esp.disconnect()
            pyportal.network.connect()
            time.sleep(5)
            continue