Skip to content

Dashboard Guide

Dashboards are drag-and-drop layouts with live widgets that display real-time data from your devices.

Creating a Dashboard

Create a .dashboard.json file in workspace/dashboards/:

json
{
  "name": "Lab Monitor",
  "widgets": [
    {
      "id": "voltage-gauge",
      "type": "gauge",
      "x": 0, "y": 0, "w": 4, "h": 3,
      "config": {
        "connector": "psu",
        "property": "voltage",
        "label": "Voltage",
        "min": 0, "max": 30, "unit": "V"
      }
    }
  ]
}

Open the dashboard file in the app to see the live widget layout.


Widget Types

Display Widgets (read-only)

TypeDescriptionKey Config
gaugeSemi-circular gauge with needle and color zonesmin, max, unit, zones
textFormatted value display with label and unitlabel, unit
chartTime-series line chart (using uPlot), auto-scrollingbindings[], duration, yMin, yMax
indicatorLED-style on/off status indicator (red/green/amber)label
object-viewerCollapsible JSON tree view of complex datafontSize, decimals

Interactive Widgets (read + write)

TypeDescriptionKey Config
sliderHorizontal slider to set a numeric propertymin, max, step
knobRotary dial with arc indicator, drag to changemin, max
buttonTrigger an action on a connectorlabel, color, action binding
toggleOn/off switch with LED-style indicatorboolean property binding
script-controlStart/stop button for a named scriptscriptName, text, activeColor

Streaming Widgets

TypeDescriptionKey Config
canvasDisplays video/image streams or custom canvas renderingmode ("image"), stream (e.g., "webcam:frames")
terminalScrolling monospace text display with input fieldstream, maxLines, fontSize, sendAction

Widget Layout

Widgets are positioned on a 12-column grid:

  • x, y — grid position (columns, rows)
  • w, h — size in grid units (width, height)

Drag widgets to reposition them. Resize by dragging the corner handle.


Data Binding

Widgets bind to connector properties via the config object:

  • connector — the connector name (e.g., "psu")
  • property — the property to display (e.g., "voltage")
  • binding — alternative path format: "connector.property" (e.g., "robot.position[0]")

Properties with poll: true in the connector config update the widget automatically.

Stream Binding

For canvas and terminal widgets, use a stream config to subscribe to real-time data:

json
{
  "type": "canvas",
  "config": {
    "label": "Webcam",
    "mode": "image",
    "stream": "webcam:frames"
  }
}

Script Control Binding

Script control widgets bind to a script by name:

json
{
  "type": "script-control",
  "config": {
    "scriptName": "monitor",
    "text": "Monitor",
    "activeColor": "#4caf50"
  }
}

Dashboard JSON Format

Full example with multiple widget types:

json
{
  "name": "Robot Control Panel",
  "version": 1,
  "gridCols": 12,
  "rowHeight": 40,
  "widgets": [
    {
      "id": "w1",
      "type": "gauge",
      "layout": { "x": 0, "y": 0, "w": 3, "h": 4 },
      "config": {
        "label": "Joint 1 Angle",
        "binding": "robot.joints[0]",
        "min": -180, "max": 180, "unit": "°",
        "zones": [
          { "min": -180, "max": -90, "color": "var(--error)" },
          { "min": -90, "max": 90, "color": "var(--success)" },
          { "min": 90, "max": 180, "color": "var(--error)" }
        ]
      }
    },
    {
      "id": "w2",
      "type": "chart",
      "layout": { "x": 3, "y": 0, "w": 6, "h": 4 },
      "config": {
        "label": "Position History",
        "bindings": ["robot.position[0]", "robot.position[1]", "robot.position[2]"],
        "duration": 30,
        "yMin": -500, "yMax": 500, "unit": "mm"
      }
    },
    {
      "id": "w3",
      "type": "terminal",
      "layout": { "x": 0, "y": 4, "w": 6, "h": 4 },
      "config": {
        "stream": "serial-monitor:output",
        "maxLines": 500,
        "fontSize": "medium",
        "showTimestamps": true,
        "sendAction": "serial-monitor.sendLine"
      }
    }
  ]
}

Editing

  • Edit mode: Click the edit button to toggle layout editing
  • Add widgets: Click the add button and select a widget type
  • Configure: Click a widget to edit its config (connector, property, appearance)
  • Delete: Select a widget and press Delete or use the remove button
  • Save: Changes are saved to the .dashboard.json file automatically

Virtual Store Pattern

Use the GUI driver to create virtual connectors that bridge scripts and dashboards without hardware:

javascript
// workspace/connectors/store.js
export default {
  driver: "GUI",
  config: {
    widgets: [
      { name: "value1", type: "gauge", label: "Value 1", min: 0, max: 100 },
      { name: "input",  type: "slider", label: "Input",  min: 0, max: 100 },
    ],
  },
};

Scripts write: await store.value1(42) → Dashboard gauge updates automatically.


Cross-Panel Drag-and-Drop

Drag SourceDrop TargetResult
Hardware property (from Connector Browser)Widget on dashboard canvasSets widget binding automatically
Hardware streamCanvas/Video widget on dashboard canvasSets stream + switches to image mode
Hardware property (from Connector Browser)Binding field in config panelSets widget binding
Hardware streamStream field in config panelSets stream binding
Script (from Scripts panel)Dashboard gridCreates script-control widget
Hardware propertyScript editorInserts await connector("x").prop() code

Muxit — Hardware Orchestration Platform