Communication between devices in Blynk 2.0

That’s not a great way of wording it, but basically yes. The restriction is actually that each device has its own Auth token, and that Auth token can only be used on one device.

You can however use the HTTP(S) API to write data to the datastreams belonging to that Auth token, and this can be done from any device. The device doesn’t even need to be connected to Blynk, and the API can even be called from a web browser.

Another way of transferring data from one device to another is to use Automations in Blynk.

Both of these approaches, plus the third option of using Node-Red are discussed above.

Yes, it can be achieved with either of the three methods described above - HTTP(S) API, Automations or Node-Red.

Pete.

Hi Pete,

I’m lookinmg at your HTTP code. I see the part that sends to the web server (push_some_data() ) but I was wondering what code would be needed to receive the data on the other device? Or is that included in the code that you posted?

Please advise.

Thank you
Mike

A standard Blynk sketch, using the auth token that you’ve sent the data to using push_some_data() with a BLYNK_WRITE(Vpin) function to receive the values and do something with them - like send them on your display.

Pete.

Hi Pete,

I have looked at your code to send a number to the Blynk server. The example is for an ESP32 but I need code for an ESP8266.

I changed the include lines as follows:
#include <BlynkSimpleEsp8266_SSL.h>
#include <ESP8266HTTPClient.h>

But I am having an error with the HTTP call in the void api_bridge():

Compilation error: call to ‘HTTPClient::begin’ declared with attribute error: obsolete API, use ::begin(WiFiClient, url)

What am I doing wrong? Is there an example for the ESP8266 ? The guy said he hasn’t tested it with an ESP8266.

Thanks
Mike

If you’d have continued reading that topic you’d have seen that I posted an ESP8266 version in post #45

Pete.