r/homebridge

The best “vibe coding” I’ve done.

The best “vibe coding” I’ve done.

I know vibe coding is good and bad, but I’ve played around with home kit for a while, and posted earlier asking how to integrate power usage.

So, after vibe coding a http service to poll multiple devices using HTTP and MQTT I have full visibility if my issues including solar generation and grid usage (using ecoflow smart meter)

This is cooler than i expected! - just wish we could have more icons!

u/Juggernoobs — 2 days ago

homebridge-betterkey: turn "car parked at home" into a HomeKit motion trigger

Disclosure up front: I make BetterKey, the iOS app this bridges from.

I wanted to bring the passive automations from BetterKey into my smart home. I found that Home Arrival was something I would actually use and allowed the app to have a deeper integration for connected car/home automation enthusiasts. Sharing in case it's useful to others who would also be interested in BetterKey.

What it does:

  • One motion sensor per vehicle, named {Vehicle} Parked at Home.
  • Each time BetterKey confirms the car parked inside a home area you drew on the map, the sensor flips to "motion detected" for about 30 seconds and then back to "no motion." That's enough for Apple Home to run an automation like "when Forester Parked at Home detects motion after sunset, turn on the driveway lights."
  • Dynamic platform, so vehicles are added and removed automatically as they show up in BetterKey.
  • Polls the BetterKey API on a configurable interval (default 60s, range 30 to 600s). Confirmed arrivals persist server side for 24h, so a Homebridge restart during that window will still catch the event.
  • Verbose logging option that records event ids and dispatch outcomes. The API key is never logged.

A few things worth calling out up front:

  • Requires an active BetterKey subscription and the iOS BetterKey app with Home Arrival turned on (feature overview at https://betterkey.xyz/home-arrival). If you are not already a BetterKey user, this plugin will not be useful on its own.
  • Arrival only. It never reports "away" or "not parked," and if iOS suspends BetterKey in the background a specific park can be missed. A missed trigger is inconvenient rather than unsafe, since nothing downstream is treating the sensor as authoritative presence.
  • The comparison between "where the car is" and "the home area you drew" happens entirely on the iPhone. Only a short-lived arrival event (id, vehicle, timestamp) leaves the device for this plugin to poll. No coordinates, no radius, no vehicle location.

Install from the Homebridge UI by searching for BetterKey, or from the CLI:

npm install -g homebridge-betterkey

Repo, config, and troubleshooting: https://github.com/CMLabsLLC/homebridge-betterkey

Happy to answer questions or take device reports in the thread.

reddit.com
u/RussellQwerty — 1 day ago
▲ 20 r/homebridge+5 crossposts

Looking for beta testers for an integrated Chromecast/ Android TV plugin

looking for beta testers for a plugin that uses Google Cast, Android TV Protocol v2 and ADB protocols for adding, remote controlling and synchronizing playback status of google Chromecast/ android TVs.

sudo npm install -g github:vivekanandbv/Homebridge-ADB-Cast
github.com
u/BrainEcstatic2513 — 2 days ago

The new iOS27 Power Readings

I’ve seen that iOS 27 supports power, does anybody know how. I have http switches which have worked for years and are fan-bloody-tastic.

They support power readings in http get requests, wondered whether I could modify http-switch to support power readings too.

reddit.com
u/Juggernoobs — 2 days ago

Raspberry Pi setup ELI5

Hello! I’ve been a HomeKit user for the last six years or so. I found this Raspberry Pi Zero W when cleaning out my father-in-law’s house after he passed and decided to try to use it for HomeBridge as I have a few non-HomeKit devices I’d like to bring over (Samsung fridge, Skylight calendar, etc.). The Pi didn’t come with anything except for the chip and the case it’s in, so I got a power cable, a USB cable, and a microSD card. I downloaded the Raspberry Pi setup app on my MacBook Air and went through the setup process for the microSD card. Now I’m stuck in trying to get it onto my WiFi. I think I followed the steps for SSH, but when I look at my router’s app to find the WiFi address, I don’t see it listed as connected. When I try to find it in Terminal, it says it can’t find it. The green light on the Pi flashes intermittently in a random pattern. I can’t tell if that’s good or bad.

Suggestions? I know quite a bit about Apple and HomeKit but pretty much nothing about Raspberry Pi, Android, coding, etc. I was hoping this would be easy. Am I in over my head?

ETA: To clarify, it’s a Pi Zero W.

u/marmaladestripes725 — 4 days ago

Shelly relay ID issue

I recently installed a Shelly 1 Gen 4 relay with a reed switch on my dumb garage door opener, and while it works fine, I’d like it to show up in HomeKit as a garage door opener rather than an unconfigured switch. I’ve played around with a few of the Shelly plugins, but haven’t gotten them to work as well as Z2M. Any tips?

reddit.com
u/RiverDwellingInnuend — 5 days ago

Would this be good enough?

So I have wanted to start using homebridge for a while. Looking at prices of raspberry pi I decided to hold off till I had the spare cash as it’s not something I need to do NOW. But now I’ve seen this Mac mini on CEX. I know it’s old. But for £70 it’s hard to not think this is a good alternative? I understand the power consumption would be higher. But is it a good idea or shall I hold off and get a pi ?

u/callum1304 — 7 days ago

MacOS: VM or native?

Having RTFM and discovered that containers are not an option on MacOS, I’m debating running HB in a VM vs native on my M1 Mac. I set up a VirtualBox / Ubuntu VM yesterday, and HB runs very well in it, but the VM seems like a lot of overhead for a relatively lightweight service.

Would there be any downside to running HB natively on MacOS? Do MacOS updates impact HB?

reddit.com
u/Salmundo — 7 days ago

UniFi Relay and Garage Door Opener

I’ve been using the UniFi Protect plug-in for homebridge and it’s been working great. My HomeKit garage door opener just broke, so I installed a UniFi Relay to control my garage door opener. I can open and close the garage door fine but there are two issues.

  1. The UniFi Relay output shows up in HomeKit as a switch, not a garage door opener. This is a pain because I ca’t ask Siri to open the garage door, I have to ask Siri to turn on the garage door.
  2. The garage door state doesn’t show up in HomeKit so I can’t tell if the garage door is open.

Is there any way to get the UniFi Relay to show up as a native garage door opener with state in HomeKit? If not would this be possible with an update to the UniFi Protect plug-in for homebridge, or by switching to Home Assistant?

reddit.com
u/jeffzacharias — 7 days ago

Virtual machine or container?

I’ve been running HB for years on bare metal on a series of RPis (currently a 3B) along with Pi-hole, and lately they haven’t been getting along particularly well. Today I built a virtual machine on a Mac M1 in an Ubuntu VM and created a new HB bridge. Very fast, of course.

I’m a bit old fashioned and haven’t done too much with containers, they were starting to become prevalent about the time I stopped working in the industry. The times that I played around with Docker on the Mac, it seemed to consume a lot of resources (particularly RAM), which seemed unnecessary for something as light weight as HB. I have Podman installed, but haven’t done much with it.

Any guidance here?

UPDATE: containers aren’t an option on macOS per HB docs.

reddit.com
u/Salmundo — 7 days ago

Fan controls only on/off - no speed

I purchased Sofucor fans from Amazon. I set them up with the SmartLife App and connected them to Alexa. In both Apps I have full control - on/off, speed and forward/reverse.
I was able to bring these accessories into homebridge using the Alexa Smart Home plugin. With this plugin I can only turn the fans on and off - no speed. I am able to control brightness on all of my other dimmer switches
I tried several of the SmartLife/Tuya plugins with the same results on off only.
Is this a limitation of the fan hardware? Any other recommendations for getting the speed controls in homebridge?

Note: I am not using a wall controller switch with the fans. They are hardwired on and controlled with a remote or App.

reddit.com
u/jeffyboy526 — 11 days ago

Which TP-Link plugin?

I’ve been running the TPLink Smarthome plugin for ages, it’s been ok but has some issues, and the dev has put minimal maintenance into it in recent years. There are several alternatives, including Homebridge Kasa Python, which appears to be maintained.

Recommend a TP-Link plugin?

reddit.com
u/Salmundo — 10 days ago