How to connect to Blynk server in ESP8266 mesh network?

Can I use Blynk in mesh network and how to?
Thanks.

That is kind of … not enough information, to be polite. Please state the nature of the medical emergency, eh, I mean, project you want to make :slight_smile:

1 Like

Sorry. But I just want to know how to use Blynk in mesh network.
(use this mesh network library: https://github.com/Coopdis/easyMesh)
I don’t know how to connect to Blynk server in mesh network.

From what I read you cannot use that because it will interfere with the Blynk Wifi routines. But Blynk has something called Bridge widget. You can use that to mesh you network :slight_smile:

I know Bridge widget.
But can I send data to Blynk server by self auth token?
(a send data to b and b send a’s data use a’s token to Blynk server)
May be I should use a’s token on b to connect to Blynk server and send data?

(But if I have hundred of device…)

You can send all data everywhere with bridge, I’d use virtual Pins for that. Please read up on the bridge functions. There are some examples in the sketch builders for this and the documentation is fairly good for this :slight_smile:

But I think I can’t use this function in mesh network.
Because I can’t specify vritualWrite send data port.

What do you mean by “data port” ? You can send data to other ESP’s using the Bridge functionality.

Because I have to use sendBroadcast(“message”) to send data.

@gscc perhaps if you said what you want to do with the mesh network it would help.

In the true sense of the definition, while it is possible to use the ESP hardware in a mesh, Blynk’s topology is a star, and thus can not be used in a true mesh setup. Even Bridging goes through the hub (server).

This is not a bad thing as Blynk is built for IOT, not signal path redundancy. If for some reason you need a Mesh for wide ranging sensor pickup, then you can still do so with whatever library works, and standard Arduino coding for the sensors, but only use Blynk, running independently on it’s own hardware, by connecting with one of the closest Mesh hubs (via i2c, serial, smoke signals, etc) to correlate all the incoming data.

2 Likes

So I can only use one device to send data to Blynk server, right?

You can, but you are not limited to it. You can send data to the Blynk Server with any connected device.

Sorry, I thought you might have had some understanding of Blynk basics… I updated my diagram to show that Blynk can run on many different devices, all linked via the Server.

But if you have a wide ranging Mesh network of ESP’s and their sensors, then you would just physically link at least one node to any of the MCU devices on the Blynk network. You would have to code in some data transfer methodology between your sendBroadcast("message") and virtual pins that Blynk could process, but otherwise there is no reason why that combo can’t work.

I think it can’t work.
Because in mesh network I can’t let all device direct link Internet (ap no signal).
If device not link to Internet, I can’t use Blynk.connect() to connect Blynk server (not modify Blynk library).
I can’t send itself’s data as a Blynk device.

So if I want to direct use Blynk in mesh network, I have to modify Blynk library to support mesh sendBroadcast function.

No… Whatever you are referencing can’t work… but thats NOT what I was suggesting anyhow. You DON’T use Blynk in a Mesh Network… You just interface the two separate networks together in a way to share data between their independently running infrastructures and control libraries.