add mqtt control
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/tag Build is passing

This commit is contained in:
2026-01-31 16:50:34 +11:00
parent 7cc6056e7e
commit a9c5139d55
13 changed files with 385 additions and 7 deletions

View File

@@ -117,6 +117,7 @@ Supported keys and values in the JSON configuration are:
* `opacity` : the same as the command line `-o` argument
* `blur` : the same as the command line `-b` argument
* `debug` : set to true to enable verbose output from the program
* `mqtt` : MQTT playback control (see below)
* `immich` : connect to an Immich server instead of a local path (see below)
* `scheduler` : this entry is an array of possible path values and associated settings. This key lets you manage display times/settings for a collection of paths. In the example above the top entry shows ONLY files from a Redit feed between 2 and 4pm, ONLY files from the `show_peak_times` folder from 8am to 10am and then 4pm to 7pm. At all other times it alternates displaying files in the `always_show_1` and `always_show_2` folder.
* `exclusive` : When set to `true` only this entry will be used when it is in its valid time window.
@@ -124,9 +125,36 @@ Supported keys and values in the JSON configuration are:
* `path` : the path to image files
* `stretch` : as above
### MQTT control
Add an `mqtt` block to control playback remotely. Publish one of the commands below to the configured topic.
Example:
```
{
"mqtt": {
"host": "mqtt.local",
"port": 1883,
"topic": "slide/control",
"clientId": "slide-frame",
"username": "slide",
"password": "secret",
"keepAlive": 30,
"qos": 0
}
}
```
Commands:
* `play` / `resume` — resume slideshow
* `pause` — pause slideshow
* `next` / `next-image` — advance to next image
* `next-folder` — jump to next configured path (if multiple paths are configured)
* `restart` / `reset` — recreate the selector and restart playback
### Immich configuration (lightweight + low power)
Immich uses an API key and a `/api` base path. This integration requests the asset search endpoint and downloads thumbnail images into a local cache before displaying them. That keeps bandwidth and power usage low while still letting `slide` do its normal scaling and transitions.
Immich uses an API key and a `/api` base path. This integration requests the asset search endpoint and downloads the configured image size into a local cache before displaying them. That keeps bandwidth and power usage low while still letting `slide` do its normal scaling and transitions.
Example (single source):
```
@@ -171,7 +199,7 @@ Immich settings:
* `order`: `"asc"` or `"desc"` ordering for asset search.
* `pageSize`: assets fetched per page.
* `maxAssets`: cap on total assets fetched (0 means no cap).
* `cachePath`: local cache directory for downloaded thumbnails.
* `cachePath`: local cache directory for downloaded images.
* `cacheMaxMB`: maximum cache size in MB (0 disables cleanup).
* `includeArchived`: include archived assets in search results.
When `immich` is set on an entry, `path` and `imageList` are ignored.
@@ -205,6 +233,7 @@ See the `Configuration File` section for details of each setting.
* qt5
* qt5-image-formats-plugins
* libexif
* libmosquitto-dev
Ubuntu/Raspbian: