syncVirtual() not working on 2nd device, works on 1st

Hello! I running my server and have following in my loop


and following function to catch writes from “value widget”

That code works perfect on one ESP32 and doesnt trigger BLYNK_WRITE(110) on another ESP32, same server. How do I debug? Sketches are identical, auth tokens different.

Blynk Server 0.39.12 successfully started.

two separate projects, two devices devices

Widget value display.

post the sketch here (properly formatted that is).

Also if it really is

then that may be the issue.

1 Like

Also the value widget (labeled or display) doesn’t write, it is for displaying. So it wouldnt have a BLYNK_WRITE associated with it.

1 Like

Solved by initializing value first. Unless server got anything set it wont do “write” procedure. I expected to “write"s with null” params but no.

So you have to init VPIN value, for instance execute once Blynk.virtualWrite(110,""). Now you’ll get syncVirtual to proc BLYNK_WRITE.

Same issue has been discussed @ github. Developer said it’s by design. Well, should have stated in manual :slight_smile:

Is a value a value before you assign it a value :thinking:

Then we would have pages and pages of what is NOT going to happen when nothing is intended to happen :stuck_out_tongue:

NOTE: vehicle gauges will not show any levels when vehicle is off

NOTE: Caller ID will not show caller when no one calls you

NOTE: Coffee machine will not contain coffee until you add water… and coffee… and turn it on…

But seriously… I actually ran into something similar when dealing with API issues… I blamed it all on lack of documentation as well :rofl:

Marking this topic solved :+1:

I updated doc :slight_smile:.

1 Like

foo(int x) {}
int a;

wont break most of languages if any. c++ will assume a = 0 on most compilers, js will consider a = undefined, etc.

However, thanks Dmitriy for quick response and help.