2 device in 1 notification only

Is it possible to merge the notification on 2 device in 1 notificatiom only?

At the top of my head I can only think of bridge widget for this. Send data from device1 to device2, process on device2 and send notification from device2

Do you have any sample code on how to do that?

https://examples.blynk.cc/?board=ESP8266&shield=ESP8266%20WiFi&example=Widgets%2FBridge

hello, can you show me some code with notification sir using the bridge? i can’t understand the syntax sir. Thank you . Just show me how to merge the notification from device to device 2. and the final output will be the notification of the device1 and device 2.

Sorry I dont have time to play code factory :slight_smile:

The example shows you how to use bridge.
from device1 use bridge to update virtual pin on device 2 with the text you want to send in notification
from device 2.

from device2 implement a BLYNK_WRITE() function for said pin and save the values that come in from device 1.

something along the lines of

String bridgeText = ""; // global
BLYNK_WRITE(vPin)
{
   bridgeText = param.asStr();
}

void notify()
{
   if (bridgeText != "") {
      // use bridgeText in combination with info from device2 
      // to send a single notification
      bridgeText = ""; // return to default
   }
}

If you can’t understand the syntax of the Bridge example already provided, how would you understand anything we wrote for you… it would be in the exact same syntax!

    /////////////////////////////////////////////////////////////////////////////////////////
    // Keep in mind that when performing virtualWrite with Bridge,
    // second board will need to process the incoming command.
    // It can be done by using this handler on the second board:
    //
    //    BLYNK_WRITE(V5){
    //    int pinData = param.asInt(); // pinData variable will store value that came via Bridge
    //       if pinData == 1 {  
    //         Blynk.notify("Other device sent a 1"); // THIS IS THE NOTIFICATION ADDITION YOU ARE
    //                                                                    LOOKING FOR.
    //         }
    //    }
    //
    /////////////////////////////////////////////////////////////////////////////////////////

Note that using that Bridge example previously provided, you would also need to change the timer to something higher then 15 seconds, due to the 1 notification per 15 second rule with Cloud Server. E.g.

timer.setInterval(16000L, blynkAnotherDevice);