PiBlynk libraries for Raspberry Pi

I have posted to github a pair of blynk libraries to control the Raspberry Pi from the Blynk APP on smartphone:

One version operates on nodejs (if upgraded to V6, and only on armV7).
The other runs on any Pi with python or python3. (ie good for RPi-zero-W)

These are independent libraries. But both have the same design targets and almost the same functionality. They are both tagged as being “PiBlynk”, just one in python and one in javascript!

Design targets:

  • stability in connection to server
  • full suite of interfacing functions
  • similarity of functions/functionality in the two versions, as far as the languages allow
  • easy compatibility with Raspberry Pi GPIO and PiCamera

Features:

  • Automatic connecting to Blynk server, and maintaining that connection.
  • Full suite of functions for interfacing to GPIO and virtual pins of the Blynk protocol.
  • Nil custom coding for simplest GPIO in/out
  • Widget object for LCD
  • Widget for GPS (with distance and direction),
  • Widget for accelerometer (with pitch and roll)
  • Generic buffering widget for any sensor pushing data from APP (eg lightmeter)
  • Send email, tweet, smartphone notification.
  • Change phone widget properties (colour, label)
  • Widget for a “bridge”, ie gpio or virtual commands to another hardware device.
  • Compatible with PiCamera
  • Works on Android, iPhone, tablets
  • Access your RPi from anywhere on the internet
  • Extensive example files.

The PiBlynk-py library was inspired by, and leveraged from, the work of the WIPY project. https://github.com/wipy/wipy/blob/master/lib/blynk/BlynkLib.py
and thence from
https://github.com/youngsoul/BlynkLib

The piblynk-js library was derived from:

2 Likes

Thanks for you hard work and involvement.
I really encourage you o contribute to original, officially supported libraries:
Python library on github
JS library on github
It should be easy for you to compare with your current code base and issue Pull Requests on GitHub.
This way, you will help our project, and your achievements will be delivered to a broader auditorium!

Thank you,

My interest has been quite narrowly for (adult) classes that I teach in Raspberry Pi and Internet of Things. These two PiBlynk libraries are targetted very specifically to the Raspberry Pi, and they contain

  • no code for other scenarios beyond Raspberry Pi (espruino, browser)
  • what I believe are stability enhancements against crashing sometimes, incl
  1. handling for server response with ID=0 (which DOES occur, and seems ignorable),
  2. sensing & resetting & healing after server stops acknowledging pings for any reason,
  • extra “widget” functions, incl ticker. LCD, accelerometer, GPS, buffered sensors, bridge, property
  • send() locking for safety in blynk writes made by usertasks
  • more examples as suited to my classes
  • full supporting documentation

You suggest “It should be easy for you to compare with your current code …”. Sorry, but it is not trivial. And my first interest is in servicing my own class.

I have fully published and (I believe) fully credited my version. It’s open source. I am more than happy that anyone might take any or all of the code and use it for themselves or to integrate it into any other version, official or not.

Great, no problem!