Use ESP NOW to transfer a sensor value between two ESPs in blynk

Hi, I want to send an int value from ESP 8266 to ESP 32 using the ESP NOW protocol.
But when I use this protocol (ESP NOW) in blynk I can not find any value

This is my ESP 32 code

This is my ESP 8266code

I can not access the variable sent by ESP 8266 when I use BLYNK
I’m sure my ESP NOW protocol is working properly because when I use the following code in ESP 32 everything is fine

Note: I can send commands from ESP 32 to ESP 8266 with this protocol. But I can not do the contrary
Note: If you want to test the code, change the MAC address and BLYNK_TEMPLATE_ID

ESP code 32 without using Blink which works properly (ESPNOW protocol only)

I basically want to set up a ds18b20 temperature sensor.
Read its value with ESP 8266. Transfer it to my ESP 32 with the ESPNOW protocol.
And display it on BLYNK

Thank you all :white_heart:

Blynk is presumably using WiFi but you cannot use WiFi and ESP-NOW at the same time

See https://github.com/espressif/arduino-esp32/issues/878

1 Like

Is there a solution for doing this?

Some people in the link that I posted claim to have got it working but others had problems

Have you tried any of the proposed solutions involving the use of a common WiFi channel ?

1 Like

Yes I tried. Unfortunately I can only send information from ESP 32 to ESP 8266. I can not get information from ESP 8266

Once I discovered the problem I did not look for a solution. Do you actually need to use ESP-NOW when WiFi is available ?

1 Like

I basically want to set up a ds18b20 temperature sensor.
Read its value with ESP 8266. And transfer it to ESP32.
And display it in BLYNK

Is there a solution other than ESPNOW?

Why not connect the sensor to the EPS32 ?

More details of your project please

1 Like

I have three rooms that I have to measure their temperature and display on the BLYNK system.
And if needed, the user can turn the heater or air conditioner on and off, or this can be done automatically.
The rooms are far apart, and if I connect all the sensors to ESP 32, I get an error in measuring the temperature.

I am trying to measure the temperature with ESP 8266 and send it to ESP 32 to eliminate this error

Are you planning to use a separate ESP8266 for each room ?

1 Like

Yes. That's right.
This will use less wire in the heater and air conditioner wiring and make troubleshooting easier.
And checking the temperature information is done correctly with the least mistakes

It is not an area that I am familiar with, but how about using UDP to send the data from the ESP8266 boards to the ESP32 ?

I am sure that this must be possible, but I don't know whether it can coexist with Blynk

1 Like

I know absolutely nothing about Blynk. But if you have WiFi then consider the MQTT protocol.

1 Like

I thank you for your guidance.
Yes, there is no problem with udp. But I am afraid that due to the long distance of 50 meters, the voltage will drop and the connections will not be made properly.

Doesn't UDP make a mistake on this long route?

I do not know much about mqtt. Can I do this with mqtt?
With proper protection in terms of others not having access to the system؟

What voltage drop do you mean ?

I was suggesting using UDP from to send values from each ESP8266 to the ESP32

Yes, I'm wrong with uart. Sorry
Apparently I have to use the same method

There's several ways to do it. I haven't used Blynk recently, but I see that they permit virtual devices to talk to their cloud using a REST API. So it may be possible for each device to use the API to talk to Blynk and still have the data aggregated in a single app. You'd need to dig into their docs to find out.

Alternatively, you can just have one master ESP taking to Blynk and it can talk to the other ESPs over Wifi, collecting their sensor data and passing on instructions. I think the old ethernet shields could manage four connections, so I would expect no less of the ESPs, which should mean that Blynk and other comms can coexist.

I'd go with MQTT, simply because it's easy to monitor traffic on the broker for debugging.

1 Like

I have a few dozen devices around my home that communicate through MQTT. Its a protocol that is practically made for remote sensors. The sensors are completely independent from each other and I can add or remove them easily. How you get this data to and from Blynk is not in my scope.

MQTT can be as simple or as complex as you can imagine, but simply put, you just publish an MQTT message from your sensor/ESP device to a broker. The broker can be a public broker that is free and anyone can use it, or you can run a free broker program, mosquitto, on a Raspberry Pi.

1 Like

Thank you :white_heart: