Skip to main content

System Bridge smart home integration, free and open source

System Bridge integration for Gladys Assistant

Your PC through System Bridge: CPU, memory, disks, GPU, battery, sleep and restart buttons.

Follow a Windows or Linux PC from Gladys through System Bridge, a free and open source application that runs on the PC: whether it is on, CPU and memory load, disk usage, GPU, battery, users logged in, uptime, camera and microphone in use; and buttons to lock, sleep, hibernate, restart or shut it down, or open a page in its browser.

Unofficial integration, not affiliated with System Bridge. It has never been tested with a real PC yet: please report what you see.

Installation​

  1. Install System Bridge on the PC (Windows or Linux) and start it. It listens on port 9170; let it through the firewall of the PC for your local network only.
  2. In the settings of System Bridge, copy the API token.
  3. In Gladys, open this integration and fill in:
    • Address of the PC: its IP address or name, e.g. 192.168.1.20 (add :port if you changed 9170). Give the PC a fixed address in your router.
    • Token: the token copied above. It is kept by Gladys in its database, never shown again, sent only to System Bridge, and never written in the logs.
  4. Press Test the connection, then open the Discovery tab and add the PC.

System Bridge has no https: the token and the readings cross your network in clear. Use it on a trusted home network only, never through the Internet.

What you get​

One device per PC, named after the PC and identified by its machine id (it survives a rename or a new IP address):

FeatureMeaning
Online1 while the PC answers, 0 when it is off, asleep or away
CPU (%), CPUload, and temperature when the PC gives it
Memory (%), Memory usedload, and MB used
Disk … (%)usage of each disk (12 at most); system mounts are left out
GPU (%), GPU temperatureper graphics card (4 at most), when reported
Battery, Charginglaptops only
Powerwhen System Bridge reports it
Users logged in, Uptimesessions open, hours since the last start
Camera in use, Microphone in use1 while an application uses them
Restart pending, System Bridge update availablewhen reported
Lock, Sleep, Hibernate, Restart, Shut down, Open the URLbuttons

A disk or a GPU seen once stays on the device (it shows no value while it is absent), so that its history is never lost. Under Windows, only NVIDIA cards report a GPU temperature (for the others, Windows gives a zone of the board, not the card).

The PC is read at the pace chosen in Refresh (every minute by default). When it does not answer, Gladys tries again 30 seconds to 5 minutes later, never faster than that pace. The Discovery button shows the last reading when it is more recent than that pace.

Buttons and safety​

  • Lock locks the session; it is always allowed (it protects the PC), but only while Gladys is connected to that PC (it never opens a connection of its own, so it is refused while System Bridge asked Gladys to slow down).
  • Sleep, Hibernate, Restart, Shut down are refused until you tick Allow sleep, hibernate, restart and shut down. Unsaved work on the PC is lost on a restart or a shut down. Never allow them on the PC that runs Gladys itself.
  • Open the URL is refused until you tick Allow opening the URL and type an http or https address: it opens that page in the default browser of the PC. Never a file, a path nor a program.
  • They are buttons, never switches: no voice assistant nor "turn everything off" scene reaches them. In a scene, use the "set a device value" action on the button.
  • Before a sleep, restart, shut down or URL, Gladys reads the PC again and checks it is the same machine. If the check does not fit in Gladys' 5 seconds, nothing is sent. Once sent, if System Bridge does not confirm in time, Gladys says "sent, without confirmation" (it may have run).
  • Gladys never sends a command line, keystrokes, a notification, a file nor a path, even though System Bridge accepts them.

When something goes wrong​

  • The PC does not answer: it is off, asleep, System Bridge is not running, or the firewall blocks port 9170.
  • System Bridge refused the token: copy the token again from the settings of System Bridge and save. Gladys does not send a refused token again by itself before 6 hours.
  • Does not answer like System Bridge: check the port.
  • Slow down: System Bridge (or something in between) answered HTTP 429 or 503; every request is paused (1 minute to 6 hours), even after a restart. The test button lifts the pause.

Privacy​

The integration reads only the modules listed above: never the list of processes, the media, the network connections nor the notifications. Names of users, applications using the camera, IP and MAC addresses are never published nor logged.

Configuration settings​

These are the settings System Bridge asks for in its configuration screen in Gladys.

SettingTypeRequiredDescription
How it workssectionNoInstall System Bridge (free, open source) on a Windows or Linux PC of your network: Gladys reads it through its local WebSocket API, with its token. The PC becomes a Gladys device (Discovery tab): online, CPU, memory, disks, GPU, battery, users logged in, uptime, and Lock, Sleep, Hibernate, Restart, Shut down and Open the URL buttons. Gladys never sends a command line nor keystrokes. Unofficial integration, not affiliated with System Bridge.
Address of the PCstringYesThe address of the PC on your network, with the port of System Bridge if it is not 9170: 192.168.1.20 or my-pc.local:9170. System Bridge has no https: the token crosses your network in clear, use it on a trusted network only.
TokensecretYesThe API token shown in the settings of System Bridge on the PC. Kept by Gladys in its database, never shown again, sent only to System Bridge, in each message. It never appears in the logs.
RefreshselectYesHow often Gladys reads the PC. When it does not answer (off, asleep), Gladys tries again 30 seconds to 5 minutes later, never faster than this.
CommandssectionNoBy default Gladys only reads, and locks the session (Lock button). Sleep, Hibernate, Restart and Shut down are refused unless you allow them below; so is Open the URL. They are buttons, never switches: no voice assistant nor "turn everything off" reaches them. Unsaved work on the PC is lost on a restart or a shut down. Never allow them on the PC that runs Gladys itself.
Allow sleep, hibernate, restart and shut downbooleanNo
Allow opening the URLbooleanNoThe Open the URL button opens the page below in the default browser of the PC.
URL to open (optional)stringNoAn http or https address only (never a file nor a program), without a user name nor password.

How to install System Bridge in Gladys​

  1. In Gladys, open Integrations: System Bridge appears in the catalog, next to the native integrations, with a community badge.
  2. Click Install. Gladys pulls the Docker image (ghcr.io/lm1lc3n7/gladys-system-bridge:0.1.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/LM1LC3N7/gladys-system-bridge.

System Bridge 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​

System Bridge 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 LM1LC3N7, 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 🙂