Alarm & Sound Widget
Available to PRO and Enterprise plans subscribers.
The alarm and sound widget creates an alarm in the Blynk.Console. It is triggered by a datastream value other than zero (0).
Datastream
Select or create a datastream of data type integer.
You can change the ‘label’ property of the widget from your hardware, or via an HTTP API.
Widget Controls
The alarm and sound widget has the following controls:
On / Off: Disables (mutes) the alarm, or resets it.
Alarm Sound: When the ‘Allow end-user to change the sound’ widget option is enabled, the user can select the alarm sound to be played when the alarm is triggered.
How to trigger the alarm from the hardware
or
Any integer value other than zero (0) will trigger the alarm. The alarm can be disabled by changing the datastream value to zero (0) by using the Blynk.virtualWrite()
command.
Find full code examples of using Blynk.virtualWrite()
for your hardware here.
Change Alarm and Sound Properties
You can change certain properties of the widget from your hardware using the command:
Where:
vPin
is: virtual pin number the widget is assigned towidgetProperty
: property you want to changepropertyValue
: 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.
Properties you can change
You can change the properties “label”, “isHidden” and “isMuted” of the widget from your hardware, or via an HTTP API. The “isMuted” property is unique to the Alarm and Sound widget and will enable or disable the mute option for the Alarm and Sound widget.
Sync to the latest datastream value
Get the latest known value from the server. For example, after your hardware went offline and then came online again.
Last updated