mirror of
https://github.com/ChuckBuilds/LEDMatrix.git
synced 2026-04-10 21:03:01 +00:00
PLUGIN_STORE_GUIDE.md
- 19 occurrences of port 5050 -> 5000
- All API paths missing /v3 (e.g. /api/plugins/install ->
/api/v3/plugins/install). Bulk fix.
PLUGIN_REGISTRY_SETUP_GUIDE.md
- Same port + /api/v3 fixes (3 occurrences each)
- "Go to Plugin Store tab" -> "Open the Plugin Manager tab and scroll
to the Install from GitHub section" (the real flow for registry
setup is the GitHub install section, not the Plugin Store search)
PLUGIN_CONFIG_QUICK_START.md
- Port 5001 -> 5000 (5001 is the dev_server.py default, not the web UI)
- "Plugin Store tab" install flow -> real Plugin Manager + Plugin Store
section + per-plugin tab in second nav row
- Removed reference to PLUGIN_CONFIG_TABS_SUMMARY.md (archived doc)
PLUGIN_CONFIGURATION_TABS.md
- "Plugin Management vs Configuration" section confusingly described
a "Plugins Tab" that doesn't exist as a single thing. Rewrote to
describe the real two-piece structure: Plugin Manager tab (browse,
install, toggle) vs per-plugin tabs (configure individual plugins).
PLUGIN_DEPENDENCY_GUIDE.md
- Port 5001 -> 5000
PLUGIN_DEPENDENCY_TROUBLESHOOTING.md
- Wrong port (8080) and wrong UI nav ("Plugin Store or Plugin
Management"). Fixed to the real flow.
PLUGIN_QUICK_REFERENCE.md
- "Plugin Location: ./plugins/ directory" -> default is plugin-repos/
(verified in config/config.template.json:130 and
display_controller.py:132). plugins/ is a fallback.
- File structure diagram showed plugins/ -> plugin-repos/.
- Web UI install flow: "Plugin Store tab" -> "Plugin Manager tab ->
Plugin Store section". Also fixed Configure ⚙️ button (doesn't
exist) and "Drag and drop reorder" (not implemented).
- API examples: replaced ad-hoc Python pseudocode with real curl
examples against /api/v3/plugins/* endpoints. Pointed at
REST_API_REFERENCE.md for the full list.
- "Migration Path Phase 1-5" was a roadmap written before the plugin
system shipped. The plugin system is now stable and live. Removed
the migration phases as they're history, not a roadmap.
- "Quick Migration" section called scripts/migrate_to_plugins.py
which doesn't exist anywhere in the repo. Removed.
- "Plugin Registry Structure" referenced
ChuckBuilds/ledmatrix-plugin-registry which doesn't exist. The
real registry is ChuckBuilds/ledmatrix-plugins. Fixed.
- "Next Steps" / "Questions to Resolve" sections were
pre-implementation planning notes. Replaced with a "Known
Limitations" section that documents the actually-real gaps
(sandboxing, resource limits, ratings, auto-updates).
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
224 lines
5.4 KiB
Markdown
224 lines
5.4 KiB
Markdown
# Plugin Configuration Tabs - Quick Start Guide
|
|
|
|
## 🚀 Quick Start (1 Minute)
|
|
|
|
### For Users
|
|
|
|
1. Open the web interface: `http://your-pi-ip:5000`
|
|
2. Open the **Plugin Manager** tab
|
|
3. Find a plugin in the **Plugin Store** section (e.g., "Hello World")
|
|
and click **Install**
|
|
4. Notice a new tab appears in the second nav row with the plugin's name
|
|
5. Click that tab to configure the plugin
|
|
6. Modify settings and click **Save**
|
|
7. From **Overview**, click **Restart Display Service** to see changes
|
|
|
|
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.)
|
|
- ✅ One-click reset to defaults
|
|
|
|
## 📋 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:
|
|
|
|
```
|
|
[Overview] [General] [...] [Plugins] [Hello World] ← New tab!
|
|
```
|
|
|
|
### 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 ]
|
|
|
|
[Save Configuration] [Back] [Reset to Defaults]
|
|
```
|
|
|
|
### Step 3: Save and Apply
|
|
|
|
1. Modify any settings
|
|
2. Click **Save Configuration**
|
|
3. See confirmation: "Configuration saved for hello-world. Restart display to apply changes."
|
|
4. Restart the display service
|
|
|
|
## 🛠️ For Plugin Developers
|
|
|
|
### Minimal Setup
|
|
|
|
Create `config_schema.json` in your plugin directory:
|
|
|
|
```json
|
|
{
|
|
"$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"
|
|
}
|
|
}
|
|
}
|
|
```
|
|
|
|
Reference it in `manifest.json`:
|
|
|
|
```json
|
|
{
|
|
"id": "my-plugin",
|
|
"icon": "fas fa-star", // Optional: add a custom icon!
|
|
"config_schema": "config_schema.json"
|
|
}
|
|
```
|
|
|
|
**Done!** Your plugin now has a configuration tab.
|
|
|
|
**Bonus:** Add an `icon` field for a custom tab icon! Use Font Awesome icons (`fas fa-star`), emoji (⭐), or custom images. See [PLUGIN_CUSTOM_ICONS.md](PLUGIN_CUSTOM_ICONS.md) for the full guide.
|
|
|
|
## 🎨 Supported Input Types
|
|
|
|
### Boolean → Toggle Switch
|
|
```json
|
|
{
|
|
"type": "boolean",
|
|
"default": true
|
|
}
|
|
```
|
|
|
|
### Number → Number Input
|
|
```json
|
|
{
|
|
"type": "integer",
|
|
"default": 60,
|
|
"minimum": 1,
|
|
"maximum": 300
|
|
}
|
|
```
|
|
|
|
### String → Text Input
|
|
```json
|
|
{
|
|
"type": "string",
|
|
"default": "Hello",
|
|
"maxLength": 50
|
|
}
|
|
```
|
|
|
|
### Array → Comma-Separated Input
|
|
```json
|
|
{
|
|
"type": "array",
|
|
"items": {"type": "integer"},
|
|
"default": [255, 0, 0]
|
|
}
|
|
```
|
|
User enters: `255, 0, 0`
|
|
|
|
### Enum → Dropdown
|
|
```json
|
|
{
|
|
"type": "string",
|
|
"enum": ["small", "medium", "large"],
|
|
"default": "medium"
|
|
}
|
|
```
|
|
|
|
## 💡 Pro Tips
|
|
|
|
### For Users
|
|
|
|
1. **Reset Anytime**: Use "Reset to Defaults" to restore original settings
|
|
2. **Navigate Back**: Switch to the **Plugin Manager** tab to see the
|
|
full list of installed plugins
|
|
3. **Check Help Text**: Each field has a description explaining what it does
|
|
4. **Restart Required**: Remember to restart the display service from
|
|
**Overview** after saving
|
|
|
|
### For Developers
|
|
|
|
1. **Add Descriptions**: Users see these as help text - be descriptive!
|
|
2. **Use Constraints**: Set min/max to guide users to valid values
|
|
3. **Sensible Defaults**: Make sure defaults work without configuration
|
|
4. **Test Your Schema**: Use a JSON Schema validator before deploying
|
|
5. **Order Matters**: Properties appear in the order you define them
|
|
|
|
## 🔧 Troubleshooting
|
|
|
|
### Tab Not Showing
|
|
- Check that `config_schema.json` exists
|
|
- Verify `config_schema` is in `manifest.json`
|
|
- Refresh the page
|
|
- Check browser console for errors
|
|
|
|
### Settings Not Saving
|
|
- Ensure plugin is properly installed
|
|
- Restart the display service after saving
|
|
- Check that all required fields are filled
|
|
- Look for validation errors in browser console
|
|
|
|
### Form Looks Wrong
|
|
- 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](PLUGIN_CONFIGURATION_TABS.md)
|
|
- Check the configuration architecture: [PLUGIN_CONFIG_ARCHITECTURE.md](PLUGIN_CONFIG_ARCHITECTURE.md)
|
|
- Browse example plugins in the
|
|
[ledmatrix-plugins](https://github.com/ChuckBuilds/ledmatrix-plugins)
|
|
repo, especially `plugins/hello-world/` and `plugins/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! 🚀
|
|
|