Skip to content

About

Show SidePulse agent status and LEDs in Home Assistant over MQTT, and control the LEDs.

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Repository files navigation

sidepulse-mqtt

This bridge shows the agent status and the LEDs of a SidePulse device in Home Assistant. Home Assistant can also control the LEDs. The bridge runs on the Mac with SidePulse, and it connects to your MQTT broker.

flowchart LR
    HA[Home Assistant] <-->|MQTT| Broker[MQTT broker]
    Broker <-->|MQTT| Bridge[sidepulse-mqtt]
    Bridge -->|LED programs| Service[SidePulse service]
    Service -->|status history| Bridge
    Service -->|writes LEDS.LED| Device[SidePulse device]
    Device -->|current program| Bridge
Loading

What you get in Home Assistant

image image

MQTT discovery adds one device, "SidePulse ", with three entities:

Entity Type What it shows
Agent status Sensor Idle, Working, Ask, or Done, as in the SidePulse menu
Needs input Binary sensor On while an agent waits for you or stopped on an error. SidePulse shows both as Ask.
LEDs Light The colour and the animation on the device. The program attribute holds the full LED program, and show_topic holds the topic for alerts.

Use the LEDs light to control the device:

Action in Home Assistant Result on the device
Pick a colour That colour, until you change it
Pick an effect That SidePulse animation, until you change it
Turn off LEDs dark, until you change it
Turn on, with no colour or effect Live agent status again

While a colour or an effect holds, the LEDs show no agent status. The Needs input sensor still works, because it reads the agent status, not the LEDs. A newer push, an alert, a disconnect in the SidePulse menu, or a restart of the SidePulse service also ends a hold.

SidePulse keeps a pushed program for one hour at most. The bridge therefore sends a held colour or effect again every 50 minutes. An animation starts from its beginning at that moment.

For a short alert, publish to the show topic. An alert plays for 10 s by default. Then the device shows live status again.

Requirements

  • macOS, with SidePulse from inteliwear/sidepulse and a SidePulse Pro or Dot.
  • uv.
  • An MQTT broker, for example the Mosquitto add-on.
  • Home Assistant with the MQTT integration and the default discovery prefix, homeassistant.

LED control and alerts need the SidePulse background service. Upstream added it on 10 November 2026. With an older SidePulse, the two sensors and the LED state still work, but Home Assistant cannot change the LEDs.

Install

git clone https://github.com/benkelly/sidepulse-mqtt.git
cd sidepulse-mqtt
MQTT_HOST=homeassistant.local MQTT_USERNAME=mqtt ./install.sh

If you set MQTT_USERNAME, the installer asks for the password once and keeps it in the Keychain. The LaunchAgent file contains no secret.

macOS can ask if uv can find devices on your local network. Click Allow. Without this permission, the bridge cannot reach the broker.

To update, run git pull. Then run install.sh again with the same settings.

Variable Default Purpose
MQTT_HOST none, required Address of the MQTT broker
MQTT_PORT 1883 Port of the MQTT broker
MQTT_USERNAME none Login for the broker. The password goes into the Keychain.

MQTT topics

<node> is sidepulse_ and the short host name of the Mac, in lowercase. An example is sidepulse_my_macbook.

Topic Direction Content
sidepulse/<node>/state Bridge to broker Agent status as JSON
sidepulse/<node>/availability Bridge to broker online or offline
sidepulse/<node>/light Bridge to broker LED state as Home Assistant JSON light state
sidepulse/<node>/light/set Broker to bridge Light commands from Home Assistant
sidepulse/<node>/show Broker to bridge Alerts

An alert is JSON or plain text:

{"program": "off\n#0080FF 0.5s pulse\nrepeat\n", "seconds": 8}

A plain-text alert is the LED program itself, and it plays for 10 s. An alert lasts at most 60 s. A program has at most 512 bytes and 20 lines. The LED language is in LEDS_FORMAT.md.

The bridge ignores retained messages on show and light/set. An old command therefore does not play again after a restart.

Blueprints

Import the two blueprints. Then create an automation from each one in Settings → Automations & scenes → Blueprints. You pick the entities in the UI.

Blueprint What it does Import
SidePulse alert Plays an LED program for some seconds when a trigger fires, for example a doorbell. You pick the trigger, the SidePulse LEDs light, the program, and the duration. Import the SidePulse alert blueprint
SidePulse agent waits Sends a notification to your phone when an agent waits for your input for some time. You pick the Needs input sensor, the wait time, and the phone. Import the SidePulse agent waits blueprint

Dashboard card

In a dashboard, select Edit, then Add card, then Manual. Paste this YAML, and replace sidepulse_my_macbook with your node:

type: vertical-stack
cards:
  - type: tile
    entity: light.sidepulse_my_macbook_leds
  - type: entities
    entities:
      - sensor.sidepulse_my_macbook_agent_status
      - binary_sensor.sidepulse_my_macbook_needs_input

Select the tile to open the colour and effect controls.

Write your own automation

Publish an alert with mqtt.publish. The show_topic attribute of the LEDs light gives the topic:

- alias: Doorbell on SidePulse
  triggers:
    - trigger: state
      entity_id: binary_sensor.front_door_doorbell
      to: "on"
  actions:
    - action: mqtt.publish
      data:
        topic: "{{ state_attr('light.sidepulse_my_macbook_leds', 'show_topic') }}"
        payload: '{"program": "off\n#0080FF 0.5s pulse\nrepeat\n", "seconds": 8}'

Replace the entity IDs with your own. Find them in Settings → Devices & services → MQTT.

Troubleshooting

The log is ~/Library/Logs/sidepulse-mqtt.log.

Log line Cause Fix
cannot reach the broker, retrying macOS blocks local network access, or the broker is down. Turn on uv in System Settings → Privacy & Security → Local Network. Then restart the bridge.
connect failed: … The broker rejects the login. Store the correct password. Then restart the bridge.
error: the SidePulse service does not run The SidePulse background service is stopped, or SidePulse is older than 10 November 2026. Run sidepulse service start. If the command is unknown, update SidePulse.
error: no SidePulse device is mounted The device is not plugged in, or macOS has not mounted it. Plug the device in. Check that its volume is in Finder.
cannot read the device: … macOS blocks access to the SidePulse volume. Allow uv to access removable volumes in System Settings → Privacy & Security.

The Local Network permission belongs to the exact uv binary. After uv updates itself, macOS can block the bridge again.

Restart the bridge:

launchctl kickstart -k gui/$(id -u)/local.sidepulse-mqtt

Store a new password. The command asks for it:

security add-generic-password -U -s sidepulse-mqtt -a "$USER" -w

Test

Both checks need an MQTT broker without a login on 127.0.0.1:18830, and both use temporary folders. They do not touch your SidePulse or your device.

docker run -d --rm --name sidepulse-mqtt-check -p 127.0.0.1:18830:1883 eclipse-mosquitto:2 mosquitto -c /mosquitto-no-auth.conf
./check_bridge.py
SIDEPULSE_BIN=~/.local/bin/sidepulse ./check_service.py
docker stop sidepulse-mqtt-check
Check What it runs the bridge against Time
check_bridge.py A fake SidePulse: a status history, a service socket, a device folder, and animations. It also tests the functions of the bridge directly. About 80 s
check_service.py A real SidePulse service, which it starts in a temporary home folder. It checks the sensors, an alert, a colour that holds for longer than the service keeps one push, and the return to live status. About 2 min

Each check prints one line that starts with ok for each step, and then ok: all checks passed. check_service.py is tested on Linux only, which is where CI runs it.

CI runs both on every pull request. It runs check_service.py against three SidePulse versions: the first commit with the background service, a later commit, and main. The main run repeats every Monday, so a breaking change in SidePulse fails here first. When that happens, fix the bridge and add the new commit to .github/workflows/ci.yml.

Remove

launchctl bootout gui/$(id -u)/local.sidepulse-mqtt
rm ~/Library/LaunchAgents/local.sidepulse-mqtt.plist
rm -r ~/.local/share/sidepulse-mqtt
security delete-generic-password -s sidepulse-mqtt -a "$USER"

To remove the device from Home Assistant, delete it in Settings → Devices & services → MQTT.

Limits

  • The bridge reads the status history of SidePulse, and it changes the LEDs with the write_led command that the SidePulse menu uses for a preview. SidePulse does not document either one for other programs. The Rust migration in inteliwear/sidepulse#52 can change both. See inteliwear/sidepulse#55.
  • SidePulse writes the status history every 15 s, so the two sensors can be up to 20 s late.
  • The light shows the first colour of the program. An animation with more colours shows only one colour on the tile.
  • Effect names come from the file names of the app animations, for example "Kitt" for KITT Scanner.
  • The brightness slider in Home Assistant sends a darker colour. The device brightness in SidePulse still limits the output.

License

MIT. SidePulse and its LED language come from inteliwear/sidepulse (MIT). This bridge is an independent client of its file and socket interfaces.

About

Show SidePulse agent status and LEDs in Home Assistant over MQTT, and control the LEDs.

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages