Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

homebridge

homebridge50kApache-2.01.8.5TypeScript support: included

HomeKit support for the impatient

readme

Homebridge


Unlocking Door

Homebridge is a lightweight Node.js 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

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

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

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

changelog

Change Log

All notable changes to homebridge will be documented in this file. This project tries to adhere to Semantic Versioning.

v1.8.5 (2024-10-25)

Changed

  • support plugins with dots in their npm scope (#3687) (@gtalusan)
  • mark compatible with node v22
  • minor dependency updates

Homebridge Dependencies

  • hap-nodejs @ v0.12.3

v1.8.4 (2024-07-19)

Fixed

  • Fix default FirmwareRevision (#3644) (@hjdhjd)

Changed

  • Detect config interface on registerPlatform (#3609) (@duddu)
  • Updated dependencies, fix typedoc generation
  • Added log messaging about upcoming Homebridge v2.0.0 update
    • NOTICE TO USERS AND PLUGIN DEVELOPERS
      • Homebridge 2.0 is on the way and brings some breaking changes to existing plugins.
      • Please visit the following link to learn more about the changes and how to prepare:

Homebridge Dependencies

  • hap-nodejs @ v0.12.2

v1.8.3 (2024-06-19)

Changed

  • Updated dependencies (hap-nodejs)

Homebridge Dependencies

  • hap-nodejs @ v0.12.2

v1.8.2 (2024-05-16)

Changed

  • Updated dependencies (hap-nodejs)
  • correct comment for automatically added 'alpha' labels in labeler.yml (#3608) (@techm4te)

Homebridge Dependencies

  • hap-nodejs @ v0.12.1

v1.8.1 (2024-04-27)

Fixed

  • shared use of commander between homebridge and the UI repo

Other Changes

  • Update Discord Webhook

v1.8.0 (2024-04-20)

Added

  • allow for FirmwareRevision override in config
  • add GitHub labeler action
  • allow custom NODE_OPTIONS and DEBUG on child bridges
  • add logging success colour (#3581)
  • adds alpha publisher

Changed

  • improve README installation docs
  • updated dependencies
  • updated Discord Webhooks so notifications are seperated for release and pre-release
  • updated lint rules for imports
  • regenerate docs
  • update hap-nodejs version

Homebridge Dependencies

  • hap-nodejs @ v0.12.0

v1.7.0 (2023-11-04)

Reminder: Node.js v18.15.0 or later is required to run Homebridge.

Other Changes

v1.6.1 (2023-04-30)

Bug Fixes

  • Fixed an issue with the avahi advertiser on Synology that resulted in homebridge not starting by @Supereg in https://github.com/homebridge/HAP-NodeJS/pull/1003
  • Resolved an issue where developers weren't able to compile strict TypeScript projects against Homebridge

v1.6.0 (2022-11-26)

What's Changed

New Contributors

v1.5.1 (2022-10-25)

Changes

v1.5.0 (2022-06-22)

  • Add support for stopping / starting a child bridge via the Homebridge UI @oznu #3139

Other Changes

  • Add support for package.json exports field @ShogunPanda #3016, #3165

v1.4.1 (2022-04-29)

  • Upgraded HAP-NodeJS to v0.10.2
    • Fix an issue with network interface family detection when running Node.js 18 @oznu #947
    • Fixed memory leak with HomeKit DataStreams @Supereg #943
  • Strict plugin resolution option added to Homebridge plugin @oznu #3117
  • Replace https://git.io URLs as the service is being depreciated

Bug Fixes

This release upgrades various dependencies with bug fixes and security fixes.

v1.4.0 (2022-01-22)

  • HomeKit Secure Video @Supereg #3056
  • New advertiser: Avahi/D-Bus API @adriancable

Bug Fixes

  • Fix ES Module loading with absolute path @seydx #3070
  • Fix casing of generated inline docs @Supereg #3066

v1.3.9 (2021-12-29)

Bug Fixes

  • Fixed a crash occurring for any encrypted communication when running Node.js 17 on linux based machines #3046

v1.3.8 (2021-10-22)

  • PluginManager would abort plugin loading if one plugin encounters a loading error #3017

Other Changes

  • Move to centrally managed Issue form templates and GitHub Action workflows #3011

v1.3.6 (2021-11-10)

Notable changes

  • Added support for ESM modules and async plugin initializers #2915
  • Upgraded HAP-NodeJS to v0.9.7 providing bug fixes #3008

v1.3.5 (2021-10-08)

Notable changes

This version adds new services and characteristics introduced with iOS 15.

  • AccessCode and NFCAccess services and corresponding characteristics.
  • Services related to the support of Siri enabled HomeKit devices:
    • The following services were newly added: Assistant, SiriEndpoint
    • The following services received new optional characteristics: Siri and SmartSpeaker

Bug Fixes

This release upgrades various dependencies with bug fixes and security fixes.

This includes the dns-packet security vulnerability referenced under CVE-2021-23386. Only users who use the bonjour mdns advertiser are impacted by this vulnerability.

v1.3.4 (2021-03-16)

Bug Fixes

  • Fixed a characteristic warning for Cameras or Video Doorbells, which might be emitted on startup under certain conditions. This warning had no impact on the functionality of Cameras.

v1.3.3 (2021-03-10)

Bug Fixes

  • #2855 - Fixed an issue to handle the situation where Siri or a Home Hub sends unexpected values for the characteristic format type. This should fix the situations where accessories could be controlled from the Home app, but not via Siri and/or automations.

Other Changes

  • #2856 - Gracefully handle duplicate UUID errors when restoring the accessory cache.
  • Update HAP-NodeJS to v0.9.3.

v1.3.2 (2021-03-04)

Please make sure you have done the following before updating:

Notable Changes

Other Changes

  • Warnings about "slow" plugin characteristics will no longer be shown for external / unbridged accessories (typically Cameras or TVs) as these do not slow down the entire bridge.

v1.3.1 (2021-02-23)

Please make sure you have done the following before updating:

  • Read the full release notes for v1.3.0 if you have not already done so.
  • Updated all existing plugins to their latest version.
  • Create a backup of your Homebridge instance.
  • Review the mDNS Options that you may need to adjust after updating to Homebridge v1.3.x.

Notable Changes

  • #2820 - Automatically correct bad characteristic values provided by plugins in more cases, this should fix the vast majority of problems users were facing after upgrading to v1.3.0.
  • #2820 - Fix an issue where a child bridge would not load if another non-child-bridge plugin created a circular reference on the plugin's config object at runtime.
  • #2799 - The Current Temperature characteristic now has a default minimum value of -273.15 down from 0.
  • Characteristic warning messaging improvements.
  • Update HAP-NodeJS to v0.9.2.

v1.3.0 (2021-02-20)

Pre-Update Checklist

Please make sure you have done the following before updating:

  • Updated all existing plugins to their latest version.
  • Create a backup of your Homebridge instance.
  • Review the mDNS Options that you may need to adjust after updating to Homebridge v1.3.0.

Adaptive Lighting

The new Adaptive Lightning feature introduced with iOS 14 can now be used by plugin developers. Most of the actively maintained plugins already secretly added support for it.

Child Bridges

Child bridges allow any Homebridge platform or accessory to optionally run as its own independent accessory, separate from the main bridge, and in an isolated process. Running certain accessories in a child bridge can improve the general responsiveness and reliability of Homebridge.

Why you might run a child bridge:

  • To isolate plugin code from the main bridge - in this mode the plugin will run in its own child process, preventing it from ever crashing the main bridge if a fatal exception occurs.
    • If the child bridge process does crash, Homebridge will automatically restart it, without impacting the main bridge or other plugins.
  • To isolate slow plugins, preventing them from slowing down the main bridge or other plugins.
  • To gain the ability to restart individual accessories after a config change or plugin update without having to restart the main bridge or other plugins.
  • To gain all the benefits of running multiple instances of Homebridge without the management overhead.

Child bridge support is available for all existing plugins. You can enable it via the Homebridge UI on an accessory/platform basis from the "Bridge Settings" menu item:

Learn more about child bridges here: https://github.com/homebridge/homebridge/wiki/Child-Bridges

mDNS Advertiser Selection

Homebridge v1.3.0 ships with two different Bonjour/mDNS advertisers which users can choose from, Ciao and Bonjour HAP.

  • Homebridge v1.1.x shipped with Bonjour HAP
  • Homebridge v1.2.x shipped with Ciao

The default for new users will be Bonjour HAP, you can swap between the two from the "Homebridge Settings" screen in the Homebridge UI:

See https://github.com/homebridge/homebridge/wiki/mDNS-Options for more information.

Breaking Changes

The "mdns"."interface" option has been removed, please use "bridge"."bind" instead. This new option takes an array of interface names or IP addresses. You can also configure this option using the "Network Interfaces" option under the Homebridge Settings section of the UI.

See https://github.com/homebridge/homebridge/wiki/mDNS-Options for more information.

Other Notable Changes

  • Added the ability to disable individual plugins without having to remove their config from the config.json file.
  • Homebridge will no longer crash if a plugin cannot be found for a certain accessory / platform config block.
  • Improved stability with malfunctioning plugins or plugins which read/write handlers take too long to respond. You may have been there, where you whole Homebridge instance went down only because one plugin or accessory didn't behave properly. We have invested some time to reduce the possibility of such scenarios; or at least give hints where we can reliably detect that something gone wrong.
  • Plugin characteristics are now strictly validated, if an invalid value is passed in the bridge will now force it to a known good value and show a warning in the logs, this should prevent some of the "Not Responding" issues users have faced in the past.

Changes For Developers

Compatibility

Homebridge v1.3.0 does not introduce breaking changes for the majority of existing plugins, while you may see Characteristic Warnings in the logs, these are just issues that were already present prior to v1.3.0 - just hidden from view. You should update your plugins before updating Homebridge.

A large number of plugins have been tested during an extensive beta period, the results can be viewed here.

Rolling Back

If for any reason Homebridge v1.3.0 is not working for you, you can roll back to a previous version of Homebridge easily using the Homebridge UI.

See https://github.com/homebridge/homebridge/wiki/How-To-Change-Homebridge-Version for more information.

v1.2.5 (2020-12-28)

Bug Fixes

  • Updated HAP-NodeJS to v0.8.5 incorporating fixes made to the ciao mDNS library. Refer to the release notes of HAP-NodeJS for more technical details.

v1.2.4 (2020-12-05)

Bug Fixes

  • Updated the mdns library ciao to v1.1.0 introducing further stability improvements.

v1.2.3 (2020-09-21)

Bug Fixes

  • Updated the mdns library ciao to the latest version
    • Includes general bug fixes and stability improvements
    • Improved compatibility with machines running avahi
    • Fixed handling of updated ip addresses
    • Fixes for Darwin system running in a VM

v1.2.2 (2020-09-16)

Bug Fixes

  • Added a warning when a plugin takes too long to load and prevents homebridge from starting.
  • Update hap-nodejs to v0.8.2 resolving some advertising issues on some uncommon platforms

For Developers

  • Updated the typing of the accessory context to be any again to allow less strict typing. Though we encourage you to write your own Type Definition for better type safety!

v1.2.1 (2020-09-15)

Bug Fixes

  • Fixed a bug related to mdns discovery where on some machines (FreeBSD and some containerized installs) the accessory is not correctly advertised on the local network

v1.2.0 (2020-09-14)

Notable Changes

  • Updated HAP-Nodejs to v0.8.0 (see HAP-NodeJS release notes). This includes the rewritten bonjour/mdns library ciao, which improves Accessory discovery on the local network (#2619).
  • Add ability to type an accessory context using generics (2664)

v1.1.6 (2020-09-07)

Bug Fixes

  • Fixed an incompatibility introduced in v1.1.3 with the commander library

v1.1.3 (2020-09-03)

Bug Fixes

  • Updated HAP-Nodejs to v0.7.9 (see HAP-NodeJS release notes):
    • IP addresses for camera streaming endpoints are automatically and more reliably set
    • Added latest changes made to iOS 14 beta 4 and 5

v1.1.2 (2020-08-12)

Bug Fixes

  • #2646 - Fixed an issue with scoped plugin registration / cached accessory restoration.

v1.1.1 (2020-06-17)

Bug Fixes

v1.1.0 (2020-05-17)

Reminder: Node.js v10.17.0 or later is required to run Homebridge.

Notable Changes

  • Bumped API version to 2.6 with the following changes:
    • AccessoryPlugins and Accessory objects returned by StaticPlatformPlugins can now define the optional getControllers method to configure controllers like the RemoteController or CameraController
  • Updated HAP-Nodejs to v0.7.3.

Bug Fixes

  • #2551 Fixed a breaking change to the identify event on PlatformAccessory.

For Developers

Plugins Using TypeScript: Homebridge now only exports types that are safe to use in your code and won't result in the homebridge library being a runtime dependency. If you have been using types correctly then you will not be impacted by this change.

v1.0.4 (2020-04-30)

Bug Fixes

v1.0.3 (2020-04-29)

  • Some users were seemingly unable to pair new homebridge instances or encountered "no response" for all of their accessories if plugins chose to supply an empty serial number for their accessory information. This is now resolved.
  • Added a check that plugins can't expose an accessory with an empty set of services (which would also cause HomeKit reject the accessory)

v1.0.2 (2020-04-28)

Bug Fixes

  • #2527 Improve cached accessory resolution.
  • #2528 Removing orphaned cached accessories is now the default behavior.
    • The -R flag was deprecated. A new -K/--keep-orphans flag was introduced to disable this behavior.

v1.0.1 (2020-04-27)

Notable Changes

  • #2522 Allow plugins that have strict Homebridge version requirements to still load, instead an error message will be posted in the Homebridge logs letting users know they may face issues using the current version of the plugin.

v1.0.0 (2020-04-27)

Breaking Changes

  • The minimum Node.js version required is now v10.17.0.
  • Important notice: The update to the underlying HAP-NodeJS library brings many fixes to the HomeKit Accessory Protocol. One of those is the permission management of people you may have added to your Home. It is strongly recommended that you remove every person added to your Home and then invite them back into your home. This will ensure that permissions for all people in your home are downgraded correctly.
  • #2481 - Platforms will no longer load unless they have been explicitly configured in the config.json
  • #2482 - Dropped support for the BridgeSetupManager

If you encounter any issues in v1.0.0 you can roll back to v0.4.53 using this command:

sudo npm install -g --unsafe-perm homebridge@0.4.53

Notable Changes

  • #2476 - Project converted to Typescript by @Supereg
  • Homebridge API version was bumped to 2.5 with the following additions:
    • The signatures of registerAccessory and registerPlatform have been adjusted. The plugin name, which was passed as the first argument, can now be left out and will be determined automatically by homebridge.
    • The PlatformAccessory class received a new method configureController which can be used to access the new Controller API (used for Apple TV Remotes and Cameras) introduced with HAP-NodeJS 0.6.0
    • Cameras can now be added to the bridge using a DynamicPlatformPlugin and the methods configureCameraSource or configureController of the PlatformAccessory (removing the need to create an external accessory)
    • The hidden service and primary service properties are now properly restored for cached accessories
  • #2391 - HAP-NodeJS updated to 0.6.0 with some changes highlighted here:
    • HAP-NodeJS was converted to Typescript as well (thanks to @hassankhan)
    • Support for exposing Cameras through a Bridge was added
    • Support for Apple TV Remotes (with and without Siri Voice transmission) using the new RemoteController API
    • Introduction of the new CameraController API which improves on the existing API and opens the way for a possible future introduction of an API for HomeKit Secure Video
    • Introduced new APIs to mark a service as primary service
    • Added new characteristic property adminOnlyAccess to limit certain access rights to the home-owner
    • Added new services and characteristics for:
      • HomeKit Routers (WiFiRouter and WiFiSatellite services)
      • HomeKit Secure Video (CameraOperatingMode and CameraEventRecordingManagement services)
      • AccessControl service
      • SmartSpeaker service
      • PowerManagement service
      • TransferTransportManagement service
    • Updated to HAP Protocol Version 1.1.0:
      • Support of the HomeKit Data Stream (HDS) protocol (used by Remotes and Secure Video)
      • Support for Timed Writes and Write Responses
    • Fixed a bug in the encryption layer, which would sometimes encrypt events in the wrong order causing corrupted responses. This issue typically affected service which expose their state using 'target' characteristics and 'current' characteristics like Doors, Locks and Windows.
    • Improved HAP specification compatibility, while noting the following changes affecting compatibility:
      • For /characteristics PUT request the HAP server will return 204 No Content if all characteristic writes succeeded and 207 Multi-Status if at least one write failed or when a write-response is delivered.
      • For /characteristics GET request the HAP server will return 200 Success if all characteristic reads succeeded and 207 Multi-Status if at least one write failed.
      • The HAP server will now return short UUIDs for Apple predefined services and characteristics for the /accessories route.
    • Many, many more bug fixes and improvements.

Other Changes

  • Homebridge now exports TypeScript types that can be used in the development of plugins.

v0.4.53 (2020-03-18)

Notable Changes

  • Added the ability to use scoped npm modules as Homebridge plugins. This means plugin developers can now publish Homebridge plugins to npm under their own user or npm organisation, such as @username/homebridge-plugin.