How can I read an existing Datastream value without waiting for
BLYNK_WRITE ( VPIN ) to get called?
Use case: I have Master and Slave devices. The Master device writes to the Slave device’s Datastream using a Blynk API HTTP update. When that Blynk API update occurs the Slave’s
BLYNK_WRITE ( VPIN ) executes. All is Right with The World.
However, if the Slave device reboots, when it comes online there’s nothing to trigger the
BLYNK_WRITE ( VPIN ) routine on the Slave device. The Slave device does not know the current Datastream values. Moreover, if the Master device has changed the Slave’s Datastream value while the Slave device is offline, the Master device still sees a successful Blynk API update return-code – as it should, and the Slave device doesn’t know of the change.
I have not found a way for the Slave device to obtain its own Datastream value without something triggering
BLYNK_WRITE ( VPIN ). I get around it by having the Slave device ‘check-in’ with the Master device using another Blynk API update to the Master device. When the Master device sees the update from the Slave device, it can then (re)send the correct data to the Slave device. But this creates unnecessary traffic.
I have tried
Blynk.syncAll(), but it doesn’t fire the
BLYNK_WRITE ( VPIN ) routine unless the Datastream has been updated recently.
Hope this is clear. All thoughts welcome. Thanks for any info.