I have 1 project with token and one ESP8266 board with this token. I can easily control my hardware from app, however I do not understand how can I control more than 1 ESP? For example, I want to add one more device to existing project how can I do that?
3 Answers
You can use the APP to control 1 ESP, and then from that ESP control other ESPs using the Bridge functionality available. You will need to assign different tokens for each ESP, in order to identify in the main ESP sketch as bridges. Using the same token for multiple ESPs is a bad and unstable approach.

- 41
- 1
- 6
You can now add multiple devices in the Blynk app with each an unique token. When adding a control in the app you will have to choose on wich device (esp) the control has to take action.
Because each device will have an unique token, you will me a lot more flexible than with the before provided answer.

- 41
- 10
-
1This does not provide an answer to the question. Once you have sufficient [reputation](https://stackoverflow.com/help/whats-reputation) you will be able to [comment on any post](https://stackoverflow.com/help/privileges/comment); instead, [provide answers that don't require clarification from the asker](https://meta.stackexchange.com/questions/214173/why-do-i-need-50-reputation-to-comment-what-can-i-do-instead). - [From Review](/review/low-quality-posts/16476625) – shabeer90 Jun 20 '17 at 15:30
-
Can you cite a changelog/release notes? – Jon Jun 20 '17 at 16:25
-
@shabeer90, I must correct you, because this solves the issue from the asker. The bridge is not necessary if the hardware does not need to communicate one to each other... – Alex Logist Jun 21 '17 at 06:29
At the moment you have 2 options :
Upload 1 token to all your ESPs. It will work fine, however this approach is not very flexible. As any command from application will go to all your devices with same token. So you have to code separate logic on every ESP. That's fine if your hardware performs different tasks, but not very suitable for same logic.
You can use bridge functionality. In that case you'll need to create few projects to have different tokens. Upload specific token to specific hardware and send command directly from 1 device to another device. Here is basic example of bridge logic :
-
WidgetBridge bridge1(V1); //Initiating Bridge Widget on V1 of Device A
...
void setup() {
Blynk.begin(...);
while (Blynk.connect() == false) {
// Wait until Blynk is connected
}
bridge1.digitalWrite(9, HIGH); // will trigger D9 HIGH on Device B. No code on Device B required
bridge1.analogWrite(10, 123);
bridge1.virtualWrite(V1, "hello"); // you need to write code on Device B in order to receive this value. See below
bridge1.virtualWrite(V2, "value1", "value2", "value3");
}
BLYNK_CONNECTED() {
bridge1.setAuthToken("OtherAuthToken"); // Token of the hardware B
}

- 11,657
- 9
- 37
- 57