I would like to limit data sent from the device to the app only to times when the Blynk app for that device is open. This would result in far fewer messages being sent to the app.
Right now, I am using a key press in the app to update (with a timeout), but it would be nice to have the update from the device be automatically sent when the app opens.
I did read that Blynk_Read in the legacy app could be used for this purpose in the past.
In the Legacy system, the app was the only available interface. Blynk IoT now has the web interface, and multi-user support. In addition, there are the webhook and MQTT interfaces to consider.
Most users will want data sent to the Blynk server (it doesn’t go directly to the app) regardless of whether the app, or other interfaces, are active - so that data can be stored, plotted and reported as required.
Obviously you are using the free subscription, which is intended for testing/exploration only, and are trying to implement a workaround to the message limits imposed by this subscription. Having gone to the trouble to re-write the Blynk system to implement these restrictions, to prevent people from making long-term use of the free subscription, Blynk aren’t likely to re-implement a system which allows you to detect if any of the interfaces are currently active.
You’re going to have to live with your current solution, and hope that Blynk don’t change the Free subscription to impose time limits that would cause the subscription to expire after a certain amount of time.
I have been on a maker plan for a few years, and hopefully will continue to be for many more.
I do think this would be useful functionality in some cases (e.g. where one wants current data immediately displayed on app opening) and it should reduce message costs for Blynk.
I had thought the new 30,000 message limit on the free plan was a way for Blynk to reduce its costs.
I think you’ll find that its because Blynk wants people to move to a paid subscription once they’ve use the free plan to evaluate the functionality.
Unfortunately, the cheapest paid subscription for new users is the $99 Pro plan, which is outside the reach of most individuals, so making Blynk a business-only product.