I have 3 funhouses writing environmental data to Adafruit IO. If they loose the network connection they will error out. To get around that I used smart sockets and triggered a power cycle every hour in case they loose connection, it will reset at least hourly. I was using tuya and ifttt, but apparently they are having a spat, so I cant add devices to that flow.
The better thing would to just have the funhouse reset if there was no connection found or wait for a period of time and try connecting again. Is there a clean way in circuitpython to do that?
reset Funhouse if no internet connection
Moderators: adafruit_support_bill, adafruit
Please be positive and constructive with your questions and comments.
- danhalbert
- Posts: 4649
- Joined: Tue Aug 08, 2017 12:37 pm
Re: reset Funhouse if no internet connection
If they are throwing an exception, you can catch the exception inside a try-catch block, and then decide what to do. You could even reset the board if you wanted to.
- tundra242
- Posts: 7
- Joined: Wed Dec 02, 2020 3:54 pm
Re: reset Funhouse if no internet connection
thanks, I was getting a lot of errors until I read everything has to be indented after the try:. Working so far.
Please be positive and constructive with your questions and comments.