Set min and max value with setProperty function

I don’t think we can set min max value using Blynk.setProperty, we have to do it manually.

Since I got no response from @Dmitriy if it is implemented in Blynk 2.0 or not… has anyone tested it already?

BLYNK_CONNECTED(){
  Blynk.setProperty(V2, "min", 3);
  Blynk.setProperty(V2, "max", 5);
}

I just tested it:

Blynk.setProperty(V2, "min", 1);
Blynk.setProperty(V2, "max", 800);

Property values has changed to:

image

However, no effect in the gauge widget…

@Dmitriy Why the widgtes (min/max) are not following the datastream min/max properties?

Any news on this feature? I’m also wanting to change the max on the gauge widget.

Hi

I’m using an NodeMCU Esp32S with Arduino architecture on pio. Blynk library 1.2.0.
I am having an issue which seems to be stemming from the Blynk server side. I have sent the below code snippet to update the maximum property on a datastream that is linked to a gauge widget. I want to show a countdown on the gauge to show minutes remaining which works well except on the app the maximum property does not update and remains the default originally set for the datastream but the console shows the updated maximum value.

Blynk.setProperty(VIRTUAL_TIME, "max", timeToEnd);

I can’t find in the documentation if this feature has been ported over from the legacy Blynk for max and min properties of any of the widgets. There is a really old forum post saying that this method works but this is before Blynk 2.0. Am I doing this incorrectly or is this a bug?

@PeteKnight I don’t believe this is the right place for this as this is an old thread based around an idea for a widget which ended in the capability being added to the library and API. My finding is a specific behaviour/bug which seems to be related to this same functionality. Happy to leave it here though if you feel that best helps the development team.

@Greenchain far better to have all the information, data and findings related to an issue in one place.

Although it was initially a Legacy related topic it became a Blynk IoT topic about the same functionality, so this is the best place for it.

Pete.

1 Like

Understood I’m going to leave it here. I am concerned that the developers (I see now it’s been directed at the co-founder @Dmitriy ) haven’t commented on the reinstatement of the feature in 2.0 since it was questioned in May last year.
Thanks for your rapid responses so far. Hopefully, we can get somewhere with this.

Anything further on this issue??

At the moment, min/max setProperty on mobile apps are supported by button and slider widgets, which have the “use Datastreams min/max” setting turned off (value ought to be a subrange of the datastream’s range)

I don’t have eta when we bring this setting for gauges on mobile. Please use separate datastream for now.

Hello, any updates on ETA for this min/max feature?
Very usefull in case you need to change the unit of a messurement, lets say from PSI to Bar. In this case a fix scale of a gauge will not work.
Thanks.

@Eugene … can you pls comment any update on ETA?
thks.

Hi @berodrig
it is not on the todo list at the moment