Create an account on blynk.cloud by clicking Create new account.
Create a new Template (Create New Template), enter a name, choose Other as the hardware type, and the connection type doesn’t matter. Click Done to finish creating the template.
Now set up a new Datastream. On the template detail page, click the Datastreams tab. In the top right, click Edit. A + New Datastream button will appear — click it, choose Virtual Pin, and a dialog window will open.
Set a name for the new Datastream (for example, Notification) and choose one of the free Pins (any). In the mobile notification you’ll want to display illumination, so select Double as the data type.
At the top of the dialog window you are in the General settings. Switch to the Expose to Automation tab so the stream can be used in automations. In the selector next to it, choose Sensor and also check Condition and Action. Create the datastream by clicking Create.
Save your work using the Save button in the top right. Save your Template ID.
In Blynk, go to Devices. Click + New Device to open the device creation dialog.
For the creation method, choose From template. In the next form, select your template and assign a name to the device. Click Create to finish the process.
Save the information provided by Blynk — you should already have the Template ID, and now you will obtain the Auth Token.
In the Functions tab, find the nodes that work with the new version of Blynk — they are labeled under the Blynk IoT section.
To write values to the created datastream, choose the write node.
Double-click to open its settings.
On the right, click the small pencil — this opens a new window.
In the Url field, enter blynk.cloud. In the Auth Token and Template ID fields, paste the values from the device detail in the web application on your computer.
Confirm the settings by clicking Add.
Enter the number of the virtual pin of your datastream and click Done to save everything.
You can now set up your flow in Node-RED, where you connect the mqtt out node that provides illumination from the sensor to the write node for Blynk.