PUSH-mode widgets are not initialized automatically

Hi guys.
When you create a widget (e.g. gauge) connected to a virtual pin in PUSH mode, pin value is not read until it is pushed by device. I would expect the widget to read the initial value automatically at startup.

Well, I’m not sure if we can call it an Issue or Error. Anyway you can easily solve it by means of BLYNK_APP_CONNECTED() function. See docs.

Then it wouldn’t be called PUSH mode now would it? :stuck_out_tongue_winking_eye: Just like how manual transmissions refuse to shift gears themselves.

Set a reading rate in the Widget and use a BLYNK_READ(vPIN) function instead.

Or do as already recommended… if using a long timer, and don’t want to wait for the initial start, then send a manual PUSH upon connection, and let the timer take over from there.

Manual PUSH in BLYNK_APP_CONNECTED won’t work when device is offline, but it would be nice to have widget initialized with last-known pin value. Existing widgets do display the last-known if they have been PUSHed once.

Not that it is an issue, not at all, but it would make our experience with Blynk slightly better :slight_smile:

Nor would it matter… since the App is offline and thus unable to see it :stuck_out_tongue_winking_eye:

However since data goes to the server first, then simply exchanging with BLYNK_CONNECTED() would do that same thing when the device itself goes online.

Documentation + testing, such a wonderful combonation :wink: