Bridge Matter: Control your Gladys devices from Apple Home, Google Home, Alexa...

Hello everyone,

I’ve opened a PR that adds a new integration to Gladys: the Matter Bridge.

:light_bulb: What is it?

So far, Gladys could control Matter devices. With this integration, it’s the opposite: Gladys becomes a Matter bridge itself and exposes your devices (even those that aren’t Matter) to the ecosystem of your choice. If you’ve already used Gladys’ Homekit bridge, it’s the same thing but with much more compatibility:

  • Apple Home
  • Google Home
  • Amazon Alexa
  • SmartThings
  • Home Assistant
  • … and any Matter-compatible controller

And it works regardless of the device’s protocol in Gladys: Zigbee2mqtt, Z-Wave, MQTT, Philips Hue, Tasmota, Shelly, eWeLink… If Gladys can control it, you can find it in the Home app on your iPhone or control it with your voice using Siri, Google, or Alexa.

Everything remains 100% local: no cloud, no Gladys Plus account required.

:information_source: Not to be confused with the Matterbridge integration (the container), which does the opposite: it allows you to import Matterbridge devices into Gladys. The Matter Bridge, on the other hand, exports your Gladys devices to other ecosystems.

:white_check_mark: Supported Devices

For now, it’s just a basic version and only a few devices are compatible:

Type What is exposed
:light_bulb: Lights On/off, dimming, color temperature, color (hue/saturation and xy)
:electric_plug: Outlets / Switches On/off
:window: Roller shutters and curtains Position, open / close / stop
:door: Opening sensors Open / closed
:person_walking: Motion / presence sensors Occupancy
:droplet: Leak detectors Leak detected
:fire: Smoke / CO detectors Smoke alarm, CO alarm
:thermometer: Temperature, humidity, brightness, pressure Measured value
:fog: Air quality CO2, PM2.5, PM10
:battery: Battery Battery level, reported on the affected device

A Gladys device with multiple features (for example, a temperature + humidity + battery sensor) appears as a single accessory with all its sensors.

:gear: How it works

  • Disabled by default: nothing changes until you enable it.
  • Real-time synchronization in both directions: a state change in Gladys is reflected in the ecosystem, and a command from Apple Home / Google Home / Alexa becomes a Gladys action. Gladys scenes are therefore triggered normally.
  • Choice of exposed devices: all compatible devices, or just a selection.
  • Automatic updates: a device added, renamed, or deleted in Gladys is updated on the bridge without having to re-pair it.
  • Independent of the Matter integration: the bridge uses its own port (UDP 5541) and its own storage; it doesn’t affect your existing Matter devices.

:test_tube: How to test

A test Docker image is available: bertrandda/gladys:matter-bridge

:warning: This is a test image, not an official version. Make a backup first (Gladys Plus, or a copy of the /var/lib/gladysassistant folder). The ideal is to test on a test instance, but a production instance also works: the PR adds no database migration, you can go back to gladysassistant/gladys:v5 afterward.

Then:

  1. Go to Integrations → Assistants → Matter Bridge.
  2. Check that IPv6 is properly detected :white_check_mark: (Matter needs it on the local network, and the container must run with --network=host).
  3. Click on Enable Matter Bridge.
  4. Choose the devices to expose (all, or a selection) then Save.
  5. In your app (Home, Google Home, Alexa…), add a Matter accessory and scan the QR code, or enter the pairing code.
  6. Your app will warn that the accessory is not certified: this is normal for an uncertified bridge, accept to continue.

To add Gladys to a second ecosystem, open the pairing mode from an already paired app (for example, “Enable Pairing Mode” in Apple Home), then scan the new code in the other app.

:memo: What I’m interested in your feedback

  • The ecosystem used (Apple Home, Google Home, Alexa, SmartThings, Home Assistant…) and the hub (HomePod, Apple TV, Nest Hub, Echo…)
  • Did the pairing go smoothly?
  • The types of devices tested
  • Do commands from the ecosystem arrive in Gladys? And in the other direction, do the states come back properly?
  • Behavior after a restart of Gladys (do the devices remain paired and responsive?)
  • A device that should appear but does not appear, or that appears with the wrong type
  • In case of trouble, the logs of the container: docker logs gladys 2>&1 | grep -i "matter bridge"

Thanks in advance to all testers! :folded_hands:

The PR

3 Likes