The Config Studio (editor.html) is a web-based graphical editor for managing Pico Commander's config.json file. It provides a visual interface to configure hardware pins, define input sensors and output targets, build menu hierarchies, create automation scenarios, and manage device behavior without manual JSON editing.
Target Users: Anyone who needs to configure Pico Commander for custom workflows, including system administrators, DevOps engineers, and homelab enthusiasts.
- Visual Menu Builder — Drag-and-drop interface for organizing menu items and folders.
- Scenario Editor — Step-by-step automation sequence builder with toolboxes for different output types (HID, GPIO).
- Hardware Configuration — Pin assignment management for UI components, sensors, and outputs.
- Unified Pipeline Management — Configure
loopmodes and multiple scenarios for both menu items and passive triggers. - Raw JSON Editor — Direct JSON editing with validation and auto-sync.
- Configuration Validation — Automatic checks for common configuration errors.
- Backward Compatibility — Automatically migrates older
config.jsonformats to the modern structure upon loading.
- Locate
editor.htmlin the Pico Commander project directory. - Open the file in a modern web browser (Chrome, Firefox, Edge, or Safari).
- The editor loads with a default configuration skeleton.
Note: This is a client-side application. All data remains in your browser until you explicitly save the configuration file.
Method 1: Import existing file
- Click "Load config.json" in the header.
- Select your
config.jsonfile from the file picker. - The configuration loads automatically into all panels. If your file uses the legacy format (e.g., sensors in
hardware.hall_sensors), the editor will automatically runmigrateToInputsFormat()to convert it to the newinputsstructure without data loss.
Method 2: Start from scratch
- The editor initializes with a minimal working configuration.
- Customize settings and build your menu structure.
- Save when ready.
- Pico Config Studio branding with "PICO" badge.
- Load config.json button — Import configuration file.
- Save config.json button — Export configuration with validation.
- Device Configuration
- Global settings: Armed state, Debounce (ms), Cooldown (ms), Screen Timeout (s), Screensaver selection, Display Render Mode.
- Hardware Pins Configuration
- UI and system pins: Encoder (CLK, DT, SW), Button Pin, LED Pin, Display I2C (SDA, SCL).
- Inputs
- Hall Sensors: List of configured Hall sensors (ID, Pin, Active Low checkbox). Includes a "+ Add" button.
- Power Monitor: Configuration for the INA226 module (Enabled, Trigger Mode, Thresholds, Cooldowns, I2C settings, Warning/Splash screen timings).
- Outputs Configuration
- HID: Configuration for the USB Keyboard output.
- GPIO: Cards for each digital output pin. Includes pin number, Active High checkbox, Label, and a "Default Scenario" quick-link. Also contains the Auto-Boot subsection (enabled, interval, attempts, cooldown). Includes a "+ GPIO" button to add more outputs.
- Passive Sensors triggers
- Bindings for hardware events (Hall sensors, Power Monitor, Button Double Click).
- Features the Loop mode checkbox and the Pipeline builder (see Understanding Loop Mode below).
- Menu Hierarchy — Visual menu structure editor.
- Scenarios Editor — Automation step builder with output-specific toolboxes.
- Raw JSON View — Direct configuration editing.
- Context-sensitive panel that appears when you click a menu item in the Menu Hierarchy tab. Allows editing item properties, pipelines, and nested contents.
The menu hierarchy defines what appears on the Pico Commander's OLED display. Users navigate this menu using the rotary encoder.
Click any menu item to open the inspector on the right:
| Field | Description | Required |
|---|---|---|
| Item ID | Unique identifier (use a-z, 0-9, _ only) |
Yes |
| Display Label | Text shown on OLED display (max 21 chars) | Yes |
| Item Type | Radio toggle: Action, Folder, or Direct Control | Yes |
Both Action items (in the Inspector) and Passive triggers (in the left sidebar) use the Pipeline builder to define what scenarios execute when triggered.
Understanding Loop Mode: Every pipeline has a "Loop mode" checkbox with a tooltip:
"ON: one trigger = one scenario (cycles). OFF: one trigger = all scenarios at once"
- Loop ON (Toggle Pattern): If you add "Stop" and "Start" scenarios, the first click runs "Stop". The second click runs "Start". It remembers its position.
- Loop OFF (Chain/One-Shot Pattern): The trigger executes all scenarios in the list at once.
Adding Scenarios to a Pipeline:
- Click the "+ Add" button.
- Select a scenario from the dropdown.
- Provide a Display Label (shown on the OLED screen as the "Next Action" hint).
- Constraint: If Loop mode is OFF and you already have one scenario in the list, the "+ Add" button is disabled to prevent UI complexity. (To build multi-scenario loop:false chains, use the Raw JSON tab).
- Reorder items: Drag by the title area to change order.
- Move between folders: Drag items into folder submenus.
- Nested dragging: Works at any depth level.
If an item is set to "Folder", the Inspector shows an "Add inside this folder" block with "+ Action", "+ Folder", and "+ Direct Control" buttons.
If an item has both a pipeline and sub-items, it acts as a Hybrid Item: clicking it will execute the pipeline and then open the folder.
Set an item's type to "Direct Control" to turn it into an encoder_control item — a mode where rotating or clicking the physical encoder directly produces an effect, instead of navigating the menu.
Output Mode (dropdown in the Inspector):
- Mouse — fixed behavior: rotate = scroll, click = right-click. No further settings.
- Scenario — reveals three scenario lists: On Rotate Right, On Rotate Left, On Click. Each works like a small pipeline builder (same "+ Add" / drag-to-reorder / delete pattern as elsewhere in the editor), but with no Loop mode checkbox and no per-entry label — these always run in sequence, once, on their triggering event.
A Direct Control item has no "Add inside this folder" block and no submenu — it cannot contain other items. Converting an existing Folder with contents into Direct Control (via the Item Type radio) asks for confirmation, the same as converting Folder → Action.
Scenarios are automation sequences that execute when triggered. Each scenario consists of ordered steps, and each step targets a specific Output.
- Click "+ Add Scenario" at the bottom of the left list.
- "Choose Output Type" Modal: A popup will ask you to select the primary output type for this scenario (HID or GPIO). This determines which toolbox is shown.
- Enter a unique scenario name.
- Click a scenario to edit its steps, or use the search box to filter.
Depending on the output type chosen, you will see different step buttons:
HID Toolbox:
- Type text: Types a string of text.
- KeyPress combo: Presses a key combination (e.g.,
ctrl+c,super+l). - Wait MS: Pauses execution.
- Press Enter: Presses the Enter key
counttimes.
GPIO Toolbox:
- GPIO Pulse: Sends a quick 250ms pulse (like a button press).
- GPIO Set: Forces the pin to an absolute HIGH or LOW state.
- GPIO Hold: Holds the active state for a specified duration.
- Wait MS: Pauses execution.
If your project has multiple outputs of the same type (e.g., two GPIO outputs), each step will have an Output target dropdown allowing you to select exactly which pin should execute the action.
- Drag steps by their left handle to reorder.
- Click the × button on the right side to delete.
For advanced users who prefer direct JSON editing or need to configure complex features (like multi-step loop: false pipelines).
- Syntax-highlighted JSON editor.
- Real-time synchronization with the visual tabs.
- Keyboard shortcut: Ctrl+S to apply changes.
- Switch to Raw JSON View tab.
- Edit the JSON structure directly.
- Click "Apply Changes" or press Ctrl+S.
- The editor parses the JSON and updates the UI tabs automatically.
The editor produces standard config.json files matching the modern unified architecture:
{
"hardware": { /* Basic UI/system pins */ },
"inputs": { /* Hall sensors, INA226 */ },
"outputs": { /* HID, GPIO configurations */ },
"device": { /* Timeouts, cooldowns */ },
"passive": { /* Sensor -> Pipeline bindings */ },
"active_menu": [ /* Menu hierarchy */ ],
"scenarios": { /* Scenario definitions */ }
}When loading a config.json, the editor automatically runs migrateToInputsFormat(). This detects older files that stored sensors in hardware.hall_sensors or hardware.ina226 and safely moves them to the new inputs dictionary.
The editor performs automatic validation when saving or switching tabs. Look for the yellow warning banner at the top of the screen.
| Warning | Fix |
|---|---|
Empty label for menu item |
Provide a display label in the Inspector. |
Missing ID for menu item |
Provide a unique ID in the Inspector. |
Duplicate item ID: [id] |
Ensure all menu items have strictly unique IDs. |
Empty scenario name |
Provide a name for the scenario in the Scenarios tab. |
Duplicate scenario name: [name] |
Rename one of the scenarios. |
Pipeline references missing scenario: [name] |
Ensure the scenario selected in the pipeline actually exists. |
Empty text to type |
Add text to the Type step. |
Empty key combination |
Add a valid combo (e.g., ctrl+c) to the KeyPress step. |
Invalid wait time |
Ensure Wait MS is a positive number. |
Output type not determined |
Add at least one step with a selected output to enable filtering. |
Auto-Boot is enabled on multiple outputs |
Disable Auto-Boot on all but one GPIO output. |
- Configure Output:
- Go to the Outputs Configuration sidebar.
- Click "+ GPIO".
- Set Pin to
14, Label toPC Power, and ensure Active High is checked. - Click the "Create default scenario" link. This auto-generates
scenario_gpio_14_pulse.
- Create Menu Item:
- Go to the Menu Hierarchy tab.
- Click "+ Add Root Action".
- Set ID to
boot_pc, Label toBoot PC. - In the Pipeline section, ensure Loop mode is OFF.
- Click "+ Add", select
scenario_gpio_14_pulse, and set the label toPower.
- Save: Click "Save config.json".
- Configure Input:
- In the Inputs sidebar, under Hall Sensors, click "+ Add".
- Set ID to
case_door, Pin to15, Active Low to checked.
- Create Scenario:
- Go to the Scenarios Editor tab.
- Click "+ Add Scenario", choose HID output type.
- Name it
safe_shutdown. - Add steps: Press Enter (count: 3) → Wait (1000ms) → Type (
sudo shutdown -h now) → KeyPress (enter).
- Bind Trigger:
- In the left sidebar, find Passive Sensors triggers.
- Locate the
case_doorcard. - Set Loop mode to OFF.
- Click "+ Add" and select the
safe_shutdownscenario.
- Save: Click "Save config.json".
Q: What is "Display Render Mode"?
A: In the Device Configuration section (within Display & Encoder settings), you can choose between Text (Classic) and Geometric (Shapes). Text mode shows menu items as labels. Geometric mode renders the root menu as shapes: 6 per page, with page 0 = squares, page 1 = triangles, page 2 = circles, page 3 = diamonds. Submenus remain text-based. This setting is stored as device.display_mode in config.json.
Q: Can I edit config.json directly instead of using the editor?
A: Yes. The editor is a convenience tool. Manual JSON editing works perfectly, and the editor's Raw JSON tab makes this easy.
Q: Does the editor validate scenario command syntax?
A: No. The editor checks JSON structure and field presence, but cannot validate if shell commands (like docker-compose) will actually work on your target system.
Q: Why is the "+ Add" button disabled in my pipeline?
A: If Loop mode is OFF, the UI restricts you to a single scenario to prevent visual clutter. If you absolutely need a multi-scenario loop: false chain, you can build it in the Raw JSON tab.
Q: Can I share configurations between devices?
A: Yes. Save config.json and copy to other Pico Commander devices. Ensure hardware pin assignments match the physical wiring.
For issues, feature requests, or questions:
- Documentation: See project README and inline code comments.
- GitHub Issues: Report bugs or request features via project repository.
Last Updated: 2026-10-06
Compatible with Architecture: Unified Pipeline, Inputs, and Outputs Engine, Encoder Control Mode