No Option to Select ON Value And Off Value In Mobile Dashboard of Blynk 2.0

I have mentioned earlier that I am trying to make my old Blynk project in the new app, I faced several issue and was to able to solve most of them. But this time the problem is I am unable to find a very used option in this Blynk 2.0.

The feature is to set the On and Off values of the Button / Switch. Earlier it was available in the Blynk app and currently it is even available in the web dashboard. But I think the option is missing from the Mobile dashboard.

Can anyone please tell me how can I set the on and off value of the switches/Buttons in the new Blynk dashboard?

Thanks for any kind of help in advance.
Subhodip

The button on/off values are indeed not visibele in the app but are just as normal, so 0 for “off” and 1 for “on” if you make a virtual datastream with type Integer and min/max values of 0 and 1.

Then what if I want to send value for off and 0 for ON?

As you’re having to use virtual pins anyway, it’s a simple task to do a logical NOT (!) on the values to swap the values.

Pete.

Sub is right i think. Ofcourse there are ways to swap the values in code but in the web dashboard button you can easily switch the values, which work so it should be possible with app button too i think?

There is always multiple ways to get the desired output that we need by changing code. But having used Blynk 1.0 from many years we are all adapted to the flexibility of changing stuff in the app and getting the desired thing running without having to upload a new code.

But that was a good option to have. But in the same time there was confusion atleast for me like
1 - ON 0 - OFF or vice versa … having a fixed value will eliminate the confusion. But having room n flexibility is always good.

I agree, but just pointing out that there are simple work-around to the issue.

Personally, I prefer to stick with 0/1 for off/on and invert the values in code if necessary, it fits my logic better.

Pete.

1 Like