I’m using gab.lau’s excellent nodes with node red (all latest versions).
I would like it so when the virtual LED on V5 goes on/off on my iOS app, it sends a corresponding payload to a debug node (for now).
This works for virtual Buttons (e.g. Pin V2 Write Event sends 1 or 0 to debug node).
But when I try it with a virtual LED, it does not send anything from either Write or Read Event nodes. I would think when the state of V5 is updated on the Blynk server, it could trigger an event.
Do I need to amend my Arduino device code to send a message to MQTT, or can this be achieved using nodes alone?
It would certainly be cleaner to send an MQTT message from the Arduino, but polling every second or two would work without any real issues.
If you have the option to change the Arduino code then that’s how I’d do it, but polling would give you a quick fix.
Also, bear in mind that polling will give 0-255 as a result.
Which device triggers the v5 led on and off? If, when the LED is triggered, you send a value with a “bridge” direct to nodered?
This avoids using sync and polling.
The bridge is a direct communication between two devices. The message sent by the device arrives at the server which forwards it to the destination device.
In this case between arduino and nodered.
Thanks for the reply. At present V5 is written to via digital.Write code on the Arduino. There is nothing being sent to node red via code.
I thought I might be able to “read” the LED state of V5 from the Blynk server via one of your nodes, and use the value to trigger another node red flow.
In otherwords a dodgy fix
I can easily add some client.publish lines on the Arduino which seems the best way, I was just curious if your nodes could be used.