Widget Properties
The widget property is a widget attribute like color, labels, min/max, ..., and others that could be dynamically changed from the hardware or HTTPS API.
Single Datastream
You can change the widget property assigned to a single datastream from the hardware side. For example, you can change the color of an LED widget assigned to Virtual Pin 0:
Set Property for single value field
Set Property for multi value field
NOTE : Changing these parameters work only for widgets attached to Virtual pins (analog/digital pins won't work).
color
, label
, isDisabled
, isHidden
widget properties are supported for all widgets:
label
is a string for the label of all widgets.
color
is a string in HEX format (in the form: #RRGGBB, where RR (red), GG (green), and BB (blue) are hexadecimal values between 00 and FF). For example:
On the firmware side, widget objects also support setLabel()
and setColor()
functions.
Widget-specific properties:
Button
onLabel
/ offLabel
is a string for ON/OFF label of a button;
Styled Button
onLabel
/ offLabel
is a string for ON/OFF label of a button;
onColor
/ offColor
is a string in HEX format for ON/OFF colors of the button;
onBackColor
/ offBackColor
is a string in HEX format for ON/OFF colors of the button background.
Music Player
isOnPlay
is boolean accepts true/false.
Menu
labels
is a list of strings for Menu widget selections;
Video Streaming
Step
Image
also, you can fully replace the list of images from the hardware:
or you can change the individual image by its index:
Alarm and Sound
You can also change widget properties via HTTP API.
Multiple Datastreams
In addition to the above commands, you can also change the multiple datastream properties with one command. For example, let's assume, you want to disable multiple widgets with a single command:
The above command would be an alternative to the batch of single datastream commands:
Last updated