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
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
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
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.
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.
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.