iOS button behaviour

Using Blynk on iOS 16.5, and my project is running on micropython. Can the dashboard button (which is set to ‘switch’) behavior be modified (either within the write_handler, or in the iOS app)? The behavior I am seeing is if I press the button for anything longer than 1ns (:-)), it reverts to its old state.

For example if the button indicates ‘OFF’ and I supper quickly stab the button, it (correctly) changes state to ‘ON’. (and write_handler correctly sees this as one state change)

But if I casually (normally) press the button and release, it changes state to ‘ON’ while pressing, then ‘OFF’ on release. And the write_handler sees and responds to these two state changes.

Suggestion: Would be great if you could casually press a button, and it only changed state once.

I guess I could do some sort of write_handler check that the new state has been present for > 200ms before acting on it - but maybe an app setting for ‘length of button press required’ would be better?

What mode do you have your button set to in the app (Push/Switch/Page/QR)?

What app version are you using?

Pete.

Button is set to ‘switch’ (I only see push or switch options)

App version 3.5.5 (0)

@Eugene I was on app version 3.5.4(0) and have just updated to 3.5.5(0) to and now if I add a new button or styled button widget and set it to SWITCH it still behaves like a PUSH button.

My existing buttons that were already set to SWITCH work correctly under the new app version, but if I go into edit mode and open one of these button widgets then exit again it no longer works correctly, it behaves like a PUSH button rather than as a SWITCH.

Is there any way that you can roll back to v3.5.4(0) in the App Store, or issue an emergency fix for this?

Pete.

@Eugene to help with your debugging, I see it behave as a switch if i tap the button super quickly (the briefest stab at the button)

@Eugene a bit more info…
I found that my iPad was still on version 3.5.4 (0) and discovered that if I edited my dashboard I that version, changing the button widgets to push then back to switch and exiting edit mode, when I opened the dashboard on my iPhone (running 3.5.5 (0) the were back to working correctly, as switch buttons again.
Buttons created in 3.5.5 (0) that were set to switch but that worked as push buttons were also fixed if edited in 3.5.4 (0).

Seems that in the latest version, the edit process is saving the widget settings incorrectly, and although they say that they are in switch mode they act like push buttons until edited in an earlier version which fixes them.

Pete.

@andyp @PeteKnight Thanks you for the report.
We’ll release an app update with the fix asap.

2 Likes

I am experiencing the exact same problem with the switch mode. I’ve been developing a new app on my ESP32 and I edited six switches to give them new names. After editing, the behavior is as what Pete described. The other three switches I had, which were not changed, continued to function properly. The behavior is almost random, in some case a normal push activates properly, in other times it behaves like a push button as opposed to a switch. If I stab (or push) the switch very fast it would behave as a switch and I mean really fast stabbing.

Yes same problem here, a very short tap on the button works but a long press > 0.2 sec the switch sends the off code on release.
I tried putting a delay in the code but of course the interrupt over rides the delay.

I’m running IOS16.5 on my iPad

Fixed for me on latest iOS Blynk app update - thank you!

1 Like

Yes working now, many thanks!