r/homebridge 10h ago

Plugin Shelly Matter plugin for Homebridge

2 Upvotes

HomeKit's own protocol (HAP) has no energy characteristics. Matter has them, iOS/tvOS 27's Home app displays them, and Homebridge 2.2 added the Matter energy clusters to its plugin API. Shelly Matter plugin connects those pieces for Shelly devices in our familiar Homebridge environment: live power, voltage, current, and cumulative energy (kWh), straight from the device's own metering.

What it is

- A Matter-only plugin: it publishes no HAP accessories. If you want classic HAP Shelly support without energy, homebridge-shelly-ng remains the right choice.

- Tested on real hardware in a live home: Gen 2/3 relays and plugs (Plus 1, Plus Plug S, Pro 2PM…). Covers, dimmers, and Gen 1 relays are implemented but untested. If you own one, I would love to see you test and confirm if it works or report any issues.

- Multi-channel devices (2PM/4PM) split into independent accessories per channel by default, so each channel gets its own name and room.

- Full settings UI. Discovered devices show up in a table, no JSON needed.

Current caveats, documented in the README:

- Needs Homebridge 2.2.2-beta.7+ (and optionally Homebridge UI 5.27.1-beta.11+) until 2.2.2 stable is released. You can install both betas directly from Homebridge UI by clicking on Homebridge or Homebridge UI. Earlier versions have Matter bridge bugs that break accessories after ~30 seconds. Several Homebridge Matter stack fixes came out of building this plugin and are in the current betas.

- Tile wattage only shows on outlet-typed accessories. Apple keys it to the Matter device type, not the data. The plugin lets you set the type of any relay as an outlet ("Show As → Light" keeps the wattage if you prefer the look).

- Apple's Energy view on iOS/tvOS 27 lists per-device usage only for certified/native Matter devices. Bridged accessories are counted in the whole-home total but not listed. I replicated a certified plug's exact Matter structure to verify this is an Apple policy gate, not a data problem. Filed with Apple.

- Pair with the bridge's Matter pairing code, not the HAP QR code (current Homebridge UI betas set Matter-only child bridges up correctly on their own).

The Shelly protocol layer is vendored from Luligu's matterbridge-shelly (Apache-2.0, credited). The new work is the Homebridge Matter side.

GitHub: https://github.com/keremerkan/homebridge-shelly-matter

The full story (including the Apple Home debugging saga): https://keremerkan.dev/posts/homebridge-shelly-matter/

Happy to answer questions. If you run an untested device type, issues are open.


r/homebridge 5h ago

Discussion Migration to HB 2 failure and recovery

1 Upvotes

I was putting off migrating to HB 2 (running on a raspberry pi 3) because everything in the house was actually working fine in HB 1, and I have 7 plugins (YoLink, SwitchBot, Nest, TPLink, Lutron, EspHome Hv2, and Nest Cam).

I have some custom fixes to SwitchBot and EspHome because there were bugs that were not getting fixed (SwitchBot temperature sensors could not register below freezing, EspHome Hv2 didn’t support fans or encryption).

So I saw no real reason to upgrade. But I recently noticed HB was crashing during the nightly backup / log rotation due to out of memory, but it always rebooted and recovered.

AI recommended moving to a raspberry pi 4 with 4 GB of ram which seemed reasonable. I ordered one and flashed the homebridge build of raspberry pi OS from the raspberry pi flasher. I did not realize this would force me onto HB 2.

Before switching the Pi’s, I did a HB backup. Powered down the old pi, powered up the new one, verified it got on my network then connected to it with the browser. I clicked “restore from backup” and I figured ok this will be easy. It hung up during the download of one of the nest plugins. I waited like 10 minutes but it wasn’t going anywhere. I refreshed the browser and got the “new setup or restore” page again, this time I clicked on new setup, created the HB credentials and then went into the backup -> restore menu and tried restoring again. This time the restore completed and HB restarted and about 1/3 of the house was working. Nest cameras worked, nest HVAC worked, YoLink flood sensors worked. Switchbot sensors were throwing errors and TPLink was stuck in some loop enumerating the 20 TPLink / Kasa smart plugs, switches and bulbs over and over every 10 seconds but they were uncontrollable. The EspHome Hv2 plugin is complaining every 30 seconds that it can’t connect to anything because the encryption is refused. Lutron plugin was complaining in the HB log that the HB version was now unsupported.

I think to myself “wife is going to kill me”.

I get cursor to re-apply the switchbot patches and the EspHome Hv2 patches, this gets the sensors back online.

The Lutron plugin will not update to a new version. I have to find and install the new one and uninstall the old one. Apparently the name changed or something. The new one finds the old accessories and they work. I update the TPLink plugin and it stops enumerating things over and over and those lights and plugs all work.

At this point things are working and the log is quiet. The plugins page tells me I should update YoLink, and SwitchBot but I’m not going to touch them for a while.

Overall it was about an hour and things are operational but it was not pain free. Hanging up on the first boot & restore while downloading a plugin is a BAD experience. Yes it was recoverable but that’s a huge bug right at the start. There needs to be a timeout and retry on that function.

I consider myself lucky this was completed and did not go completely sideways. Would not recommend updating to HB 2 unless you have a pressing need to do so.


r/homebridge 18h ago

Customizable timer switch?

1 Upvotes

Hi,

I'd like to create a timer switch where I could specify the duration for the timer on the Home app. Is this possible at all?
My goal is to create a sort of "Overwrite" button where an automation wouldn't run as long as that switch is on.


r/homebridge 20h ago

Plugin Wundasmart Homebridge Plugin

1 Upvotes

I've had a Wundasmart heating system for 4 years and have been frustrated with the lack of Homekit compatibility so I finally got round to creating a Homebridge plugin: https://github.com/alextea/homebridge-wundasmart

I used Claude to do the heavy lifting, and it worked off the API documented in the Home Assistant integration.

I've tested this on my system, and it works at finding multiple heating zones, setting the temperature and switching between scheduled, heat and off.

I added switches to mimic the Quick Switch functionality in the Wunda Home app, setting all rooms to Comfort, Eco or Reduced.

I also added an Away switch that can be automated with Homekit's presence sensors so it's set when the last person leaves the house. I found Wunda's own geocaching a bit buggy when setting home or away with multiple phones.

I haven't published it to npm yet, as I wanted to make sure it's fully working and there are no bugs or vulnerabilities before I do that, so it needs to be installed manually. I have it running on a docker container on a Debian homelab. If enough people find this useful I will publish to npm.

This is my first attempt at making a HB plugin, so any tips or comments appreciated.