Skip to content

App Actions

Each app downlink message can include an actions array of one or more action objects. Every action has an a (action name) and a p (parameter).

{
"app": {
"mydv": {
"actions": [
{
"a": "beep",
"p": "AT1",
},
],
},
},
}
Action Short Param Description
netact na network name Activate a network
netdeact nd network name Deactivate a network
beep – alert code Play alert tone
vibr – vibr song Play vibration pattern
msg – string Show status bar message
led0–led3 – LED command Control a single LED
delmsg d message id Delete a msglist entry
gotoWidget gw widget id Open a widget’s DED
show – widget id Make widget visible
hide – widget id Hide widget
updateLocal – path:value Update widget value locally
updateRemote – path or path:value Push widget value to backend
updateOutput – path:value Update a devcfg attribute
pb – (none) Go back one page
run r command Run a system command
closeded – (none) Close the current DED

Activates a network by its configuration name. The network must already be defined in your network section; see Network Setup.

Configuration variables

  • a (Required, string): netact or its short alias na.
  • p (Required, string): The name of the network configuration to activate (e.g., k1, b1, q1, l1).
{
"a": "netact",
"p": "k1",
}

Deactivates a network by its configuration name.

Configuration variables

  • a (Required, string): netdeact or its short alias nd.
  • p (Required, string): The name of the network configuration to deactivate.
{
"a": "netdeact",
"p": "k1",
}

Plays an alert tone or beep pattern through the device speaker. The actual duration and volume are limited by the current devcfg.audioout settings.

Configuration variables

  • a (Required, string): Must be beep.
  • p (Required, string): The audio code to play. One of:
Code Type Description
AT1 Tone 1 kHz continuous
AT2 Tone 2 kHz continuous
AT5 Tone 500 Hz continuous
ABS Beep Slow beeps
ABF Beep Fast beeps
ABE Beep Extremely fast beeps

Duration and volume are constrained by devcfg.audioout.durMS and devcfg.audioout.vol. See Audio Config.

{
"a": "beep",
"p": "AT1",
}

Plays a vibration pattern on the haptic motor.

Configuration variables

  • a (Required, string): Must be vibr.
  • p (Required, string): Vibration song. A sequence of V (vibrate) and S (silence) tokens, each followed by a duration in units of 100 ms.
Token Meaning
V + number Vibrate for number × 100 ms
S + number Silence for number × 100 ms

Example: V10S10V20 = vibrate 1 s, silence 1 s, vibrate 2 s.

{
"a": "vibr",
"p": "V10S10V20S10V30",
}

Shows a short status message on the device screen.

Configuration variables

  • a (Required, string): Must be msg.
  • p (Required, string): Text to display (max ~40 characters).
{
"a": "msg",
"p": "Hello world",
}

Controls a single LED. The action name selects the LED (0–3).

Configuration variables

  • a (Required, string): One of led0, led1, led2, led3.
  • p (Required, string): LED command. One of:
Code Meaning
S1 Set ON
S0 Set OFF
B1 Blink fast
B0 Blink slow
F1 Flash long
F0 Flash short
P + number Pulse: on for number × 10 ms (e.g., P100 = 1 s)
{
"a": "led0",
"p": "P100",
}

Deletes a message from a msglist widget by its ID.

Configuration variables

  • a (Required, string): delmsg or its short alias d.
  • p (Required, string): The ID of the message to delete.
{
"a": "delmsg",
"p": "5",
}

Opens the DED (detail view) for a widget. For msglist widgets, the DED opens at the first unread message.

Configuration variables

  • a (Required, string): gotoWidget or its short alias gw.
  • p (Required, string): Widget identifier in dv.widgetname or app.dv.widgetname format.

If two widgets with the same name exist in a DV, the first one found is used.

{
"a": "gotoWidget",
"p": "duress.alerts",
}

Makes a hidden widget visible.

Configuration variables

  • a (Required, string): Must be show.
  • p (Required, string): Full widget path (e.g., app.dv.widget).
{
"a": "show",
"p": "app.home.duress_flag",
}

Hides a visible widget.

Configuration variables

  • a (Required, string): Must be hide.
  • p (Required, string): Full widget path (e.g., app.dv.widget).
{
"a": "hide",
"p": "app.home.duress_flag",
}

Updates a widget’s value locally on the device without sending a notification to the backend.

Configuration variables

  • a (Required, string): Must be updateLocal.
  • p (Required, string): A string in the format "path:value", where path is the widget identifier and value is the new value.
{
"a": "updateLocal",
"p": "app.myapp.counter:42",
}

Sends a widget’s current value to the backend, or forces a specific value.

Configuration variables

  • a (Required, string): Must be updateRemote.
  • p (Required, string): If only a path is given (e.g., "app.dv.widget"), the device reads the current widget value and sends it uplink. If a value is appended with a colon ("app.dv.widget:value"), that value is sent instead.
{
"a": "updateRemote",
"p": "app.duress.alerts",
}

Changes a devcfg attribute directly from an app action, without using the devcfg message envelope.

Configuration variables

  • a (Required, string): Must be updateOutput.
  • p (Required, string): A string in the format "devcfg.group.param:value".
{
"a": "updateOutput",
"p": "devcfg.uiperi.show:true",
}

Navigates back one page in the UI history stack. No parameter is needed.

{
"a": "pb",
}

Executes a system command.

Configuration variables

  • a (Required, string): run or its short alias r.
  • p (Required, string): The command to run. One of:
Command Description
ota Trigger an over‑the‑air DFU check
reboot Reboot the device
{
"a": "run",
"p": "ota",
}

Closes the currently open DED (detail view). No parameter is needed.

{
"a": "closeded",
}