Blynk and Espnow together, solution?

HI, does anybody has a good solution to use Blynk and Espnow together in one Sktech?
I made a working sketch, but I thing it’s not the optimum.
What I do is start Espnow, get the values from slaves, then start connecting Blynk, send to Blynk, disconnect and restart, reset the esp. Then it works both together, but blynk was in loop connect, disconnect and I found its not a good solution. Maybe has anybody a better idea.

1 Like

You can have both Blynk and ESPNOW, if you set the mode to WIFI_AP_STA and folow those rules.

ESPNOW always use your wifi access point channel !
Note! the softAP has newer the same mac as Station !
On ESP32 you can set both the AP mac and the Station mac !
On ESP8266 you can set only the Station mac not the AP mac !
You can only have one wifi access point unles you configure them to use the same channel !

In my test both ESP32 and ESX8266 was connected to blynk at the same time with out any issiue with comunication in both directions.

I you want to create a Blynk gateway I recomment you to use ESP32, then you can set the AP mac, and if you also have ESX8266 use ESPNOW only.
Then you can set your own mac

For troubleshooting you can wtite to FF:FF:FF:FF:FF:FF it is a broadcast to all device


Ok, so I’ve crossed this topic while trying to do the same thing…
Since no one posted the solution, i had to find the way…
Quite simple, and works like a charm…
Will post the code in the next few days, need to clean up all of the non relevent code, so it’ll be easy to implement.

hi i used blynk and espnow to send data to an lcd1602 display, to make them work BOTH and very well you have to set the wireless channel of your router to CH 1 otherwise you have blocks or no connection

I use ESP-NOW and WiFi in same esp8266 (and esp32) devices. They are also connected to Blynk. So YES, it is possible.

In short:

  • I have up to 20 devices SENDING on ESP-NOW to a “gateway” (esp8266 or esp32) which is connected to and sends forward to Blynk. (Blynk Legacy in my case. As I haven’t converted this system to Blynk 2.0/IoT yet.)

I have a GitHub repository ( ) describing how it works with ESP-NOW and WiFi simultaneously using only one (1) esp8266 or esp32. And they work simultaneously, not one-by-one in time. I.e. i never miss a message from any of the 20 devices sending.

I haven’t published my code using also Blynk but it works in same way as usual.

Note. My solution requires to work on WiFi channel 1 fixed, and not auto.
I use a separate router for this purpose (my “IoT Router”) but it is possible to use your standard router and set the 2.45 GHz band to channel 1.
Not everyone likes this. (I have no problems.) If you don’t like this, you can use 2 esp8266 (or esp32) in one same gateway unit. One as ESP-NOW receiver, then sending via SERIAL to the other which then is just any ordinary WiFi enabled device connected to Blynk or any other service. (I havent tried this myself, but may try this for another location where I hopefully (?) will set up yet another ESP-NOW system.)

Edit: I have read about other solutions more targeting only one ESP-NOW sending device. The receiver (i call it gateway) then listens to ESP-NOW. When received a message, it disables ESP-NOW and enables WiFi and sends data forward. Then disables WiFi and enables ESP-NOW again.
This is maybe how you have tried out.
This may work OK when only sending from one (1) ESP-NOW device but it will never work if you have several devices sending. As you will lose lots of messages.

Well, i didnt set the channel to 1, also i didnt use soft ap or ap…
But i did use one as receiver (the same one connected to blynk server, and one as transmitter.
Blynk stays connected the whole time…
Will upload a code so you guys can criticize it ((;
Maybe someone will find it useful.

@2centsisrael I know it’s been a while but I would love to see your code if you’ve still got it