Enhanced Gauge
Last updated
Last updated
Displays visually and numerically the latest datastream value, and optionally an arrow that indicates an increasing or decreasing trend, and optionally the value for the trend change. The trend change period is adjustable between 15 min and 1 day.
An indicator on a circle is positioned based on the latest datastream value and proportional to an arc of 270 degrees and the datastream min and max values. The last datastream value is also shown as a number in the center of the display. A filled radial arc of 270 degrees with a fading color from light to dark visually enhances the gauge.
The ‘Trend’ and ‘Trend change’ options change the mode between the following:
‘Trend’ disabled - the latest datastream value is displayed.
‘Trend’ enabled, ‘Trend change’ disabled -in addition to the display of the latest datastream value, an arrow point up (increasing trend) or down (decreasing trend) is shown based on the first and last values over the ‘TREND PERIOD’. The ‘TREND PERIOD’ is also displayed.
‘Trend’ enabled, ‘Trend change’ enabled - in addition to the display of the latest datastream value, an arrow point up (increasing trend) or down (decreasing trend) is shown, and to the right of the trend arrow a numerical value for the change in value over the ‘TREND PERIOD’. The ‘IGNORE DELTA FLUCTUATIONS’ setting will cause the trend calculation to ignore (filter) values less than this setting.
‘TREND PERIOD’ defines the period over which a trend will be evaluated. The options are: 15 min, 30 min, 1 h, 3h, 6h, 12h, 1d. No trend arrow or trend change numerical value will be displayed until at least one trend period has elapsed.
Select or create a datastream of data type integer or double. Widget properties (label, color, etc.) are also changed via the datastream, but only for virtual, enumerable, and location pins, not digital and analog pins.
The “color” property changes the color of the radial gauge and the latest value shown in the center of the gauge.
The widget has no controls.
The datastream value displayed is updated whenever the value stored on Blynk.Cloud changes.
You can update the assigned datastream value using the hardware or HTTP API.
Hardware:
HTTP API:
Don't put Blynk.virtualWrite()
into the void loop()
as it can cause a flood of messages and your hardware will be disconnected. Send such updates only when necessary, use flags, or timers.
Sketch: Basic Sketch
Sketch: Set Property
Sketch: VirtualPinWrite
Sketch: VirtualPinRead
You can change certain properties of the Widget from your hardware. For that, use this command:
Where:
vPin
is: virtual pin number the widget is assigned to
widgetProperty
: property you want to change
propertyValue
: value of the property you want to change
Don't put Blynk.setProperty()
into the void loop()
as it can cause a flood of messages and your hardware will be disconnected. Send such updates only when necessary, or use timers.
You can change the properties label, color, isDisabled, isHidden of the widget from your hardware, or via an HTTP API. The URL must be encoded, so spaces in labels must be replaced with %20, and color hexadecimal values in the HTTP API URL must include the hash # character urlencoded as %23.
Widget will be greyed out on UI and users won't be able to tap on it.
Widget will be hidden from dashboard. Design your UI so that it doesn't look weird when there is no widget.
GET
https://{server_address}/external/api/update/property?token={your 32 char token}&pin={your vPin}&{property}={value}
The endpoint allows you to update the Datastream Property value via GET request. All widgets (both web and mobile) that are assigned to this datastream will inherit this property. The Datastream Property is persistent and will be stored forever until you change it with another value. In order to clear the property you need to clear the device data in device actions menu.
Example:
https://blynk.cloud/external/api/update/property?token=GVki9IC70vb3IqvsV0YD3el4y0OpneL1&pin=V2&label=My%20Label
https://blynk.cloud/external/api/update/property?token=GVki9IC70vb3IqvsV0YD3el4y0OpneL1&pin=V1&color=%23D3435C
https://blynk.cloud/external/api/update/property?token=GVki9IC70vb3IqvsV0YD3el4y0OpneL1&pin=V1&isDisabled=true
{property}
string
The property of the widget you want to update: label
, color
, isDisabled
, isHidden
label
string
the text used as widget label
color
string
button color hexadecimal, must include the hash # character urlencoded as %23
isDisabled
string
true or false
isHidden
string
true or false
You can update your hardware to the latest datastream value from Blynk.Cloud after your hardware went offline, and then came online again. Use Blynk.syncVirtual()
to update a single virtual pin, or Blynk.syncAll()
to update all virtual pins. See State Syncing for more details.