BLYNK
BLYNK.IO       📲 GETTING STARTED       📗 DOCS       ❓HELP CENTER       👉 SKETCH BUILDER

Micropython and Blynk 2.0 libary

@vshymanskyy Micropython Library
Do you have an ETA on this library?
End of month or earlier perhaps?

Even if you have a BETA library with just VPins for my development.

Would love to have a library before my next payment.

Thanks Ryan
Perth WA

1 Like

Simple version can be released soon, but provisioning/OTA will take more time (some weeks, I hope)

2 Likes

@FCS which exactly device/board are you using with Micropython?

1 Like

@vshymanskyy
Thanks for the update

I am using the Pycom Gpy. Using LTE comms.
With Custom PCB
Only using invite provisioning with ssl

Good luck with OTA. I can understand how hard this is to support. Pycom has already written code for this as part of their own stack. They also offer it as a roll your own solution

I wish more Micros and wireless chips were RCM certified. The ESP modules are not pre certified for Australia :sob::sob:

Thanks,
Ryan
Perth WA

https://docs.pycom.io/updatefirmware/ota/

Would love to have the base functionality asap so we can start rebuilding on the new cloud version.

2 Likes

Please consider this scenario when you are looking to implement provisioning/OTA.

Will have great time if you can provide initial Micro Python Library with support for Dynamic wifi provisioning, ex .Edgent.

1 Like

Hi @vshymanskyy

Do you have a simple version yet?
Or an ETA?

yes, we have!
will be sharing soon

3 Likes

Hi @vshymanskyy ,
Please let me know on the support for ESP32 over micro python on new Blynk cloud. I am using older version of Blynk mpy library for my prototype , can that be tweaked for new cloud and template pls.

@vshymanskyy @PeteKnight , I am using the new Python Library on ESP32, presently have made my own wifi provisioning on ESP32 through web page & wifimanager for ESP32. However I am finding it difficult to handle disconnection of wifi. Can you please provide code for the same in python. The “Status” variable of “Connect” function does not give stable value.
Please help.

Thanks ,

giphy

1 Like

@blynk.on("connected")
def blynk_connected(ping):
    print('Blynk ready. Ping:', ping, 'ms')

@blynk.on("disconnected")
def blynk_disconnected():
    print('Blynk disconnected')

These have been working perfectly for me

I have an issue with random disconnections and ssl does not work
Will post code and terminal output soon
It connects with ssl and crashes

On the disconnect I have inserted a 5 second delay and the reconnect works 90% of the time

Currently, my personal Python library was updated to support Blynk 2.0:

There’s also an initial implementation of Blynk.Edgent Dynamic Provisioning for Raspberry Pi (for advanced users)

2 Likes

Tested it with A9G Pudding board thru GPRS connection. From the first galnce, it does work with Blynk 2.0 in my case (except of @decorators which seems to be not supported by A9G micropython version). Very useful library, thanks.

2 Likes

Could you post a test code, pls? (Don’t need the whole code. Just the part which connects to the cloud 2.0) I’m having (looks like) a memory issue with the library, here is my post.
Thanks.

Hi
I am having issues with SSL
Set your ssl to insecure. This fixed my issues
Using the examples they worked for me

Using Pycom GPY
Get random disconnects every now and again

Pycom devices have tons of ram and flash
I think 8 MB of each

I thought that applied only for the ESP8266. Thank you, it worked!

` For ESP8266, you may need to disable secure connection using:

blynk = BlynkLib.Blynk('YourAuthToken', insecure=True)`

Hi,

I tried the python modified library with a Rpi 4 board. It works but, I’m getting disconnections even with this code in the loop:

def runLoop():
    while True:
       try:
         blynk.run()
         timer.run()
       except socket.error as e:
         if(e.errno != errno.EPIPE):
           t = time.ctime()
           logging.error(str(t) + " err in main blynk " + e)
           raise
         blynk.connect()

BTW, what do you mean by

personal Python Library?

Doesn’t Blynk HQ support it?
Thanks for updating it.

@vshymanskyy @PeteKnight

On Raspberry Pi, I get the v0.2.0 which is said to be the legacy Blynk - ie old one-
Please remain on v0.2.0 for legacy Blynk. - when pip3 installing the library:

$pip3 install blynk-library-python
Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple
Collecting blynk-library-python
  Downloading https://www.piwheels.org/simple/blynk-library-python/blynk_library_python-0.2.0-py3-none-any.whl
Installing collected packages: blynk-library-python
Successfully installed blynk-library-python-0.2.0

How to force pip3 to get the 2.0 library for Python ?

Have I missed something somewhere ?