Can Blynk.syncAll() except some Virtual Pin?

Can I use Blynk.syncAll() but don’t sync some Virtual Pin or array of virtual pin?
Can I use sync with array of virtual pin?

You can sync specific pins with Blynk.syncVirtual(Vx).

I know but I have 30 pins need sync & 30 pins don’t need sync? I have to write 30 lines of code?

I did some tests a while ago and I think you can use For loops with Vx but there is a specific format. I think the x needs to become text and added to “V” to make “V0”, “V1” etc. I will leave you to test this.

1 Like

I will try.
Is there a way to tell the hardware known the app is connecting to server or not? Some alarm use push function, but if app not connect to server, I can’t receive alarm push. In this case if app not connect I hardware send sms instead of push

I find out, I can use rest api to get app status

1 Like

Rest Api return status of app is open or close, mean if you close app, but still conecting to internet, rest api return false, but phone still get push notification, it’s not mean phone is offline.

Hi, you can use a cicle FOR and ARRAY.

I look you with a demostration:

volatile int blynk_sync[20] = {V1, V2, V3, V4, V5, V7, V8, V11, V12, V15, V17, V18, V20, V24, V25, V27, V29, V42, V43, V60};

BLYNK_CONNECTED() {

for (int x = 0; x < 20; x++) {

Blynk.syncVirtual(blynk_sync[x]);
}
}

That’s All !.. Sorry for my English, but i’m Italian…ahahahahah

Yes. https://docs.blynk.cc/#blynk-firmware-blynktimer-blynk_app_connected you can detect this in realtime if hardware has open connection to the server.

When you close the app - socket connection is closed. So app is considered if offline.

Correct.