DataViews
A DataView (DV) is a JSON file that defines everything shown on the CC2 device screen for a given application: its pages, the widgets on each page, how those widgets display data, and how the user can interact with them.
DataViews are primarily stored in the /dvs/ directory on the device and activated through the allocation process.
Architecture
Section titled “Architecture”Backend Application └── MQTT downlink └── MQTT uplink
CC2 Device └── DeviceUI Manager ← owns display + touch └── ApplicationUI Manager ← parses DataView JSON └── DataView (DV) └── InfoPage (1…N pages) └── InfoWidget (widgets on the page)-> See Architecture for the full breakdown.
Quick navigation
Section titled “Quick navigation”| Section | Description |
|---|---|
| Dataview Designer | Visual drag-and-drop tool at dataviewdesigner.infrafon.club |
| Runtime Updates | Push widget values, switch pages, show/hide widgets at runtime |
| Concepts | JSON format, InfoPage, InfoWidget, formatters, actions, rules |
| Widget Types | Reference for every widget format + formatter combination |
| Interactive Widgets | Button and Editable interactions, all DED types |
| Examples | Live DataView pages (duress, syscfg, etc.) with JSON + screenshot |
How DataViews are loaded
Section titled “How DataViews are loaded”DataViews are referenced from the allocdata.json (or unallocdata.json) file under the user.apps section. A DataView can be:
| Source | How |
|---|---|
"src": "local" |
Loaded from /dvs/<name>.json on the device flash |
"src": "inline" |
Embedded directly in the allocdata JSON |
Each DataView entry can also include a data object to pre-initialize widget values at allocation time.
Related
Section titled “Related”- Dataview Designer — build DVs visually without editing JSON
- DataView JSON format — full annotated JSON reference
- Allocation config — how DVs are referenced and initialized
- MQTT Downlink — how the backend communicates with the device