Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

node-red-contrib-blynk-ws

gablau232MIT1.0.10

Node Red integration with Blynk App and Server through websockets

node-red, blynk, iot, websockets

readme

node-red-contrib-blynk-ws

Information Panel\ Blynk library implementation for Node-RED using WebSockets

npm version Npm download GitHub stars GitHub issues License

NPM


Warning: this library is for old Blynk [or Blynk 1.0 or Legacy] for the new Blynk Iot Platform go to the new library repository: node-red-contrib-blynk-iot


Node-RED blynk Websockets version

This library supports both SSL (wss://) and non secure (ws://) connection to local server and Blynk cloud server. For local server, wss:// works only if you ve got a certificate installed. For Blynk cloud server, you can use ws://blynk-cloud.com/websockets or with SSL wss://blynk-cloud.com/websockets as the server url.

If you installed Node Red globally use this command to install npm install --global node-red-contrib-blynk-ws

Supported events, commands and widgets

Events: read, write, app (connected/disconected)\ Commands: write, bridge, sync (virtual/all), set property\ Widgets: emails, notify, LCD, table, zeRGBa, styled button, image gallery

Changelog

See the changelog for all the details of each releases

Node-RED palette

Available Nodes

Blynk App Settings

Use Raspberry PI as hardware to access 128 virtual pins or Generic Board for 32.

How to use

See your server url and auth token in configuration node

Information Panel

See information panel on every nodes

Information Panel

Debug

Use the verbose -v flag when starting Node-RED to get more information or use node-red-log and enable log on Configuration Node as needed

Log settings

Compatibility

This library is retrocompatible and can replace node-red-contrib-blynk-websockets. To do this:

  • stop node-red
  • install node-red-contrib-blynk-ws npm install node-red-contrib-blynk-ws
  • remove node-red-contrib-blynk-websockets npm uninstall node-red-contrib-blynk-websockets
  • edit your flow file eg: "my-flows.js" search for 'blynk-websockets-' and replace with 'blynk-ws-'
  • start node-red.

  • With Blynk Library you can connect over 400 hardware models (including ESP8266, ESP32, NodeMCU, all Arduinos, Raspberry Pi, Particle, Texas Instruments, etc.)to the Blynk Cloud. Full list of supported hardware can be found here.

  • With Blynk apps for iOS and Android apps you can easily drag-n-drop graphic interfaces for any DIY or commercial project. It's a pure WYSIWG experience: no coding on iOS or Android required.

  • Hardware can connect to Blynk Cloud (open-source server) over the Internet using hardware connectivity available on your board (like ESP32), or with the use of various shields (Ethernet, WiFi, GSM, LTE, etc). Blynk Cloud is available for every user of Blynk for free. Direct connection over Bluetooth is also possible.

Blynk Banner

Downloads

Blynk Arduino Library

Blynk Mobile App: Google Play | App Store

Optionally you can install Blynk Local Server and run everything locally. However, Blynk Cloud is free for anyone who is using Blynk for personal (non-commercial) use.

Quickstart: Arduino + Ethernet shield

  • Download the Blynk app (App Store, Google Play)
  • Get the Auth Token from the app
  • Import this library to Arduino IDE. Guide here
  • In Arduino IDE, select File -> Examples -> Blynk -> Boards_Ethernet -> Arduino_Ethernet
  • Update Auth Token in the sketch and upload it to Arduino
  • Connect your Arduino with Ethernet shield to the internet

When you are connected - check the included examples on how to use different types of connections (transports) and explore Blynk features. You can combine any example for your hardware + transport + features.

Supported boards, Ethernet, WiFi, Bluetooth, GSM, Serial, USB...

Full list of supported hardware is here.
Check out our Examples Browser: http://examples.blynk.cc

Full Blynk Documentation - a complete guide on Blynk features

Full Blynk Legacy Documentation - a complete guide on Blynk features (forked from original repo) Community (Forum) - join a 500,000 Blynk community to ask questions and share ideas
Help Center - helpful articles on various Blynk aspects
Code Examples Browser - browse examples to explore Blynk possibilities
Official Website

Social Media:

Facebook | Twitter | Youtube | Instagram | LinkedIn


Official implementations

Libraries by community

Attributions

The node-red-contrib-blynk-ws was born as a fork of node-red-contrib-blynk-websockets and some javascripts code was derived from Node.js, Espruino, Browsers

License

This project is released under The MIT License (MIT)

changelog

Changelog

All notable changes to this project will be documented in this file.

The format is based on Keep a Changelog and this project adheres to Semantic Versioning.

Unreleased

1.0.10 - 2025-01-19

Changed

  • Updated dependencies

1.0.9 - 2023-01-12

Changed

  • Updated dependencies
  • Updated images docs

1.0.8 - 2023-01-09

Changed

  • Increased minimum Node-red version to 2.0.0
  • Increased minimum Node version to 12.22.12
  • Updated dependencies for security reasons
  • Remove info of public server: blynk-cloud.com
  • Returns warning if trying to connect to old cloud server
  • Converting the examples to local server
  • Updated docs link to new address https://gablau.dev/blynk-legacy-docs/

1.0.7 - 2022-02-01

Changed

  • Updated dependencies for security reasons
  • Provided examples for all nodes
  • Compatibility with Scorecard

1.0.6 - 2021-09-04

Changed

  • Updated dependencies for security reasons
  • Warning on SSL connection to blynk cloud server
  • Change on('input') event with footprint for node red 1.0

Fixed

  • Change of URL in node-config is only picked up after reboot of node-red instance - See Issue #29
  • Wrong constant MsgStatus.BLYNK_INVALID_TOKEN - See Issue #30

1.0.5 - 2021-03-17

Fixed

  • Interim fix for server certificate expiration. You can continue to use the wss connection even if the certificate has expired. See this forum post

1.0.4 - 2020-09-29

Changed

  • Updated dependencies for security reasons

Fixed

  • Node - Table - Table ndex not reset on "clear" command - See Issue #25
  • Regexp validation for server url - See Issue #26

1.0.3 - 2020-04-10

Changed

  • Updated dependencies for security reasons

1.0.2 - 2020-03-14

Changed

  • Updated dependencies for security reasons
  • Small changes

1.0.1 - 2019-08-28

Changed

  • Updated dependencies for security reasons
  • Updated esLint + airbnb base

Fixed

  • Bridge node - Regexp validation for auth token

1.0.0 - 2019-07-27

Added

  • Utf-8 support in blynk message
  • ESLint to increase code quality and discover problems
  • Adopted the Airbnb javascript code style

Changed

  • Refactoring and adjusted all the source code to the new standard
  • Various code improvements

Fixed

  • Regexp validation for auth token - See Issue #13

0.9.2 - 2019-05-04

Changed

  • Updated images in readme

Fixed

  • Missing release link in the changelog
  • Saving the Vpin setting for the first time does not work - See Issue #12

0.9.1 - 2019-04-17

Fixed

  • No automatic reconnect on connection lost

0.9.0 - 2019-03-19

Added

  • Node - Image Gallery - Implemented "url" and "urls" property [NOTE: url and urls property are supported only in beta app]
  • Node - Set Property - Implemented "url" and "urls" property [NOTE: url and urls property are supported only in beta app]

Changed

  • Node - Configuration - Using tabs for better UI
  • All nodes - Increased the limit of the pins to 255 and better validation checks
  • Improved heartbeat, send PING command only if necessary.
  • Control and blocking of sending too long messages (BLYNK_PROTOCOL_MAX_LENGTH)
  • Compatibility with Blynk C++ Library 0.6.1
  • LOGIN command changed to int 29 (old int 2)
  • Remove unused command and code clean

Fixed

  • Fix TypeError on node-red restart
  • Crash on websocket "timeout" error

0.8.0 - 2019-01-05

Added

  • Node - Configuration - The configuration node can be "enable" or "disable" now, when disabled no connection is start on boot and all linked node show the red dot "disabled" status.
  • Node - Image Gallery - New node to simplify the use of this new widget (set images urls is not yet implemented in app)
  • Node - Set Property - Implemented "url, urls, opacity, rotation, scale" property for Image Gallery widget (blynk cloud or local server >= v0.39.4) [NOTE: url and urls property are not yet supported in app]
  • Check SLL certificate on connection for blynk cloud

Changed

  • All nodes - Conversion, where necessary, of "isBuffer" checks into "isArray" checks
  • All nodes - Avoid input processing on client node disconnected or disabled
  • Node - zeRGBa - Check if a valid RGB value is passed, otherwise it will generate an alert and the message will be discarded
  • Node - Table - It will generate an alert on a simple payload without other parameters and the message will be discarded
  • Increase heartbeat timeout to 15 seconds - see Blynk Server Issue #1294
  • Compatibility with Blynk C++ Library 0.5.4

Fixed

  • Node - Write - Now it accepts multiple values as input via arrays and forwards them to the server correctly - see this
  • Correct some log messages

0.7.1 - 2018-08-04

Fixed

  • Node - Sync - Missing "syncAll" commands

0.7.0 - 2018-07-30

Added

  • Node - Styled Button - New node to simplify the use of this new button
  • Node - Set Property - Implemented "onColor, offColor, onBackColor, offBackColor" property for Styled Button widget (blynk cloud or local server >= v0.36.2)
  • Node - Set Property - Implemented "fraction" property for Slide widget (blynk cloud or local server >= v0.33.3)
  • Node - Table - Implemented "select, deselect and order" commands

Changed

  • Code refactor - Extract blynk method and variable to files in "libs" directory
  • Node - Notify - Rate limit increased to 5 msg/s (Blynk C++ Library 0.5.3)

Fixed

  • Node - zeRGBa - Check if the widget is configured in merge mode, otherwise it will generate an alert
  • Missing log on respond illegal command
  • Message ID overflow - see Blynk Library JS PR #44
  • Show protocol warning in debug panel

0.6.0 - 2018-05-07

Added

  • Node - zeRGBa - New node to simplify the use of this widget in merge mode

0.5.2 - 2018-04-27

Fixed

  • Fix Crash on log Read Event

0.5.1 - 2018-04-15

Fixed

  • Fix regular expression for validate server url on configuration node
  • Fix display readme

0.5.0 - 2018-04-14

Added

  • Blynk protocol - Handle any number of Blynk commands (virtualWrite(), setProperty(), etc.) in a row see Blynk C++ Library 0.5.0
  • Control max lenght of message and max number of commands in a single message
  • Config node - Option to enable "Multiple blynk command in single message" (blynk cloud or local server >= v0.34.0)
  • Config node - Implemented server proxy configuration
  • Config node - Option to log protocol "sync" and "bridge" messages type
  • Node - Bridge - New node that implements the functionality of sending commands to other blynk devices.
  • Node - Sync - New node that implements the "syncAll" and "syncVirtual" blynk commands
  • Node - Set Property - Implemented "step" for Step Widget (blynk cloud or local server >= v0.32.2)
  • Node - Set Property - Implemented "url" for Video Straming Widget (blynk cloud or local server >= v0.28.7)
  • Node - Set Property / LCD / Table - Send multiple blynk command in a single message
  • Node - Read Event - Option to receive all pins events
  • Node - Write Event - Option to receive all pins events
  • Node - Write Event - Added pin number that generate event in msg.pin variable
  • Initial support to Internationalisation

Changed

  • Better handle of configuration node error, now blocks child nodes if some parameter is missing.
  • More check on "pin" parameter before send message
  • The PING command is only sent if no data has been sent or received in the "heart beat" time
  • Hide "Auth token" - from all log message
  • Config node - Rename "Private key" to "Auth token" and better help message
  • Split every node on single file
  • Removed dependency from "DataView" package
  • Code clean

Fixed

  • Rightly handles the reception of the BRIDGE type commands.
  • Websocket SSL connection error on nodejs > 8.6.0 see (ws iusse #1227)

0.4.0 - 2018-03-09

Added

Changed

Fixed

  • Invalid HW cmd: "pm" see iusse #3
  • Protocol Log on message received and retrive right command body

0.3.0 - 2017-12-12

Added

  • Node - Notify - Implemented queue messages
  • Node - Write - Pin mode (Fixed / Dynamic) pass pin number in msg.pin variable
  • Node - Set Property - Pin mode (Fixed / Dynamic) pass pin number in msg.pin variable

Changed

  • Node - LCD - Warning on incorrect use of msg.payload property
  • Fixed some log messages

0.2.0 - 2017-09-18

Added

  • Debug option to log only specified pins number
  • Node - _ Table Widgets _ to simplify the use of this widget
  • Link to official documentation

Fixed

  • Missing logs on read and write event

0.1.0 - 2017-09-15

Added

  • Implemented SSL usage on the websocket connection.
  • Added Other Messages Type and Status Messages
  • Debug option in the configuration node
  • Display the number of pins on the status of the nodes,
  • Node - _ Notify _ to send push notifications on the smartphone
  • Node - _ Set Property _ to set the property of any widget
  • Node - _ App Event _ for the connection and disconnect event of the app
  • Node - _ LCD Widgets _ to simplify the use of this widget
  • On-line documentation of each node
  • Send PROFILE command on login

Changed

  • Blynk Protocol - Rewritten send and receive message functions, with more options, like vshymanskyy/blynk-library-js
  • Heartbeat once 10 seconds
  • Max virtual pin allowed 128