Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Does not recover after disconnect #68

Open
pjlfrost opened this issue Dec 8, 2022 · 0 comments
Open

Does not recover after disconnect #68

pjlfrost opened this issue Dec 8, 2022 · 0 comments

Comments

@pjlfrost
Copy link

pjlfrost commented Dec 8, 2022

I'm using a Raspberry PI with the latest Python (3.9 i believe)

It works fine most of the time but as soon as I loose internet connection (for example the breaker for my router tripped) the library does not automatically re-connect to the Blynk server. The Raspberry pi will re-connect to WiFi, and logs show my python script is still running and attempting to write to the Blynk server every 10s.

I logged "blynk.state" and it changes from 2 (CONNECTED) to 0 (DISCONNECTED), and stays at 0 until I stop and re-start the python script.

I call
blynk = BlynkLib.Blynk('xxx')#insert your Auth Token here
up at the top. And
blynk.run()
in a while loop that runs constanly. In the while loop, every 10s my script gathers data then does a blynk.virtual_write(...)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant