homebridge README

The project's README from github.com/homebridge/homebridge. As one markdown file: README.md.

Homebridge


Unlocking Door

Homebridge is a lightweight Node.js server you can run on your home network to emulate the HomeKit Accessory Protocol (HAP). It supports plugins, which are community-contributed modules that provide a basic bridge from HomeKit to various 3rd-party APIs provided by manufacturers of "smart home" devices. From v2, plugins can also expose accessories over Matter for use with Apple Home, Google Home, Amazon Alexa, SmartThings and other Matter-capable controllers.

Homebridge is a free, non-commercial, community-driven open-source project. It is not affiliated with Apple, Google, Amazon, or the Connectivity Standards Alliance, and no part of it is offered as a paid or certified product.

Since Siri supports devices added through HomeKit, this means that with Homebridge you can ask Siri to control devices that don't have any support for HomeKit at all. For instance, using just some of the available plugins, you can say:

You can explore all available plugins at the NPM website by searching for the keyword homebridge-plugin.

Community

The official Homebridge Discord server and Reddit community are where users can discuss Homebridge and ask for help.

Homebridge Discord Homebridge Reddit

HomeKit communities can also be found on both Discord and Reddit.

Installation

raspbian

Raspberry Pi

Official Homebridge Raspberry Pi Image
Install Homebridge on Raspbian


linux

Linux

Debian or Ubuntu Linux | Red Hat, CentOS or Fedora Linux | Arch / Manjaro Linux|Install Homebridge on Arch Linux


macos

macOS

Install Homebridge on macOS


windows

Windows 10 / 11

Install Homebridge on Windows 10 / 11 Using Hyper V


docker

Docker

Install Homebridge on Docker
Synology | Unraid | QNAP | TrueNAS Scale


docker

Synology DSM

Install Homebridge on Synology DSM 7

Other Platforms

Other Platforms

Adding Homebridge to iOS

  1. Open the Home app on your device.
  2. Tap the Home tab, then tap .
  3. Tap Add Accessory, then scan the QR code shown in the Homebridge UI or your Homebridge logs.

If the bridge does not have any accessories yet, you may receive a message saying Additional Set-up Required, this is ok, as you add plugins they will show up in the Home app without the need to pair again (except for Cameras and TVs).

Cameras and most TV devices are exposed as separate accessories and each needs to be paired separately. See this wiki article for instructions.

Interacting with your Devices

Once your device has been added to HomeKit, you should be able to tell Siri to control your devices. However, realize that Siri is a cloud service, and iOS may need some time to synchronize your device information with iCloud.

One final thing to remember is that Siri will almost always prefer its default phrase handling over HomeKit devices. For instance, if you name your Sonos device "Radio" and try saying "Siri, turn on the Radio" then Siri will probably start playing an iTunes Radio station on your phone. Even if you name it "Sonos" and say "Siri, turn on the Sonos", Siri will probably just launch the Sonos app instead. This is why, for instance, the suggested name for the Sonos accessory is "Speakers".

Matter Support

Homebridge v2 introduces optional support for the Matter smart home standard, allowing plugins to expose their devices to any Matter-capable controller — Apple Home, Google Home, Amazon Alexa, Samsung SmartThings and others — alongside (or instead of) HomeKit.

[!IMPORTANT] Homebridge's Matter support is not certified by the Connectivity Standards Alliance (CSA) and Homebridge is not a "Matter product" in any commercial sense. It is a community, non-profit implementation that re-uses the open-source matter.js library to speak the protocol. Matter-certified controllers may treat uncertified bridges as "uncertified accessories" and display a warning during pairing — this is expected.

How it works

Limitations

For setup instructions and the latest list of supported device types, see the developer docs at https://github.com/homebridge-plugins/homebridge-matter/wiki.

Plugin Development

The https://developers.homebridge.io website contains the Homebridge API reference, available service and characteristic types, and plugin examples.

The Homebridge Plugin Template project provides a base you can use to create your own platform plugin.

There are many existing plugins you can study; you might start with the Homebridge Example Plugins or a plugin that already implements the device type you need.

When writing your plugin, you'll want Homebridge to load it from your development directory instead of publishing it to npm each time. Run this command inside your plugin project folder so your global installation of Homebridge can discover it:

npm link

You can undo this using the npm unlink command.

Then start Homebridge in debug mode:

homebridge -D

This will start up Homebridge and load your in-development plugin. Note that you can also direct Homebridge to load your configuration from somewhere besides the default ~/.homebridge, for example:

homebridge -D -U ~/.homebridge-dev

This is very useful when you are already using your development machine to host a "real" Homebridge instance (with all your accessories) that you don't want to disturb.

Common Issues

Home App Says Accessory Already Added

To fix this, Reset Homebridge.

My iOS App Can't Find Homebridge

Try the following:

  1. Swap between the Bonjour HAP and Ciao mDNS Advertiser options. See the wiki for more details.
  2. iOS DNS cache has gone stale or gotten misconfigured. To fix this, turn airplane mode on and back off to flush the DNS cache.

Limitations

Why Homebridge?

Technically, the device manufacturers should be the ones implementing the HomeKit API. And I'm sure they will - eventually. When they do, this project will be obsolete, and I hope that happens soon. In the meantime, Homebridge is a fun way to get a taste of the future, for those who just can't bear to wait until "real" HomeKit devices are on the market.

Homebridge is maintained on a volunteer basis by a community of contributors. There is no company behind it, nothing is sold, and no part of the project is certified or endorsed by Apple, Google, Amazon, the Connectivity Standards Alliance, or any device manufacturer. If a plugin or page asks you to pay for "Homebridge" itself, it isn't us.

Credit

homebridge (homebridge/homebridge)

Searching Database…

这是什么东西?Homebridge 是一个轻量级的 Node.js 服务器,运行在你的家庭网络里,它可以模拟 HomeKit 配件协议,让不支持 HomeKit 的智能家居设备也能通过 Apple 家庭 App 和 Siri 来控制。
这是我 iPhone 上的一个应用,还是要部署在服务器上的东西?它是一个服务器:一个轻量级的 Node.js 进程,跑在家庭网络里一台长期开机的机器上。你的 iPhone 只需要装 Apple 家庭 App,扫描二维码就能完成配对。
我在家里怎么把 Homebridge 跑起来?针对你的平台运行官方安装程序——支持树莓派、Debian/Ubuntu、Fedora、Arch、macOS、通过 Hyper-V 的 Windows 或 Docker——然后在 Apple 家庭 App 里扫描 Homebridge 界面上的二维码完成添加。
我可以用树莓派来跑吗,还是必须用一台像样的电脑?树莓派完全没问题——有官方的 Homebridge 树莓派镜像——任何长期开机的机器都可以:Linux、macOS、通过 Hyper-V 的 Windows、Docker,或者 Synology、Unraid 这类 NAS 也行。它需要 Node.js 22、24 或 26。
我能添加的设备数量有上限吗?HomeKit 限制一个网桥最多带 150 个配件——想超过这个数,可以用子网桥或多个 Homebridge 实例。另外,在 Homebridge 里重命名设备后,家庭 App 里的名字不会跟着更新,需要在家庭 App 里也改一次。
它只能配合 Apple 家庭用,还是也支持其他生态?现在不止了——v2 加入了对 Matter 的可选支持,插件可以把设备同时暴露给 Google Home、Alexa、SmartThings 和其他 Matter 控制器。不过这个实现没有经过认证,所以有些控制器在配对时会显示警告。
通过 Siri 进行语音控制,会不会经过苹果的云端?网桥本身在你自己的网络里本地运行,但 Siri 是一项云服务:iOS 会通过 iCloud 同步设备信息,所以语音控制依赖苹果的云端,响应有时需要一点时间才能跟上。
我到底能用它控制哪些设备?只要插件支持就行——借助现有的插件,你可以让 Siri 打开后门、打开车库门、启动咖啡机或开灯。可以在 npm 上浏览带 homebridge-plugin 关键字的插件。
为什么 Siri 有时不理我的设备,却去做了别的事?Siri 会优先按它自己内置的说法来处理:把设备命名为 'Radio',它可能就去播放 Apple Music 了。挑一个 Siri 已经在用的名字之外的名字——README 建议把 Sonos 音箱叫成 'Speakers'——然后给 iOS 一点时间通过 iCloud 完成同步。
摄像头和电视的配对方式和其他配件一样吗?不一样。摄像头和大多数电视设备是作为独立配件暴露的,每一个都需要单独配对,而不是通过主网桥一起接入。
作者为什么要自己做这个,而不是等厂商支持?HomeKit API 本应由厂商来实现,作者也希望他们最终能做到——让这个项目变得没必要。在那之前,对等不及的人来说,Homebridge 是提前体验那种未来的一种有趣方式。
Creator
homebridge
Size
5.1 MB
Stars
25.5K
Age
11y
Commits · 90 Days