Multiple bridge in one sketch - bridge definitions

Hi,

I have a problem with bridge. I have one device (that read a ds18b20) and I want to send the data in two device.

The problem is that only the first definited bridge receive data, the second nothing.

This is the sketch:

WidgetBridge bridgeSala(V1);
WidgetBridge bridgeBagno(V2);

void setup() {
  ...  
  timer.setInterval(10005L, sendTemps);   
  ...
}
 

BLYNK_CONNECTED() {
  bridgeSala.setAuthToken("014fxxx5b"); 
  bridgeBagno.setAuthToken("4a5fxxx940");
}

void sendTemps(){ 
  ...  
  bridgeSala.virtualWrite(V30, tempOut);
  bridgeBagno.virtualWrite(V31, tempOut);
} 

The first “Sala” device:

char auth[] = "014fxxx5b"

BLYNK_WRITE(V30) {
  esterna = String(param.asStr());
}

The second “Bagno” device:

char auth[] = "4a5fxxx940"

BLYNK_WRITE(V31) {
  esterna = String(param.asStr());
}

In this case the data is received only from “bridgeSala” on V30.

If I invert the declaration of bridge

WidgetBridge bridgeBagno(V2);
WidgetBridge bridgeSala(V1);

The data is received only from “bridgeBagno” on V31.

Blynk Library version on all devices: 0.6.1

Any ideas? Thanks, saddys

Update: I tried changing vpin, order, etc etc, and it works for a while and then stops sending the data to the second bridge in order. Could it be a bug with sonoff basic’s esp8265? Because I have another device (esp8266 nodemcu 12e) that sends the data to 4 devices and never fails for months.

4 posts were split to a new topic: Getting many syntax errors