• Stars
    star
    22,843
  • Rank 958 (Top 0.02 %)
  • Language
    TypeScript
  • License
    Apache License 2.0
  • Created over 9 years ago
  • Updated 5 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

HomeKit support for the impatient.

Homebridge

Unlocking Door

Homebridge is a lightweight NodeJS server you can run on your home network that emulates the iOS HomeKit API. 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.

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:

  • Siri, unlock the back door. [pictured to the right]
  • Siri, open the garage door.
  • Siri, turn on the coffee maker.
  • Siri, turn on the living room lights.
  • Siri, good morning!

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

The Homebridge Wiki contains step-by-step instruction on how to install Node.js and setup Homebridge and the Homebridge UI as a service so it automatically starts on boot:

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".

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 install 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

  • One bridge can only expose 150 accessories due to a HomeKit limit. You can however run your plugins as a Child Bridge or run Multiple Homebridge Instances to get around this limitation.
  • Once an accessory has been added to the Home app, changing its name via Homebridge won't be automatically reflected in iOS. You must change it via the Home app as well.

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.

Credit

Homebridge was originally created by Nick Farina.

The original HomeKit API work was done by Khaos Tian in his HAP-NodeJS project.

More Repositories

1

HAP-NodeJS

Node.js implementation of the HomeKit Accessory Protocol (HAP)
TypeScript
2,674
star
2

homebridge-config-ui-x

The Homebridge UI. Monitor, configure and backup Homebridge from a browser.
TypeScript
2,570
star
3

docker-homebridge

Homebridge Docker. HomeKit support for the impatient using Docker on x86_64, Raspberry Pi (armhf) and ARM64. Includes ffmpeg + libfdk-aac.
Shell
2,552
star
4

homebridge-raspbian-image

Official Homebridge Raspberry Pi Image based on Raspberry Pi OS Lite.
Shell
1,004
star
5

homebridge-syno-spk

Homebridge Package for Synology DSM 7.
Shell
596
star
6

verified

Plugins Verified by Homebridge
TypeScript
348
star
7

homebridge-plugin-template

A template you can use to create your own Homebridge plugins.
TypeScript
279
star
8

ffmpeg-for-homebridge

Static FFmpeg binaries for Homebridge with support for audio (libfdk-aac) and hardware-accelerated decoding and encoding (h264_qsv, h264_v4l2m2m, videotoolbox).
Shell
98
star
9

ciao

RFC 6762 and RFC 6763 compliant mdns service discovery library written in Typescript
TypeScript
77
star
10

homebridge-examples

Collection of homebridge plugin examples
TypeScript
77
star
11

plugin-ui-utils

Create fully customisable configuration user interfaces for Homebridge plugins.
TypeScript
29
star
12

homebridge-apt-pkg

Debian / Ubuntu package and repo for Homebridge
Shell
20
star
13

camera-utils

Utilities to simplify homebridge camera plugin development
TypeScript
18
star
14

homebridge.io

The https://homebridge.io website.
HTML
10
star
15

homebridge.github.io

Homebridge Plugin Development Documentation Website.
SCSS
10
star
16

HAP-NodeJS-examples

Collection of examples to get started using HAP-NodeJS as a library.
TypeScript
9
star
17

documentation

Placeholder repository for the Homebridge plugin development docs.
JavaScript
7
star
18

homebridge-macos-pkg

Work in progress. Homebridge macOS Installer.
Shell
7
star
19

branding

Homebridge branding guidelines, naming conventions, logo usage rules, and logo files.
7
star
20

.github

Global workflow files and community health files for the Homebridge organization.
7
star
21

hap-client

A client for an insecure HAP-NodeJS instance
TypeScript
6
star
22

mdns-diagnostics

Test tool to display HAP instances on your network
JavaScript
4
star
23

homebridge-plugin-camera-template

A template you can use to create your own Homebridge camera plugins.
TypeScript
2
star
24

plugin-repo

Bundles for Verified Homebridge Plugins
TypeScript
2
star