The Blynk is a mobile front end builder and signaling relay (MQTT). This let's you quicky create control and display for your IoT things. Here we will guide you the process of putting together the hardware and connecting it to the cloud. The cloud in turn gets interconnected with the project on your phone withing the Blynk app. The local side of the project is hosted on the BigClown Raspian which has all the necessary components prepared for interconnection. When everything will be finished then you would have an ability to turn on and off the relay, switch the LED strip on and off, change the light intensity using slider and also you would be able to watch the temperature (and other values collected) acompanied by graphs.
Open the Blynk App and sing in to your account
Go to the main PROJECT DASHBOARD. If you are inside of one project tap on DASHBOARD icon.
Tap on QR code icon and scan your QR code
You should get Thanks! window
Tap to CLAIM REWARD
You are done and you can start integrations with Blynk.
The very first step needed is to install and configure the application on your mobile device. In order to interconnect things you would have to create account. The Blynk gives you two options either create account by email or use OAuth2 login of Facebook. Decide yourself which is better for you.
In order to create a UI for your application you have to first create a project.
Choose the project name
Choose Generic Board device
Connection type is WiFi
In node red, install the Blynk package
node-red-contrib-blynk-ws if you cannot see Blynk nodes. Also follow one of the project tutorials above where installation and creating and connecting of nodes is explained.
Blynk color values needs to be transformed to proper hexadecimal RGB string. You can use function block in the Node-RED and paste the code below. Remember to configure ZeRGBa to MERGE mode and the range of values has to be set for all three channels to 0 - 255
var node = "generic-node:3"msg.topic = "node/" + node + "/led-strip/-/color/set";var r = Number(msg.arrayOfValues).toString(16);var g = Number(msg.arrayOfValues).toString(16);var b = Number(msg.arrayOfValues).toString(16);r = (r.length < 2) ? "0" + r : r;g = (g.length < 2) ? "0" + g : g;b = (b.length < 2) ? "0" + b : b;msg.payload = "\"#" + r + g + b + "\"";return msg;