Blynk 2.0 Python Lib unable to connect

Hi everyone,

I just getting started with Blynk and tried to setup a small example using the python lib on my raspberry pi.

After executing my example I was wondering why my device is still shown as offline and marked as never seen before. So I tried to debug and first thing I found is that the lib by default still tries to authenticate against blynk-cloud.com which is wrong if I did not misunderstood the information I found searching for my issue. Therefore I tried to configure the param to blynk.cloud which did not help either.
I also increased the connection timeout, but same result.

The device itself is connected to WiFi and has access to the internet.

I hope somewhere out there has an idea what else I could check.

import blynklib
from datetime import datetime
# Initialize Blynk
blynk = blynklib.Blynk('mhg67X...0',server="blynk.cloud", port=443)

print(blynk.connected())

print(blynk.connect(timeout=360))

print(blynk.connected())

while True:
    blynk.run()

The output looks like this:

        ___  __          __
       / _ )/ /_ _____  / /__
      / _  / / // / _ \/  '_/
     /____/_/\_, /_//_/_/\_\
            /___/ for Python v0.2.6

False
False
False

Try this
Haven’t had ssl working yet on micro
insecure=True,

Thank you @FCS ,

seems like insecure is not supported => https://github.com/blynkkk/lib-python/blob/c43df249daaee198d208efcdad4dc8a0a2b0a596/blynklib.py#L149

Or did I try at the wrong place?
Beside that I switched port to 80, but that did not help either.

That is not the library for 2.0
Blynk should update to say that is for 1.0

See the below link to Library for 2.0

Examples are great

1 Like

@FCS , that was a really good tip. So i manually installed the lib from that repo mentioned by you and now it says 1.0. Now the examples make sense as well :smiley:

Thank you. That fixed my issue. My device is shown as online now :slight_smile:

1 Like

@vshymanskyy

Could you please Lable to repo’s to sort out future confusion

An put a link at the offical Blynk 1.0 to the 2.0 Library

I actually saw that repo, but used normal pip install which installed version 0.2.0. So maybe some hint that if you want to use it as 1.0.0 you need to run a manual pip install or something like that would be nice as well.

A post was split to a new topic: Unable to connect my raspberry pi-4 with blynk