BLYNK
HOME       📲 GETTING STARTED       📗 DOCS       ❓HELP CENTER       👉 SKETCH BUILDER

HW sided widget enable/disable function


#1

One function I’ve always enjoyed when coding with forms in java or c# is the ability to control
when a user can press buttons and/or see certain controls. What I would like to see is two functions that allow
you to control the enabled status of widgets from HW.

I envision using this to prevent users from spamming buttons and flooding my HW. This is something that might not be a problem for the programmer when using his/her blynk projects but if you share it to someone not as knowledgable it could easily happen that they spam buttons and flood the HW.

The two functions I think of is:
Blynk.WidgetEnabled(var vPin, boolean enabled)
This should make it so that the widget in an project with the corresponding pin is enabled/disabled based on arguments.
In case of HW failure, stopping and starting a project should default all widgets to enabled

Blynk.WidgetTimedDisable(var vPin, int timeInMillis)
This would do the same as above but would, instead of enable/disable a widget at a certain part of code, disable it and enable it after an certain amount of seconds/minutes/hours… Maybe a spamrestricted update button for usage scenario?

HW should just pass along this to the server and the blynk app should handle the request in similar fashion as I imaging setproperties works. Perhaps it can be included as a setProperties?

Blynk.setProperty(V0, “enabled”, “true”)
Blynk.setProperty(V0, “enabled”, “false”)
Blynk.setProperty(V0, “enabled”, “5000”) //disabled for 5 s, re-enabled on app side without further code

I’d love your thoughts on this, anyone else finding this interesting/useful?


#2

Definately. On my current project, I’ve built a bunch of calibration facilites. Works well, but messing with these controlls inadvertantly would make a mess of calibration. Having the ability to enable/disable controlls, in my case a specific tab but individual controls, would be a phenominal plus.


#3

You should add your votes to this roadmap idea then…

Pete.


#4