- PLUGIN_CONFIG_QUICK_START / PLUGIN_CONFIGURATION_TABS / PLUGIN_CONFIGURATION_GUIDE: there is no "Reset to Defaults" button (the tab has Refresh, Update, Uninstall, Save Configuration); plugin config hot-reloads (ConfigService + on_config_change), so no restart; the schema is found by the fixed name config_schema.json, not a manifest config_schema field; the tab row is "Plugin Manager", not "Plugins"; forms are server-rendered from /v3/partials/plugin-config/<id>; the duration hook is get_display_duration()/display_duration; a class_name mismatch raises PluginError; the store requires id, name, class_name and display_modes (not version); plugin_system.debug/log_level do not exist (use run.py -d / LEDMATRIX_DEBUG). Drop "future" features that shipped. - PLUGIN_CONFIG_CORE_PROPERTIES: list all of CORE_PLUGIN_PROPERTIES, including skin, skin_options and the vegas_* tuning keys. - PLUGIN_CUSTOM_ICONS: icon is only a Font Awesome class (fallback fa-puzzle-piece); emoji/URL icons and getPluginIcon() never existed in v3. Note that /api/v3/plugins/installed currently omits icon. - PLUGIN_WEB_UI_ACTIONS (+ example JSON): success_message, error_message and step1_message are never read. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
5.3 KiB
Plugin Configuration Tabs - Quick Start Guide
🚀 Quick Start (1 Minute)
For Users
- Open the web interface:
http://your-pi-ip:5000 - Open the Plugin Manager tab
- Find a plugin in the Plugin Store section (e.g., "Hello World") and click Install
- Notice a new tab appears in the second nav row with the plugin's name
- Click that tab to configure the plugin
- Modify settings and click Save Configuration. The running display picks the change up by itself; no restart is needed
That's it! Each installed plugin automatically gets its own configuration tab.
🎯 What You Get
Before This Feature
- All plugin settings mixed together in the Plugins tab
- Generic key-value inputs for configuration
- Hard to know what each setting does
- No validation or type safety
After This Feature
- ✅ Each plugin has its own dedicated tab
- ✅ Configuration forms auto-generated from schema
- ✅ Proper input types (toggles, numbers, dropdowns)
- ✅ Help text explaining each setting
- ✅ Input validation (min/max, length, etc.)
📋 Example Walkthrough
Let's configure the "Hello World" plugin:
Step 1: Navigate to Configuration Tab
After installing the plugin, you'll see a new tab:
[Plugin Manager] [Hello World] ← New tab! (second nav row)
Step 2: Configure Settings
The tab shows a form like this:
Hello World Configuration
A simple test plugin that displays a customizable message
✓ Enable or disable this plugin
[Toggle Switch: ON]
Message
The greeting message to display
[Hello, World! ]
Show Time
Show the current time below the message
[Toggle Switch: ON]
Color
RGB color for the message text [R, G, B]
[255, 255, 255 ]
Display Duration
How long to display in seconds
[10 ]
[Refresh] [Update] [Uninstall] [Save Configuration]
Step 3: Save and Apply
- Modify any settings
- Click Save Configuration
- See the confirmation notification. Plugin settings apply live: the
display service reloads
config.jsonwhen it changes and passes the new settings to the plugin'son_config_change()
🛠️ For Plugin Developers
Minimal Setup
Create config_schema.json in your plugin directory:
{
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"properties": {
"enabled": {
"type": "boolean",
"default": true,
"description": "Enable this plugin"
},
"message": {
"type": "string",
"default": "Hello!",
"description": "Message to display"
}
}
}
Done! The file name is fixed: the web interface looks for
config_schema.json in the plugin's directory; there is no manifest field
for it. Every installed plugin gets a tab; the schema is what turns it into a
form.
Bonus: an icon field in manifest.json names a Font Awesome class for
the tab ("icon": "fas fa-star"). See
PLUGIN_CUSTOM_ICONS.md.
🎨 Supported Input Types
Boolean → Toggle Switch
{
"type": "boolean",
"default": true
}
Number → Number Input
{
"type": "integer",
"default": 60,
"minimum": 1,
"maximum": 300
}
String → Text Input
{
"type": "string",
"default": "Hello",
"maxLength": 50
}
Array → Comma-Separated Input
{
"type": "array",
"items": {"type": "integer"},
"default": [255, 0, 0]
}
User enters: 255, 0, 0
Enum → Dropdown
{
"type": "string",
"enum": ["small", "medium", "large"],
"default": "medium"
}
💡 Pro Tips
For Users
- Navigate Back: Switch to the Plugin Manager tab to see the full list of installed plugins
- Check Help Text: Each field has a description explaining what it does
- No Restart Needed: Saved plugin settings apply to the running display
For Developers
- Add Descriptions: Users see these as help text - be descriptive!
- Use Constraints: Set min/max to guide users to valid values
- Sensible Defaults: Make sure defaults work without configuration
- Test Your Schema: Use a JSON Schema validator before deploying
- Order Matters: Properties appear in the order you define them
🔧 Troubleshooting
Tab Not Showing
- Check that the plugin is installed and listed under Plugin Manager
- Refresh the page
- Check browser console for errors
Settings Not Saving
- Ensure plugin is properly installed
- Check that all required fields are filled
- Look for validation errors in browser console
Form Looks Wrong
- Check that
config_schema.jsonis in the plugin's directory - Validate your JSON Schema
- Check that types match your defaults
- Ensure descriptions are strings
- Look for JavaScript errors
📚 Next Steps
- Read the full documentation: PLUGIN_CONFIGURATION_TABS.md
- Check the configuration architecture: PLUGIN_CONFIG_ARCHITECTURE.md
- Browse example plugins in the
ledmatrix-plugins
repo, especially
plugins/hello-world/andplugins/clock-simple/ - Join the community for help and suggestions
🎉 That's It!
You now have dynamic, type-safe configuration tabs for each plugin. No more manual JSON editing or cluttered interfaces - just clean, organized plugin configuration.
Enjoy! 🚀