milan-fabian / slideshow-support

Support and issue tracking for Slideshow software
https://slideshow.digital/
15 stars 1 forks source link

Possible to use mqtt to request resync? #33

Closed kentare closed 1 year ago

kentare commented 1 year ago

Does this exist now?

Here is what I want to do: I want to set up an external endpoint that have only the config file zipped (i.e example.com/config.zip). But I only want the device to sync 1. When the device is being set up, and 2. When I update my config file, I want to be able to tell the device to resync to get the new one.

I guess this is a feature request if this does not already exist.

milan-fabian commented 1 year ago

@kentare Hello, there is no public MQTT command to trigger resync in Slideshow yet, but it won't be very hard to add it.

kentare commented 1 year ago

It would be amazing to have this feature. It opens up for the tech savvy to have have remote sync on demand (i.e broadcasted through mqtt) if you do changes instead of interval based sync.

milan-fabian commented 1 year ago

Support for triggering file synchronization through HTTP API as well as MQTT was added in Slideshow 4.1.0.

Example command through MQTT: {"operation": "synchronize", "parameters": {"url": "https://example.com/data.zip", "method": "GET", "target": "file.zip", "clearFolder": false}}

The parameters are the same as in /ajax/synchronize REST API, as described in the documentation: https://slideshow.digital/documentation/rest-api/.

kentare commented 1 year ago

Amazing! You work faster than the speed of light. Thank you