Skip to main content

qBittorrent / Transmission smart home integration, free and open source

qBittorrent / Transmission integration for Gladys Assistant

Follow and control qBittorrent, Transmission or Deluge: speeds, downloads, pause, slow-down.

Follow and control the torrent clients of your home server from Gladys, over your local network: qBittorrent, Transmission and Deluge. See the download and upload speeds and the downloads in progress, slow everything down when a film starts on the TV, pause it all, and get a notification when a download is finished.

Tested on the real programs, not yet in a real home: feedback welcome. This integration was tested against qBittorrent 4.6.3 and 5.2.4, Transmission 4.0.5 and Deluge 2.1 running next to it, with downloads between them, but not yet in a real Gladys installation with your NAS, your reverse proxy or your Docker setup. If something does not work as described, please say so on the Gladys forum or in the issues.

The integration never deletes a torrent nor a file. Its commands are pause, resume and the alternative speed limits, all reversible; adding a magnet link is off unless you allow it.

What you need​

  • Gladys Assistant 5.1.0 or later.
  • One to three torrent clients reachable from Gladys, any mix:
    • qBittorrent 4.1 or later with its Web UI on (Tools → Options → Web UI), or qbittorrent-nox;
    • Transmission (2.80 or later) with remote access on: the daemon transmission-daemon, or Preferences → Remote in the desktop versions;
    • Deluge with its web interface (deluge-web, port 8112), connected to its daemon.
  • The user name and password of the web interface (Deluge: the password only, deluge until you change it).

On Transmission, the address of Gladys must be allowed: either add it to rpc-whitelist in settings.json, or turn the whitelist off (rpc-whitelist-enabled: false) and keep a password. In Docker images (linuxserver.io…), the variables USER, PASS and WHITELIST do it.

Set up​

  1. Install the integration from the Gladys catalog.
  2. In Configuration, for your first client, choose the Software, enter its Address (for example 192.168.1.10:8080), the User name and the Password, and optionally a Name. Without a port, the integration uses the default one of the software: 8080 for qBittorrent, 9091 for Transmission, 8112 for Deluge. Two or three clients? Fill in the Second client and Third client sections too: another software, or another instance of the same one.
  3. Save, then click Test the connection: the message under the button says, for each client, whether it answers, its version and its torrents.
  4. Open the Discover tab: one device per client. Click Add, pick a room, save.

The address can carry a path when the client is behind a reverse proxy (https://nas.example.com/qbittorrent), or be copied from the browser (http://192.168.1.10:9091/transmission/web/ works for Transmission).

Options:

  • Accept self-signed certificates: for an https:// address whose certificate was not signed by an authority (common on a NAS).
  • Refresh interval: how often the clients are read, from 10 seconds to 2 minutes (30 seconds by default). It is also the delay of the triggers.
  • Allow adding magnet links: lets the scenes add a torrent (off by default, see the Add a magnet link action).
  • Language of the device texts: English, French, German or Spanish, for the feature names (given when a device is added) and the list of downloads (French by default).

The device of each client​

FeatureWhat it is
Download speedSpeed of all the downloads, in kB/s
Upload speedSpeed of all the uploads (seeding), in kB/s
Torrents in progressTorrents not finished and not paused: downloading, queued, stalled, checked
Paused torrentsTorrents not finished and paused
Completed torrentsTorrents entirely downloaded, seeding or not, paused or not
Current downloadsText: the first three downloads in progress with their percentage
Free spaceFree space of the download folder, in GB
Alternative speed limitsSwitch: the alternative speed limits of the client (not on Deluge)
Client connected1 while the client answers, 0 when it does not

The three counters add up to the total number of torrents. A torrent paused once its sharing ratio is reached counts as completed, not as paused.

Alternative speed limits are the slower limits you set in the client itself: in qBittorrent, Options → Speed → Alternative rate limits; in Transmission, the turtle mode (Preferences → Speed → Alternative speed limits). Deluge has no such mode: its device has no switch.

In the list of downloads, the ones receiving data come first, the fastest first. A percentage is rounded down: 99 % until the end.

Dashboard​

The Torrents widget shows the download and upload speeds, the number of torrents in progress, the downloads in progress with their percentage and speed, and the paused and completed counts. It sums every client, or shows the one chosen in its settings. Three buttons:

  • Pause all: pauses every torrent;
  • Resume all: resumes every torrent;
  • Alternative speed: turns the alternative speed limits on, or off when they are on (a check mark shows it). Not shown for Deluge alone.

The widget works as soon as the integration is configured, even before the devices are added.

Scenes​

Triggers​

  • Download completed: a torrent finished downloading. A torrent added with its files already on disk (checked, then complete) does not count, nor a finished torrent checked again. Filters: the client, and the category (qBittorrent) or label (Transmission 4, Deluge with the Label plugin). Variables: the torrent name, the client name, the category and the size in GB.
  • New torrent added: a torrent was added to the client, by anyone (you, Sonarr, Radarr, a browser extension…). A magnet link is announced once its name is known. Same filters and variables.

The torrents present when the integration starts are not announced: a torrent added or finished while the integration (or Gladys) was stopped is not announced. While a client does not answer, the integration remembers its torrents: what finished in the meantime is announced when it answers again.

Actions​

  • Pause all torrents: on one client, or on every client.
  • Resume all torrents: on one client, or on every client.
  • Alternative speed limits: On or Off, on one client or on every client that has them (Deluge is skipped). The output is the number of clients that accepted.
  • Add a magnet link: adds a torrent by its magnet:?xt=urn:btih:… link, on the chosen client or the first one of the configuration. Only when Allow adding magnet links is ticked: whoever can edit a scene could otherwise start a download. Only magnet links are accepted, never an http address the client would fetch. The output is the info hash.

Scene ideas​

  • A film starts: when the TV or the media player starts playing, run Alternative speed limits → On; when it stops, Off.
  • Video call: from a calendar event or a button, Pause all torrents, then Resume all torrents an hour later.
  • Film ready: on Download completed with the category films, send a message "{{triggerEvent.data.name}} is ready to watch".
  • Disk almost full: when Free space drops under 20 GB, pause everything and send a message.
  • Client down: when Client connected goes to 0 for 10 minutes, send a message.

Refresh and load​

The integration reads each client on its own timer (every 30 seconds by default), not through the Gladys poller. One reading is light: qBittorrent sends only what changed since the previous reading, Transmission answers four small calls with only the fields used, Deluge one call. A client that stops answering is read again 15 seconds later. A value that does not change is still sent to Gladys every 6 hours.

The APIs are local, without quota. qBittorrent, however, bans the address of Gladys after 5 failed logins (for an hour by default): after a refused password, the integration waits 5 minutes, then 15, then an hour, then 6 hours before trying again. Fixing the password in the configuration, or clicking Test the connection, tries again at once.

Troubleshooting​

  • "does not answer": check the address and the port from the Gladys machine (curl http://192.168.1.10:8080), and that the client listens on the network, not only on localhost.
  • "user name or password refused": check them in the web interface of the client. On Deluge, it is the password of the web interface, not of the daemon.
  • "qBittorrent banned the address of Gladys": too many failed logins. Wait for the end of the ban (Options → Web UI → Ban client after consecutive failures), or restart qBittorrent, then fix the password.
  • "not on the RPC whitelist" (Transmission): add the address of Gladys to rpc-whitelist, see What you need.
  • "no such client at this address": the software chosen does not match the address, or a reverse proxy serves it under a path you did not type.
  • "not connected to its daemon" (Deluge): open the web interface, Connection Manager, and connect it to its daemon; the integration then connects it itself to the first daemon of the list.
  • qBittorrent behind a reverse proxy refuses the login: turn off Enable Host header validation or add the host to it (Options → Web UI), or allow the address of Gladys under Bypass authentication for clients in whitelisted IP subnets and leave the user name and password empty.
  • The Discovery tab shows nothing: no client is configured, or its address was not understood (said in the Configuration screen).
  • More details: set the LOG_LEVEL=debug environment variable on the container to see every reading in the logs of the integration. Passwords and session cookies are never written.

Limits​

  • Three clients at most. One device per client, not per torrent.
  • No deletion of torrents or files, by design.
  • Deluge: no alternative speed limits (none in Deluge itself); the Label plugin is needed for the category filter.
  • Transmission: the category is the first label (Transmission 4.0 and later).
  • The speeds are those of the whole client, not of one torrent.
  • The triggers depend on the refresh interval: a torrent added then removed between two readings is not seen.
  • Feature names are set when the device is added: changing the language later renames nothing in Gladys.
  • Not affiliated with the qBittorrent, Transmission or Deluge projects.

Configuration settings​

These are the settings qBittorrent / Transmission asks for in its configuration screen in Gladys.

SettingTypeRequiredDescription
Your torrent clientssectionNoqBittorrent (web interface on), Transmission (remote access on) or Deluge (web interface, deluge-web). Up to three clients, on your network. Never deletes a torrent nor a file.
SoftwareselectNo
AddressstringYesIP address or name, with :port. Without a port, the default one: 8080, 9091 or 8112. https:// for HTTPS.
User namestringNoqBittorrent and Transmission. Empty if the client asks for none. Deluge: leave empty.
PasswordsecretNoPassword of the web interface (Deluge: "deluge" until changed). Empty if none.
NamestringNoName of the device in Gladys. Empty: the software followed by the address.
Second client (optional)sectionNoSame fields, for another torrent client: another software, or another instance.
SoftwareselectNo
AddressstringNoIP address or name, with :port. Without a port, the default one: 8080, 9091 or 8112. https:// for HTTPS.
User namestringNoqBittorrent and Transmission. Empty if the client asks for none. Deluge: leave empty.
PasswordsecretNoPassword of the web interface (Deluge: "deluge" until changed). Empty if none.
NamestringNoName of the device in Gladys. Empty: the software followed by the address.
Third client (optional)sectionNoSame fields, for another torrent client: another software, or another instance.
SoftwareselectNo
AddressstringNoIP address or name, with :port. Without a port, the default one: 8080, 9091 or 8112. https:// for HTTPS.
User namestringNoqBittorrent and Transmission. Empty if the client asks for none. Deluge: leave empty.
PasswordsecretNoPassword of the web interface (Deluge: "deluge" until changed). Empty if none.
NamestringNoName of the device in Gladys. Empty: the software followed by the address.
OptionssectionNo
Accept self-signed certificatesbooleanNoFor a client served in HTTPS with its own certificate (common on a NAS).
Refresh intervalselectNoHow often the clients are read. Also the delay of the "Download completed" trigger.
Allow adding magnet linksbooleanNoLets the scenes add a torrent by its magnet link. Off by default: whoever can edit a scene could then start a download.
Language of the device textsselectNoFeature names (set when the device is added) and texts sent by the integration.

How to install qBittorrent / Transmission in Gladys​

  1. In Gladys, open Integrations: qBittorrent / Transmission appears in the catalog, next to the native integrations, with a community badge.
  2. Click Install. Gladys pulls the Docker image (ghcr.io/guim31/gladys-torrent:1.0.1), starts it in a sandbox isolated from the core, and generates the integration's interface (devices, discovery and configuration).
  3. Open the Configuration screen of the integration, fill in the settings, and save.
  4. You can also install it directly from its repository URL: https://github.com/guim31/gladys-torrent.

qBittorrent / Transmission requires Gladys >=5.1.0. The catalog inside Gladys refreshes every hour, so a new version becomes available at most one hour after its release.

Not running Gladys yet? It is free and open source: follow the installation guide to get started.

About external integrations​

qBittorrent / Transmission is an external integration: a community integration packaged as a Docker container and published on GitHub, that Gladys installs in one click and runs in a sandbox isolated from its core. It is published and maintained by guim31, not by the Gladys core team.

Subscribe to the Gladys Assistant newsletter

A few emails per month about new releases and project news. Sent by Pierre-Gilles Leymarie, founder of the project. Unsubscribe anytime 🙂