Skip to main content

Test on a Volumio device

BetaThe plugin SDK and these pages are new. They change with each release, as developers use them and tell us what works.View as Markdown

Install your plugin on a Volumio of your local network and read what the device logs. The SDK does it the way the web UI installs a plugin, so you need no SSH and no copy of anything on the device.

Prerequisites​

  1. Install Node.js 22 or later. deploy and logs need it to talk to the device.
  2. Have a Volumio 4 device on the same network as your computer, and know its IP address, such as 192.168.1.20. A .local name such as volumio.local does not resolve on every computer.
  3. Have a plugin that passes volumio-plugin check. See Build your first plugin.

1. Install the plugin​

From the plugin's folder, run deploy with the address of your device:

npx --package=@volumio/plugin-sdk volumio-plugin deploy 192.168.1.20 .

deploy does these steps:

  1. Builds the plugin package on your computer and runs the checks on it. It stops when a check finds an error.
  2. Asks the device to install the package. The device downloads it from your computer.
  3. Reboots the device, so it loads the new code. The music stops for a minute or two.
  4. Starts the plugin and prints the lines the device logged about it, and every warning and error. When the plugin did not start, it prints the whole log.

If your computer's firewall asks, allow Node.js to accept incoming connections. The device downloads the package from your computer.

2. Check that the plugin started​

deploy ends with one of these lines:

✔ hello_volumio is running on 192.168.1.20
✖ hello_volumio did not start on 192.168.1.20: the log above says why

When the plugin did not start, deploy exits with an error. Read the device log above that line: the error from your plugin is there. Troubleshooting covers the common causes.

3. Follow the log​

logs prints the device's log as it is written. Run it while you use the plugin in the Volumio web UI:

npx --package=@volumio/plugin-sdk volumio-plugin logs 192.168.1.20

It runs until you press Ctrl+C. Add --seconds 30 to stop it after 30 seconds. Lines your plugin writes with this.logger appear among the others: start them with the plugin's id, so you can find them. See Log from a plugin.

4. Install a new version​

Change the code and run deploy again. When the plugin is already on the device, deploy updates it and keeps its saved settings. The device reboots each time. Volumio keeps running the code of a plugin it has loaded until its backend restarts, even after an update or an uninstall. The reboot makes sure the new code runs.

Plugins with native modules​

A native module is compiled for one processor architecture. Your computer builds for its own architecture, which is often not the device's. Build the package for the device in Volumio's build container, then pass it to deploy with --zip.

  1. Install Docker and clone volumio-plugin-sdk.

  2. From the SDK folder, build the package for the device's architecture: armhf, arm64 or amd64. This example builds for armhf.

    scripts/build.sh <plugin-folder> armhf <out-folder>
  3. Install that package:

    npx --package=@volumio/plugin-sdk volumio-plugin deploy 192.168.1.20 <plugin-folder> --zip <out-folder>/<id>-<version>-armhf.zip

Remove the plugin​

Open the Volumio web UI, go to Plugins › Installed Plugins, and uninstall the plugin. Reboot the device so the plugin's code stops running.

Was this page helpful?