[Solved] Is it possible to use two Bridges?

Is it possible to send comands from device A to device B and C?
I have this code that works good with the first device, but do nothing with the second.

Both devices uses V50 to turn off the light.

PS: I use a TAG to send the same command at V50 to all my devices, and it works. But then I added that TAG as a Widget in Android home screen, and its not working. Apparently this doesnt work with TAGS, when I use a simple button as a Widget it works. This is why Im trying to use bridges.

• ESP8266
• Smartphone Android
• Blynk server
• Lsst version of everything



WidgetBridge bridge1(V41);
WidgetBridge bridge2(V42);

BLYNK_CONNECTED()
{
  bridge1.setAuthToken("c66da95e5d4647c985b75608c1*****");
  bridge2.setAuthToken("c3460ae1237bc48afbd305fea6******");
}

void apagar()
{
  bridge1.virtualWrite(V50, 1); //Works OK
  delay(100);
  bridge1.virtualWrite(V50, 0);
  
 bridge2.virtualWrite(V50, 1); //Not work
  delay(100);
 bridge2.virtualWrite(V50, 0);
}

yes its possible, I’ve used up to 6 in one script and they worked. i’ve mainly switched to the restful api for this operation as its more manageable to code.

Your code should work. Unless I’m missing something. I would suggest you test by ommission (so remove parts of the code to see whether it works, switch the bridge names etc.

For one, have you succesffully switched the light on the second device with only one bridge?

1 Like

Thanks for your answer,
I’ve found there was an extra number in the auth code… :face_with_symbols_over_mouth: haha

The code works OK now.
Thank you

good that you’ve found it!