Label Widget confusion Blynk 2.0

I am using pro plan, setting up new template with Label Widget. I already have a DataStream assigned to V3. On web dashboard I can set up background color based on value, in app I see no such setting. In web dashboard the text is changed based on color of background with no input from me in settings, yet in app this is the only color I am allowed to change. In web dashboard info tab calls values SUFFIX, in DataStream it is called UNITS and in the app it is called LABEL. This is all very confusing. Different terms based on where you are looking and different settings available between web and app. I am sure it is me just missing something.

https://docs.blynk.io/en/blynk.console/templates/dashboard/label

Why does the label show the Vpin? This will just cause confusion as the end user does not need to know the pin assignment nor will they understand what it is or even care?

image

Anyway, I simply want to use a label widget. I would like the background to be RED when value is 0 and GREEN when value is 1. I would like the label to be R1. How do I accomplish this on both web and app? It does not appear possible to me to change background in app only text color.

Thank you

I don’t think that is true.

The vPin is shown in the template view, but not in the device view. The end user will be looking at the device view.

You can use the Blynk.setProperty() command in your sketch to change many of the widget properties, including the widget label (the optional title above the widget) and colour for all widget types, plus additional parameters for various other types of widgets.

For example with the styled button widgets shown below, the time remaining countdown number (the onLabel parameter) is updated once every second, and the background colour (onColor parameter) is changed according to the difference in value between internal and external humidity readings)…

Pete.

@PeteKnight Thank you for your reply. This is what I find and why I said it is confusing.

From Documentation

From App
image

From DataStream

From info tab in web dashboard
image

Noted on the template view for vpin.

I am using Blynk.setProperty for and vled presently. In my case, it shows the status of a sensor connection. RED disconnected, GREEN connected without any label. Since the sensor updates every 1m, I started using HTTP API call to only change the status when it updates rather than every 1m. I have found it to be less than reliable.

I contacted Blynk for help and was told to use the label widget. If I end up using the setProperty, am I not doing the same thing as I am trying to avoid with the vled?

From Blynk
i guess there’s an easier way to display On/Off state – it’s about using a Label widget instead of LED (and you can get rid of extra code):

  • enable Change color based on value
  • setup colors and min/max DS values for their appliance
  • disable Show level

What is really needed is for the blynk library to show if a transaction with the server was successful/unsuccessful.

Thank you for your help.

Why are you using the HTTP API ? What type of device, programming language etc are you using?

I don’t really see the connection between your initial post and this comment, but in most cases it’s easy enough to query the server to see if the current value matches the existing value.

Pete.

I am using a particle boron. The slaves TX their connection status to the boron which in turn updates the app.

The http api gives back a response code if the operation was successful, so instead of updating the VLED continually it will be updated only when needed. For example, if the led is green and we want to change it to green there will be no blynk query executed, but if it is green and we want to change it to red then only one blynk query (until it succeeds) will be done, Prior to using this method we were sending a query each time the led needs to be changed regardless of its state.

The solution isn’t as efficient as I would like but this is because of the blynk library not having a way to tell if a blynk query succeeds. If the blynk team updates the library to support this functionality I could update the code to use only the blynk library to make it more efficient

Sorry about that. I originally started with a VLED sending a query each time the led needs to be changed regardless of its state. In an effort to reduce data consumption, we moved to the http api. Since I was having reliability issues with http api (vled hanging, not updating correctly) and there is no method to to tell if a blynk query succeeds, I asked Blynk for help. They suggested the label widget to address the problem of color change based on value.

Thank you

If it was me, I’d use an LED widget on both the mobile and web dashboards, and use a simple Blynk.virtualWrite to turn it on or off.
If I wanted to be 100% certain that the server had received and actioned that Blynk.virtualWrite command then I’d follow it up with a Blynk.syncVirtual command and compare the result with the the value that was sent.

Alternatively, I’d use data invalidation, and send a heartbeat message to the server every few seconds for each device, then if those heartbeats aren’t received the data invalidation rule would kick-in.

Pete.

@PeteKnight all great suggestions. I am not sure how those solutions will impact my data budget however? I guess we won’t know until I try it.

Comments?

Thank you again. Your help is very much appreciated.

This is something to do with your Particle account I guess?
Not something I’m familiar with I’m afraid.

Pete.

Noted.

I guess it comes down to simply, the more data I send to the cloud, the more I use. I can buy as much data as I want. Making it run correctly on the least amount of data is the goal.

Thank you