Button Actions
Every button widget has an actions array (or the older onEntry +
target pattern). These actions control navigation, device commands,
and data updates.
Action catalog
Section titled “Action catalog”| Action | Parameter | Description |
|---|---|---|
"a":"g" (goto) |
"p":"dvname.pageid" |
Navigate to another DV’s page |
"a":"run" |
"p":"reboot" / "alloc_local" / "ret_force" |
Execute a device command |
"a":"updateOutput" |
"p":"devcfg.key.path" |
Write a value to a devcfg key |
"a":"updateRemote" |
"p":"yes" (or any value) |
Send the widget’s value to the backend |
"a":"updateLocal" |
(none) | Update the widget’s local value (from DED) |
"a":"delmsg" |
(none) | Delete the current message in a msglist |
"a":"gotoWidget" / "gw" |
"p":"dv.widgetname" |
Open a widget’s DED directly |
Older pattern: onEntry + target
Section titled “Older pattern: onEntry + target”Some widgets use "onEntry":"updateOutput" with "target":"devcfg.xxx"
instead of an actions array. Behaviour is identical.
Common navigation targets
Section titled “Common navigation targets”| Button | From DV | Goes to |
|---|---|---|
config |
duresshome, syshome | sysfns.1 |
info |
sysfns, syshome | sysinfo.1 |
control |
sysfns, syshome | sysctrl.1 |
duress |
duresshome | duress.1 |
access |
syshome | access.1 |
Hardware button actions (navs)
Section titled “Hardware button actions (navs)”The actions above are fired by on-screen button widgets. You can also assign the same actions to the device’s hardware buttons, per InfoPage, using the page’s navs object.
| Button | Id | Colour | Built-in action |
|---|---|---|---|
| Back | 0 | Red | Previous page (Cancel in a data entry dialog) |
| OK/Home | 1 | Grey | First page of the app (id 1), or device home |
| Next | 2 | Blue | Next page in the sequence |
Each attribute of navs is an event name, and its value is an array of actions in the same {"a": "...", "p": "..."} format used by button widgets.
| Event | Triggered when |
|---|---|
b0, b1, b2 |
Button pressed |
b0l, b1l, b2l |
Button long pressed (over 3 s) |
b0d, b1d, b2d |
Button double pressed (twice in within 0.5 s) |
psl / psr |
Page swipe left (next) / right (previous) |
psu / psd |
Page swipe up / down |
enter / leave |
Page becomes displayed / is no longer displayed |
{ "id": "1", "navs": { "b0l": [{ "a": "gotoPage", "p": "syscfg.1" }] }, "infowidgets": []}When button 0 (red) is long pressed on this page, the UI shows the syscfg DataView’s page 1.
navs applies only while that page is displayed. For rules that apply on every page, see the onButton rules in Concepts.
Related
Section titled “Related”- Navigation map — full DV‑to‑DV navigation
- Editable DEDs — how inline editing works
- Device actions (MQTT) — sending actions via MQTT