Why nobody uses bridge?

maybe it should be

While(!Blynk.connect()) {}

or

While(Blynk.connect() == false) {}
1 Like

This is part of the Setup / initialization code that we got working on the earlier verion:

...
 while (Blynk.connect()) {
    // Wait until connected
  }
  bridge1.setAuthToken(authN);
...

What i am attempting to do is create a situation where the App communicates with multiple devices via a primary Arduino and then each of the other devices can return a status / value / message back to the Primary Arduino and then to the App, something like:

  1. Dashboard Button Press
  2. Primary Arduino Receives the button push
  3. Primary sends signal to standalone ESP#1 via Bridge
  4. Standalone ESP to Perform Activity
  5. Standalone ESP#1 replies to Primary Arduino via bridge
  6. Display status in Dashboard

I was struggling with getting the ESP to communicate back to the primary Arduino

Simply trying to establish a bi-directional communication via the bridge function between the devices and the App (using multiple devices on one dashboard)

1 Like

Hey, did you read my answer?..

Ill bought another ethernet modul, and i ll try it. :wink:

1 Like

Yip, testing it now.

This worked: :smile:

...
    while(Blynk.connect() == false) {}
    
    //while(!Blynk.connect()) {}   **This way round did not work, the effect should be exactly the same though?

     bridgeMain.setAuthToken(authMain);
      
    }
...
1 Like

Still doing some tweaks, making changes and trying to document the design a bit better but this is my current Dashboard, once i have all the code cleaned and and commented sufficiently to make sense I will upload it.

The Dashboard has 2 LEDs per button, the first LED is to indicate that the signal has been sent and will most likely be removed once its deployed, the second LED though is a signal from the device to indicate its current status.

Most of the devices will display the status on the app as well as to the device called ā€œBedroom monitorā€ that has an OLED screen, small buzzer and 2 relays for controlling the bedside lights.

Bridge is a key component to this design as it allows for bi-directional communication as well as being able to communicate to multiple devices.

The intention with the PIR motion sensors is hopefully to utilize the notification widget once it has been deployed in IOS, currently they just trigger the buzzer on the bedroom monitor and flash the LED widget in the application.

5 Likes

Great job! Looking forward to seeing the final result!

Once your project is ready, it would be great to put it into the Projects made with Blynk category. So that anyone can easily find it without digging the whole forum

Thanks for sharing!

I will do, apologies for ā€œhijackingā€ this thread, :smiley:

i already asked you before for how to connect Arduino Nano + ESP-01
and you give me a link http://contractorwolf.com/esp8266-wifi-arduino-micro/
and itā€™s for Micro not Nano.
i still stuck on connecting the Nano with ESP-01 on HW serial
if you can provide me with it and working blink example i will be very thankfull

I used his example and by comparing the 2 datasheets matched the pins up, the only ones that were different are the power and ground pins.

3 Likes

Other side

4 Likes

Bobbo_SA where is the final tutorial on your multiple device bridge example; would like to see. Thanks!

1 Like
  • 2 for video! Would really like to see that!
1 Like

Hello Guys,

In my opinion the ā€œbridgeā€ is not as reliable as you need for practical usage:

My examples (based on ESP8266 standalone) worked great, but only a couple (initialy 6 ) of hours. Thereafter sometimes works but not reliable at all. No changes in code, network etc. And to my surprise; when I changed the data transferred I was receiving ā€œOLDā€ data?? So the cause of this is in my opinion outside my control.

Is there a way to monitor the information exchange (data!) on both sides of the bridge?

Iā€™m using virtual pins and a counter increases the value for each information transfer.

1 Like

Regarding network - do you use local server? This is the only way you can guarantee network stability.

At the moment only via local server logs.

2 Likes

And wifi is still unreliable for production use if you ask me :smile:

Make sure you power your ESPā€™s with a decent powersupply (we canā€™t emphasis this enough because it saves so much headaches) and use a lilā€™ capacitor.

If you run the local server on old versions Raspi (like I) the Java app can seem a bit slow, but it works fine otherwise.

2 Likes

Well, it could be improved with enabling native libraries like openSSL and epoll transport. But it will complicate a lot installation process. So if it is important there is a way to improve that.

1 Like

Hi Lichtsignaal,

No issues with the ESP power supply. Yes maybe with WIFI as other applications (Webclient) suffer the same behaviour (but by far not as bad as Blynk). And indeed I want to try the PI as a local server or better on my Ubuntu system.
Is there anything I can do to monitor the JSON information exchange? It would answer many questions.

building a local server on Ubuntu enabled a reliable bridgeā€¦ However a new problem appeared. As soon as the Bridge starts other scripts stop running:

BLYNK_WRITE(V8) {
int status = param.asInt();
if (status == 0) {
mcp.digitalWrite(p0, LOW);}
else {mcp.digitalWrite(p0, HIGH);}
}

Suspected the mcpā€¦ but this appears not to be the case. Any ideas?