docs: fix plugin config + store + dependency docs

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>
This commit is contained in:
Chuck
2026-04-06 22:10:05 -04:00
parent 49287bdd1a
commit b374bfa8c6
7 changed files with 128 additions and 177 deletions

View File

@@ -29,10 +29,14 @@ Each installed plugin now gets its own dedicated configuration tab in the web in
3. Click **Save Configuration** 3. Click **Save Configuration**
4. Restart the display service to apply changes 4. Restart the display service to apply changes
### Plugin Management vs Configuration ### Plugin Manager vs Per-Plugin Configuration
- **Plugins Tab**: Used for plugin management (install, enable/disable, update, uninstall) - **Plugin Manager tab** (second nav row): used for browsing the
- **Plugin-Specific Tabs**: Used for configuring plugin behavior and settings Plugin Store, installing plugins, toggling installed plugins on/off,
and updating/uninstalling them
- **Per-plugin tabs** (one per installed plugin, also in the second
nav row): used for configuring that specific plugin's behavior and
settings via a form auto-generated from its `config_schema.json`
## For Plugin Developers ## For Plugin Developers

View File

@@ -4,13 +4,14 @@
### For Users ### For Users
1. Open the web interface: `http://your-pi-ip:5001` 1. Open the web interface: `http://your-pi-ip:5000`
2. Go to the **Plugin Store** tab 2. Open the **Plugin Manager** tab
3. Install a plugin (e.g., "Hello World") 3. Find a plugin in the **Plugin Store** section (e.g., "Hello World")
4. Notice a new tab appears with the plugin's name and click **Install**
5. Click on the plugin's tab to configure it 4. Notice a new tab appears in the second nav row with the plugin's name
6. Modify settings and click **Save Configuration** 5. Click that tab to configure the plugin
7. Restart the display to see changes 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. That's it! Each installed plugin automatically gets its own configuration tab.
@@ -171,9 +172,11 @@ User enters: `255, 0, 0`
### For Users ### For Users
1. **Reset Anytime**: Use "Reset to Defaults" to restore original settings 1. **Reset Anytime**: Use "Reset to Defaults" to restore original settings
2. **Navigate Back**: Click "Back to Plugin Management" to return to Plugins tab 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 3. **Check Help Text**: Each field has a description explaining what it does
4. **Restart Required**: Remember to restart the display after saving 4. **Restart Required**: Remember to restart the display service from
**Overview** after saving
### For Developers ### For Developers
@@ -206,8 +209,10 @@ User enters: `255, 0, 0`
## 📚 Next Steps ## 📚 Next Steps
- Read the full documentation: [PLUGIN_CONFIGURATION_TABS.md](PLUGIN_CONFIGURATION_TABS.md) - Read the full documentation: [PLUGIN_CONFIGURATION_TABS.md](PLUGIN_CONFIGURATION_TABS.md)
- Check implementation details: [PLUGIN_CONFIG_TABS_SUMMARY.md](PLUGIN_CONFIG_TABS_SUMMARY.md) - Check the configuration architecture: [PLUGIN_CONFIG_ARCHITECTURE.md](PLUGIN_CONFIG_ARCHITECTURE.md)
- Browse example plugins: `plugins/hello-world/`, `plugins/clock-simple/` - 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 - Join the community for help and suggestions
## 🎉 That's It! ## 🎉 That's It!

View File

@@ -37,7 +37,7 @@ sudo systemctl start ledmatrix-web
### ✅ Scenario 2: Web Interface Plugin Installation ### ✅ Scenario 2: Web Interface Plugin Installation
**What:** Installing/enabling plugins via web interface at `http://pi-ip:5001` **What:** Installing/enabling plugins via web interface at `http://pi-ip:5000`
- **Web service runs as:** root (ledmatrix-web.service) - **Web service runs as:** root (ledmatrix-web.service)
- **Installs to:** System-wide - **Installs to:** System-wide

View File

@@ -77,10 +77,12 @@ sudo chmod -R 755 /root/.cache
The web interface handles dependency installation correctly in the service context: The web interface handles dependency installation correctly in the service context:
1. Access the web interface (usually http://ledpi:8080) 1. Access the web interface (`http://ledpi:5000` or `http://your-pi-ip:5000`)
2. Navigate to Plugin Store or Plugin Management 2. Open the **Plugin Manager** tab (use the **Plugin Store** section to
3. Install plugins through the web UI find the plugin, or **Install from GitHub**)
4. The system will automatically handle dependencies 3. Install the plugin through the web UI
4. The system automatically handles dependency installation in the
service context (which has the right permissions)
## Prevention ## Prevention

View File

@@ -2,14 +2,20 @@
## Overview ## Overview
Transform LEDMatrix into a modular, plugin-based system where users can create, share, and install custom displays via a GitHub-based store (similar to HACS for Home Assistant). LEDMatrix is a modular, plugin-based system where users create, share,
and install custom displays via a GitHub-based store (similar in spirit
to HACS for Home Assistant). This page is a quick reference; for the
full design see [PLUGIN_ARCHITECTURE_SPEC.md](PLUGIN_ARCHITECTURE_SPEC.md)
and [PLUGIN_DEVELOPMENT_GUIDE.md](PLUGIN_DEVELOPMENT_GUIDE.md).
## Key Decisions ## Key Decisions
**Gradual Migration**: Existing managers stay, plugins added alongside **Plugin-First**: All display features (calendar excepted) are now plugins
**Migration Required**: Breaking changes in v3.0, tools provided **GitHub Store**: Discovery from `ledmatrix-plugins` registry plus
**GitHub Store**: Simple discovery, packages from repos any GitHub URL
**Plugin Location**: `./plugins/` directory **Plugin Location**: configured by `plugin_system.plugins_directory`
in `config.json` (default `plugin-repos/`; the loader also searches
`plugins/` as a fallback)
## File Structure ## File Structure
@@ -19,15 +25,16 @@ LEDMatrix/
│ └── plugin_system/ │ └── plugin_system/
│ ├── base_plugin.py # Plugin interface │ ├── base_plugin.py # Plugin interface
│ ├── plugin_manager.py # Load/unload plugins │ ├── plugin_manager.py # Load/unload plugins
│ ├── plugin_loader.py # Discovery + dynamic import
│ └── store_manager.py # Install from GitHub │ └── store_manager.py # Install from GitHub
├── plugins/ ├── plugin-repos/ # Default plugin install location
│ ├── clock-simple/ │ ├── clock-simple/
│ │ ├── manifest.json # Metadata │ │ ├── manifest.json # Metadata
│ │ ├── manager.py # Main plugin class │ │ ├── manager.py # Main plugin class
│ │ ├── requirements.txt # Dependencies │ │ ├── requirements.txt # Dependencies
│ │ ├── config_schema.json # Validation │ │ ├── config_schema.json # Validation
│ │ └── README.md │ │ └── README.md
│ └── nhl-scores/ │ └── hockey-scoreboard/
│ └── ... (same structure) │ └── ... (same structure)
└── config/config.json # Plugin configs └── config/config.json # Plugin configs
``` ```
@@ -109,100 +116,45 @@ git push origin v1.0.0
### Web UI ### Web UI
1. **Browse Store**: Plugin Store tab → Search/filter 1. **Browse Store**: Plugin Manager tab → Plugin Store section → Search/filter
2. **Install**: Click "Install" button 2. **Install**: Click **Install** in the plugin's row
3. **Configure**: Plugin Manager → Click ⚙️ Configure 3. **Configure**: open the plugin's tab in the second nav row
4. **Enable/Disable**: Toggle switch 4. **Enable/Disable**: toggle switch in the **Installed Plugins** list
5. **Reorder**: Drag and drop in rotation list 5. **Reorder**: order is set by the position in `display_modes` /
plugin order; rearranging via drag-and-drop is not yet supported
### API ### REST API
```python The API is mounted at `/api/v3` (`web_interface/app.py:144`).
# Install plugin
POST /api/plugins/install
{"plugin_id": "my-plugin"}
# Install from custom URL
POST /api/plugins/install-from-url
{"repo_url": "https://github.com/User/plugin"}
# List installed
GET /api/plugins/installed
# Toggle
POST /api/plugins/toggle
{"plugin_id": "my-plugin", "enabled": true}
```
### Command Line
```python
from src.plugin_system.store_manager import PluginStoreManager
store = PluginStoreManager()
# Install
store.install_plugin('nhl-scores')
# Install from URL
store.install_from_url('https://github.com/User/plugin')
# Update
store.update_plugin('nhl-scores')
# Uninstall
store.uninstall_plugin('nhl-scores')
```
## Migration Path
### Phase 1: v2.0.0 (Plugin Infrastructure)
- Plugin system alongside existing managers
- 100% backward compatible
- Web UI shows plugin store
### Phase 2: v2.1.0 (Example Plugins)
- Reference plugins created
- Migration examples
- Developer docs
### Phase 3: v2.2.0 (Migration Tools)
- Auto-migration script
- Config converter
- Testing tools
### Phase 4: v2.5.0 (Deprecation)
- Warnings on legacy managers
- Migration guide
- 95% backward compatible
### Phase 5: v3.0.0 (Plugin-Only)
- Legacy managers removed from core
- Packaged as official plugins
- **Breaking change - migration required**
## Quick Migration
```bash ```bash
# 1. Backup # Install plugin from the registry
cp config/config.json config/config.json.backup curl -X POST http://your-pi-ip:5000/api/v3/plugins/install \
-H "Content-Type: application/json" \
-d '{"plugin_id": "hockey-scoreboard"}'
# 2. Run migration # Install from custom URL
python3 scripts/migrate_to_plugins.py curl -X POST http://your-pi-ip:5000/api/v3/plugins/install-from-url \
-H "Content-Type: application/json" \
-d '{"repo_url": "https://github.com/User/plugin"}'
# 3. Review # List installed
cat config/config.json.migrated curl http://your-pi-ip:5000/api/v3/plugins/installed
# 4. Apply # Toggle
mv config/config.json.migrated config/config.json curl -X POST http://your-pi-ip:5000/api/v3/plugins/toggle \
-H "Content-Type: application/json" \
# 5. Restart -d '{"plugin_id": "hockey-scoreboard", "enabled": true}'
sudo systemctl restart ledmatrix
``` ```
See [REST_API_REFERENCE.md](REST_API_REFERENCE.md) for the full list.
## Plugin Registry Structure ## Plugin Registry Structure
**ChuckBuilds/ledmatrix-plugin-registry/plugins.json**: The official registry lives at
[`ChuckBuilds/ledmatrix-plugins`](https://github.com/ChuckBuilds/ledmatrix-plugins).
The Plugin Store reads `plugins.json` at the root of that repo, which
follows this shape:
```json ```json
{ {
"plugins": [ "plugins": [
@@ -245,42 +197,30 @@ sudo systemctl restart ledmatrix
- ✅ Community handles custom displays - ✅ Community handles custom displays
- ✅ Easier to review changes - ✅ Easier to review changes
## What's Missing? ## Known Limitations
This specification covers the technical architecture. Additional considerations: The plugin system is shipped and stable, but some things are still
intentionally simple:
1. **Sandboxing**: Current design has no isolation (future enhancement) 1. **Sandboxing**: plugins run in the same process as the display loop;
2. **Resource Limits**: No CPU/memory limits per plugin (future) there is no isolation. Review code before installing third-party
3. **Plugin Ratings**: Registry needs rating/review system plugins.
4. **Auto-Updates**: Manual update only (could add auto-update) 2. **Resource limits**: there's a resource monitor that warns about
5. **Dependency Conflicts**: No automatic resolution slow plugins, but no hard CPU/memory caps.
6. **Version Pinning**: Limited version constraint checking 3. **Plugin ratings**: not yet — the Plugin Store shows version,
7. **Plugin Testing**: No automated testing framework author, and category but no community rating system.
8. **Marketplace**: No paid plugins (all free/open source) 4. **Auto-updates**: manual via the Plugin Manager tab; no automatic
background updates.
## Next Steps 5. **Dependency conflicts**: each plugin's `requirements.txt` is
installed via pip; conflicting versions across plugins are not
1. ✅ Review this specification resolved automatically.
2. Start Phase 1 implementation 6. **Plugin testing framework**: see
3. Create first 3-4 example plugins [HOW_TO_RUN_TESTS.md](HOW_TO_RUN_TESTS.md) and
4. Set up plugin registry repo [DEV_PREVIEW.md](DEV_PREVIEW.md) — there are tools, but no
5. Build web UI components mandatory test gate.
6. Test on Pi hardware
7. Release v2.0.0 alpha
## Questions to Resolve
Before implementing, consider:
1. Should we support plugin dependencies (plugin A requires plugin B)?
2. How to handle breaking changes in core display_manager API?
3. Should plugins be able to add new web UI pages?
4. What about plugins that need hardware beyond LED matrix?
5. How to prevent malicious plugins?
6. Should there be plugin quotas (max API calls, etc.)?
7. How to handle plugin conflicts (two clocks competing)?
--- ---
**See PLUGIN_ARCHITECTURE_SPEC.md for full details** **See [PLUGIN_ARCHITECTURE_SPEC.md](PLUGIN_ARCHITECTURE_SPEC.md) for the
full architectural specification.**

View File

@@ -95,14 +95,14 @@ Official plugin registry for [LEDMatrix](https://github.com/ChuckBuilds/LEDMatri
All plugins can be installed through the LEDMatrix web interface: All plugins can be installed through the LEDMatrix web interface:
1. Open web interface (http://your-pi-ip:5050) 1. Open web interface (http://your-pi-ip:5000)
2. Go to Plugin Store tab 2. Open the **Plugin Manager** tab
3. Browse or search for plugins 3. Browse or search the **Plugin Store** section
4. Click Install 4. Click **Install**
Or via API: Or via API:
```bash ```bash
curl -X POST http://your-pi-ip:5050/api/plugins/install \ curl -X POST http://your-pi-ip:5000/api/v3/plugins/install \
-d '{"plugin_id": "clock-simple"}' -d '{"plugin_id": "clock-simple"}'
``` ```
@@ -152,7 +152,7 @@ Before submitting, ensure your plugin:
1. **Test Your Plugin** 1. **Test Your Plugin**
```bash ```bash
# Install via URL on your Pi # Install via URL on your Pi
curl -X POST http://your-pi:5050/api/plugins/install-from-url \ curl -X POST http://your-pi:5000/api/v3/plugins/install-from-url \
-d '{"repo_url": "https://github.com/you/ledmatrix-your-plugin"}' -d '{"repo_url": "https://github.com/you/ledmatrix-your-plugin"}'
``` ```
@@ -311,7 +311,7 @@ git push
# 1. Receive PR on ledmatrix-plugins repo # 1. Receive PR on ledmatrix-plugins repo
# 2. Review using VERIFICATION.md checklist # 2. Review using VERIFICATION.md checklist
# 3. Test installation: # 3. Test installation:
curl -X POST http://pi:5050/api/plugins/install-from-url \ curl -X POST http://pi:5000/api/v3/plugins/install-from-url \
-d '{"repo_url": "https://github.com/contributor/plugin"}' -d '{"repo_url": "https://github.com/contributor/plugin"}'
# 4. If approved, merge PR # 4. If approved, merge PR

View File

@@ -12,7 +12,7 @@ The LEDMatrix Plugin Store allows you to discover, install, and manage display p
```bash ```bash
# Web UI: Plugin Store → Search → Click Install # Web UI: Plugin Store → Search → Click Install
# API: # API:
curl -X POST http://your-pi-ip:5050/api/plugins/install \ curl -X POST http://your-pi-ip:5000/api/v3/plugins/install \
-H "Content-Type: application/json" \ -H "Content-Type: application/json" \
-d '{"plugin_id": "clock-simple"}' -d '{"plugin_id": "clock-simple"}'
``` ```
@@ -21,7 +21,7 @@ curl -X POST http://your-pi-ip:5050/api/plugins/install \
```bash ```bash
# Web UI: Plugin Store → "Install from URL" → Paste URL # Web UI: Plugin Store → "Install from URL" → Paste URL
# API: # API:
curl -X POST http://your-pi-ip:5050/api/plugins/install-from-url \ curl -X POST http://your-pi-ip:5000/api/v3/plugins/install-from-url \
-H "Content-Type: application/json" \ -H "Content-Type: application/json" \
-d '{"repo_url": "https://github.com/user/ledmatrix-plugin"}' -d '{"repo_url": "https://github.com/user/ledmatrix-plugin"}'
``` ```
@@ -29,20 +29,20 @@ curl -X POST http://your-pi-ip:5050/api/plugins/install-from-url \
### Manage Plugins ### Manage Plugins
```bash ```bash
# List installed # List installed
curl "http://your-pi-ip:5050/api/plugins/installed" curl "http://your-pi-ip:5000/api/v3/plugins/installed"
# Enable/disable # Enable/disable
curl -X POST http://your-pi-ip:5050/api/plugins/toggle \ curl -X POST http://your-pi-ip:5000/api/v3/plugins/toggle \
-H "Content-Type: application/json" \ -H "Content-Type: application/json" \
-d '{"plugin_id": "clock-simple", "enabled": true}' -d '{"plugin_id": "clock-simple", "enabled": true}'
# Update # Update
curl -X POST http://your-pi-ip:5050/api/plugins/update \ curl -X POST http://your-pi-ip:5000/api/v3/plugins/update \
-H "Content-Type: application/json" \ -H "Content-Type: application/json" \
-d '{"plugin_id": "clock-simple"}' -d '{"plugin_id": "clock-simple"}'
# Uninstall # Uninstall
curl -X POST http://your-pi-ip:5050/api/plugins/uninstall \ curl -X POST http://your-pi-ip:5000/api/v3/plugins/uninstall \
-H "Content-Type: application/json" \ -H "Content-Type: application/json" \
-d '{"plugin_id": "clock-simple"}' -d '{"plugin_id": "clock-simple"}'
``` ```
@@ -56,7 +56,7 @@ curl -X POST http://your-pi-ip:5050/api/plugins/uninstall \
The official plugin store contains curated, verified plugins that have been reviewed by maintainers. The official plugin store contains curated, verified plugins that have been reviewed by maintainers.
**Via Web Interface:** **Via Web Interface:**
1. Open the web interface at http://your-pi-ip:5050 1. Open the web interface at http://your-pi-ip:5000
2. Navigate to the "Plugin Store" tab 2. Navigate to the "Plugin Store" tab
3. Browse or search for plugins 3. Browse or search for plugins
4. Click "Install" on the desired plugin 4. Click "Install" on the desired plugin
@@ -65,7 +65,7 @@ The official plugin store contains curated, verified plugins that have been revi
**Via REST API:** **Via REST API:**
```bash ```bash
curl -X POST http://your-pi-ip:5050/api/plugins/install \ curl -X POST http://your-pi-ip:5000/api/v3/plugins/install \
-H "Content-Type: application/json" \ -H "Content-Type: application/json" \
-d '{"plugin_id": "clock-simple"}' -d '{"plugin_id": "clock-simple"}'
``` ```
@@ -101,7 +101,7 @@ Install any plugin directly from a GitHub repository, even if it's not in the of
**Via REST API:** **Via REST API:**
```bash ```bash
curl -X POST http://your-pi-ip:5050/api/plugins/install-from-url \ curl -X POST http://your-pi-ip:5000/api/v3/plugins/install-from-url \
-H "Content-Type: application/json" \ -H "Content-Type: application/json" \
-d '{"repo_url": "https://github.com/user/ledmatrix-my-plugin"}' -d '{"repo_url": "https://github.com/user/ledmatrix-my-plugin"}'
``` ```
@@ -131,13 +131,13 @@ else:
**Via REST API:** **Via REST API:**
```bash ```bash
# Search by query # Search by query
curl "http://your-pi-ip:5050/api/plugins/store/search?q=hockey" curl "http://your-pi-ip:5000/api/v3/plugins/store/search?q=hockey"
# Filter by category # Filter by category
curl "http://your-pi-ip:5050/api/plugins/store/search?category=sports" curl "http://your-pi-ip:5000/api/v3/plugins/store/search?category=sports"
# Filter by tags # Filter by tags
curl "http://your-pi-ip:5050/api/plugins/store/search?tags=nhl&tags=hockey" curl "http://your-pi-ip:5000/api/v3/plugins/store/search?tags=nhl&tags=hockey"
``` ```
**Via Python:** **Via Python:**
@@ -168,7 +168,7 @@ results = store.search_plugins(tags=["nhl", "hockey"])
**Via REST API:** **Via REST API:**
```bash ```bash
curl "http://your-pi-ip:5050/api/plugins/installed" curl "http://your-pi-ip:5000/api/v3/plugins/installed"
``` ```
**Via Python:** **Via Python:**
@@ -192,7 +192,7 @@ for plugin_id in installed:
**Via REST API:** **Via REST API:**
```bash ```bash
curl -X POST http://your-pi-ip:5050/api/plugins/toggle \ curl -X POST http://your-pi-ip:5000/api/v3/plugins/toggle \
-H "Content-Type: application/json" \ -H "Content-Type: application/json" \
-d '{"plugin_id": "clock-simple", "enabled": true}' -d '{"plugin_id": "clock-simple", "enabled": true}'
``` ```
@@ -207,7 +207,7 @@ curl -X POST http://your-pi-ip:5050/api/plugins/toggle \
**Via REST API:** **Via REST API:**
```bash ```bash
curl -X POST http://your-pi-ip:5050/api/plugins/update \ curl -X POST http://your-pi-ip:5000/api/v3/plugins/update \
-H "Content-Type: application/json" \ -H "Content-Type: application/json" \
-d '{"plugin_id": "clock-simple"}' -d '{"plugin_id": "clock-simple"}'
``` ```
@@ -230,7 +230,7 @@ success = store.update_plugin('clock-simple')
**Via REST API:** **Via REST API:**
```bash ```bash
curl -X POST http://your-pi-ip:5050/api/plugins/uninstall \ curl -X POST http://your-pi-ip:5000/api/v3/plugins/uninstall \
-H "Content-Type: application/json" \ -H "Content-Type: application/json" \
-d '{"plugin_id": "clock-simple"}' -d '{"plugin_id": "clock-simple"}'
``` ```
@@ -351,15 +351,15 @@ All API endpoints return JSON with this structure:
| Method | Endpoint | Description | | Method | Endpoint | Description |
|--------|----------|-------------| |--------|----------|-------------|
| GET | `/api/plugins/store/list` | List all plugins in store | | GET | `/api/v3/plugins/store/list` | List all plugins in store |
| GET | `/api/plugins/store/search` | Search for plugins | | GET | `/api/v3/plugins/store/search` | Search for plugins |
| GET | `/api/plugins/installed` | List installed plugins | | GET | `/api/v3/plugins/installed` | List installed plugins |
| POST | `/api/plugins/install` | Install from registry | | POST | `/api/v3/plugins/install` | Install from registry |
| POST | `/api/plugins/install-from-url` | Install from GitHub URL | | POST | `/api/v3/plugins/install-from-url` | Install from GitHub URL |
| POST | `/api/plugins/uninstall` | Uninstall plugin | | POST | `/api/v3/plugins/uninstall` | Uninstall plugin |
| POST | `/api/plugins/update` | Update plugin | | POST | `/api/v3/plugins/update` | Update plugin |
| POST | `/api/plugins/toggle` | Enable/disable plugin | | POST | `/api/v3/plugins/toggle` | Enable/disable plugin |
| POST | `/api/plugins/config` | Update plugin config | | POST | `/api/v3/plugins/config` | Update plugin config |
--- ---
@@ -369,7 +369,7 @@ All API endpoints return JSON with this structure:
```bash ```bash
# Install # Install
curl -X POST http://192.168.1.100:5050/api/plugins/install \ curl -X POST http://192.168.1.100:5000/api/v3/plugins/install \
-H "Content-Type: application/json" \ -H "Content-Type: application/json" \
-d '{"plugin_id": "clock-simple"}' -d '{"plugin_id": "clock-simple"}'
@@ -390,12 +390,12 @@ sudo systemctl restart ledmatrix
```bash ```bash
# Install your own plugin during development # Install your own plugin during development
curl -X POST http://192.168.1.100:5050/api/plugins/install-from-url \ curl -X POST http://192.168.1.100:5000/api/v3/plugins/install-from-url \
-H "Content-Type: application/json" \ -H "Content-Type: application/json" \
-d '{"repo_url": "https://github.com/myusername/ledmatrix-my-custom-plugin"}' -d '{"repo_url": "https://github.com/myusername/ledmatrix-my-custom-plugin"}'
# Enable it # Enable it
curl -X POST http://192.168.1.100:5050/api/plugins/toggle \ curl -X POST http://192.168.1.100:5000/api/v3/plugins/toggle \
-H "Content-Type: application/json" \ -H "Content-Type: application/json" \
-d '{"plugin_id": "my-custom-plugin", "enabled": true}' -d '{"plugin_id": "my-custom-plugin", "enabled": true}'