BLYNK_WRITE_DEFAULT() and BLYNK_READ_DEFAULT() send values when app is closed

Dear Blynk Community.

I am using an ESP32 Dev Module as it offers 255 Virtual Pins for usage in the app and I am trying to find a way in order to send temperature data when app is closed. In order to use virtual pins > 127 I need the BLYNK_WRITE_DEFAULT() and BLYNK_READ_DEFAULT() as described in but I can only get data on the app when Refresh Interval is set to anything different than Push and App is open.

But when App is closed the values are not received or when the Refresh Interval is set to Push I don`t get any data from hardware.

Is it possible to use the virtual pins >127 when app is closed?

Thank you very much.

It seems the “from device” Virtual Write limit is 127… anything more will not compile.

Bynk.virtualWrite(V127, "The limit allowed is 128 vpins, including V0");

So it seems we are stuck with the “App Active” _DEFAULT() methods.

But seriously… do you have over 128 temperature sensors running??

Hello @Gunner thanks for the reply.

Actually I am working on a kind of sensor gateway which will monitor the temperature and humidity and the reason why I need so many virtual pins is to also define min, max temp and humidity for each sensor among other things like buttons, battery level and menus.

But OK, I believe I will need to “reserve” the virtual pins from 0 to 127 for variables which must work when app is closed for example temperature, humidity, battery level readings… and use the rest 128 to 255 for variables which will be handled when app is active for an example definition of min and max alarms, buttons, menus…

Opps… I had found this once already… but then forgot :blush: :stuck_out_tongue:

So, this works… NO V

  Blynk.virtualWrite(255, "This works to send data to vPins 128-255");

Hello @Gunner it works, thank you. This topic can be closed.

Happy new Year.

1 Like