Segmented switch reselection issue

Thanks a lot for the Dark Theme it is really nice.
Unfortunately with this last update it looks that something not working for me, if I click on a Segmented Switch say (Option 1) it sends the command to the BLYNK_WRITE and execute the function inside it.
If I click somewhere else and come back to click again Same Segmeented Switch same Option 1 nothing happened and the no command sent to the BLYNK_WRITE and my function is not executed.
This happens only with this las update.
Essentially When I click anytime to any button if the state doesn’t change I need to trigger always the BLYNK_WRITE to execute always the same function… But with this last update if the Status of the Segmented switch doesn’t change Blynk does not trigger mt BLYNK_WRITE.
Please help to fix or expalin what to do…


In this view

If I press the 4th Segmented Switch button 22-48, I cann’t switch again to any of the first option of any Segmented switch , for instance I cannot switch back to button 44 in 1st S.Switch or 49 in 2nd or 01 in 3rd,
To go to 44 I must click first 45 to change the value of the Virtual Pin for 1st S. Switch to 2 then I can click 44 again to change the value to 1…

Please help

Is there anyway to revert back and downgrade the previous version before that one… my program is not working due to these changes…


I assume all this segmented widgets are on the same datastream? Can you attach the datastream settings here?

They are 5 Segmented switches each one has its own Data stream attached to its own Virtual Pin…the 5 Segmented Switches completely independent one from the other…
Cannot send Data stream screen shot from my mobile…

Here is a screenshot for the 2nd and 3rd segments…

If I use only one segmented switch, then the single selection dimension will become very small and also I must modify the Code in my ESP32 because I need 25 selections… that’s why I’m using 5 Segmented switches to accommodate 25 Selections.
It was working fine untill the last update…

In the new update the app doesn’t send anything if there is no change in the Data stream value but you forget that a user like me can have multiple Segment Switches and should always send the Data stream value even if there is no change…
Kindly fix this issue or send me a link to the previous version …


So you are using 5 segmented switches on 5 datastreams to have in result 25 options for some value based on latest selected option in one of 5 segmented switches?

Why not use 25 ordinary buttons in switch mode on 1 datastream with overridden high/low value where low=0 and high=each segmented switch value - you will have 1 datastream, 25 options, only 1 in time selected button?

I moved this discussion to a separate thread


I use 5 segmented switches instead of 25 buttons because in my old code for Blynk Legacy the override option was not available…

I use only 1 button in time.

I think I will still have the same issue because sometimes I select one button say the value = 5 then I will do some options and press again the same buttun , the value still = 5 but in the code will do differnt things because I changed my option … In this case Blynk will not trigger the BLYNK_WRITE in the code same as with segmented switches, am I right?.

I’m using this project to control a video survilance system with 25 cameras controlled wirelessly, I can select Camera nr. 1 by pressing button nr.1 to watch this camera using a separate option to change only the frequecy, or I can select another option to Turn Off the same Camera nr.1 with same button nr. 1 , or I can select another option to Turn On the same Camera nr.1 with same button nr.1 .
In this case Blynk will not send the button value to my board is it is not changed…

Thanks for your help

Wouldn’t it be better to use the Menu widget, with 25 menu items in it?



Got your point, I still don’t like the idea of reselecting to send value, especially for such a case when you have 4 other segmented switches, which have their own selection still visible - that’s not great UI. As I said sending data on reselecting previously - was a bug.

  1. 2 data streams: one for buttons, second for value display
  2. buttons are in push mode: so they send camera high value, and immediately after send low (zero, for example, and on fw side - just no action on zero)
  3. on received push high from the button - hw enables the option and sends a text to value display describing the option

So you have 25 options and a field describing the latest selection

I already use the menu but just to see which button is pressed (Actual Selected Camera) it has not the visibility for all the 25 Buttons in the same time as with Segmented Switch or 25 separate Switches sharing same DataStream Virtual Pin…

You are right, I did so because I was beginner, years ago, with Blynk and I was not expert, I used it in this way and worked for me since the begining until this last update where you fixed “This Bug where you don’t resend the same value for any Widget not only the Segmented Switch I believe”:slight_smile:

You idea is good and more elgant but I have to modify the logic …
Its Ok this would fix my issue… I will do the patch and let you know…


1 Like

Tried it with multiple Push buttons sharing same Datastream with different values and it works, since the Push button changes state then the reslection of the same button sends the value to the HW as before.

The problem now is that I cann’t send the feedback color on the same button to indicate that this button is selected…

Because before I was sending GREEN if I press button in VIDEO only mode but I send RED to the same button when I press it in Power On Off mode because the Segmented Switch works well and can do it.

In the case of One Datastream if I change color it change the colour of all the buttons since they share the Same DataStream or Virtual Pin.

Also many swithes make the UI bigger and ugly, before it was much better, please see before and after…


I still not understanding why did you change the Last version of Blynk 2 saying that it was a bug resending the same slection.

Is it possible to have an APK or link for the previous version before the last one with the Dark Mode?


you can google apkpure or apkmirror - they usually provide option to download some older apk by version, in play store that’s impossible

If you will switch those buttons into Switch Mode - only the last selected option will be in ON mode. On button size - I will check if it will be possible to allow smaller size as minimal

For now I downgraded to Ver “cloud.blynk_1.3.13-66” and it works very nice with the Segmented Switches as before.

But doing that I will not be able to receive an new future update, so please help to fix this issue…


Have you tried the latest version 1.5.2(80) ?

Styled Button or Icon Button have smaller min sizes, and they have onColor\offColor properties and separate color settings, so it would work fine with the buttons approach and showing selected state (if buttons are in switch mode)

The buttons in Switch mode didn’t work as discussed before, because state doesn’t change when I come back to the previousely selected button… To make it work buttons must be in Push button mode.

How can I change color for a certain switch if all switches are sharing the same DataStream Virtual Pin?