<!doctype html>
<html class="default no-js">
<head>
	<meta charset="utf-8">
	<meta http-equiv="X-UA-Compatible" content="IE=edge">
	<title>homebridge</title>
	<meta name="description" content="Documentation for homebridge">
	<meta name="viewport" content="width=device-width, initial-scale=1">
	<link rel="stylesheet" href="assets/css/main.css">
	<script async src="assets/js/search.js" id="search-script"></script>
</head>
<body>
<header>
	<div class="tsd-page-toolbar">
		<div class="container">
			<div class="table-wrap">
				<div class="table-cell" id="tsd-search" data-index="assets/js/search.json" data-base=".">
					<div class="field">
						<label for="tsd-search-field" class="tsd-widget search no-caption">Search</label>
						<input id="tsd-search-field" type="text" />
					</div>
					<ul class="results">
						<li class="state loading">Preparing search index...</li>
						<li class="state failure">The search index is not available</li>
					</ul>
					<a href="index.html" class="title">homebridge</a>
				</div>
				<div class="table-cell" id="tsd-widgets">
					<div id="tsd-filter">
						<a href="#" class="tsd-widget options no-caption" data-toggle="options">Options</a>
						<div class="tsd-filter-group">
							<div class="tsd-select" id="tsd-filter-visibility">
								<span class="tsd-select-label">All</span>
								<ul class="tsd-select-list">
									<li data-value="public">Public</li>
									<li data-value="protected">Public/Protected</li>
									<li data-value="private" class="selected">All</li>
								</ul>
							</div>
							<input type="checkbox" id="tsd-filter-inherited" checked />
							<label class="tsd-widget" for="tsd-filter-inherited">Inherited</label>
						</div>
					</div>
					<a href="#" class="tsd-widget menu no-caption" data-toggle="menu">Menu</a>
				</div>
			</div>
		</div>
	</div>
	<div class="tsd-page-title">
		<div class="container">
			<h1>homebridge</h1>
		</div>
	</div>
</header>
<div class="container container-main">
	<div class="row">
		<div class="col-8 col-content">
			<div class="tsd-panel tsd-typography">
				<p align="center">
					<a href="https://homebridge.io"><img src="https://raw.githubusercontent.com/homebridge/branding/master/logos/homebridge-color-round-stylized.png" height="140"></a>
				</p>
				<span align="center">
					<a href="#homebridge" id="homebridge" style="color: inherit; text-decoration: none;">
						<h1>Homebridge</h1>
					</a>
					<p><a href="https://www.npmjs.com/package/homebridge"><img title="npm version" src="https://badgen.net/npm/v/homebridge?label=stable"></a>
						<a href="https://github.com/homebridge/homebridge/wiki/Homebridge-Beta-Testing"><img title="npm version" src="https://badgen.net/npm/v/homebridge/beta?label=beta"></a>
					<a href="https://www.npmjs.com/package/homebridge"><img title="npm downloads" src="https://badgen.net/npm/dt/homebridge"></a></p>
				</span>
				<img src="https://media.giphy.com/media/10l79ICohTu4iQ/giphy.gif" align="right" alt="Unlocking Door">
				<p><strong>Homebridge</strong> 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 &quot;smart home&quot; devices. </p>
				<p>Since Siri supports devices added through HomeKit, this means that with Homebridge you can ask Siri to control devices that don&#39;t have any support for HomeKit at all. For instance, using just some of the available plugins, you can say:</p>
				<ul>
					<li><em>Siri, unlock the back door.</em> [pictured to the right]</li>
					<li><em>Siri, open the garage door.</em></li>
					<li><em>Siri, turn on the coffee maker.</em> </li>
					<li><em>Siri, turn on the living room lights.</em></li>
					<li><em>Siri, good morning!</em></li>
				</ul>
				<p>You can explore all available plugins at the NPM website by <a href="https://www.npmjs.com/search?q=homebridge-plugin">searching for the keyword <code>homebridge-plugin</code></a>.</p>
				<a href="#community" id="community" style="color: inherit; text-decoration: none;">
					<h2>Community</h2>
				</a>
				<p>The official Homebridge Discord server and Reddit community are where users can discuss Homebridge and ask for help.</p>
				<span align="center">
					<p><a href="https://discord.gg/kqNCe2D"><img src="https://discordapp.com/api/guilds/432663330281226270/widget.png?style=banner2" alt="Homebridge Discord"></a> <a href="https://www.reddit.com/r/homebridge/"><img src=".github/homebridge-reddit.svg?sanitize=true" alt="Homebridge Reddit"></a></p>
				</span>
				<p>HomeKit communities can also be found on both <a href="https://discord.gg/RcV7fa8">Discord</a> and <a href="https://www.reddit.com/r/homekit">Reddit</a>.</p>
				<a href="#installation" id="installation" style="color: inherit; text-decoration: none;">
					<h2>Installation</h2>
				</a>
				<p>The <a href="https://github.com/homebridge/homebridge/wiki">Homebridge Wiki</a> contains step-by-step instruction on how to install Node.js and setup Homebridge and the <a href="https://github.com/oznu/homebridge-config-ui-x">Homebridge UI</a> as a service so it automatically starts on boot:</p>
				<ul>
					<li><a href="https://github.com/homebridge/homebridge-raspbian-image/wiki/Getting-Started">Official Homebridge Raspberry Pi Image</a></li>
					<li><a href="https://github.com/homebridge/homebridge/wiki/Install-Homebridge-on-Raspbian">Setup Homebridge on a Raspberry Pi (Raspbian)</a></li>
					<li><a href="https://github.com/homebridge/homebridge/wiki/Install-Homebridge-on-Debian-or-Ubuntu-Linux">Setup Homebridge on Debian or Ubuntu Linux</a></li>
					<li><a href="https://github.com/homebridge/homebridge/wiki/Install-Homebridge-on-Red-Hat%2C-CentOS-or-Fedora-Linux">Setup Homebridge on Red Hat, CentOS or Fedora Linux</a></li>
					<li><a href="https://github.com/homebridge/homebridge/wiki/Install-Homebridge-on-macOS">Setup Homebridge on macOS</a></li>
					<li><a href="https://github.com/homebridge/homebridge/wiki/Install-Homebridge-on-Windows-10">Setup Homebridge on Windows 10</a></li>
					<li><a href="https://github.com/homebridge/homebridge/wiki/Install-Homebridge-on-Docker">Setup Homebridge on Docker (Linux)</a></li>
					<li><a href="https://github.com/homebridge/homebridge/wiki/Other-Platforms">Other Platforms</a></li>
				</ul>
				<p>On other platforms, ensure you have <strong>Node.js v10.17.0</strong> or later installed and run:</p>
				<pre><code class="language-shell"><span style="color: #000000">sudo npm install -g --unsafe-perm homebridge</span>
</code></pre>
				<p>Then start Homebridge in your terminal window by running:</p>
				<pre><code class="language-shell"><span style="color: #000000">homebridge</span>
</code></pre>
				<a href="#installing-plugins" id="installing-plugins" style="color: inherit; text-decoration: none;">
					<h2>Installing Plugins</h2>
				</a>
				<p>Plugins are Node.js modules published through NPM and tagged with the keyword <code>homebridge-plugin</code>. They must have a name with the prefix <code>homebridge-</code>, like <strong>homebridge-mysmartlock</strong>.</p>
				<p>Plugins can publish Accessories and/or Platforms. Accessories are individual devices, like a smart switch or a garage door. Platforms act like a single device but can expose a set of devices, like a house full of smart lightbulbs.</p>
				<p>You install Plugins using the <a href="https://github.com/oznu/homebridge-config-ui-x">Homebridge UI</a>, or the same way you installed Homebridge - as a global NPM module. For example:</p>
				<pre><code class="language-shell"><span style="color: #000000">sudo npm install -g homebridge-dummy</span>
</code></pre>
				<p>You can explore all available plugins at the NPM website by <a href="https://www.npmjs.com/search?q=homebridge-plugin">searching for the keyword <code>homebridge-plugin</code></a>.</p>
				<a href="#adding-homebridge-to-ios" id="adding-homebridge-to-ios" style="color: inherit; text-decoration: none;">
					<h2>Adding Homebridge to iOS</h2>
				</a>
				<ol>
					<li>Open the Home <img src="https://user-images.githubusercontent.com/3979615/78010622-4ea1d380-738e-11ea-8a17-e6a465eeec35.png" height="16.42px"> app on your device.</li>
					<li>Tap the Home tab, then tap <img src="https://user-images.githubusercontent.com/3979615/78010869-9aed1380-738e-11ea-9644-9f46b3633026.png" height="16.42px">.</li>
					<li>Tap <em>Add Accessory</em>, then scan the QR code shown in the Homebridge UI or your Homebridge logs.</li>
				</ol>
				<p>If the bridge does not have any accessories yet, you may receive a message saying <em>Additional Set-up Required</em>, 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).</p>
				<p>Cameras and most TV devices are exposed as separate accessories and each needs to be paired separately. See <a href="https://github.com/homebridge/homebridge/wiki/Connecting-Homebridge-To-HomeKit#how-to-add-homebridge-cameras--tvs">this wiki article</a> for instructions.</p>
				<a href="#interacting-with-your-devices" id="interacting-with-your-devices" style="color: inherit; text-decoration: none;">
					<h2>Interacting with your Devices</h2>
				</a>
				<p>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.</p>
				<p>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 &quot;Radio&quot; and try saying &quot;Siri, turn on the Radio&quot; then Siri will probably start playing an iTunes Radio station on your phone. Even if you name it &quot;Sonos&quot; and say &quot;Siri, turn on the Sonos&quot;, Siri will probably just launch the Sonos app instead. This is why, for instance, the suggested <code>name</code> for the Sonos accessory is &quot;Speakers&quot;.</p>
				<a href="#plugin-development" id="plugin-development" style="color: inherit; text-decoration: none;">
					<h2>Plugin Development</h2>
				</a>
				<p>The <a href="https://developers.homebridge.io">https://developers.homebridge.io</a> website contains the Homebridge API reference, available service and characteristic types, and plugin examples.</p>
				<p>The <a href="https://github.com/homebridge/homebridge-plugin-template">Homebridge Plugin Template</a> project provides a base you can use to create your own <em>platform</em> plugin.</p>
				<p>There are many existing plugins you can study; you might start with the <a href="https://github.com/homebridge/homebridge-examples">Homebridge Example Plugins</a> or a plugin that already implements the device type you need.</p>
				<p>When writing your plugin, you&#39;ll want Homebridge to load it from your development directory instead of publishing it to <code>npm</code> each time. Run this command inside your plugin project folder so your global install of Homebridge can discover it:</p>
				<pre><code class="language-shell"><span style="color: #000000">npm link</span>
</code></pre>
				<p><em>You can undo this using the <code>npm unlink</code> command.</em></p>
				<p>Then start Homebridge in debug mode:</p>
				<pre><code class="language-shell"><span style="color: #000000">homebridge -D</span>
</code></pre>
				<p>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 <code>~/.homebridge</code>, for example:</p>
				<pre><code class="language-shell"><span style="color: #000000">homebridge -D -U ~/.homebridge-dev</span>
</code></pre>
				<p>This is very useful when you are already using your development machine to host a &quot;real&quot; Homebridge instance (with all your accessories) that you don&#39;t want to disturb.</p>
				<a href="#common-issues" id="common-issues" style="color: inherit; text-decoration: none;">
					<h2>Common Issues</h2>
				</a>
				<a href="#home-app-says-accessory-already-added" id="home-app-says-accessory-already-added" style="color: inherit; text-decoration: none;">
					<h3>Home App Says Accessory Already Added</h3>
				</a>
				<p>To fix this, <a href="https://github.com/homebridge/homebridge/wiki/Connecting-Homebridge-To-HomeKit#how-to-reset-homebridge">Reset Homebridge</a>.</p>
				<a href="#my-ios-app-can39t-find-homebridge" id="my-ios-app-can39t-find-homebridge" style="color: inherit; text-decoration: none;">
					<h3>My iOS App Can&#39;t Find Homebridge</h3>
				</a>
				<p>Try the following:</p>
				<ol>
					<li>Swap between the <code>Bonjour HAP</code> and <code>Ciao</code> mDNS Advertiser options. See <a href="https://github.com/homebridge/homebridge/wiki/mDNS-Options">the wiki</a> for more details.</li>
					<li>iOS DNS cache has gone stale or gotten misconfigured. To fix this, turn airplane mode on and back off to flush the DNS cache. </li>
				</ol>
				<a href="#limitations" id="limitations" style="color: inherit; text-decoration: none;">
					<h3>Limitations</h3>
				</a>
				<ul>
					<li>One bridge can only expose 150 accessories due to a HomeKit limit. You can however run your plugins as a <a href="https://github.com/homebridge/homebridge/wiki/Child-Bridges">Child Bridge</a> or run <a href="https://github.com/oznu/homebridge-config-ui-x/wiki/Homebridge-Service-Command#multiple-instances">Multiple Homebridge Instances</a> to get around this limitation.</li>
					<li>Once an accessory has been added to the Home app, changing its name via Homebridge won&#39;t be automatically reflected in iOS. You must change it via the Home app as well.</li>
				</ul>
				<a href="#why-homebridge" id="why-homebridge" style="color: inherit; text-decoration: none;">
					<h2>Why Homebridge?</h2>
				</a>
				<p>Technically, the device manufacturers should be the ones implementing the HomeKit API. And I&#39;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&#39;t bear to wait until &quot;real&quot; HomeKit devices are on the market.</p>
				<a href="#credit" id="credit" style="color: inherit; text-decoration: none;">
					<h2>Credit</h2>
				</a>
				<p>Homebridge was originally created by <a href="https://twitter.com/nfarina">Nick Farina</a>.</p>
				<p>The original HomeKit API work was done by <a href="https://twitter.com/khaost">Khaos Tian</a> in his <a href="https://github.com/homebridge/HAP-NodeJS">HAP-NodeJS</a> project.</p>
			</div>
		</div>
		<div class="col-4 col-menu menu-sticky-wrap menu-highlight">
			<nav class="tsd-navigation primary">
				<ul>
					<li class=" ">
						<a href="modules.html">Exports</a>
					</li>
				</ul>
			</nav>
			<nav class="tsd-navigation secondary menu-sticky">
				<ul class="before-current">
					<li class=" tsd-kind-enum">
						<a href="enums/apievent.html" class="tsd-kind-icon">APIEvent</a>
					</li>
					<li class=" tsd-kind-enum">
						<a href="enums/loglevel.html" class="tsd-kind-icon">Log<wbr>Level</a>
					</li>
					<li class=" tsd-kind-enum">
						<a href="enums/platformaccessoryevent.html" class="tsd-kind-icon">Platform<wbr>Accessory<wbr>Event</a>
					</li>
					<li class=" tsd-kind-enum">
						<a href="enums/plugintype.html" class="tsd-kind-icon">Plugin<wbr>Type</a>
					</li>
					<li class=" tsd-kind-class">
						<a href="classes/logger.html" class="tsd-kind-icon">Logger</a>
					</li>
					<li class=" tsd-kind-class tsd-has-type-parameter">
						<a href="classes/platformaccessory.html" class="tsd-kind-icon">Platform<wbr>Accessory</a>
					</li>
					<li class=" tsd-kind-class">
						<a href="classes/user.html" class="tsd-kind-icon">User</a>
					</li>
					<li class=" tsd-kind-interface">
						<a href="interfaces/api.html" class="tsd-kind-icon">API</a>
					</li>
					<li class=" tsd-kind-interface">
						<a href="interfaces/accessoryconfig.html" class="tsd-kind-icon">Accessory<wbr>Config</a>
					</li>
					<li class=" tsd-kind-interface">
						<a href="interfaces/accessoryplugin.html" class="tsd-kind-icon">Accessory<wbr>Plugin</a>
					</li>
					<li class=" tsd-kind-interface">
						<a href="interfaces/accessorypluginconstructor.html" class="tsd-kind-icon">Accessory<wbr>Plugin<wbr>Constructor</a>
					</li>
					<li class=" tsd-kind-interface">
						<a href="interfaces/bridgeconfiguration.html" class="tsd-kind-icon">Bridge<wbr>Configuration</a>
					</li>
					<li class=" tsd-kind-interface">
						<a href="interfaces/dynamicplatformplugin.html" class="tsd-kind-icon">Dynamic<wbr>Platform<wbr>Plugin</a>
					</li>
					<li class=" tsd-kind-interface">
						<a href="interfaces/externalportsconfiguration.html" class="tsd-kind-icon">External<wbr>Ports<wbr>Configuration</a>
					</li>
					<li class=" tsd-kind-interface">
						<a href="interfaces/homebridgeconfig.html" class="tsd-kind-icon">Homebridge<wbr>Config</a>
					</li>
					<li class=" tsd-kind-interface">
						<a href="interfaces/homebridgeoptions.html" class="tsd-kind-icon">Homebridge<wbr>Options</a>
					</li>
					<li class=" tsd-kind-interface">
						<a href="interfaces/independentplatformplugin.html" class="tsd-kind-icon">Independent<wbr>Platform<wbr>Plugin</a>
					</li>
					<li class=" tsd-kind-interface">
						<a href="interfaces/logging.html" class="tsd-kind-icon">Logging</a>
					</li>
					<li class=" tsd-kind-interface">
						<a href="interfaces/platformconfig.html" class="tsd-kind-icon">Platform<wbr>Config</a>
					</li>
					<li class=" tsd-kind-interface">
						<a href="interfaces/platformpluginconstructor.html" class="tsd-kind-icon">Platform<wbr>Plugin<wbr>Constructor</a>
					</li>
					<li class=" tsd-kind-interface">
						<a href="interfaces/plugininitializer.html" class="tsd-kind-icon">Plugin<wbr>Initializer</a>
					</li>
					<li class=" tsd-kind-interface">
						<a href="interfaces/staticplatformplugin.html" class="tsd-kind-icon">Static<wbr>Platform<wbr>Plugin</a>
					</li>
					<li class=" tsd-kind-type-alias">
						<a href="modules.html#accessoryidentifier" class="tsd-kind-icon">Accessory<wbr>Identifier</a>
					</li>
					<li class=" tsd-kind-type-alias">
						<a href="modules.html#accessoryname" class="tsd-kind-icon">Accessory<wbr>Name</a>
					</li>
					<li class=" tsd-kind-type-alias">
						<a href="modules.html#hap" class="tsd-kind-icon">HAP</a>
					</li>
					<li class=" tsd-kind-type-alias">
						<a href="modules.html#platformidentifier" class="tsd-kind-icon">Platform<wbr>Identifier</a>
					</li>
					<li class=" tsd-kind-type-alias">
						<a href="modules.html#platformname" class="tsd-kind-icon">Platform<wbr>Name</a>
					</li>
					<li class=" tsd-kind-type-alias">
						<a href="modules.html#pluginidentifier" class="tsd-kind-icon">Plugin<wbr>Identifier</a>
					</li>
					<li class=" tsd-kind-type-alias">
						<a href="modules.html#pluginname" class="tsd-kind-icon">Plugin<wbr>Name</a>
					</li>
					<li class=" tsd-kind-type-alias">
						<a href="modules.html#scopedpluginname" class="tsd-kind-icon">Scoped<wbr>Plugin<wbr>Name</a>
					</li>
					<li class=" tsd-kind-type-alias">
						<a href="modules.html#unknowncontext" class="tsd-kind-icon">Unknown<wbr>Context</a>
					</li>
				</ul>
			</nav>
		</div>
	</div>
</div>
<footer>
	<div class="container">
		<h2>Legend</h2>
		<div class="tsd-legend-group">
			<ul class="tsd-legend">
				<li class="tsd-kind-constructor tsd-parent-kind-interface"><span class="tsd-kind-icon">Constructor</span></li>
				<li class="tsd-kind-property tsd-parent-kind-interface"><span class="tsd-kind-icon">Property</span></li>
				<li class="tsd-kind-method tsd-parent-kind-interface"><span class="tsd-kind-icon">Method</span></li>
			</ul>
			<ul class="tsd-legend">
				<li class="tsd-kind-constructor tsd-parent-kind-class"><span class="tsd-kind-icon">Constructor</span></li>
				<li class="tsd-kind-property tsd-parent-kind-class"><span class="tsd-kind-icon">Property</span></li>
				<li class="tsd-kind-method tsd-parent-kind-class"><span class="tsd-kind-icon">Method</span></li>
			</ul>
			<ul class="tsd-legend">
				<li class="tsd-kind-property tsd-parent-kind-class tsd-is-static"><span class="tsd-kind-icon">Static property</span></li>
				<li class="tsd-kind-method tsd-parent-kind-class tsd-is-static"><span class="tsd-kind-icon">Static method</span></li>
			</ul>
		</div>
	</div>
</footer>
<div class="overlay"></div>
<script src="assets/js/main.js"></script>
</body>
</html>