Closed BugRaptor closed 6 years ago
Could you post some more details about the ConnectionError you're getting?
Ok, sorry, I was wrong. I simply didn't wait enough time to let the WiFi LAN be up again !
Actually the connection was finally correctly restored... :-)
All is fine !
I'm using the smappy.LocalSmappee client to continuously get instantaneous data in a loop from my local Smappee device via my WiFi LAN. If the WiFi connection is lost (ie. if I switch off the WiFi) I get first a ReadTimeout exception from ls.load_instantaneous(). I then call the connection initialisation code again...
...in order to try to restore the connection and on next ls.load_instantaneous() I get a ConnectionError exception. On each loop I then try to restore the connection the same way (creating a new client and calling logon()) and I always get the ConnectionError exception. This appears correct as the WiFi is always down. But if I switch on the WiFi, the behavior remains the same. I always get a ConnectionError exception... I need to restart the python script to restore the correct functionning.