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ā€¦

Regards

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ā€¦

Regards

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 ā€¦

Regards

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

Yes.

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
Regards

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

Pete.

@bek

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ā€¦

Thanks

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ā€¦

Before

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?

Thanks

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ā€¦

Thanks

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?