Android widget (different from Blynk widget)

Hi

I’ve developed a button widget for Android, feel free to try it out and send your feedback - the good and the bad experiences are welcome :wink:

Blynk Button One on Google Play

2 Likes

Just loaded on my Android, feedback to follow.

Edit: free form text required for pins or extend the drop down list to the 140 available pins.

@jvetterli 5* from me, simple, smart and free.

Your “DO without the wait” widget or spouse button as I call it, is very nice.

Thanks for the nice feedback and suggestion on the pin selection, will update soon

You’re welcome. Like the app, perhaps the button can be toggled between a switch and a pushbutton style.

If I were pie-in-the-sky dreaming, I would like to see you be able to source the light from another pin output. For example, I have an ESP8266 garage door controller. It has a pushbutton (which happens to be V1), and a light (which is V0, which by the way I did not notice referenced in the selectable pins list). The light indicates whether or not the door is open or closed. We set a threshold on a distance sensor to determine when the door is blocking the sensor (indicating it is open). When we detect the door is open, the light turns on (receives a value of 255). When the door closes, the light turns off (receives a value of 0).

Therefore, the light on the button on the widget could also serve to indicate whether or not the command was received and the door completed its travel. It could mirror the state of the pin.

Another good feature to include would be some sort of feedback to indicate that the command was sent, and perhaps that a valid REST API return code was received. Something visual like a popup, or something audible/vibration-based would also work as well.

But otherwise, I think the button is well done. It does function as you indicated. Great first run of an app.

It would be good if we had an “Add to home” button on the setting page of widgets.

Thanks for the suggestions and feedback on the missing V0 pin.
I’ll try to incorporate them in further updates.

The automatic “Add to home” functionality would be nice and was in my mind as well, but would be pretty complicated to achieve as Android doesn’t want this to happen. Since my days are too short anyways, I’ll concentrate on more useful functions on the widgets itself.

It’s impossible to implement, because only Home Screen application can add widgets to it.

With some “Exceptions” of course.

Updated the widget button with a couple of new features:
-Save settings checks if a connection to the selected hardware is possible
-Choose button style, works either as a switch (like before) or as a pushbutton for an adjustable click time
-Choose status pin: lets you monitor the state of a second digital pin - as per request of @billstein
-Status listener timeout: gives you the possibility to adjust the duration of the server connection after a click

The rectangle status indicator shows actual pin state for the button, Status-Pin state will be indicated with the circular indicator on the left.

After updating, you might have to delete and reinstall the widget to see the new button.

@Costas I’m sorry, but I didn’t have the time to go after the local server connection yet.

I hope this makes it even more useful for your applications, I’m looking forward for your feedback

@jvetterli took a look at the new version and it is a BIG improvement.

Liking the check for hardware connection when saving the configuration.

How does the status pin of D1 to D8 tie up with ESP pins? Tried to check the onboard LED on a WeMos (GPIO 2, WeMos D4) but no joy. The pin has a 10K pull-up resistor so it is active LOW but I tried HIGH, LOW and D1, D2 and D4 without any response.

After each change to the settings do we need to create a new button from the widget or does it update the existing button? Looks like the latter.

Not quite sure I understand the Pushbutton and the associated click duration as Blynk buttons that are set as PUSH work OK with Switch (on/off) setting. If I use Pushbutton on a PUSH Vpin for say 2000ms it will turn ON and then OFF but that is not what PUSH mode is for in Blynk. Perhaps I am missing something and Pushbutton is for SWITCH mode buttons.

Can you please remove V132 to V140 as they don’t exist, virtual pins are V0 to V131. When I said 140 available pins in an earlier post I was including digital pins in the count.

Are you able to make each of the fields deeper down the screen as they all get part of the text cut off on my Android?

P.S. local server is working as http://xxx.xxx.xxx.xxx:8080/ :grinning:

I agree with @Costas, the update looks awesome, I think you are doing a super job with this widget! The changes look good. The button changes look great, the pushbutton timeout is right on the money.

I’m not seeing the status pin update, though. How does the status listener work? Does it check the status of the pin at timeout, does it check the status of the pin like once per second until the timeout?

Also, what values does it respond to? For example, I have a LED on V0 which has a value of 0 when off, and a value of 255 when on. Does the status pin respond that way? What are its criteria to turn off and on?

Thanks
Bill

@costas
Thanks for the positive feedback and the hint for local server connections :raised_hands:

The status of a pin (digital and virtual) is only available if you have connected the corresponding pin in you Blynk project, could this be the cause of your problem?

You don’t have to create a new button after a change to the settings. A new button should only be necessary after an update of the widget graphics like in the last update.

Pushbutton mode is meant to make using switch mode buttons easier if someones usage would only be a short impulse. Could you explain your meanings on “PUSH mode” in Blynk?

Thanks on your clarification on the numbers of available virtual pins, actually Blynk on my Android only shows V0 to V127 and I couldn’t find more documentation on this matter.

Next update will size the fields according to the screen size, could you let me know your specifications so I can pre-check?

@billstein
Thanks for your feedback as well! Status pin update checks every 200ms until the timeout is fired after the last button click.

At present, it responds to digital value 1 the set the status to “on” every thing else turns it off. It wouldn’t be difficult to implement additional/different values, I just haven’t found a solution to implement an easy and understandable way to make this available in the settings without confusing too much. Maybe you have an idea, as I don’t want to make the settings too cluttered.

I’ll release an update the next couple of minutes which will trigger the status “on” if it reads a value of 1 or 255, please let me know if it works for you

Sorry, you are right. Originally it was 32 virtual pins 0 to 31 then it became 128, 0 to 127.

Got your update earlier today.

I have some digital and some virtual pins set in the project but even V4 which is working as your main control button is not showing any changes in the status area of your widget. Similarly the onboard LED of a WeMos which is GPIO 2 (silkscreen D4) and set up in my project is not showing any status changes.

Blynk’s PUSH button mode is the same effect you get with a momentary switch (HIGH whilst pressed and LOW when not pressed, unlike a regular switch).

Screenshot of your widget on my Samsung S3 (Android 4.4.4).

Perhaps you could make an “Advanced Settings” page. Advanced Settings, in general, are settings which don’t normally need to be changed. You could even put a note on the Advanced Settings page which indicates that under normal circumstances, these settings do not need to be changed, don’t change these unless you know what you’re doing, or something like that.

You could either make it a menu off of the Settings page, or a button somewhere on the page which reads “Advanced Settings.” Either way, calling it “Advanced Settings” removes it from the “standard” settings into an “Advanced” area where people can make changes if they need to.

I might also consider adding another feature to the Advanced Settings page: logging. Monitoring what the app sends and what the return codes are can be very useful for troubleshooting. Especially if you are helping people using your app, using the logging can help to narrow down where the issue is occurring.

@Costas
Thanks a lot for the screenshot, I’ve tested the app on different units, but obviously all with a higher resolution. Next update will include a nicer scaling settings screen.

Regarding the missing status notification: if this is running on blynk-cloud, would you mind sending me the token as pm or email to info.88octane@gmail.com so I can check what’s happening?

Ah, it’s called a momentary switch, I couldn’t find the right term, English isn’t my mother’s tongue…
Unfortunately Android doesn’t let us do this on a widget button, the pushbutton-style should mimic it’s behavior with the click duration time.

@billstein
Just found a bug monitoring the 255 value, next update will fix it.
Thanks for sharing your ideas, a logging feature is on my road-map and an “Advanced Settings page” might be a good solution - especially if more features should be built in in the future.

@jvetterli I can send you the token of a connected device but based on the pinout at https://www.wemos.cc/product/d1-mini.html what would you like me connect in the project so you can check the status notification?

@billstein @Jon_Moore @hjroh0315 here you go New Android Release 1.16.1

1 Like

Like the widgets. Don’t like the unrecoverable energy they consume. I understand it, I just don’t like it. Well done, thanks for the update.