System Bridge

System Bridge is an application that runs on your local machine to share system information via its API/WebSocket. You can also send commands to the device such as opening a URL or sending keyboard keypresses.

Prerequisites

Version

This integration requires System Bridge 4.0.2 and above. Any older version will not work.

Token

You will need your token. For instructions on finding your token, follow the steps in the System Bridge documentation.

配置

此集成可通过 UI 配置。前往 设置 > 设备与服务 添加。

Binary sensors

This integration provides the following binary sensors:

NameDescription
Battery Is ChargingWhether the battery is charging
Camera In UseWhether the camera/webcam is in use
Pending RebootWhether a reboot is pending
New Version AvailableWhether a new version is available

Sensors

This integration provides the following sensors:

NameDescription
BatteryBattery level of the device
Boot TimeTime the device was turned on
CPU SpeedThe current CPU speed
Displays ConnectedNumber of displays connected
Display Resolution XDisplay resolution (across)
Display Resolution YDisplay resolution (down)
Display Refresh RateDisplay refresh rate
Filesystem(s)Space used for each drive letter / filesystem mount
GPU Memory FreeGPU memory free in GB
GPU Usage %GPU usage percentage
KernelVersion information of the Kernel
Latest VersionSystem Bridge Latest Version
LoadSystem load percentage
Power UsagePower usage in watts (if available)
Memory FreeMemory (RAM) free in GB
Memory UsedMemory (RAM) used in GB
Memory Used %Memory (RAM) % used
Operating SystemVersion information of the Operating System
ProcessesShows count of processes on the system
VersionSystem Bridge Version

These sensors are also available, but are not enabled by default:

NameDescription
CPU TemperatureThe current temperature of the CPU
CPU VoltageThe current voltage of the CPU
GPU Core Clock SpeedGPU core clock speed in MHz
GPU Memory Clock SpeedGPU memory clock speed in MHz
GPU Fan SpeedGPU fan speed percentage
GPU Memory UsedGPU memory used in GB
GPU Memory Used %GPU memory used percentage
GPU Power UsageGPU power usage
GPU TemperatureThe current temperature of the GPU

Media player

The integration also provides a media player. This allows you control the currently playing media on your device.

This is currently only supported devices running System Bridge on Windows.

Media source

This integration is available as a media source to use with the media browser integration. You can browse and view media from your system to media players such as your web browser and other supported media players.

Update

The integration provides an update component, which will notify you when a new version of the app is available.

Actions

Notifications notify.system_bridge_hostname

You can send notifications to the device using the notify platform.

action: notify.system_bridge_hostname
data:
  data:
    image: "https://brands.home-assistant.io/system_bridge/logo@2x.png"
    timeout: 30
    actions:
      - command: api
        data:
          endpoint: open
          method: POST
          body:
            url: "http://homeassistant.local:8123/lovelace/cameras"
        label: "Open Cameras"
    audio:
      source: "https://d3qhmae9zx9eb.cloudfront.net/home/amzn_sfx_doorbell_chime_02.mp3"
      volume: 80
  title: "Test Title"
  message: "This is a message"

Parameters

ParameterDescription
targetThe target to send the notification to. This can be ignored.
titleThe title of the notification.
messageThe message of the notification.
dataThe data to send to the device. See below for info.
Actions (data parameter)

This is an array of actions that can be sent to the device. These are buttons that show below the title, message and image.

ParameterDescription
commandThe command to send to the device. For example api will send a request to the System Bridge API.
labelThe label of the button.
dataThe data to send to the device. The available parameters for the api command are: endpoint, method body, params.

Here is an example action that will open a URL in the device's browser:

- command: api
  label: "Open Cameras"
  data:
    endpoint: open
    method: POST
    body:
      url: "http://homeassistant.local:8123/lovelace/cameras"
Audio (data parameter)

This is an object containing the source and volume (0-100). The source must be a URL to a playable audio file (an MP3 for example).

Action: Get process by ID

The system_bridge.get_process_by_id action returns a process by its PID.

Show action in your Home Assistant instance.

action: system_bridge.get_process_by_id
data:
  bridge: "deviceid"
  id: 17752

This returns Response Data like the following:

id: 17752
name: steam.exe
cpu_usage: 0.9
created: 1698951361.6117153
memory_usage: 0.23782578821487121
path: C:\Program Files (x86)\Steam\steam.exe
status: running
username: hostname\user
working_directory: null

Action: Get processes by name

The system_bridge.get_processes_by_name action returns a count and a list of processes matching the name provided.

Show action in your Home Assistant instance.

action: system_bridge.get_processes_by_name
data:
  bridge: "deviceid"
  name: discord

This returns Response Data like the following:

count: 1
processes:
  - id: 11196
    name: Discord.exe
    cpu_usage: 0.3
    created: 1698951365.770648
    memory_usage: 0.07285296297215042
    path: C:\Users\user\AppData\Local\Discord\app\Discord.exe
    status: running
    username: hostname\user
    working_directory: null

Action: Open path

The system_bridge.open_path action opens a URL or file on the server using the default application.

Show action in your Home Assistant instance.

action: system_bridge.open_path
data:
  bridge: "deviceid"
  path: "C:\\image.jpg"

This returns Response Data like the following:

id: abc123
type: OPENED
data:
  path: C:\image.jpg
message: Path opened

Action: Open URL

The system_bridge.open_url action opens a URL or file on the server using the default application.

Show action in your Home Assistant instance.

action: system_bridge.open_url
data:
  bridge: "deviceid"
  url: "https://home-assistant.io"

This returns Response Data like the following:

id: abc123
type: OPENED
data:
  url: https://home-assistant.io
message: URL opened

Action: Send keypress

The system_bridge.send_keypress action sends a keypress to the server.

Show action in your Home Assistant instance.

action: system_bridge.send_keypress
data:
  bridge: "deviceid"
  key: "a"

This returns Response Data like the following:

id: abc123
type: KEYBOARD_KEY_PRESSED
data:
  key: a
message: Key pressed

Action: Send text

The system_bridge.send_text action sends text for the server to type.

Show action in your Home Assistant instance.

action: system_bridge.send_text
data:
  bridge: "deviceid"
  text: "Hello"

This returns Response Data like the following:

id: abc123
type: KEYBOARD_TEXT_SENT
data:
  text: Hello
message: Text entered

Action: Power command

The system_bridge.power_command action sends a power command to the system.

Supported commands are:

  • hibernate
  • lock
  • logout
  • restart
  • shutdown
  • sleep

Show action in your Home Assistant instance.

action: system_bridge.power_command
data:
  bridge: "device"
  command: "sleep"

This returns Response Data like the following:

id: abc123
type: POWER_SLEEPING
data: {}
message: Sleeping