365 lines
No EOL
16 KiB
HTML
365 lines
No EOL
16 KiB
HTML
<!doctype html>
|
||
<!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]-->
|
||
<!--[if IE 7]> <html class="no-js lt-ie9 lt-ie8"> <![endif]-->
|
||
<!--[if IE 8]> <html class="no-js lt-ie9"> <![endif]-->
|
||
<!--[if gt IE 8]><!--> <html> <!--<![endif]-->
|
||
|
||
<head>
|
||
<meta charset="utf-8">
|
||
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
|
||
<title>Emulated Hue Bridge - Home Assistant</title>
|
||
<meta name="author" content="Home Assistant">
|
||
<meta name="description" content="Instructions how to emulated Hue Bridge within Home Assistant.">
|
||
|
||
<meta name="viewport" content="width=device-width">
|
||
<link rel="canonical" href="https://home-assistant.io/components/emulated_hue/">
|
||
|
||
<meta property="fb:app_id" content="338291289691179">
|
||
<meta property="og:title" content="Emulated Hue Bridge">
|
||
<meta property="og:site_name" content="Home Assistant">
|
||
<meta property="og:url" content="https://home-assistant.io/components/emulated_hue/">
|
||
<meta property="og:type" content="article">
|
||
<meta property="og:description" content="Instructions how to emulated Hue Bridge within Home Assistant.">
|
||
<meta property="og:image" content="https://home-assistant.io/images/default-social.png">
|
||
|
||
<meta name="twitter:card" content="summary_large_image">
|
||
<meta name="twitter:site" content="@home_assistant">
|
||
|
||
<meta name="twitter:title" content="Emulated Hue Bridge">
|
||
<meta name="twitter:description" content="Instructions how to emulated Hue Bridge within Home Assistant.">
|
||
<meta name="twitter:image" content="https://home-assistant.io/images/default-social.png">
|
||
|
||
<link href="/stylesheets/screen.css" media="screen, projection" rel="stylesheet">
|
||
<link href="/atom.xml" rel="alternate" title="Home Assistant" type="application/atom+xml">
|
||
<link rel='shortcut icon' href='/images/favicon.ico' />
|
||
<link rel='icon' type='image/png' href='/images/favicon-192x192.png' sizes='192x192' />
|
||
</head>
|
||
|
||
<body >
|
||
|
||
<header>
|
||
<div class="grid-wrapper">
|
||
<div class="grid">
|
||
|
||
<div class="grid__item three-tenths lap-two-sixths palm-one-whole ha-title">
|
||
<a href="/" class="site-title">
|
||
<img width='40' src='/demo/favicon-192x192.png'>
|
||
<span>Home Assistant</span>
|
||
</a>
|
||
</div>
|
||
|
||
<div class="grid__item seven-tenths lap-four-sixths palm-one-whole">
|
||
<nav>
|
||
<input type="checkbox" id="toggle">
|
||
<label for="toggle" class="toggle" data-open="Main Menu" data-close="Close Menu"></label>
|
||
<ul class="menu pull-right">
|
||
|
||
<li><a href="/getting-started/">Getting started</a></li>
|
||
<li><a href="/components/">Components</a></li>
|
||
<li><a href="/ecosystem/">Ecosystem</a></li>
|
||
<li><a href="/cookbook/">Examples</a></li>
|
||
<li><a href="/developers/">Developers</a></li>
|
||
<li><a href="/blog/">Blog</a></li>
|
||
<li><a href="/help/">Need help?</a></li>
|
||
</ul>
|
||
</nav>
|
||
</div>
|
||
|
||
</div>
|
||
</div>
|
||
</header>
|
||
|
||
|
||
|
||
<div class="grid-wrapper">
|
||
<div class="grid grid-center">
|
||
|
||
<div class="grid__item two-thirds lap-one-whole palm-one-whole">
|
||
|
||
|
||
<article class="page">
|
||
|
||
|
||
|
||
|
||
<header>
|
||
<h1 class="title indent">
|
||
Emulated Hue Bridge
|
||
</h1>
|
||
</header>
|
||
<hr class="divider">
|
||
|
||
|
||
<p>The <code class="highlighter-rouge">emulated_hue</code> component provides a virtual Philips Hue bridge, written entirely in software, that allows services that work with the Hue API to interact with Home Assistant
|
||
entities. The driving use case behind this functionality is to allow Home Assistant to work with an Amazon Echo or Google Home with no set up cost outside of configuration changes.
|
||
The virtual bridge has the ability to turn entities on or off, or change the brightness of dimmable lights. The volume level of media players can be controlled as brightness.</p>
|
||
|
||
<p class="note">
|
||
It is recommended to assign a static IP address to the computer running Home Assistant. This is because the Amazon Echo discovers devices by IP addresses, and if the IP changes, the Echo won’t be able to control it. This is easiest done from your router, see your router’s manual for details.
|
||
</p>
|
||
|
||
<h3><a class="title-link" name="configuration" href="#configuration"></a> Configuration</h3>
|
||
|
||
<p>To enable the emulated Hue bridge, add one of the following configs to your <code class="highlighter-rouge">configuration.yaml</code> file:</p>
|
||
|
||
<div class="language-yaml highlighter-rouge"><pre class="highlight"><code><span class="c1"># Amazon Echo example configuration.yaml entry</span>
|
||
<span class="s">emulated_hue</span><span class="pi">:</span>
|
||
</code></pre>
|
||
</div>
|
||
|
||
<div class="language-yaml highlighter-rouge"><pre class="highlight"><code><span class="c1"># Google Home example configuration.yaml entry</span>
|
||
<span class="s">emulated_hue</span><span class="pi">:</span>
|
||
<span class="s">type</span><span class="pi">:</span> <span class="s">google_home</span>
|
||
<span class="c1"># Google Home does not work on different ports.</span>
|
||
<span class="s">listen_port</span><span class="pi">:</span> <span class="s">80</span>
|
||
</code></pre>
|
||
</div>
|
||
|
||
<p>Configuration variables:</p>
|
||
|
||
<ul>
|
||
<li><strong>type</strong> (<em>Optional</em>): The type of assistant who we are emulated for. Either <code class="highlighter-rouge">alexa</code> or <code class="highlighter-rouge">google_home</code>.</li>
|
||
<li><strong>host_ip</strong> (<em>Optional</em>): The IP address that your Home Assistant installation is running on. If you do not specify this option, the component will attempt to determine the IP address on its own.</li>
|
||
<li><strong>listen_port</strong> (<em>Optional</em>): The port the Hue bridge API web server will run on. If not specified, this defaults to 8300. This can be any free port on your system.</li>
|
||
<li><strong>upnp_bind_multicast</strong> (<em>Optional</em>): Whether or not to bind the UPNP (SSDP) listener to the multicast address (239.255.255.250) or instead to the (unicast) host_ip address specified above (or automatically determined). The default is true, which will work for most situations. In special circumstances, like running in a FreeBSD or FreeNAS jail, you may need to disable this.</li>
|
||
<li>
|
||
<p><strong>off_maps_to_on_domains</strong> (<em>Optional</em>): The domains that maps an “off” command to an “on” command.</p>
|
||
|
||
<p>For example, if <code class="highlighter-rouge">script</code> is included in the list, and you ask Alexa to “turn off the <em>water plants</em> script,” the command will be handled as if you asked her to turn on the script.</p>
|
||
|
||
<p>If not specified, this defaults to the following list:</p>
|
||
|
||
<ul>
|
||
<li><code class="highlighter-rouge">script</code></li>
|
||
<li><code class="highlighter-rouge">scene</code></li>
|
||
</ul>
|
||
</li>
|
||
<li>
|
||
<p><strong>expose_by_default</strong> (<em>Optional</em>): Whether or not entities should be exposed via the bridge by default instead of explicitly (see the ‘emulated_hue’ customization below). If not specified, this defaults to true. Warning: If you have a lot of devices (more than 49 total across all exposed domains), you should be careful with this option. Exposing more devices than Alexa supports can result in it not seeing any of them. If you are having trouble getting any devices to show up, try disabling this, and explicitly exposing just a few devices at a time to see if that fixes it.</p>
|
||
</li>
|
||
<li><strong>exposed_domains</strong> (<em>Optional</em>): The domains that are exposed by default if <code class="highlighter-rouge">expose_by_default</code> is set to true. If not specified, this defaults to the following list:
|
||
<ul>
|
||
<li><code class="highlighter-rouge">switch</code></li>
|
||
<li><code class="highlighter-rouge">light</code></li>
|
||
<li><code class="highlighter-rouge">group</code></li>
|
||
<li><code class="highlighter-rouge">input_boolean</code></li>
|
||
<li><code class="highlighter-rouge">media_player</code></li>
|
||
<li><code class="highlighter-rouge">fan</code></li>
|
||
</ul>
|
||
</li>
|
||
</ul>
|
||
|
||
<p>A full configuration sample looks like the one below.</p>
|
||
|
||
<div class="language-yaml highlighter-rouge"><pre class="highlight"><code><span class="c1"># Example configuration.yaml entry</span>
|
||
<span class="s">emulated_hue</span><span class="pi">:</span>
|
||
<span class="s">host_ip</span><span class="pi">:</span> <span class="s">192.168.1.186</span>
|
||
<span class="s">listen_port</span><span class="pi">:</span> <span class="s">8300</span>
|
||
<span class="s">off_maps_to_on_domains</span><span class="pi">:</span>
|
||
<span class="pi">-</span> <span class="s">script</span>
|
||
<span class="pi">-</span> <span class="s">scene</span>
|
||
<span class="s">expose_by_default</span><span class="pi">:</span> <span class="s">true</span>
|
||
<span class="s">exposed_domains</span><span class="pi">:</span>
|
||
<span class="pi">-</span> <span class="s">light</span>
|
||
</code></pre>
|
||
</div>
|
||
|
||
<p>With additional customization you will be able to specify the behaviour of the existing entities.</p>
|
||
|
||
<div class="language-yaml highlighter-rouge"><pre class="highlight"><code><span class="c1"># Example customization</span>
|
||
<span class="s">homeassistant</span><span class="pi">:</span>
|
||
<span class="s">customize</span><span class="pi">:</span>
|
||
<span class="s">light.bedroom_light</span><span class="pi">:</span>
|
||
<span class="c1"># Don't allow light.bedroom_light to be controlled by the emulated Hue bridge</span>
|
||
<span class="s">emulated_hue</span><span class="pi">:</span> <span class="s">false</span>
|
||
<span class="s">light.office_light</span><span class="pi">:</span>
|
||
<span class="c1"># Address light.office_light as "back office light"</span>
|
||
<span class="s">emulated_hue_name</span><span class="pi">:</span> <span class="s2">"</span><span class="s">back</span><span class="nv"> </span><span class="s">office</span><span class="nv"> </span><span class="s">light"</span>
|
||
</code></pre>
|
||
</div>
|
||
|
||
<p>The following are attributes that can be applied in the <code class="highlighter-rouge">customize</code> section:</p>
|
||
|
||
<ul>
|
||
<li><strong>emulated_hue</strong> (<em>Optional</em>): Whether or not the entity should be exposed by the emulated Hue bridge. The default value for this attribute is controlled by the <code class="highlighter-rouge">expose_by_default</code> option.</li>
|
||
<li><strong>emulated_hue_name</strong> (<em>Optional</em>): The name that the emulated Hue will use. The default for this is the entity’s friendly name.</li>
|
||
</ul>
|
||
|
||
<h3><a class="title-link" name="troubleshooting" href="#troubleshooting"></a> Troubleshooting</h3>
|
||
|
||
<p>You can verify that the <code class="highlighter-rouge">emulated_hue</code> component has been loaded and is responding by pointing a local browser to the following URL:</p>
|
||
|
||
<ul>
|
||
<li><code class="highlighter-rouge">http://<HA IP Address>:8300/description.xml</code> - This URL should return a descriptor file in the form of an XML file.</li>
|
||
<li><code class="highlighter-rouge">http://<HA IP Address>:8300/api/pi/lights</code> - This will return a list of devices, lights, scenes, groups, etc.. that <code class="highlighter-rouge">emulated_hue</code> is exposing to Alexa.</li>
|
||
</ul>
|
||
|
||
<h3><a class="title-link" name="license" href="#license"></a> License</h3>
|
||
|
||
<p>Much of this code is based on work done by Bruce Locke on his <a href="https://github.com/blocke/ha-local-echo">ha-local-echo</a> project, originally released under the MIT License. The license is located <a href="https://github.com/blocke/ha-local-echo/blob/b9bf5dcaae6d8e305e2283179ffba64bde9ed29e/LICENSE">here</a>.</p>
|
||
|
||
|
||
</article>
|
||
|
||
|
||
</div>
|
||
|
||
|
||
<aside id="sidebar" class="grid__item one-third lap-one-whole palm-one-whole">
|
||
<div class="grid">
|
||
|
||
|
||
<section class="aside-module grid__item one-whole lap-one-half">
|
||
<div class='edit-github'><a href='https://github.com/home-assistant/home-assistant.github.io/tree/current/source/_components/emulated_hue.markdown'>Edit this page on GitHub</a></div>
|
||
<div class='brand-logo-container section'>
|
||
</div>
|
||
<div class='section'>
|
||
IoT class<sup><a href='/blog/2016/02/12/classifying-the-internet-of-things/#classifiers'><i class="icon-info-sign"></i></a></sup>: Local Push
|
||
</div>
|
||
<div class='section'>
|
||
Introduced in release: 0.27
|
||
</div>
|
||
<div class='section'>
|
||
<h1 class="title delta">Category Hub</h1>
|
||
<ul class='divided'>
|
||
<li>
|
||
<a href='/components/apcupsd/'>APCUPSd</a>
|
||
</li>
|
||
<li>
|
||
<a href='/components/wemo/'>Belkin WeMo</a>
|
||
</li>
|
||
<li>
|
||
<a href='/components/bloomsky/'>BloomSky</a>
|
||
</li>
|
||
<li>
|
||
<a href='/components/digital_ocean/'>Digital Ocean</a>
|
||
</li>
|
||
<li>
|
||
Emulated Hue Bridge
|
||
</li>
|
||
<li>
|
||
<a href='/components/enocean/'>EnOcean</a>
|
||
</li>
|
||
<li>
|
||
<a href='/components/ffmpeg/'>FFmpeg</a>
|
||
</li>
|
||
<li>
|
||
<a href='/components/homematic/'>Homematic</a>
|
||
</li>
|
||
<li>
|
||
<a href='/components/isy994/'>ISY994 Controller</a>
|
||
</li>
|
||
<li>
|
||
<a href='/components/insteon_local/'>Insteon (local)</a>
|
||
</li>
|
||
<li>
|
||
<a href='/components/insteon_hub/'>Insteon Hub</a>
|
||
</li>
|
||
<li>
|
||
<a href='/components/joaoapps_join/'>Joaoapps Join</a>
|
||
</li>
|
||
<li>
|
||
<a href='/components/litejet/'>LiteJet</a>
|
||
</li>
|
||
<li>
|
||
<a href='/components/mqtt/'>MQTT</a>
|
||
</li>
|
||
<li>
|
||
<a href='/components/mochad/'>Mochad</a>
|
||
</li>
|
||
<li>
|
||
<a href='/components/modbus/'>Modbus</a>
|
||
</li>
|
||
<li>
|
||
<a href='/components/mysensors/'>MySensors</a>
|
||
</li>
|
||
<li>
|
||
<a href='/components/neato/'>Neato Robotics</a>
|
||
</li>
|
||
<li>
|
||
<a href='/components/nest/'>Nest</a>
|
||
</li>
|
||
<li>
|
||
<a href='/components/netatmo/'>Netatmo</a>
|
||
</li>
|
||
<li>
|
||
<a href='/components/nuimo_controller/'>Nuimo controller</a>
|
||
</li>
|
||
<li>
|
||
<a href='/components/octoprint/'>OctoPrint</a>
|
||
</li>
|
||
<li>
|
||
<a href='/components/pilight/'>Pilight</a>
|
||
</li>
|
||
<li>
|
||
<a href='/components/qwikswitch/'>QwikSwitch QSUSB Hub</a>
|
||
</li>
|
||
<li>
|
||
<a href='/components/rfxtrx/'>RFXtrx</a>
|
||
</li>
|
||
<li>
|
||
<a href='/components/scsgate/'>SCSGate</a>
|
||
</li>
|
||
<li>
|
||
<a href='/components/sleepiq/'>SleepIQ</a>
|
||
</li>
|
||
<li>
|
||
<a href='/components/tellstick/'>TellStick</a>
|
||
</li>
|
||
<li>
|
||
<a href='/components/tellduslive/'>Telldus Live</a>
|
||
</li>
|
||
<li>
|
||
<a href='/components/vera/'>Vera</a>
|
||
</li>
|
||
<li>
|
||
<a href='/components/verisure/'>Verisure</a>
|
||
</li>
|
||
<li>
|
||
<a href='/components/wink/'>Wink</a>
|
||
</li>
|
||
<li>
|
||
<a href='/components/zwave/'>Z-Wave</a>
|
||
</li>
|
||
<li>
|
||
<a href='/components/ecobee/'>ecobee</a>
|
||
</li>
|
||
</ul>
|
||
</div>
|
||
</section>
|
||
|
||
</div>
|
||
</aside>
|
||
|
||
</div>
|
||
</div>
|
||
|
||
<footer>
|
||
<div class="grid-wrapper">
|
||
<div class="grid">
|
||
<div class="grid__item">
|
||
<div class="copyright">
|
||
<a rel="me" href='https://twitter.com/home_assistant'><i class="icon-twitter"></i></a>
|
||
<a rel="me" href='https://facebook.com/homeassistantio'><i class="icon-facebook"></i></a>
|
||
<a rel="me" href='https://plus.google.com/110560654828510104551'><i class="icon-google-plus"></i></a>
|
||
<a rel="me" href='https://github.com/home-assistant/home-assistant'><i class="icon-github"></i></a>
|
||
|
||
<div class="credit">
|
||
Contact us at <a href='mailto:hello@home-assistant.io'>hello@home-assistant.io</a>.<br>
|
||
Website powered by <a href='http://jekyllrb.com/'>Jekyll</a> and the <a href='https://github.com/coogie/oscailte'>Oscalite theme</a>.<br />
|
||
Hosted by <a href='https://pages.github.com/'>GitHub</a> and served by <a href='https://cloudflare.com'>CloudFlare</a>.
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</footer>
|
||
|
||
<script>
|
||
var _gaq=[['_setAccount','UA-57927901-1'],['_trackPageview']];
|
||
(function(d,t){var g=d.createElement(t),s=d.getElementsByTagName(t)[0];
|
||
g.src=('https:'==location.protocol?'//ssl':'//www')+'.google-analytics.com/ga.js';
|
||
s.parentNode.insertBefore(g,s)}(document,'script'));
|
||
</script>
|
||
</body>
|
||
</html> |