Site updated at 2016-08-22 08:21:42 UTC

This commit is contained in:
Travis CI 2016-08-22 08:21:43 +00:00
parent f9d65cbe57
commit 4acb07bf8e
559 changed files with 18878 additions and 21688 deletions

View file

@ -93,7 +93,7 @@
<ul class="tags unstyled">
<li><a class='category' href='/blog/categories/release-notes/'>Release-Notes</a></li>
<li>Release-Notes</li>
</ul>
@ -123,14 +123,12 @@
<h3>Enabling the notify component</h3>
<p>To enable the new notify component, add the following to your <code>home-assistant.conf</code>:</p>
<p>To enable the new notify component, add the following to your <code class="highlighter-rouge">home-assistant.conf</code>:</p>
<div class="highlighter-coderay"><div class="CodeRay">
<div class="code"><pre>[notify]
platform=pushbullet
api_key=ABCDEFGHJKLMNOPQRSTUVXYZ
</pre></div>
</div>
<div class="language-conf highlighter-rouge"><pre class="highlight"><code>[<span class="n">notify</span>]
<span class="n">platform</span>=<span class="n">pushbullet</span>
<span class="n">api_key</span>=<span class="n">ABCDEFGHJKLMNOPQRSTUVXYZ</span>
</code></pre>
</div>
<p>You can get your api key from <a href="https://www.pushbullet.com/account">your account page on PushBullet.com</a>.</p>
@ -139,14 +137,12 @@ api_key=ABCDEFGHJKLMNOPQRSTUVXYZ
<p>To be able to send messages, the notify component has to be loaded and initialized successfully.</p>
<div class="highlighter-coderay"><div class="CodeRay">
<div class="code"><pre><span class="keyword">import</span> <span class="include">homeassistant.loader</span> <span class="keyword">as</span> loader
<div class="language-python highlighter-rouge"><pre class="highlight"><code><span class="kn">import</span> <span class="nn">homeassistant.loader</span> <span class="kn">as</span> <span class="nn">loader</span>
<span class="keyword">def</span> <span class="function">setup</span>(hass, config):
notify = loader.get_component(<span class="string"><span class="delimiter">'</span><span class="content">notify</span><span class="delimiter">'</span></span>)
notify.send_message(hass, <span class="string"><span class="delimiter">&quot;</span><span class="content">Hello from my component!</span><span class="delimiter">&quot;</span></span>)
</pre></div>
</div>
<span class="k">def</span> <span class="nf">setup</span><span class="p">(</span><span class="n">hass</span><span class="p">,</span> <span class="n">config</span><span class="p">):</span>
<span class="n">notify</span> <span class="o">=</span> <span class="n">loader</span><span class="o">.</span><span class="n">get_component</span><span class="p">(</span><span class="s">'notify'</span><span class="p">)</span>
<span class="n">notify</span><span class="o">.</span><span class="n">send_message</span><span class="p">(</span><span class="n">hass</span><span class="p">,</span> <span class="s">"Hello from my component!"</span><span class="p">)</span>
</code></pre>
</div>
</article>
@ -221,7 +217,7 @@ api_key=ABCDEFGHJKLMNOPQRSTUVXYZ
<li class="post">
<a href="/blog/2016/08/13/foursquare-fast-com-ffmpeg-gpsd/">0.26: Foursquare, Fast.com, FFMPEG and GPSD</a>
<a href="/blog/2016/08/13/foursquare-fast.com-ffmpeg-gpsd/">0.26: Foursquare, Fast.com, FFMPEG and GPSD</a>
</li>

View file

@ -87,13 +87,13 @@
<div class="meta clearfix">
<time datetime="2015-01-11T21:49:08+00:00" pubdate data-updated="true"><i class="icon-calendar"></i> January 11, 2015</time>
<span class="byline author vcard"><i class='icon-user'></i> Paulus Schoutsen</span>
<span><i class='icon-time'></i> less than one minute reading time</span>
<span><i class='icon-time'></i> Less than one minute reading time</span>
<span>
<i class="icon-tags"></i>
<ul class="tags unstyled">
<li><a class='category' href='/blog/categories/release-notes/'>Release-Notes</a></li>
<li>Release-Notes</li>
</ul>
@ -114,12 +114,10 @@
<p>Most devices still require some sort of interaction from the user after being discovered - be it a button being pressed or some sort of authentication. This is a challenge that will be solved in the future.</p>
<p>To enable the discovery component, add the following to your <code>home-assistant.conf</code>:</p>
<p>To enable the discovery component, add the following to your <code class="highlighter-rouge">home-assistant.conf</code>:</p>
<div class="highlighter-coderay"><div class="CodeRay">
<div class="code"><pre>[discovery]
</pre></div>
</div>
<div class="language-conf highlighter-rouge"><pre class="highlight"><code>[<span class="n">discovery</span>]
</code></pre>
</div>
<p>A new <a href="/developers/add_new_platform/#discovery">discovery section</a> has been added to the Adding a new platform page with instructions how to make your platform discoverable.</p>
@ -196,7 +194,7 @@
<li class="post">
<a href="/blog/2016/08/13/foursquare-fast-com-ffmpeg-gpsd/">0.26: Foursquare, Fast.com, FFMPEG and GPSD</a>
<a href="/blog/2016/08/13/foursquare-fast.com-ffmpeg-gpsd/">0.26: Foursquare, Fast.com, FFMPEG and GPSD</a>
</li>

View file

@ -87,13 +87,13 @@
<div class="meta clearfix">
<time datetime="2015-01-13T16:29:04+00:00" pubdate data-updated="true"><i class="icon-calendar"></i> January 13, 2015</time>
<span class="byline author vcard"><i class='icon-user'></i> Paulus Schoutsen</span>
<span><i class='icon-time'></i> less than one minute reading time</span>
<span><i class='icon-time'></i> Less than one minute reading time</span>
<span>
<i class="icon-tags"></i>
<ul class="tags unstyled">
<li><a class='category' href='/blog/categories/release-notes/'>Release-Notes</a></li>
<li>Release-Notes</li>
</ul>
@ -116,15 +116,13 @@
<p>The new integration exists out of two parts: a generic thermostat component and a Nest platform implementation. The initial version implements provides a read-only card and services to control it. The plan is in the future to add temperature and away mode controls from the thermostat card and more info dialog. Internally, we are using the Python package <a href="https://github.com/jkoelker/python-nest">python-nest by jkoelker</a> to talk to the Nest.</p>
<p>If you own a Nest thermostat, add the following lines to your <code>home-assistant.conf</code>:</p>
<p>If you own a Nest thermostat, add the following lines to your <code class="highlighter-rouge">home-assistant.conf</code>:</p>
<div class="highlighter-coderay"><div class="CodeRay">
<div class="code"><pre>[thermostat]
platform=nest
username=YOUR_USERNAME
password=YOUR_PASSWORD
</pre></div>
</div>
<div class="language-conf highlighter-rouge"><pre class="highlight"><code>[<span class="n">thermostat</span>]
<span class="n">platform</span>=<span class="n">nest</span>
<span class="n">username</span>=<span class="n">YOUR_USERNAME</span>
<span class="n">password</span>=<span class="n">YOUR_PASSWORD</span>
</code></pre>
</div>
</article>
@ -199,7 +197,7 @@ password=YOUR_PASSWORD
<li class="post">
<a href="/blog/2016/08/13/foursquare-fast-com-ffmpeg-gpsd/">0.26: Foursquare, Fast.com, FFMPEG and GPSD</a>
<a href="/blog/2016/08/13/foursquare-fast.com-ffmpeg-gpsd/">0.26: Foursquare, Fast.com, FFMPEG and GPSD</a>
</li>

View file

@ -93,7 +93,7 @@
<ul class="tags unstyled">
<li><a class='category' href='/blog/categories/release-notes/'>Release-Notes</a></li>
<li>Release-Notes</li>
</ul>
@ -110,13 +110,13 @@
<p>I have just merged the latest version of the development branch into master. Here are some of the highlights of this release:</p>
<p><strong>Configuration via the frontend</strong><br /><br />
Phliips Hue will now be auto discovered and uses the new <code>configurator</code> component to interact with the user to finish the setup process.</p>
<p><strong>Configuration via the frontend</strong><br />
Phliips Hue will now be auto discovered and uses the new <code class="highlighter-rouge">configurator</code> component to interact with the user to finish the setup process.</p>
<p><strong>Wink Hub support</strong><br /><br />
<p><strong>Wink Hub support</strong><br />
Thanks to the work done by John McLaughlin and Geoff Norton we now support the lights, switches and sensors that are connected to the Wink hub.</p>
<p><strong>The getting started guide and component page have been reorganized</strong><br /><br />
<p><strong>The getting started guide and component page have been reorganized</strong><br />
The getting started instructions have been split into separate pages per component and a general overview page. The goal is to have a page per component that describes:</p>
<ul>
@ -127,11 +127,11 @@ The getting started instructions have been split into separate pages per compone
<li>Additional development tips</li>
</ul>
<p><strong>More reasonable errors</strong><br /><br />
<p><strong>More reasonable errors</strong><br />
Home Assistant should now throw better errors and offer solutions if you do not have the right version of Python 3, forgot to clone the git submodules or install the dependencies.</p>
<p><strong>Streamlined first launch</strong><br /><br />
Home Assistant now supports <code>--open-ui</code> and <code>--demo-mode</code> command line properties to open the browser automatically and have something to show. Home Assistant now supports to be run without a password, allowing the interface to login automatically on launch.</p>
<p><strong>Streamlined first launch</strong><br />
Home Assistant now supports <code class="highlighter-rouge">--open-ui</code> and <code class="highlighter-rouge">--demo-mode</code> command line properties to open the browser automatically and have something to show. Home Assistant now supports to be run without a password, allowing the interface to login automatically on launch.</p>
</article>
@ -205,7 +205,7 @@ Home Assistant now supports <code>--open-ui</code> and <code>--demo-mode</code>
<li class="post">
<a href="/blog/2016/08/13/foursquare-fast-com-ffmpeg-gpsd/">0.26: Foursquare, Fast.com, FFMPEG and GPSD</a>
<a href="/blog/2016/08/13/foursquare-fast.com-ffmpeg-gpsd/">0.26: Foursquare, Fast.com, FFMPEG and GPSD</a>
</li>

View file

@ -93,7 +93,7 @@
<ul class="tags unstyled">
<li><a class='category' href='/blog/categories/release-notes/'>Release-Notes</a></li>
<li>Release-Notes</li>
</ul>
@ -119,7 +119,7 @@
<p>Adding history to the UI was a challenge on itself because the old UI did not support easy navigation. So to add to the awesomeness of this release, Home Assistant also got a face lift.</p>
<p>The history component will be enabled for new users by default. For current users, run <code>scripts/update</code> to upgrade to the latest version and add <code>[history]</code> to your <code>home-assistant.conf</code> file.</p>
<p>The history component will be enabled for new users by default. For current users, run <code class="highlighter-rouge">scripts/update</code> to upgrade to the latest version and add <code class="highlighter-rouge">[history]</code> to your <code class="highlighter-rouge">home-assistant.conf</code> file.</p>
<p class="img">
<a href="/images/screenshots/component_history_24h.png">
@ -213,7 +213,7 @@ Events are saved in a local database. Google Graphs is used to draw the graph. D
<li class="post">
<a href="/blog/2016/08/13/foursquare-fast-com-ffmpeg-gpsd/">0.26: Foursquare, Fast.com, FFMPEG and GPSD</a>
<a href="/blog/2016/08/13/foursquare-fast.com-ffmpeg-gpsd/">0.26: Foursquare, Fast.com, FFMPEG and GPSD</a>
</li>

View file

@ -93,7 +93,7 @@
<ul class="tags unstyled">
<li><a class='category' href='/blog/categories/release-notes/'>Release-Notes</a></li>
<li>Release-Notes</li>
</ul>
@ -116,7 +116,7 @@
<a name="read-more"></a>
<p>Streaming updates has been implemented using the HTML5 <code>EventSource</code> tag. Implementation is pretty straight forward as all the reconnection logic will be handled by the event source tag. The <a href="https://github.com/home-assistant/home-assistant/blob/master/homeassistant/components/api.py#L90">server-side code</a> is 50 lines and the <a href="https://github.com/home-assistant/home-assistant-js/blob/master/src/actions/stream.js">client-side code</a> is 80 lines of code.</p>
<p>Streaming updates has been implemented using the HTML5 <code class="highlighter-rouge">EventSource</code> tag. Implementation is pretty straight forward as all the reconnection logic will be handled by the event source tag. The <a href="https://github.com/home-assistant/home-assistant/blob/master/homeassistant/components/api.py#L90">server-side code</a> is 50 lines and the <a href="https://github.com/home-assistant/home-assistant-js/blob/master/src/actions/stream.js">client-side code</a> is 80 lines of code.</p>
<p>All events that happen on the server will now also be sent to the browser. This turns any browser running the UI into a fully functioning <a href="https://home-assistant.io/developers/architecture/#multiple-connected-instances">slave instance</a> of Home Assistant. This opens up new possibilities for Home Assistant components that live completely client-side.</p>
@ -124,7 +124,7 @@
<p>A connection can go stale in Chrome without any event handler being called. This happens when a device goes into standby. For computers this is rare but for phones this occurs quite often. This has been solved by sending a regular ping from the server. The frontend will assume the connection has gone stale when it hasnt heard any communication for a while. Sending a ping will also help the server detect broken connections and clean them up.</p>
<p>Another issue that I encountered is that Safari and Firefox would not fire the <code>open</code> event when the connection has been opened but when the first message has been received. To work around this the server will now fire a ping when the connection gets opened.</p>
<p>Another issue that I encountered is that Safari and Firefox would not fire the <code class="highlighter-rouge">open</code> event when the connection has been opened but when the first message has been received. To work around this the server will now fire a ping when the connection gets opened.</p>
</article>
@ -198,7 +198,7 @@
<li class="post">
<a href="/blog/2016/08/13/foursquare-fast-com-ffmpeg-gpsd/">0.26: Foursquare, Fast.com, FFMPEG and GPSD</a>
<a href="/blog/2016/08/13/foursquare-fast.com-ffmpeg-gpsd/">0.26: Foursquare, Fast.com, FFMPEG and GPSD</a>
</li>

View file

@ -87,13 +87,13 @@
<div class="meta clearfix">
<time datetime="2015-03-01T19:38:00+00:00" pubdate data-updated="true"><i class="icon-calendar"></i> March 1, 2015</time>
<span class="byline author vcard"><i class='icon-user'></i> Theodor Lindquist</span>
<span><i class='icon-time'></i> less than one minute reading time</span>
<span><i class='icon-time'></i> Less than one minute reading time</span>
<span>
<i class="icon-tags"></i>
<ul class="tags unstyled">
<li><a class='category' href='/blog/categories/release-notes/'>Release-Notes</a></li>
<li>Release-Notes</li>
</ul>
@ -188,7 +188,7 @@
<li class="post">
<a href="/blog/2016/08/13/foursquare-fast-com-ffmpeg-gpsd/">0.26: Foursquare, Fast.com, FFMPEG and GPSD</a>
<a href="/blog/2016/08/13/foursquare-fast.com-ffmpeg-gpsd/">0.26: Foursquare, Fast.com, FFMPEG and GPSD</a>
</li>

View file

@ -87,13 +87,13 @@
<div class="meta clearfix">
<time datetime="2015-03-08T22:16:10+00:00" pubdate data-updated="true"><i class="icon-calendar"></i> March 8, 2015</time>
<span class="byline author vcard"><i class='icon-user'></i> Paulus Schoutsen</span>
<span><i class='icon-time'></i> less than one minute reading time</span>
<span><i class='icon-time'></i> Less than one minute reading time</span>
<span>
<i class="icon-tags"></i>
<ul class="tags unstyled">
<li><a class='category' href='/blog/categories/organisation/'>Organisation</a></li>
<li>Organisation</li>
</ul>
@ -189,7 +189,7 @@ The old logo, the new detailed logo and the new simple logo.
<li class="post">
<a href="/blog/2016/08/13/foursquare-fast-com-ffmpeg-gpsd/">0.26: Foursquare, Fast.com, FFMPEG and GPSD</a>
<a href="/blog/2016/08/13/foursquare-fast.com-ffmpeg-gpsd/">0.26: Foursquare, Fast.com, FFMPEG and GPSD</a>
</li>

View file

@ -93,7 +93,7 @@
<ul class="tags unstyled">
<li><a class='category' href='/blog/categories/release-notes/'>Release-Notes</a></li>
<li>Release-Notes</li>
</ul>
@ -110,50 +110,44 @@
<p>It has only been a little over a week since Theodor introduced YAML support for Home Assistant but so much has already happened that it is time for a summary of recent changes. Before mentioning the highlights I want to thank <a href="https://github.com/andythigpen">andythigpen</a>, <a href="https://github.com/jamespcole">jamespcole</a> and <a href="https://github.com/theolind">theolind</a> for numerous bug fixes, enhancements and new contributions. Thanks!</p>
<p><strong>Monitor local resources.</strong><br /><br />
<p><strong>Monitor local resources.</strong><br />
Theodor has contributed a new sensor platform to allow you to monitor disk usage, memory usage, CPU usage and running processes. This platform has superseded the process component which is now considered deprecated.</p>
<div class="highlighter-coderay"><div class="CodeRay">
<div class="code"><pre><span class="comment"># Example configuration.yaml entry</span>
<span class="key">sensor</span>:
- <span class="string"><span class="content">platform: systemmonitor</span></span>
<span class="key">resources</span>:
- <span class="string"><span class="content">type: disk_use_percent</span></span>
<span class="key">arg</span>: <span class="string"><span class="content">/home</span></span>
- <span class="string"><span class="content">type: memory_free</span></span>
- <span class="string"><span class="content">type: process</span></span>
<span class="key">arg</span>: <span class="string"><span class="content">kodi</span></span>
</pre></div>
</div>
<div class="language-yaml highlighter-rouge"><pre class="highlight"><code><span class="c1"># Example configuration.yaml entry</span>
<span class="s">sensor</span><span class="pi">:</span>
<span class="pi">-</span> <span class="s">platform</span><span class="pi">:</span> <span class="s">systemmonitor</span>
<span class="s">resources</span><span class="pi">:</span>
<span class="pi">-</span> <span class="s">type</span><span class="pi">:</span> <span class="s">disk_use_percent</span>
<span class="s">arg</span><span class="pi">:</span> <span class="s">/home</span>
<span class="pi">-</span> <span class="s">type</span><span class="pi">:</span> <span class="s">memory_free</span>
<span class="pi">-</span> <span class="s">type</span><span class="pi">:</span> <span class="s">process</span>
<span class="s">arg</span><span class="pi">:</span> <span class="s">kodi</span>
</code></pre>
</div>
<p><strong>Experimental Z-Wave support</strong><br /><br />
<p><strong>Experimental Z-Wave support</strong><br />
There is now experimental support for connecting Z-Wave networks using a Z-Wave USB stick. Right now it only integrates Z-Wave sensors into Home Assistant. Our goal is to get this tested by more people before adding support for other Z-Wave devices.</p>
<p>The new component is built on top of <a href="https://code.google.com/p/python-openzwave/">python-openzwave</a>. This package is currently not distributed on PyPi so weve added a script <code>scripts/build_python_openzwave</code> to install it on your machine. Alternatively you can use the Docker image which is ready to go.</p>
<p>The new component is built on top of <a href="https://code.google.com/p/python-openzwave/">python-openzwave</a>. This package is currently not distributed on PyPi so weve added a script <code class="highlighter-rouge">scripts/build_python_openzwave</code> to install it on your machine. Alternatively you can use the Docker image which is ready to go.</p>
<p>The development was done using an AEON Z-Wave USB stick and an AEON Z-Wave MultiSensor.</p>
<div class="highlighter-coderay"><div class="CodeRay">
<div class="code"><pre><span class="comment"># Example configuration.yaml entry</span>
<span class="key">zwave</span>:
<span class="key">usb_path</span>: <span class="string"><span class="content">/dev/ttyUSB0</span></span>
</pre></div>
</div>
<div class="language-yaml highlighter-rouge"><pre class="highlight"><code><span class="c1"># Example configuration.yaml entry</span>
<span class="s">zwave</span><span class="pi">:</span>
<span class="s">usb_path</span><span class="pi">:</span> <span class="s">/dev/ttyUSB0</span>
</code></pre>
</div>
<p><strong>Voice control</strong><br /><br />
<p><strong>Voice control</strong><br />
An initial version of voice control for Home Assistant has landed. The current implementation consists of two parts.</p>
<p>The first part is a component called <code>conversation</code> that exposes the service <code>conversation/process</code>. This service is capable of processing text and translating them into commands for devices. For now it will only support commands in the format of <code>Turn &lt;Friendly Name&gt; &lt;on/off&gt;</code>.</p>
<p>The first part is a component called <code class="highlighter-rouge">conversation</code> that exposes the service <code class="highlighter-rouge">conversation/process</code>. This service is capable of processing text and translating them into commands for devices. For now it will only support commands in the format of <code class="highlighter-rouge">Turn &lt;Friendly Name&gt; &lt;on/off&gt;</code>.</p>
<p>The second part is an upgrade to the frontend to use the speech-to-text in Chrome to allow users to speak commands. If youre using Chrome, you can test this out in <a href="/demo/">the demo</a>.</p>
<div class="highlighter-coderay"><div class="CodeRay">
<div class="code"><pre><span class="comment"># Example configuration.yaml entry</span>
<span class="key">conversation</span>:
</pre></div>
</div>
<div class="language-yaml highlighter-rouge"><pre class="highlight"><code><span class="c1"># Example configuration.yaml entry</span>
<span class="s">conversation</span><span class="pi">:</span>
</code></pre>
</div>
</article>
@ -228,7 +222,7 @@ An initial version of voice control for Home Assistant has landed. The current i
<li class="post">
<a href="/blog/2016/08/13/foursquare-fast-com-ffmpeg-gpsd/">0.26: Foursquare, Fast.com, FFMPEG and GPSD</a>
<a href="/blog/2016/08/13/foursquare-fast.com-ffmpeg-gpsd/">0.26: Foursquare, Fast.com, FFMPEG and GPSD</a>
</li>

View file

@ -93,7 +93,7 @@
<ul class="tags unstyled">
<li><a class='category' href='/blog/categories/release-notes/'>Release-Notes</a></li>
<li>Release-Notes</li>
</ul>
@ -110,87 +110,79 @@
<p>A new version of Home Assistant has just been pushed out. It contains bugfixes contributed by <a href="https://github.com/jamespcole">jamespcole</a>, <a href="https://github.com/andythigpen">andythigpen</a>, <a href="https://github.com/trainman419">trainman419</a> and <a href="https://github.com/balloob">me</a>. It also adds a bunch of great new features:</p>
<p><strong>Script</strong><br />
Andythigpen has contributed a script component. This allows users to create a sequence of service calls and delays. Scripts can be started using the service <code>script/turn_on</code> and interrupted using the service <code>script/turn_off</code>. A separate page has been added to the frontend to see the status of your scripts.</p>
<p><strong>Script</strong>
Andythigpen has contributed a script component. This allows users to create a sequence of service calls and delays. Scripts can be started using the service <code class="highlighter-rouge">script/turn_on</code> and interrupted using the service <code class="highlighter-rouge">script/turn_off</code>. A separate page has been added to the frontend to see the status of your scripts.</p>
<div class="highlighter-coderay"><div class="CodeRay">
<div class="code"><pre><span class="comment"># Example configuration.yaml entry</span>
<span class="key">script</span>:
<span class="comment"># Turns on the bedroom lights and then the living room lights 1 minute later</span>
<span class="key">wakeup</span>:
<span class="key">alias</span>: <span class="string"><span class="content">Wake Up</span></span>
<span class="key">sequence</span>:
- <span class="string"><span class="content">alias: Bedroom lights on</span></span>
<span class="key">execute_service</span>: <span class="string"><span class="content">light.turn_on</span></span>
<span class="key">service_data</span>:
<span class="key">entity_id</span>: <span class="string"><span class="content">group.bedroom</span></span>
- <span class="string"><span class="content">delay:</span><span class="content">
# supports seconds, milliseconds, minutes, hours, etc.
minutes: 1</span></span>
- <span class="string"><span class="content">alias: Living room lights on</span></span>
<span class="key">execute_service</span>: <span class="string"><span class="content">light.turn_on</span></span>
<span class="key">service_data</span>:
<span class="key">entity_id</span>: <span class="string"><span class="content">group.living_room</span></span>
</pre></div>
</div>
<div class="language-yaml highlighter-rouge"><pre class="highlight"><code><span class="c1"># Example configuration.yaml entry</span>
<span class="s">script</span><span class="pi">:</span>
<span class="c1"># Turns on the bedroom lights and then the living room lights 1 minute later</span>
<span class="s">wakeup</span><span class="pi">:</span>
<span class="s">alias</span><span class="pi">:</span> <span class="s">Wake Up</span>
<span class="s">sequence</span><span class="pi">:</span>
<span class="pi">-</span> <span class="s">alias</span><span class="pi">:</span> <span class="s">Bedroom lights on</span>
<span class="s">execute_service</span><span class="pi">:</span> <span class="s">light.turn_on</span>
<span class="s">service_data</span><span class="pi">:</span>
<span class="s">entity_id</span><span class="pi">:</span> <span class="s">group.bedroom</span>
<span class="pi">-</span> <span class="s">delay</span><span class="pi">:</span>
<span class="c1"># supports seconds, milliseconds, minutes, hours, etc.</span>
<span class="s">minutes</span><span class="pi">:</span> <span class="s">1</span>
<span class="pi">-</span> <span class="s">alias</span><span class="pi">:</span> <span class="s">Living room lights on</span>
<span class="s">execute_service</span><span class="pi">:</span> <span class="s">light.turn_on</span>
<span class="s">service_data</span><span class="pi">:</span>
<span class="s">entity_id</span><span class="pi">:</span> <span class="s">group.living_room</span>
</code></pre>
</div>
<a name="read-more"></a>
<p><strong>Scene</strong><br />
<p><strong>Scene</strong>
I (Paulus) have contributed a scene component. A user can create scenes that capture the states you want certain entities to be. For example a scene can contain that light A should be turned on and light B should be bright red. Deactivating a scene will restore the previous state from before the scene was activated. Just like scripts, scenes have their own separate page to see which scenes are on.</p>
<div class="highlighter-coderay"><div class="CodeRay">
<div class="code"><pre><span class="comment"># Example configuration.yaml entry</span>
<span class="key">scene</span>:
- <span class="string"><span class="content">name: Romantic</span></span>
<span class="key">entities</span>:
<span class="key">light.tv_back_light</span>: <span class="string"><span class="content">on</span></span>
<span class="key">light.ceiling</span>:
<span class="key">state</span>: <span class="string"><span class="content">on</span></span>
<span class="key">color</span>: <span class="string"><span class="content">[0.33, 0.66]</span></span>
<span class="key">brightness</span>: <span class="string"><span class="content">200</span></span>
</pre></div>
</div>
<div class="language-yaml highlighter-rouge"><pre class="highlight"><code><span class="c1"># Example configuration.yaml entry</span>
<span class="s">scene</span><span class="pi">:</span>
<span class="pi">-</span> <span class="s">name</span><span class="pi">:</span> <span class="s">Romantic</span>
<span class="s">entities</span><span class="pi">:</span>
<span class="s">light.tv_back_light</span><span class="pi">:</span> <span class="s">on</span>
<span class="s">light.ceiling</span><span class="pi">:</span>
<span class="s">state</span><span class="pi">:</span> <span class="s">on</span>
<span class="s">color</span><span class="pi">:</span> <span class="pi">[</span><span class="nv">0.33</span><span class="pi">,</span> <span class="nv">0.66</span><span class="pi">]</span>
<span class="s">brightness</span><span class="pi">:</span> <span class="s">200</span>
</code></pre>
</div>
<p><a name="sabnzbd"></a><br />
<strong>SABnzbd</strong><br />
<p><a name="sabnzbd"></a>
<strong>SABnzbd</strong>
<img src="/images/supported_brands/sabnzbd.png" style="border:none; box-shadow: none; float: right;" height="50" /> James Cole has contributed support to integrate SABnzbd. This will allow you to monitor your downloads from within Home Assistant and setup automation based on the information.</p>
<div class="highlighter-coderay"><div class="CodeRay">
<div class="code"><pre><span class="comment"># Example configuration.yaml entry</span>
<span class="key">sensor</span>:
- <span class="string"><span class="content">platform: sabnzbd</span></span>
<span class="key">name</span>: <span class="string"><span class="content">SAB</span></span>
<span class="key">api_key</span>: <span class="string"><span class="content">YOUR_API_KEY</span></span>
<span class="comment"># Example: http://192.168.1.32:8124/</span>
<span class="key">base_url</span>: <span class="string"><span class="content">YOUR_SABNZBD_BASE_URL</span></span>
<span class="key">monitored_variables</span>:
- <span class="string"><span class="content">type: 'current_status'</span></span>
- <span class="string"><span class="content">type: 'speed'</span></span>
- <span class="string"><span class="content">type: 'queue_size'</span></span>
- <span class="string"><span class="content">type: 'queue_remaining'</span></span>
- <span class="string"><span class="content">type: 'disk_size'</span></span>
- <span class="string"><span class="content">type: 'disk_free'</span></span>
</pre></div>
</div>
<div class="language-yaml highlighter-rouge"><pre class="highlight"><code><span class="c1"># Example configuration.yaml entry</span>
<span class="s">sensor</span><span class="pi">:</span>
<span class="pi">-</span> <span class="s">platform</span><span class="pi">:</span> <span class="s">sabnzbd</span>
<span class="s">name</span><span class="pi">:</span> <span class="s">SAB</span>
<span class="s">api_key</span><span class="pi">:</span> <span class="s">YOUR_API_KEY</span>
<span class="c1"># Example: http://192.168.1.32:8124/</span>
<span class="s">base_url</span><span class="pi">:</span> <span class="s">YOUR_SABNZBD_BASE_URL</span>
<span class="s">monitored_variables</span><span class="pi">:</span>
<span class="pi">-</span> <span class="s">type</span><span class="pi">:</span> <span class="s1">'</span><span class="s">current_status'</span>
<span class="pi">-</span> <span class="s">type</span><span class="pi">:</span> <span class="s1">'</span><span class="s">speed'</span>
<span class="pi">-</span> <span class="s">type</span><span class="pi">:</span> <span class="s1">'</span><span class="s">queue_size'</span>
<span class="pi">-</span> <span class="s">type</span><span class="pi">:</span> <span class="s1">'</span><span class="s">queue_remaining'</span>
<span class="pi">-</span> <span class="s">type</span><span class="pi">:</span> <span class="s1">'</span><span class="s">disk_size'</span>
<span class="pi">-</span> <span class="s">type</span><span class="pi">:</span> <span class="s1">'</span><span class="s">disk_free'</span>
</code></pre>
</div>
<p><a name="pushover"></a><br />
<strong>PushOver</strong><br />
<p><a name="pushover"></a>
<strong>PushOver</strong>
<img src="/images/supported_brands/pushover.png" style="border:none; box-shadow: none; float: right;" height="50" /> James Cole has also contributed support for <a href="https://pushover.net/">the PushOver service</a> as a platform for the notify component. This allows components to send messages to the user using PushOver.</p>
<div class="highlighter-coderay"><div class="CodeRay">
<div class="code"><pre><span class="comment"># Example configuration.yaml entry</span>
<span class="key">notify</span>:
<span class="key">platform</span>: <span class="string"><span class="content">pushover</span></span>
<span class="comment"># Get this by registering a new application on https://pushover.net</span>
<span class="key">api_key</span>: <span class="string"><span class="content">ABCDEFGHJKLMNOPQRSTUVXYZ</span></span>
<span class="comment"># Get this by logging into your account on https://pushover.net</span>
<span class="key">user_key</span>: <span class="string"><span class="content">ABCDEFGHJKLMNOPQRSTUVXYZ</span></span>
</pre></div>
</div>
<div class="language-yaml highlighter-rouge"><pre class="highlight"><code><span class="c1"># Example configuration.yaml entry</span>
<span class="s">notify</span><span class="pi">:</span>
<span class="s">platform</span><span class="pi">:</span> <span class="s">pushover</span>
<span class="c1"># Get this by registering a new application on https://pushover.net</span>
<span class="s">api_key</span><span class="pi">:</span> <span class="s">ABCDEFGHJKLMNOPQRSTUVXYZ</span>
<span class="c1"># Get this by logging into your account on https://pushover.net</span>
<span class="s">user_key</span><span class="pi">:</span> <span class="s">ABCDEFGHJKLMNOPQRSTUVXYZ</span>
</code></pre>
</div>
</article>
@ -265,7 +257,7 @@ I (Paulus) have contributed a scene component. A user can create scenes that cap
<li class="post">
<a href="/blog/2016/08/13/foursquare-fast-com-ffmpeg-gpsd/">0.26: Foursquare, Fast.com, FFMPEG and GPSD</a>
<a href="/blog/2016/08/13/foursquare-fast.com-ffmpeg-gpsd/">0.26: Foursquare, Fast.com, FFMPEG and GPSD</a>
</li>

View file

@ -93,7 +93,7 @@
<ul class="tags unstyled">
<li><a class='category' href='/blog/categories/release-notes/'>Release-Notes</a></li>
<li>Release-Notes</li>
</ul>
@ -110,98 +110,90 @@
<p>Its been a month since the latest update and a lot has happened again. Here a quick overview of the new things.</p>
<p><strong>Line Charts</strong><br />
<p><strong>Line Charts</strong>
<a href="https://github.com/jamespcole">James</a> has upgraded the history in the frontend to support line graphs. Line graphs will be shown for any entity that has a unit of measurement. The line graphs will also be shown in the more info card of an entity. <a href="/demo/">See the demo for a live example.</a></p>
<p class="img">
<img src="/images/screenshots/history-line-graphs.png" />
</p>
<p><strong>ISY994 hub support</strong><br />
<p><strong>ISY994 hub support</strong>
<img src="/images/supported_brands/universal_devices.png" style="border:none; box-shadow: none; float: right;" height="50" /> <a href="https://github.com/rmkraus">Ryan</a> has contributed support to integrate the ISY994 hub by Universal Devices. This allows you to integrate your X10/Insteon sensors, switches and lights.</p>
<p>He has created an extensive getting started guide which can be found on <a href="/components/isy994/">the ISY994 component page</a>.</p>
<div class="highlighter-coderay"><div class="CodeRay">
<div class="code"><pre><span class="comment"># Example configuration.yaml entry</span>
<span class="key">isy994</span>:
</pre></div>
</div>
<div class="language-yaml highlighter-rouge"><pre class="highlight"><code><span class="c1"># Example configuration.yaml entry</span>
<span class="s">isy994</span><span class="pi">:</span>
</code></pre>
</div>
<p><strong>Logbook</strong><br />
<img src="/images/screenshots/logbook.png" style="margin-left:10px; float: right;" height="100" /> I (Paulus) have added a logbook component. The logbook component provides a different perspective on the history of your house by showing all the changes that happened to your house in chronological order. <a href="/demo/">See the demo for a live example.</a><br />
<p><strong>Logbook</strong>
<img src="/images/screenshots/logbook.png" style="margin-left:10px; float: right;" height="100" /> I (Paulus) have added a logbook component. The logbook component provides a different perspective on the history of your house by showing all the changes that happened to your house in chronological order. <a href="/demo/">See the demo for a live example.</a>
<span class="clearfix"></span></p>
<div class="highlighter-coderay"><div class="CodeRay">
<div class="code"><pre><span class="comment"># Example configuration.yaml entry</span>
<span class="key">logbook</span>:
</pre></div>
</div>
<div class="language-yaml highlighter-rouge"><pre class="highlight"><code><span class="c1"># Example configuration.yaml entry</span>
<span class="s">logbook</span><span class="pi">:</span>
</code></pre>
</div>
<a name="read-more"></a>
<p><strong>Transmission support</strong><br />
<p><strong>Transmission support</strong>
<img src="/images/supported_brands/transmission.png" style="border:none; box-shadow: none; float: right;" height="50" /> James has also contributed support for integrating Transmission into Home Assistant.</p>
<div class="highlighter-coderay"><div class="CodeRay">
<div class="code"><pre><span class="comment"># Example configuration.yaml entry</span>
<span class="key">sensor</span>:
<span class="key">platform</span>: <span class="string"><span class="content">transmission</span></span>
<span class="key">name</span>: <span class="string"><span class="content">Transmission</span></span>
<span class="key">host</span>: <span class="string"><span class="content">192.168.1.26</span></span>
<span class="key">port</span>: <span class="string"><span class="content">9091</span></span>
<span class="key">username</span>: <span class="string"><span class="content">YOUR_USERNAME</span></span>
<span class="key">password</span>: <span class="string"><span class="content">YOUR_PASSWORD</span></span>
<span class="key">monitored_variables</span>:
- <span class="string"><span class="content">type: 'current_status'</span></span>
- <span class="string"><span class="content">type: 'download_speed'</span></span>
- <span class="string"><span class="content">type: 'upload_speed'</span></span>
</pre></div>
</div>
<div class="language-yaml highlighter-rouge"><pre class="highlight"><code><span class="c1"># Example configuration.yaml entry</span>
<span class="s">sensor</span><span class="pi">:</span>
<span class="s">platform</span><span class="pi">:</span> <span class="s">transmission</span>
<span class="s">name</span><span class="pi">:</span> <span class="s">Transmission</span>
<span class="s">host</span><span class="pi">:</span> <span class="s">192.168.1.26</span>
<span class="s">port</span><span class="pi">:</span> <span class="s">9091</span>
<span class="s">username</span><span class="pi">:</span> <span class="s">YOUR_USERNAME</span>
<span class="s">password</span><span class="pi">:</span> <span class="s">YOUR_PASSWORD</span>
<span class="s">monitored_variables</span><span class="pi">:</span>
<span class="pi">-</span> <span class="s">type</span><span class="pi">:</span> <span class="s1">'</span><span class="s">current_status'</span>
<span class="pi">-</span> <span class="s">type</span><span class="pi">:</span> <span class="s1">'</span><span class="s">download_speed'</span>
<span class="pi">-</span> <span class="s">type</span><span class="pi">:</span> <span class="s1">'</span><span class="s">upload_speed'</span>
</code></pre>
</div>
<p><strong>Modbus support</strong><br />
<p><strong>Modbus support</strong>
<a href="https://github.com/kixam">Kixam</a> has contributed support for modbus, a serial communication protocol to control PLCs. It currently supports sensors and switches which can be controlled over serial, TCP and UDP connections.</p>
<div class="highlighter-coderay"><div class="CodeRay">
<div class="code"><pre><span class="comment"># Example configuration.yaml entry</span>
<span class="key">modbus</span>:
<span class="key">type</span>: <span class="string"><span class="content">serial</span></span>
<span class="key">method</span>: <span class="string"><span class="content">rtu</span></span>
<span class="key">port</span>: <span class="string"><span class="content">/dev/ttyUSB0</span></span>
<span class="key">baudrate</span>: <span class="string"><span class="content">9600</span></span>
<span class="key">stopbits</span>: <span class="string"><span class="content">1</span></span>
<span class="key">bytesize</span>: <span class="string"><span class="content">8</span></span>
<span class="key">parity</span>: <span class="string"><span class="content">N</span></span>
<div class="language-yaml highlighter-rouge"><pre class="highlight"><code><span class="c1"># Example configuration.yaml entry</span>
<span class="s">modbus</span><span class="pi">:</span>
<span class="s">type</span><span class="pi">:</span> <span class="s">serial</span>
<span class="s">method</span><span class="pi">:</span> <span class="s">rtu</span>
<span class="s">port</span><span class="pi">:</span> <span class="s">/dev/ttyUSB0</span>
<span class="s">baudrate</span><span class="pi">:</span> <span class="s">9600</span>
<span class="s">stopbits</span><span class="pi">:</span> <span class="s">1</span>
<span class="s">bytesize</span><span class="pi">:</span> <span class="s">8</span>
<span class="s">parity</span><span class="pi">:</span> <span class="s">N</span>
<span class="key">sensor</span>:
<span class="key">platform</span>: <span class="string"><span class="content">modbus</span></span>
<span class="key">slave</span>: <span class="string"><span class="content">1</span></span>
<span class="key">registers</span>:
<span class="key">16</span>:
<span class="key">name</span>: <span class="string"><span class="content">My integer sensor</span><span class="content">
unit: C</span></span>
<span class="key">24</span>:
<span class="key">bits</span>:
<span class="key">0</span>:
<span class="key">name</span>: <span class="string"><span class="content">My boolean sensor</span></span>
<span class="key">2</span>:
<span class="key">name</span>: <span class="string"><span class="content">My other boolean sensor</span></span>
<span class="s">sensor</span><span class="pi">:</span>
<span class="s">platform</span><span class="pi">:</span> <span class="s">modbus</span>
<span class="s">slave</span><span class="pi">:</span> <span class="s">1</span>
<span class="s">registers</span><span class="pi">:</span>
<span class="s">16</span><span class="pi">:</span>
<span class="s">name</span><span class="pi">:</span> <span class="s">My integer sensor</span>
<span class="s">unit</span><span class="pi">:</span> <span class="s">C</span>
<span class="s">24</span><span class="pi">:</span>
<span class="s">bits</span><span class="pi">:</span>
<span class="s">0</span><span class="pi">:</span>
<span class="s">name</span><span class="pi">:</span> <span class="s">My boolean sensor</span>
<span class="s">2</span><span class="pi">:</span>
<span class="s">name</span><span class="pi">:</span> <span class="s">My other boolean sensor</span>
<span class="key">switch</span>:
<span class="key">platform</span>: <span class="string"><span class="content">modbus</span></span>
<span class="key">slave</span>: <span class="string"><span class="content">1</span></span>
<span class="key">registers</span>:
<span class="key">24</span>:
<span class="key">bits</span>:
<span class="key">0</span>:
<span class="key">name</span>: <span class="string"><span class="content">My switch</span></span>
<span class="key">2</span>:
<span class="key">name</span>: <span class="string"><span class="content">My other switch</span></span>
</pre></div>
</div>
<span class="s">switch</span><span class="pi">:</span>
<span class="s">platform</span><span class="pi">:</span> <span class="s">modbus</span>
<span class="s">slave</span><span class="pi">:</span> <span class="s">1</span>
<span class="s">registers</span><span class="pi">:</span>
<span class="s">24</span><span class="pi">:</span>
<span class="s">bits</span><span class="pi">:</span>
<span class="s">0</span><span class="pi">:</span>
<span class="s">name</span><span class="pi">:</span> <span class="s">My switch</span>
<span class="s">2</span><span class="pi">:</span>
<span class="s">name</span><span class="pi">:</span> <span class="s">My other switch</span>
</code></pre>
</div>
</article>
@ -276,7 +268,7 @@
<li class="post">
<a href="/blog/2016/08/13/foursquare-fast-com-ffmpeg-gpsd/">0.26: Foursquare, Fast.com, FFMPEG and GPSD</a>
<a href="/blog/2016/08/13/foursquare-fast.com-ffmpeg-gpsd/">0.26: Foursquare, Fast.com, FFMPEG and GPSD</a>
</li>

View file

@ -93,7 +93,7 @@
<ul class="tags unstyled">
<li><a class='category' href='/blog/categories/release-notes/'>Release-Notes</a></li>
<li>Release-Notes</li>
</ul>
@ -110,32 +110,30 @@
<p>I have recently merged code to refactor Home Assistant to use only UTC times internally. A much needed refactor. Ive added some extra test coverage to time sensitive parts to ensure stability. The code has been live in the dev branch for the last 9 days and will be soon released to the master branch.</p>
<p>From now on all internal communication will be done in UTC: time changed events, datetime attributes of states, etc. To get the current time in UTC you can call <code>homeassistant.util.dt.utcnow()</code>. This is a timezone aware UTC datetime object. <a href="https://github.com/home-assistant/home-assistant/blob/dev/homeassistant/util/dt.py"><code>homeassistant.util.dt</code></a> is a new util package with date helpers.</p>
<p>From now on all internal communication will be done in UTC: time changed events, datetime attributes of states, etc. To get the current time in UTC you can call <code class="highlighter-rouge">homeassistant.util.dt.utcnow()</code>. This is a timezone aware UTC datetime object. <a href="https://github.com/home-assistant/home-assistant/blob/dev/homeassistant/util/dt.py"><code class="highlighter-rouge">homeassistant.util.dt</code></a> is a new util package with date helpers.</p>
<p>There is also such a thing as local time. Local time is based on the time zone that you have setup in your <code>configuration.yaml</code>. Local times should only be used for user facing information: logs, frontend and automation settings in <code>configuration.yaml</code>.</p>
<p>There is also such a thing as local time. Local time is based on the time zone that you have setup in your <code class="highlighter-rouge">configuration.yaml</code>. Local times should only be used for user facing information: logs, frontend and automation settings in <code class="highlighter-rouge">configuration.yaml</code>.</p>
<h3>Setting up your time zone</h3>
<p>Setting up a time zone happens in <code>configuration.yaml</code>. If you have no time zone setup, it will be auto detected using the existing detection code using <a href="https://freegeoip.net">freegeoip.net</a>. You can find a list of compatible time zones on <a href="http://en.wikipedia.org/wiki/List_of_tz_database_time_zones">Wikipedia</a>.</p>
<p>Setting up a time zone happens in <code class="highlighter-rouge">configuration.yaml</code>. If you have no time zone setup, it will be auto detected using the existing detection code using <a href="https://freegeoip.net">freegeoip.net</a>. You can find a list of compatible time zones on <a href="http://en.wikipedia.org/wiki/List_of_tz_database_time_zones">Wikipedia</a>.</p>
<div class="highlighter-coderay"><div class="CodeRay">
<div class="code"><pre><span class="key">homeassistant</span>:
<span class="key">time_zone</span>: <span class="string"><span class="content">America/Los_Angeles</span></span>
</pre></div>
</div>
<div class="language-yaml highlighter-rouge"><pre class="highlight"><code><span class="s">homeassistant</span><span class="pi">:</span>
<span class="s">time_zone</span><span class="pi">:</span> <span class="s">America/Los_Angeles</span>
</code></pre>
</div>
<h3>Compatibility</h3>
<p>The changes to the code are mostly backwards compatible. The old <code>hass.track_time_change</code> and <code>hass.track_point_in_time</code> use now internally two new methods: <code>hass.track_utc_time_change</code> and <code>hass.track_point_in_utc_time</code>. The usage of the old methods have not changed and should be backwards compatible.</p>
<p>The changes to the code are mostly backwards compatible. The old <code class="highlighter-rouge">hass.track_time_change</code> and <code class="highlighter-rouge">hass.track_point_in_time</code> use now internally two new methods: <code class="highlighter-rouge">hass.track_utc_time_change</code> and <code class="highlighter-rouge">hass.track_point_in_utc_time</code>. The usage of the old methods have not changed and should be backwards compatible.</p>
<p>This refactor adds a new migration for the database adding a <code>utc_offset</code> column to events and states. This information is currently not used but can prove useful in the future when we start analyzing the historical data.</p>
<p>This refactor adds a new migration for the database adding a <code class="highlighter-rouge">utc_offset</code> column to events and states. This information is currently not used but can prove useful in the future when we start analyzing the historical data.</p>
<h3><a class="title-link" name="backwards-incompatible-stuff" href="#backwards-incompatible-stuff"></a> Backwards incompatible stuff</h3>
<p>All built-in components have been upgraded. The following list is only for people that run custom components:</p>
<ul>
<li><code>hass.track_time_change</code> and <code>hass.track_point_in_time</code> will now return a time zone aware datetime object. Python does not allow comparing a naive with an aware datetime object.</li>
<li>the sun attributes for rising and setting are now in UTC. The methods <code>sun.next_rising(hass)</code> and <code>sun.next_setting(hass)</code> are backwards compatible, just be careful if you used to read the raw attributes.</li>
<li><code class="highlighter-rouge">hass.track_time_change</code> and <code class="highlighter-rouge">hass.track_point_in_time</code> will now return a time zone aware datetime object. Python does not allow comparing a naive with an aware datetime object.</li>
<li>the sun attributes for rising and setting are now in UTC. The methods <code class="highlighter-rouge">sun.next_rising(hass)</code> and <code class="highlighter-rouge">sun.next_setting(hass)</code> are backwards compatible, just be careful if you used to read the raw attributes.</li>
<li>the API sends all times in UTC. If you use anything else besides the frontend to talk to HA, make sure it handles it differently.</li>
</ul>
</article>
@ -211,7 +209,7 @@
<li class="post">
<a href="/blog/2016/08/13/foursquare-fast-com-ffmpeg-gpsd/">0.26: Foursquare, Fast.com, FFMPEG and GPSD</a>
<a href="/blog/2016/08/13/foursquare-fast.com-ffmpeg-gpsd/">0.26: Foursquare, Fast.com, FFMPEG and GPSD</a>
</li>

View file

@ -93,7 +93,7 @@
<ul class="tags unstyled">
<li><a class='category' href='/blog/categories/release-notes/'>Release-Notes</a></li>
<li>Release-Notes</li>
</ul>
@ -120,115 +120,101 @@ To update to the latest version, run <code>scripts/update</code>. Please report
<a name="read-more"></a>
<p><strong>Overwriting Entity Attributes</strong><br />
<p><strong>Overwriting Entity Attributes</strong>
Before diving into the newly supported devices and services, I want to highlight an awesome configuration enhancement by <a href="https://github.com/rmkraus">rmkraus</a>: overwriting entity attributes.</p>
<p>These new configuration settings allow you to overwrite entity state attributes. The main usage for this is being able to overwrite attributes that influence how an entity is shown in the interface.</p>
<div class="highlighter-coderay"><div class="CodeRay">
<div class="code"><pre><span class="comment"># Example configuration.yaml entry</span>
<span class="key">homeassistant</span>:
<span class="key">customize</span>:
<span class="key">light.bowl</span>:
<span class="comment"># hides this entity from the interface</span>
<span class="key">hidden</span>: <span class="string"><span class="content">true</span></span>
<span class="key">light.ceiling</span>:
<span class="comment"># Replaces the state badge with given picture</span>
<span class="key">entity_picture</span>: <span class="string"><span class="content">http://graph.facebook.com/schoutsen/picture</span></span>
</pre></div>
</div>
<div class="language-yaml highlighter-rouge"><pre class="highlight"><code><span class="c1"># Example configuration.yaml entry</span>
<span class="s">homeassistant</span><span class="pi">:</span>
<span class="s">customize</span><span class="pi">:</span>
<span class="s">light.bowl</span><span class="pi">:</span>
<span class="c1"># hides this entity from the interface</span>
<span class="s">hidden</span><span class="pi">:</span> <span class="s">true</span>
<span class="s">light.ceiling</span><span class="pi">:</span>
<span class="c1"># Replaces the state badge with given picture</span>
<span class="s">entity_picture</span><span class="pi">:</span> <span class="s">http://graph.facebook.com/schoutsen/picture</span>
</code></pre>
</div>
<p><strong>MySensors</strong><br />
<p><strong>MySensors</strong>
<img src="/images/supported_brands/mysensors.png" style="border:none; box-shadow: none; float: right;" height="50" /> <a href="https://github.com/andythigpen">Andythigpen</a> and <a href="https://github.com/theolind">Theolind</a> have added support for the <a href="http://www.mysensors.org">MySensors platform</a> to Home Assistant.</p>
<div class="highlighter-coderay"><div class="CodeRay">
<div class="code"><pre><span class="comment"># Example configuration.yaml entry</span>
<span class="key">sensor</span>:
<span class="key">platform</span>: <span class="string"><span class="content">mysensors</span></span>
<span class="key">port</span>: <span class="string"><span class="content">/dev/ttyACM0</span></span>
</pre></div>
</div>
<div class="language-yaml highlighter-rouge"><pre class="highlight"><code><span class="c1"># Example configuration.yaml entry</span>
<span class="s">sensor</span><span class="pi">:</span>
<span class="s">platform</span><span class="pi">:</span> <span class="s">mysensors</span>
<span class="s">port</span><span class="pi">:</span> <span class="s">/dev/ttyACM0</span>
</code></pre>
</div>
<p><strong>OpenWeatherMap</strong><br />
<p><strong>OpenWeatherMap</strong>
<img src="/images/supported_brands/openweathermap.png" style="border:none; box-shadow: none; float: right;" height="50" /> <a href="https://github.com/fabaff">Fabaff</a> has contributed support for <a href="http://openweathermap.org">OpenWeatherMap</a>. This will allow you to integrate local meteorological data into Home Assistant.</p>
<div class="highlighter-coderay"><div class="CodeRay">
<div class="code"><pre><span class="comment"># Example configuration.yaml entry</span>
<span class="key">sensor</span>:
<span class="key">platform</span>: <span class="string"><span class="content">openweathermap</span></span>
<span class="key">api_key</span>: <span class="string"><span class="content">YOUR_API_KEY</span></span>
<span class="key">monitored_variables</span>:
- <span class="string"><span class="content">type: 'weather'</span></span>
- <span class="string"><span class="content">type: 'temperature'</span></span>
- <span class="string"><span class="content">type: 'wind_speed'</span></span>
- <span class="string"><span class="content">type: 'humidity'</span></span>
- <span class="string"><span class="content">type: 'pressure'</span></span>
- <span class="string"><span class="content">type: 'clouds'</span></span>
- <span class="string"><span class="content">type: 'rain'</span></span>
- <span class="string"><span class="content">type: 'snow'</span></span>
</pre></div>
</div>
<div class="language-yaml highlighter-rouge"><pre class="highlight"><code><span class="c1"># Example configuration.yaml entry</span>
<span class="s">sensor</span><span class="pi">:</span>
<span class="s">platform</span><span class="pi">:</span> <span class="s">openweathermap</span>
<span class="s">api_key</span><span class="pi">:</span> <span class="s">YOUR_API_KEY</span>
<span class="s">monitored_variables</span><span class="pi">:</span>
<span class="pi">-</span> <span class="s">type</span><span class="pi">:</span> <span class="s1">'</span><span class="s">weather'</span>
<span class="pi">-</span> <span class="s">type</span><span class="pi">:</span> <span class="s1">'</span><span class="s">temperature'</span>
<span class="pi">-</span> <span class="s">type</span><span class="pi">:</span> <span class="s1">'</span><span class="s">wind_speed'</span>
<span class="pi">-</span> <span class="s">type</span><span class="pi">:</span> <span class="s1">'</span><span class="s">humidity'</span>
<span class="pi">-</span> <span class="s">type</span><span class="pi">:</span> <span class="s1">'</span><span class="s">pressure'</span>
<span class="pi">-</span> <span class="s">type</span><span class="pi">:</span> <span class="s1">'</span><span class="s">clouds'</span>
<span class="pi">-</span> <span class="s">type</span><span class="pi">:</span> <span class="s1">'</span><span class="s">rain'</span>
<span class="pi">-</span> <span class="s">type</span><span class="pi">:</span> <span class="s1">'</span><span class="s">snow'</span>
</code></pre>
</div>
<p><strong>InstaPush</strong><br />
<p><strong>InstaPush</strong>
<img src="/images/supported_brands/instapush.png" style="border:none; box-shadow: none; float: right;" height="50" /> <a href="https://github.com/fabaff">Fabaff</a> has contributed support for <a href="https://instapush.im">InstaPush</a>. This will allow you send messages from Home Assistant to your iOS and Android devices.</p>
<div class="highlighter-coderay"><div class="CodeRay">
<div class="code"><pre><span class="comment"># Example configuration.yaml entry</span>
<span class="key">notify</span>:
<span class="key">platform</span>: <span class="string"><span class="content">instapush</span></span>
<span class="comment"># Get those by creating a new application, event, and tracker on https://instapush.im</span>
<span class="key">api_key</span>: <span class="string"><span class="content">ABCDEFGHJKLMNOPQRSTUVXYZ</span></span>
<span class="key">app_secret</span>: <span class="string"><span class="content">ABCDEFGHJKLMNOPQRSTUVXYZ</span></span>
<span class="key">event</span>: <span class="string"><span class="content">ABCDEFGHJKLMNOPQRSTUVXYZ</span></span>
<span class="key">tracker</span>: <span class="string"><span class="content">ABCDEFGHJKLMNOPQRSTUVXYZ</span></span>
</pre></div>
</div>
<div class="language-yaml highlighter-rouge"><pre class="highlight"><code><span class="c1"># Example configuration.yaml entry</span>
<span class="s">notify</span><span class="pi">:</span>
<span class="s">platform</span><span class="pi">:</span> <span class="s">instapush</span>
<span class="c1"># Get those by creating a new application, event, and tracker on https://instapush.im</span>
<span class="s">api_key</span><span class="pi">:</span> <span class="s">ABCDEFGHJKLMNOPQRSTUVXYZ</span>
<span class="s">app_secret</span><span class="pi">:</span> <span class="s">ABCDEFGHJKLMNOPQRSTUVXYZ</span>
<span class="s">event</span><span class="pi">:</span> <span class="s">ABCDEFGHJKLMNOPQRSTUVXYZ</span>
<span class="s">tracker</span><span class="pi">:</span> <span class="s">ABCDEFGHJKLMNOPQRSTUVXYZ</span>
</code></pre>
</div>
<p><strong>XMPP</strong><br />
<p><strong>XMPP</strong>
<img src="/images/supported_brands/xmpp.png" style="border:none; box-shadow: none; float: right;" height="50" /> <a href="https://github.com/fabaff">Fabaff</a> has contributed support for Jabber/XMPP. This will allow you send messages from Home Assistant to anyone on Jabber/XMPP.</p>
<div class="highlighter-coderay"><div class="CodeRay">
<div class="code"><pre><span class="comment"># Example configuration.yaml entry</span>
<span class="key">notify</span>:
<span class="key">platform</span>: <span class="string"><span class="content">xmpp</span></span>
<span class="key">sender</span>: <span class="string"><span class="content">YOUR_JID</span></span>
<span class="key">password</span>: <span class="string"><span class="content">YOUR_JABBER_ACCOUNT_PASSWORD</span></span>
<span class="key">recipient</span>: <span class="string"><span class="content">YOUR_RECIPIENT</span></span>
</pre></div>
</div>
<div class="language-yaml highlighter-rouge"><pre class="highlight"><code><span class="c1"># Example configuration.yaml entry</span>
<span class="s">notify</span><span class="pi">:</span>
<span class="s">platform</span><span class="pi">:</span> <span class="s">xmpp</span>
<span class="s">sender</span><span class="pi">:</span> <span class="s">YOUR_JID</span>
<span class="s">password</span><span class="pi">:</span> <span class="s">YOUR_JABBER_ACCOUNT_PASSWORD</span>
<span class="s">recipient</span><span class="pi">:</span> <span class="s">YOUR_RECIPIENT</span>
</code></pre>
</div>
<p><strong>Notify My Android</strong><br />
<p><strong>Notify My Android</strong>
<img src="/images/supported_brands/nma.png" style="border:none; box-shadow: none; float: right;" height="50" /> <a href="https://github.com/fabaff">Fabaff</a> has contributed support for <a href="http://www.notifymyandroid.com/">Notify My Android</a>. This will allow you to send messages from Home Assistant to your Android device.</p>
<div class="highlighter-coderay"><div class="CodeRay">
<div class="code"><pre><span class="comment"># Example configuration.yaml entry</span>
<span class="key">notify</span>:
<span class="key">platform</span>: <span class="string"><span class="content">nma</span></span>
<span class="comment"># Get this by registering a new application on http://www.notifymyandroid.com/</span>
<span class="key">api_key</span>: <span class="string"><span class="content">ABCDEFGHJKLMNOPQRSTUVXYZ</span></span>
</pre></div>
</div>
<div class="language-yaml highlighter-rouge"><pre class="highlight"><code><span class="c1"># Example configuration.yaml entry</span>
<span class="s">notify</span><span class="pi">:</span>
<span class="s">platform</span><span class="pi">:</span> <span class="s">nma</span>
<span class="c1"># Get this by registering a new application on http://www.notifymyandroid.com/</span>
<span class="s">api_key</span><span class="pi">:</span> <span class="s">ABCDEFGHJKLMNOPQRSTUVXYZ</span>
</code></pre>
</div>
<p><strong>Time &amp; Date sensor</strong><br />
<p><strong>Time &amp; Date sensor</strong>
<a href="https://github.com/fabaff">Fabaff</a> has contributed a time &amp; date sensor. This will allow you to show the current time/date on the dashboard.</p>
<div class="highlighter-coderay"><div class="CodeRay">
<div class="code"><pre><span class="comment"># Example configuration.yaml entry</span>
<span class="key">sensor</span>:
<span class="key">platform</span>: <span class="string"><span class="content">time_date</span></span>
<span class="key">monitored_variables</span>:
- <span class="string"><span class="content">type: 'time'</span></span>
- <span class="string"><span class="content">type: 'date'</span></span>
- <span class="string"><span class="content">type: 'date_time'</span></span>
- <span class="string"><span class="content">type: 'time_date'</span></span>
</pre></div>
</div>
<div class="language-yaml highlighter-rouge"><pre class="highlight"><code><span class="c1"># Example configuration.yaml entry</span>
<span class="s">sensor</span><span class="pi">:</span>
<span class="s">platform</span><span class="pi">:</span> <span class="s">time_date</span>
<span class="s">monitored_variables</span><span class="pi">:</span>
<span class="pi">-</span> <span class="s">type</span><span class="pi">:</span> <span class="s1">'</span><span class="s">time'</span>
<span class="pi">-</span> <span class="s">type</span><span class="pi">:</span> <span class="s1">'</span><span class="s">date'</span>
<span class="pi">-</span> <span class="s">type</span><span class="pi">:</span> <span class="s1">'</span><span class="s">date_time'</span>
<span class="pi">-</span> <span class="s">type</span><span class="pi">:</span> <span class="s1">'</span><span class="s">time_date'</span>
</code></pre>
</div>
</article>
@ -303,7 +289,7 @@ Before diving into the newly supported devices and services, I want to highlight
<li class="post">
<a href="/blog/2016/08/13/foursquare-fast-com-ffmpeg-gpsd/">0.26: Foursquare, Fast.com, FFMPEG and GPSD</a>
<a href="/blog/2016/08/13/foursquare-fast.com-ffmpeg-gpsd/">0.26: Foursquare, Fast.com, FFMPEG and GPSD</a>
</li>

View file

@ -93,7 +93,7 @@
<ul class="tags unstyled">
<li><a class='category' href='/blog/categories/release-notes/'>Release-Notes</a></li>
<li>Release-Notes</li>
</ul>
@ -128,7 +128,7 @@ To update to the latest version, run <code>scripts/update</code>. Please report
<ul>
<li>Fronted upgraded to Polymer 1.0 by @balloob</li>
<li>Include other YAML files using the <code>!include</code> keyword by @andythigpen</li>
<li>Include other YAML files using the <code class="highlighter-rouge">!include</code> keyword by @andythigpen</li>
<li>Switch support and bug fixes for Vera platform by @jamespcole</li>
<li>HTTP session support for the HTTP component by @jamespcole</li>
<li>Device tracker bugfixes by @Dutchy-</li>
@ -140,148 +140,132 @@ To update to the latest version, run <code>scripts/update</code>. Please report
<li>Update documentation by @fabaff</li>
</ul>
<p><strong>Music Player Daemon</strong><br />
<p><strong>Music Player Daemon</strong>
<img src="/images/supported_brands/mpd.png" style="border:none; box-shadow: none; float: right;" height="50" /> Fabaff has contributed MusicPlayerDaemon support. The mpd platform allows you to control a <a href="http://www.musicpd.org/">Music Player Daemon</a> from Home Assistant. Right now, only playback is supported and not playlist manipulation.</p>
<div class="highlighter-coderay"><div class="CodeRay">
<div class="code"><pre><span class="comment"># Example configuration.yaml entry</span>
<span class="key">media_player</span>:
<span class="key">platform</span>: <span class="string"><span class="content">mpd</span></span>
<span class="key">server</span>: <span class="string"><span class="content">127.0.0.1</span></span>
<span class="key">port</span>: <span class="string"><span class="content">6600</span></span>
<span class="key">location</span>: <span class="string"><span class="content">bedroom</span></span>
</pre></div>
</div>
<div class="language-yaml highlighter-rouge"><pre class="highlight"><code><span class="c1"># Example configuration.yaml entry</span>
<span class="s">media_player</span><span class="pi">:</span>
<span class="s">platform</span><span class="pi">:</span> <span class="s">mpd</span>
<span class="s">server</span><span class="pi">:</span> <span class="s">127.0.0.1</span>
<span class="s">port</span><span class="pi">:</span> <span class="s">6600</span>
<span class="s">location</span><span class="pi">:</span> <span class="s">bedroom</span>
</code></pre>
</div>
<p><strong>Command line switch</strong><br />
<p><strong>Command line switch</strong>
A switch platform that issues specific commands when it is turned on and off. This might very well become our most popular platform as it allows anyone to integrate any type of switch into Home Assistant that can be controlled from the command line, including calling other scripts!</p>
<div class="highlighter-coderay"><div class="CodeRay">
<div class="code"><pre><span class="comment"># Example configuration.yaml entry</span>
<span class="key">switch</span>:
<span class="key">platform</span>: <span class="string"><span class="content">command_switch</span></span>
<span class="key">switches</span>:
- <span class="string"><span class="content">kitchen_light:</span><span class="content">
oncmd: switch_command on kitchen
offcmd: switch_command off kitchen</span></span>
</pre></div>
</div>
<div class="language-yaml highlighter-rouge"><pre class="highlight"><code><span class="c1"># Example configuration.yaml entry</span>
<span class="s">switch</span><span class="pi">:</span>
<span class="s">platform</span><span class="pi">:</span> <span class="s">command_switch</span>
<span class="s">switches</span><span class="pi">:</span>
<span class="pi">-</span> <span class="s">kitchen_light</span><span class="pi">:</span>
<span class="s">oncmd</span><span class="pi">:</span> <span class="s">switch_command on kitchen</span>
<span class="s">offcmd</span><span class="pi">:</span> <span class="s">switch_command off kitchen</span>
</code></pre>
</div>
<p><strong>LimitlessLED</strong><br />
<p><strong>LimitlessLED</strong>
This new platform can control your LimitlessLED lights from within Home Assistant. The lights are also known as EasyBulb, AppLight, AppLamp, MiLight, LEDme, dekolight or iLight.</p>
<div class="highlighter-coderay"><div class="CodeRay">
<div class="code"><pre><span class="comment"># Example configuration.yaml entry</span>
<span class="key">light</span>:
<span class="key">platform</span>: <span class="string"><span class="content">limitlessled</span></span>
<span class="key">host</span>: <span class="string"><span class="content">192.168.1.10</span></span>
<span class="key">group_1_name</span>: <span class="string"><span class="content">Living Room</span></span>
<span class="key">group_2_name</span>: <span class="string"><span class="content">Bedroom</span></span>
<span class="key">group_3_name</span>: <span class="string"><span class="content">Office</span></span>
<span class="key">group_4_name</span>: <span class="string"><span class="content">Kitchen</span></span>
</pre></div>
</div>
<div class="language-yaml highlighter-rouge"><pre class="highlight"><code><span class="c1"># Example configuration.yaml entry</span>
<span class="s">light</span><span class="pi">:</span>
<span class="s">platform</span><span class="pi">:</span> <span class="s">limitlessled</span>
<span class="s">host</span><span class="pi">:</span> <span class="s">192.168.1.10</span>
<span class="s">group_1_name</span><span class="pi">:</span> <span class="s">Living Room</span>
<span class="s">group_2_name</span><span class="pi">:</span> <span class="s">Bedroom</span>
<span class="s">group_3_name</span><span class="pi">:</span> <span class="s">Office</span>
<span class="s">group_4_name</span><span class="pi">:</span> <span class="s">Kitchen</span>
</code></pre>
</div>
<p><strong>Bitcoin sensor</strong><br />
<p><strong>Bitcoin sensor</strong>
<img src="/images/supported_brands/bitcoin.png" style="border:none; box-shadow: none; float: right;" height="50" /> The bitcoin platform displays various details about the <a href="https://bitcoin.org">Bitcoin</a> network. If you have an online wallet from <a href="https://blockchain.info/">Blockchain.info</a> the sensor is capable to show your current balance.</p>
<div class="highlighter-coderay"><div class="CodeRay">
<div class="code"><pre><span class="comment"># Example configuration.yaml entry</span>
<span class="key">sensor</span>:
<span class="key">platform</span>: <span class="string"><span class="content">bitcoin</span></span>
<span class="key">wallet</span>: <span class="string"><span class="content">'YOUR WALLET_ID'</span></span>
<span class="key">password</span>: <span class="string"><span class="content">YOUR_ACCOUNT_PASSWORD</span></span>
<span class="key">currency</span>: <span class="string"><span class="content">YOUR CURRENCY</span></span>
<span class="key">display_options</span>:
- <span class="string"><span class="content">exchangerate</span></span>
- <span class="string"><span class="content">trade_volume_btc</span></span>
- <span class="string"><span class="content">miners_revenue_usd</span></span>
- <span class="string"><span class="content">btc_mined</span></span>
- <span class="string"><span class="content">trade_volume_usd</span></span>
- <span class="string"><span class="content">difficulty</span></span>
- <span class="string"><span class="content">minutes_between_blocks</span></span>
- <span class="string"><span class="content">number_of_transactions</span></span>
- <span class="string"><span class="content">hash_rate</span></span>
- <span class="string"><span class="content">timestamp</span></span>
- <span class="string"><span class="content">mined_blocks</span></span>
- <span class="string"><span class="content">blocks_size</span></span>
- <span class="string"><span class="content">total_fees_btc</span></span>
- <span class="string"><span class="content">total_btc_sent</span></span>
- <span class="string"><span class="content">estimated_btc_sent</span></span>
- <span class="string"><span class="content">total_btc</span></span>
- <span class="string"><span class="content">total_blocks</span></span>
- <span class="string"><span class="content">next_retarget</span></span>
- <span class="string"><span class="content">estimated_transaction_volume_usd</span></span>
- <span class="string"><span class="content">miners_revenue_btc</span></span>
- <span class="string"><span class="content">market_price_usd</span></span>
</pre></div>
</div>
<div class="language-yaml highlighter-rouge"><pre class="highlight"><code><span class="c1"># Example configuration.yaml entry</span>
<span class="s">sensor</span><span class="pi">:</span>
<span class="s">platform</span><span class="pi">:</span> <span class="s">bitcoin</span>
<span class="s">wallet</span><span class="pi">:</span> <span class="s1">'</span><span class="s">YOUR</span><span class="nv"> </span><span class="s">WALLET_ID'</span>
<span class="s">password</span><span class="pi">:</span> <span class="s">YOUR_ACCOUNT_PASSWORD</span>
<span class="s">currency</span><span class="pi">:</span> <span class="s">YOUR CURRENCY</span>
<span class="s">display_options</span><span class="pi">:</span>
<span class="pi">-</span> <span class="s">exchangerate</span>
<span class="pi">-</span> <span class="s">trade_volume_btc</span>
<span class="pi">-</span> <span class="s">miners_revenue_usd</span>
<span class="pi">-</span> <span class="s">btc_mined</span>
<span class="pi">-</span> <span class="s">trade_volume_usd</span>
<span class="pi">-</span> <span class="s">difficulty</span>
<span class="pi">-</span> <span class="s">minutes_between_blocks</span>
<span class="pi">-</span> <span class="s">number_of_transactions</span>
<span class="pi">-</span> <span class="s">hash_rate</span>
<span class="pi">-</span> <span class="s">timestamp</span>
<span class="pi">-</span> <span class="s">mined_blocks</span>
<span class="pi">-</span> <span class="s">blocks_size</span>
<span class="pi">-</span> <span class="s">total_fees_btc</span>
<span class="pi">-</span> <span class="s">total_btc_sent</span>
<span class="pi">-</span> <span class="s">estimated_btc_sent</span>
<span class="pi">-</span> <span class="s">total_btc</span>
<span class="pi">-</span> <span class="s">total_blocks</span>
<span class="pi">-</span> <span class="s">next_retarget</span>
<span class="pi">-</span> <span class="s">estimated_transaction_volume_usd</span>
<span class="pi">-</span> <span class="s">miners_revenue_btc</span>
<span class="pi">-</span> <span class="s">market_price_usd</span>
</code></pre>
</div>
<p><strong>SMTP notificatoin platform</strong><br />
<p><strong>SMTP notificatoin platform</strong>
<img src="/images/supported_brands/smtp.png" style="border:none; box-shadow: none; float: right;" height="50" /> The smtp platform allows you to deliver notifications from Home Assistant to an e-mail recipient.</p>
<div class="highlighter-coderay"><div class="CodeRay">
<div class="code"><pre><span class="comment"># Example configuration.yaml entry</span>
<span class="key">notify</span>:
<span class="key">platform</span>: <span class="string"><span class="content">mail</span></span>
<span class="key">server</span>: <span class="string"><span class="content">MAIL_SERVER</span></span>
<span class="key">port</span>: <span class="string"><span class="content">YOUR_SMTP_PORT</span></span>
<span class="key">sender</span>: <span class="string"><span class="content">SENDER_EMAIL_ADDRESS</span></span>
<span class="key">starttls</span>: <span class="string"><span class="content">1 or 0</span></span>
<span class="key">username</span>: <span class="string"><span class="content">YOUR_SMTP_USERNAME</span></span>
<span class="key">password</span>: <span class="string"><span class="content">YOUR_SMTP_PASSWORD</span></span>
<span class="key">recipient</span>: <span class="string"><span class="content">YOUR_RECIPIENT</span></span>
</pre></div>
</div>
<div class="language-yaml highlighter-rouge"><pre class="highlight"><code><span class="c1"># Example configuration.yaml entry</span>
<span class="s">notify</span><span class="pi">:</span>
<span class="s">platform</span><span class="pi">:</span> <span class="s">mail</span>
<span class="s">server</span><span class="pi">:</span> <span class="s">MAIL_SERVER</span>
<span class="s">port</span><span class="pi">:</span> <span class="s">YOUR_SMTP_PORT</span>
<span class="s">sender</span><span class="pi">:</span> <span class="s">SENDER_EMAIL_ADDRESS</span>
<span class="s">starttls</span><span class="pi">:</span> <span class="s">1 or 0</span>
<span class="s">username</span><span class="pi">:</span> <span class="s">YOUR_SMTP_USERNAME</span>
<span class="s">password</span><span class="pi">:</span> <span class="s">YOUR_SMTP_PASSWORD</span>
<span class="s">recipient</span><span class="pi">:</span> <span class="s">YOUR_RECIPIENT</span>
</code></pre>
</div>
<p><strong>Syslog notification platform</strong><br />
<p><strong>Syslog notification platform</strong>
The syslog platform allows you to deliver notifications from Home Assistant to the local syslog.</p>
<div class="highlighter-coderay"><div class="CodeRay">
<div class="code"><pre><span class="comment"># Example configuration.yaml entry</span>
<span class="key">notify</span>:
<span class="key">platform</span>: <span class="string"><span class="content">syslog</span></span>
</pre></div>
</div>
<div class="language-yaml highlighter-rouge"><pre class="highlight"><code><span class="c1"># Example configuration.yaml entry</span>
<span class="s">notify</span><span class="pi">:</span>
<span class="s">platform</span><span class="pi">:</span> <span class="s">syslog</span>
</code></pre>
</div>
<p><strong>Swiss Public transport sensor</strong><br />
<p><strong>Swiss Public transport sensor</strong>
The swiss public transport sensor will give you the next two departure times from a given location to another one in Switzerland. See the <a href="/components/sensor.swiss_public_transport/">component page</a> for more information how to set it up.</p>
<p><strong>Transmission turtle mode switch</strong><br />
<p><strong>Transmission turtle mode switch</strong>
<img src="/images/supported_brands/transmission.png" style="border:none; box-shadow: none; float: right;" height="50" /> The transmission platform allows you to control your <a href="http://www.transmissionbt.com/">Transmission</a> client from within Home Assistant. The platform enables you switch to your Alternative Speed Limits (aka Turtle mode) setting.</p>
<div class="highlighter-coderay"><div class="CodeRay">
<div class="code"><pre><span class="comment"># Example configuration.yaml entry</span>
<span class="key">switch</span>:
<span class="key">platform</span>: <span class="string"><span class="content">transmission</span></span>
<span class="key">name</span>: <span class="string"><span class="content">Transmission</span></span>
<span class="key">host</span>: <span class="string"><span class="content">192.168.1.26</span></span>
<span class="key">port</span>: <span class="string"><span class="content">9091</span></span>
<span class="key">username</span>: <span class="string"><span class="content">YOUR_USERNAME</span></span>
<span class="key">password</span>: <span class="string"><span class="content">YOUR_PASSWORD</span></span>
</pre></div>
</div>
<div class="language-yaml highlighter-rouge"><pre class="highlight"><code><span class="c1"># Example configuration.yaml entry</span>
<span class="s">switch</span><span class="pi">:</span>
<span class="s">platform</span><span class="pi">:</span> <span class="s">transmission</span>
<span class="s">name</span><span class="pi">:</span> <span class="s">Transmission</span>
<span class="s">host</span><span class="pi">:</span> <span class="s">192.168.1.26</span>
<span class="s">port</span><span class="pi">:</span> <span class="s">9091</span>
<span class="s">username</span><span class="pi">:</span> <span class="s">YOUR_USERNAME</span>
<span class="s">password</span><span class="pi">:</span> <span class="s">YOUR_PASSWORD</span>
</code></pre>
</div>
<p><strong>Hikvision camera motion detection support</strong><br />
<p><strong>Hikvision camera motion detection support</strong>
This switch platform allows you to control your motion detection setting on your Hikvision camera.</p>
<div class="highlighter-coderay"><div class="CodeRay">
<div class="code"><pre><span class="comment"># Example configuration.yaml entry</span>
<span class="key">switch</span>:
<span class="key">platform</span>: <span class="string"><span class="content">hikvisioncam</span></span>
<span class="key">name</span>: <span class="string"><span class="content">Hikvision Cam 1 Motion Detection</span></span>
<span class="key">host</span>: <span class="string"><span class="content">192.168.1.26</span></span>
<span class="key">username</span>: <span class="string"><span class="content">YOUR_USERNAME</span></span>
<span class="key">password</span>: <span class="string"><span class="content">YOUR_PASSWORD</span></span>
</pre></div>
</div>
<div class="language-yaml highlighter-rouge"><pre class="highlight"><code><span class="c1"># Example configuration.yaml entry</span>
<span class="s">switch</span><span class="pi">:</span>
<span class="s">platform</span><span class="pi">:</span> <span class="s">hikvisioncam</span>
<span class="s">name</span><span class="pi">:</span> <span class="s">Hikvision Cam 1 Motion Detection</span>
<span class="s">host</span><span class="pi">:</span> <span class="s">192.168.1.26</span>
<span class="s">username</span><span class="pi">:</span> <span class="s">YOUR_USERNAME</span>
<span class="s">password</span><span class="pi">:</span> <span class="s">YOUR_PASSWORD</span>
</code></pre>
</div>
</article>
@ -356,7 +340,7 @@ This switch platform allows you to control your motion detection setting on your
<li class="post">
<a href="/blog/2016/08/13/foursquare-fast-com-ffmpeg-gpsd/">0.26: Foursquare, Fast.com, FFMPEG and GPSD</a>
<a href="/blog/2016/08/13/foursquare-fast.com-ffmpeg-gpsd/">0.26: Foursquare, Fast.com, FFMPEG and GPSD</a>
</li>

View file

@ -93,7 +93,7 @@
<ul class="tags unstyled">
<li><a class='category' href='/blog/categories/release-notes/'>Release-Notes</a></li>
<li>Release-Notes</li>
</ul>
@ -112,21 +112,19 @@
<p>This release includes some architectural changes by me. The first is that the frontend is now based on a <a href="http://optimizely.github.io/nuclear-js/">NuclearJS</a> JavaScript backend. This has greatly helped to organize and optimize the frontend code. Another change is that Home Assistant will now install dependencies on-demand instead of installing dependencies for all supported devices.</p>
<p><strong>IP Camera Support</strong><br />
<p><strong>IP Camera Support</strong>
James has worked very hard to add support for IP cameras to Home Assistant which is included in this release. The initial release focusses on providing generic IP camera support. This means that any webcam that can exposes a JPEG image via a url can be integrated.</p>
<p>Home Assistant will route the requests to your camera via the server allowing you to expose IP cameras inside your network via the Home Assistant app.</p>
<div class="highlighter-coderay"><div class="CodeRay">
<div class="code"><pre><span class="comment"># Example configuration.yaml entry</span>
<span class="key">camera</span>:
<span class="key">platform</span>: <span class="string"><span class="content">generic</span></span>
<span class="key">name</span>: <span class="string"><span class="content">my sample camera</span></span>
<span class="key">username</span>: <span class="string"><span class="content">MY_USERNAME</span></span>
<span class="key">password</span>: <span class="string"><span class="content">MY_PASSWORD</span></span>
<span class="key">still_image_url</span>: <span class="string"><span class="content">http://194.218.96.92/jpg/image.jpg</span></span>
</pre></div>
</div>
<div class="language-yaml highlighter-rouge"><pre class="highlight"><code><span class="c1"># Example configuration.yaml entry</span>
<span class="s">camera</span><span class="pi">:</span>
<span class="s">platform</span><span class="pi">:</span> <span class="s">generic</span>
<span class="s">name</span><span class="pi">:</span> <span class="s">my sample camera</span>
<span class="s">username</span><span class="pi">:</span> <span class="s">MY_USERNAME</span>
<span class="s">password</span><span class="pi">:</span> <span class="s">MY_PASSWORD</span>
<span class="s">still_image_url</span><span class="pi">:</span> <span class="s">http://194.218.96.92/jpg/image.jpg</span>
</code></pre>
</div>
<p class="note">
@ -135,105 +133,95 @@ To update to the latest version, run <code>scripts/update</code>. Please report
<a name="read-more"></a>
<p><strong>Arduino</strong><br />
<p><strong>Arduino</strong>
<img src="/images/supported_brands/arduino.png" style="border:none; box-shadow: none; float: right;" height="50" /> Fabian has contributed support for interfacing with Arduinos. This makes it possible to connect your Arduino via USB and expose pins as sensor data and write to pins via switches. Have a look at <a href="/components/arduino/">the docs</a> for an extensive guide to get started.</p>
<div class="highlighter-coderay"><div class="CodeRay">
<div class="code"><pre><span class="comment"># Example configuration.yaml entry</span>
<span class="key">switch</span>:
<span class="key">platform</span>: <span class="string"><span class="content">arduino</span></span>
<span class="key">pins</span>:
<span class="key">11</span>:
<span class="key">name</span>: <span class="string"><span class="content">Fan Office</span></span>
<span class="key">type</span>: <span class="string"><span class="content">digital</span></span>
<span class="key">12</span>:
<span class="key">name</span>: <span class="string"><span class="content">Light Desk</span></span>
<span class="key">type</span>: <span class="string"><span class="content">digital</span></span>
<div class="language-yaml highlighter-rouge"><pre class="highlight"><code><span class="c1"># Example configuration.yaml entry</span>
<span class="s">switch</span><span class="pi">:</span>
<span class="s">platform</span><span class="pi">:</span> <span class="s">arduino</span>
<span class="s">pins</span><span class="pi">:</span>
<span class="s">11</span><span class="pi">:</span>
<span class="s">name</span><span class="pi">:</span> <span class="s">Fan Office</span>
<span class="s">type</span><span class="pi">:</span> <span class="s">digital</span>
<span class="s">12</span><span class="pi">:</span>
<span class="s">name</span><span class="pi">:</span> <span class="s">Light Desk</span>
<span class="s">type</span><span class="pi">:</span> <span class="s">digital</span>
<span class="key">sensor</span>:
<span class="key">platform</span>: <span class="string"><span class="content">arduino</span></span>
<span class="key">pins</span>:
<span class="key">1</span>:
<span class="key">name</span>: <span class="string"><span class="content">Door switch</span></span>
<span class="key">type</span>: <span class="string"><span class="content">analog</span></span>
<span class="key">0</span>:
<span class="key">name</span>: <span class="string"><span class="content">Brightness</span></span>
<span class="key">type</span>: <span class="string"><span class="content">analog</span></span>
</pre></div>
</div>
<span class="s">sensor</span><span class="pi">:</span>
<span class="s">platform</span><span class="pi">:</span> <span class="s">arduino</span>
<span class="s">pins</span><span class="pi">:</span>
<span class="s">1</span><span class="pi">:</span>
<span class="s">name</span><span class="pi">:</span> <span class="s">Door switch</span>
<span class="s">type</span><span class="pi">:</span> <span class="s">analog</span>
<span class="s">0</span><span class="pi">:</span>
<span class="s">name</span><span class="pi">:</span> <span class="s">Brightness</span>
<span class="s">type</span><span class="pi">:</span> <span class="s">analog</span>
</code></pre>
</div>
<p><strong>Kodi (XBMC)</strong><br />
<p><strong>Kodi (XBMC)</strong>
<img src="/images/supported_brands/kodi.png" style="border:none; box-shadow: none; float: right;" height="50" /> Ettisan has contributed a Kodi (XBMC) platform for the media player component. This allows you to track all the media that you are playing and allow you to control it.</p>
<div class="highlighter-coderay"><div class="CodeRay">
<div class="code"><pre><span class="comment"># Example configuration.yaml entry</span>
<span class="key">media_player</span>:
<span class="key">platform</span>: <span class="string"><span class="content">kodi</span></span>
<span class="key">name</span>: <span class="string"><span class="content">Kodi</span></span>
<span class="key">url</span>: <span class="string"><span class="content">http://192.168.0.123/jsonrpc</span></span>
<span class="key">user</span>: <span class="string"><span class="content">kodi</span></span>
<span class="key">password</span>: <span class="string"><span class="content">my_secure_password</span></span>
</pre></div>
</div>
<div class="language-yaml highlighter-rouge"><pre class="highlight"><code><span class="c1"># Example configuration.yaml entry</span>
<span class="s">media_player</span><span class="pi">:</span>
<span class="s">platform</span><span class="pi">:</span> <span class="s">kodi</span>
<span class="s">name</span><span class="pi">:</span> <span class="s">Kodi</span>
<span class="s">url</span><span class="pi">:</span> <span class="s">http://192.168.0.123/jsonrpc</span>
<span class="s">user</span><span class="pi">:</span> <span class="s">kodi</span>
<span class="s">password</span><span class="pi">:</span> <span class="s">my_secure_password</span>
</code></pre>
</div>
<p><strong>TP-Link</strong><br />
<p><strong>TP-Link</strong>
<img src="/images/supported_brands/tp-link.png" style="border:none; box-shadow: none; float: right;" width="150" /> Michael has added TP-Link support to the device tracker. This allows you to now detect presence if you have a TP-Link router.</p>
<div class="highlighter-coderay"><div class="CodeRay">
<div class="code"><pre><span class="comment"># Example configuration.yaml entry</span>
<span class="key">device_tracker</span>:
<span class="key">platform</span>: <span class="string"><span class="content">tplink</span></span>
<span class="key">host</span>: <span class="string"><span class="content">YOUR_ROUTER_IP</span></span>
<span class="key">username</span>: <span class="string"><span class="content">YOUR_ADMIN_USERNAME</span></span>
<span class="key">password</span>: <span class="string"><span class="content">YOUR_ADMIN_PASSWORD</span></span>
</pre></div>
</div>
<div class="language-yaml highlighter-rouge"><pre class="highlight"><code><span class="c1"># Example configuration.yaml entry</span>
<span class="s">device_tracker</span><span class="pi">:</span>
<span class="s">platform</span><span class="pi">:</span> <span class="s">tplink</span>
<span class="s">host</span><span class="pi">:</span> <span class="s">YOUR_ROUTER_IP</span>
<span class="s">username</span><span class="pi">:</span> <span class="s">YOUR_ADMIN_USERNAME</span>
<span class="s">password</span><span class="pi">:</span> <span class="s">YOUR_ADMIN_PASSWORD</span>
</code></pre>
</div>
<p><strong>Efergy energy monitor</strong><br />
<p><strong>Efergy energy monitor</strong>
<img src="/images/supported_brands/efergy.png" style="border:none; box-shadow: none; float: right;" height="50" /> Miniconfig has contributed support for the <a href="https://efergy.com">Efergy energy meters</a>. To get an app token, log in to your efergy account, go to the Settings page, click on App tokens, and click “Add token”.</p>
<div class="highlighter-coderay"><div class="CodeRay">
<div class="code"><pre><span class="comment"># Example configuration.yaml entry</span>
<span class="key">sensor</span>:
<span class="key">platform</span>: <span class="string"><span class="content">efergy</span></span>
<span class="key">app_token</span>: <span class="string"><span class="content">APP_TOKEN</span></span>
<span class="key">utc_offset</span>: <span class="string"><span class="content">UTC_OFFSET</span></span>
<span class="key">monitored_variables</span>:
- <span class="string"><span class="content">type: instant_readings</span></span>
- <span class="string"><span class="content">type: budget</span></span>
- <span class="string"><span class="content">type: cost</span></span>
<span class="key">period</span>: <span class="string"><span class="content">day</span></span>
<span class="key">currency</span>: <span class="string"><span class="content">$</span></span>
</pre></div>
</div>
<div class="language-yaml highlighter-rouge"><pre class="highlight"><code><span class="c1"># Example configuration.yaml entry</span>
<span class="s">sensor</span><span class="pi">:</span>
<span class="s">platform</span><span class="pi">:</span> <span class="s">efergy</span>
<span class="s">app_token</span><span class="pi">:</span> <span class="s">APP_TOKEN</span>
<span class="s">utc_offset</span><span class="pi">:</span> <span class="s">UTC_OFFSET</span>
<span class="s">monitored_variables</span><span class="pi">:</span>
<span class="pi">-</span> <span class="s">type</span><span class="pi">:</span> <span class="s">instant_readings</span>
<span class="pi">-</span> <span class="s">type</span><span class="pi">:</span> <span class="s">budget</span>
<span class="pi">-</span> <span class="s">type</span><span class="pi">:</span> <span class="s">cost</span>
<span class="s">period</span><span class="pi">:</span> <span class="s">day</span>
<span class="s">currency</span><span class="pi">:</span> <span class="s">$</span>
</code></pre>
</div>
<p><strong>Forecast.io</strong><br />
Fabian has added support for <a href="https://forecast.io/">Forecast.io</a> to get weather forecasts for Home Assistant. You need an API key which is free but requires a <a href="https://developer.forecast.io/register">registration</a>. To add Forecast.io to your installation, add the following to your <code>configuration.yaml</code> file:</p>
<p><strong>Forecast.io</strong>
Fabian has added support for <a href="https://forecast.io/">Forecast.io</a> to get weather forecasts for Home Assistant. You need an API key which is free but requires a <a href="https://developer.forecast.io/register">registration</a>. To add Forecast.io to your installation, add the following to your <code class="highlighter-rouge">configuration.yaml</code> file:</p>
<div class="highlighter-coderay"><div class="CodeRay">
<div class="code"><pre><span class="comment"># Example configuration.yaml entry</span>
<span class="key">sensor</span>:
<span class="key">platform</span>: <span class="string"><span class="content">forecast</span></span>
<span class="key">api_key</span>: <span class="string"><span class="content">YOUR_APP_KEY</span></span>
<span class="key">monitored_conditions</span>:
- <span class="string"><span class="content">summary</span></span>
- <span class="string"><span class="content">precip_type</span></span>
- <span class="string"><span class="content">precip_intensity</span></span>
- <span class="string"><span class="content">temperature</span></span>
- <span class="string"><span class="content">dew_point</span></span>
- <span class="string"><span class="content">wind_speed</span></span>
- <span class="string"><span class="content">wind_bearing</span></span>
- <span class="string"><span class="content">cloud_cover</span></span>
- <span class="string"><span class="content">humidity</span></span>
- <span class="string"><span class="content">pressure</span></span>
- <span class="string"><span class="content">visibility</span></span>
- <span class="string"><span class="content">ozone</span></span>
</pre></div>
</div>
<div class="language-yaml highlighter-rouge"><pre class="highlight"><code><span class="c1"># Example configuration.yaml entry</span>
<span class="s">sensor</span><span class="pi">:</span>
<span class="s">platform</span><span class="pi">:</span> <span class="s">forecast</span>
<span class="s">api_key</span><span class="pi">:</span> <span class="s">YOUR_APP_KEY</span>
<span class="s">monitored_conditions</span><span class="pi">:</span>
<span class="pi">-</span> <span class="s">summary</span>
<span class="pi">-</span> <span class="s">precip_type</span>
<span class="pi">-</span> <span class="s">precip_intensity</span>
<span class="pi">-</span> <span class="s">temperature</span>
<span class="pi">-</span> <span class="s">dew_point</span>
<span class="pi">-</span> <span class="s">wind_speed</span>
<span class="pi">-</span> <span class="s">wind_bearing</span>
<span class="pi">-</span> <span class="s">cloud_cover</span>
<span class="pi">-</span> <span class="s">humidity</span>
<span class="pi">-</span> <span class="s">pressure</span>
<span class="pi">-</span> <span class="s">visibility</span>
<span class="pi">-</span> <span class="s">ozone</span>
</code></pre>
</div>
</article>
@ -308,7 +296,7 @@ Fabian has added support for <a href="https://forecast.io/">Forecast.io</a> to g
<li class="post">
<a href="/blog/2016/08/13/foursquare-fast-com-ffmpeg-gpsd/">0.26: Foursquare, Fast.com, FFMPEG and GPSD</a>
<a href="/blog/2016/08/13/foursquare-fast.com-ffmpeg-gpsd/">0.26: Foursquare, Fast.com, FFMPEG and GPSD</a>
</li>

View file

@ -93,7 +93,7 @@
<ul class="tags unstyled">
<li><a class='category' href='/blog/categories/release-notes/'>Release-Notes</a></li>
<li>Release-Notes</li>
</ul>
@ -110,119 +110,103 @@
<p>Its time for the August release and there is some serious good stuff this time. The core of Home Assistant has gone some serious clean up and a bump in test coverage thanks to <a href="https://github.com/balloob">@balloob</a>. If youre a developer, make sure you read up on <a href="https://github.com/home-assistant/home-assistant/pull/251">the deprecation notices</a>. <a href="https://github.com/fabaff">@fabaff</a> did another great round of documentating all the various components.</p>
<p><strong>MQTT Support</strong><br />
<p><strong>MQTT Support</strong>
<img src="/images/supported_brands/mqtt.png" style="border:none; box-shadow: none; float: right;" height="50" /> The big new addition in this release is the support for the MQTT protocol by <a href="https://github.com/fabaff">@fabaff</a> with some help from <a href="https://github.com/balloob">@balloob</a>. It will now be possible to integrate any IoT device that talks via MQTT. For the initial release we support connecting Home Assistant to a broker (no TLS yet). Components can now subscribe and publish to MQTT topics (<a href="https://github.com/home-assistant/home-assistant/blob/dev/config/custom_components/mqtt_example.py">see the example</a>) and also support for the automation component <a href="/getting-started/automation-trigger/#mqtt-trigger">has been added</a>. For more information, see <a href="/components/mqtt/">the MQTT component page</a>.</p>
<div class="highlighter-coderay"><div class="CodeRay">
<div class="code"><pre><span class="comment"># Example configuration.yaml entry</span>
<span class="key">mqtt</span>:
<span class="key">broker</span>: <span class="string"><span class="content">IP_ADDRESS_BROKER</span></span>
<span class="comment"># All the other options are optional:</span>
<span class="key">port</span>: <span class="string"><span class="content">1883</span></span>
<span class="key">keepalive</span>: <span class="string"><span class="content">60</span></span>
<span class="key">qos</span>: <span class="string"><span class="content">0</span></span>
<span class="key">username</span>: <span class="string"><span class="content">your_username</span></span>
<span class="key">password</span>: <span class="string"><span class="content">your_secret_password</span></span>
</pre></div>
</div>
<div class="language-yaml highlighter-rouge"><pre class="highlight"><code><span class="c1"># Example configuration.yaml entry</span>
<span class="s">mqtt</span><span class="pi">:</span>
<span class="s">broker</span><span class="pi">:</span> <span class="s">IP_ADDRESS_BROKER</span>
<span class="c1"># All the other options are optional:</span>
<span class="s">port</span><span class="pi">:</span> <span class="s">1883</span>
<span class="s">keepalive</span><span class="pi">:</span> <span class="s">60</span>
<span class="s">qos</span><span class="pi">:</span> <span class="s">0</span>
<span class="s">username</span><span class="pi">:</span> <span class="s">your_username</span>
<span class="s">password</span><span class="pi">:</span> <span class="s">your_secret_password</span>
</code></pre>
</div>
<a name="read-more"></a>
<p><strong>Raspberry PI GPIO Support</strong><br />
<p><strong>Raspberry PI GPIO Support</strong>
<img src="/images/supported_brands/raspberry-pi.png" style="border:none; box-shadow: none; float: right;" height="50" /> <a href="https://github.com/gbarba">@gbarba</a> has contributed support to use the general purpose input and output pins on a Raspberry PI as switches inside Home Assistant.</p>
<div class="highlighter-coderay"><div class="CodeRay">
<div class="code"><pre><span class="comment"># Example configuration.yaml entry</span>
<span class="key">switch</span>:
<span class="key">platform</span>: <span class="string"><span class="content">rpi_gpio</span></span>
<span class="key">ports</span>:
<span class="key">11</span>: <span class="string"><span class="content">Fan Office</span></span>
<span class="key">12</span>: <span class="string"><span class="content">Light Desk</span></span>
</pre></div>
</div>
<div class="language-yaml highlighter-rouge"><pre class="highlight"><code><span class="c1"># Example configuration.yaml entry</span>
<span class="s">switch</span><span class="pi">:</span>
<span class="s">platform</span><span class="pi">:</span> <span class="s">rpi_gpio</span>
<span class="s">ports</span><span class="pi">:</span>
<span class="s">11</span><span class="pi">:</span> <span class="s">Fan Office</span>
<span class="s">12</span><span class="pi">:</span> <span class="s">Light Desk</span>
</code></pre>
</div>
<p><strong>ASUSWRT based routers</strong><br />
<p><strong>ASUSWRT based routers</strong>
<img src="/images/supported_brands/asus.png" style="border:none; box-shadow: none; float: right;" height="50" /> <a href="https://github.com/persandstrom">@persandstrom</a> has contributed support to do prescence detection using ASUSWRT based routers.</p>
<div class="highlighter-coderay"><div class="CodeRay">
<div class="code"><pre><span class="comment"># Example configuration.yaml entry</span>
<span class="key">device_tracker</span>:
<span class="key">platform</span>: <span class="string"><span class="content">asuswrt</span></span>
<span class="key">host</span>: <span class="string"><span class="content">YOUR_ROUTER_IP</span></span>
<span class="key">username</span>: <span class="string"><span class="content">YOUR_ADMIN_USERNAME</span></span>
<span class="key">password</span>: <span class="string"><span class="content">YOUR_ADMIN_PASSWORD</span></span>
</pre></div>
</div>
<div class="language-yaml highlighter-rouge"><pre class="highlight"><code><span class="c1"># Example configuration.yaml entry</span>
<span class="s">device_tracker</span><span class="pi">:</span>
<span class="s">platform</span><span class="pi">:</span> <span class="s">asuswrt</span>
<span class="s">host</span><span class="pi">:</span> <span class="s">YOUR_ROUTER_IP</span>
<span class="s">username</span><span class="pi">:</span> <span class="s">YOUR_ADMIN_USERNAME</span>
<span class="s">password</span><span class="pi">:</span> <span class="s">YOUR_ADMIN_PASSWORD</span>
</code></pre>
</div>
<p><strong>Logitech Squeezebox media player support</strong><br />
<p><strong>Logitech Squeezebox media player support</strong>
<img src="/images/supported_brands/logitech.png" style="border:none; box-shadow: none; float: right;" height="50" /> <a href="https://github.com/persandstrom">@persandstrom</a> also contributed support for the Logitech Squeezebox media player. This allows you to control your Logitech Squeezebox from Home Assistant.</p>
<div class="highlighter-coderay"><div class="CodeRay">
<div class="code"><pre><span class="comment"># Example configuration.yaml entry</span>
<span class="key">media_player</span>:
<span class="key">platform</span>: <span class="string"><span class="content">squeezebox</span></span>
<span class="key">host</span>: <span class="string"><span class="content">192.168.1.21</span></span>
<span class="key">port</span>: <span class="string"><span class="content">9090</span></span>
<span class="key">username</span>: <span class="string"><span class="content">user</span></span>
<span class="key">password</span>: <span class="string"><span class="content">password</span></span>
</pre></div>
</div>
<div class="language-yaml highlighter-rouge"><pre class="highlight"><code><span class="c1"># Example configuration.yaml entry</span>
<span class="s">media_player</span><span class="pi">:</span>
<span class="s">platform</span><span class="pi">:</span> <span class="s">squeezebox</span>
<span class="s">host</span><span class="pi">:</span> <span class="s">192.168.1.21</span>
<span class="s">port</span><span class="pi">:</span> <span class="s">9090</span>
<span class="s">username</span><span class="pi">:</span> <span class="s">user</span>
<span class="s">password</span><span class="pi">:</span> <span class="s">password</span>
</code></pre>
</div>
<p><strong>Slack notification support</strong><br />
<p><strong>Slack notification support</strong>
<img src="/images/supported_brands/slack.png" style="border:none; box-shadow: none; float: right;" height="50" /> <a href="https://github.com/jamespcole">@jamespcole</a> has contributed a Slack platform for the notification platform. This allows you to deliver messages to any channel.</p>
<div class="highlighter-coderay"><div class="CodeRay">
<div class="code"><pre><span class="comment"># Example configuration.yaml entry</span>
<span class="key">notify</span>:
<span class="key">platform</span>: <span class="string"><span class="content">slack</span></span>
<span class="key">api_key</span>: <span class="string"><span class="content">ABCDEFGHJKLMNOPQRSTUVXYZ</span></span>
<span class="key">default_channel</span>: <span class="string"><span class="content">'#general'</span></span>
</pre></div>
</div>
<div class="language-yaml highlighter-rouge"><pre class="highlight"><code><span class="c1"># Example configuration.yaml entry</span>
<span class="s">notify</span><span class="pi">:</span>
<span class="s">platform</span><span class="pi">:</span> <span class="s">slack</span>
<span class="s">api_key</span><span class="pi">:</span> <span class="s">ABCDEFGHJKLMNOPQRSTUVXYZ</span>
<span class="s">default_channel</span><span class="pi">:</span> <span class="s1">'</span><span class="s">#general'</span>
</code></pre>
</div>
<p><strong>Edimax Smart Switches support</strong><br />
<p><strong>Edimax Smart Switches support</strong>
<img src="/images/supported_brands/edimax.png" style="border:none; box-shadow: none; float: right;" height="50" /> <a href="https://github.com/rkabadi">@rkabadi</a> has contributed support for integrating Edimax Smart Switches into Home Assistant.</p>
<div class="highlighter-coderay"><div class="CodeRay">
<div class="code"><pre><span class="comment"># Example configuration.yaml entry</span>
<span class="key">switch</span>:
<span class="key">platform</span>: <span class="string"><span class="content">edimax</span></span>
<span class="key">host</span>: <span class="string"><span class="content">192.168.1.32</span></span>
<span class="key">username</span>: <span class="string"><span class="content">YOUR_USERNAME</span></span>
<span class="key">password</span>: <span class="string"><span class="content">YOUR_PASSWORD</span></span>
<span class="key">name</span>: <span class="string"><span class="content">Edimax Smart Plug</span></span>
</pre></div>
</div>
<div class="language-yaml highlighter-rouge"><pre class="highlight"><code><span class="c1"># Example configuration.yaml entry</span>
<span class="s">switch</span><span class="pi">:</span>
<span class="s">platform</span><span class="pi">:</span> <span class="s">edimax</span>
<span class="s">host</span><span class="pi">:</span> <span class="s">192.168.1.32</span>
<span class="s">username</span><span class="pi">:</span> <span class="s">YOUR_USERNAME</span>
<span class="s">password</span><span class="pi">:</span> <span class="s">YOUR_PASSWORD</span>
<span class="s">name</span><span class="pi">:</span> <span class="s">Edimax Smart Plug</span>
</code></pre>
</div>
<p><strong>RFXtrx sensor support</strong><br />
<p><strong>RFXtrx sensor support</strong>
<a href="https://github.com/danielhiversen">@danielhiversen</a> has contributed support for RFXtrx sensors. It supports sensors that communicate in the frequency range of 433.92 MHz.</p>
<div class="highlighter-coderay"><div class="CodeRay">
<div class="code"><pre><span class="comment"># Example configuration.yaml entry</span>
<span class="key">sensor</span>:
- <span class="string"><span class="content">platform: rfxtrx</span></span>
<span class="key">device</span>: <span class="string"><span class="content">PATH_TO_DEVICE</span></span>
</pre></div>
</div>
<div class="language-yaml highlighter-rouge"><pre class="highlight"><code><span class="c1"># Example configuration.yaml entry</span>
<span class="s">sensor</span><span class="pi">:</span>
<span class="pi">-</span> <span class="s">platform</span><span class="pi">:</span> <span class="s">rfxtrx</span>
<span class="s">device</span><span class="pi">:</span> <span class="s">PATH_TO_DEVICE</span>
</code></pre>
</div>
<p>The path to your device, e.g. <code>/dev/serial/by-id/usb-RFXCOM_RFXtrx433_A1Y0NJGR-if00-port0</code></p>
<p>The path to your device, e.g. <code class="highlighter-rouge">/dev/serial/by-id/usb-RFXCOM_RFXtrx433_A1Y0NJGR-if00-port0</code></p>
<p><strong>TEMPer temperature sensor support</strong><br />
<p><strong>TEMPer temperature sensor support</strong>
Support for Temper temperature sensors has been contributed by <a href="https://github.com/rkabadi">@rkabadi</a>.</p>
<div class="highlighter-coderay"><div class="CodeRay">
<div class="code"><pre><span class="comment"># Example configuration.yaml entry</span>
<span class="key">sensor</span>:
<span class="key">platform</span>: <span class="string"><span class="content">temper</span></span>
</pre></div>
</div>
<div class="language-yaml highlighter-rouge"><pre class="highlight"><code><span class="c1"># Example configuration.yaml entry</span>
<span class="s">sensor</span><span class="pi">:</span>
<span class="s">platform</span><span class="pi">:</span> <span class="s">temper</span>
</code></pre>
</div>
</article>
@ -297,7 +281,7 @@ Support for Temper temperature sensors has been contributed by <a href="https://
<li class="post">
<a href="/blog/2016/08/13/foursquare-fast-com-ffmpeg-gpsd/">0.26: Foursquare, Fast.com, FFMPEG and GPSD</a>
<a href="/blog/2016/08/13/foursquare-fast.com-ffmpeg-gpsd/">0.26: Foursquare, Fast.com, FFMPEG and GPSD</a>
</li>

View file

@ -93,7 +93,7 @@
<ul class="tags unstyled">
<li><a class='category' href='/blog/categories/release-notes/'>Release-Notes</a></li>
<li>Release-Notes</li>
</ul>
@ -108,7 +108,7 @@
</header>
<p>A minor bug fix release to fix some issues that have come up since the last release. Please upgrade as soon as possible by running <code>git pull</code> from the Home Assistant directory.</p>
<p>A minor bug fix release to fix some issues that have come up since the last release. Please upgrade as soon as possible by running <code class="highlighter-rouge">git pull</code> from the Home Assistant directory.</p>
<p>This release is a major milestone in our test coverage as weve crossed into the 80s! It has to be noted that this covers mainly the core and automation components. Platforms that communicate with IoT devices have been excluded.</p>
@ -119,20 +119,18 @@
<li>Improved support for MQTT topic subscriptions has been contributed by <a href="https://github.com/qrtn">@qrtn</a></li>
</ul>
<p><strong>Verisure Support</strong><br />
<p><strong>Verisure Support</strong>
<img src="/images/supported_brands/verisure.png" style="border:none; box-shadow: none; float: right;" height="50" /> Home Assistant support to integrate your <a href="https://www.verisure.com/">Verisure</a> alarms, hygrometers, sensors and thermometers has been contributed by <a href="https://github.com/persandstrom">@persandstrom</a>.</p>
<div class="highlighter-coderay"><div class="CodeRay">
<div class="code"><pre><span class="comment"># Example configuration.yaml entry</span>
<span class="key">verisure</span>:
<span class="key">username</span>: <span class="string"><span class="content">user@example.com</span></span>
<span class="key">password</span>: <span class="string"><span class="content">password</span></span>
<span class="key">alarm</span>: <span class="string"><span class="content">1</span></span>
<span class="key">hygrometers</span>: <span class="string"><span class="content">0</span></span>
<span class="key">smartplugs</span>: <span class="string"><span class="content">1</span></span>
<span class="key">thermometers</span>: <span class="string"><span class="content">0</span></span>
</pre></div>
</div>
<div class="language-yaml highlighter-rouge"><pre class="highlight"><code><span class="c1"># Example configuration.yaml entry</span>
<span class="s">verisure</span><span class="pi">:</span>
<span class="s">username</span><span class="pi">:</span> <span class="s">user@example.com</span>
<span class="s">password</span><span class="pi">:</span> <span class="s">password</span>
<span class="s">alarm</span><span class="pi">:</span> <span class="s">1</span>
<span class="s">hygrometers</span><span class="pi">:</span> <span class="s">0</span>
<span class="s">smartplugs</span><span class="pi">:</span> <span class="s">1</span>
<span class="s">thermometers</span><span class="pi">:</span> <span class="s">0</span>
</code></pre>
</div>
</article>
@ -207,7 +205,7 @@
<li class="post">
<a href="/blog/2016/08/13/foursquare-fast-com-ffmpeg-gpsd/">0.26: Foursquare, Fast.com, FFMPEG and GPSD</a>
<a href="/blog/2016/08/13/foursquare-fast.com-ffmpeg-gpsd/">0.26: Foursquare, Fast.com, FFMPEG and GPSD</a>
</li>

View file

@ -87,13 +87,13 @@
<div class="meta clearfix">
<time datetime="2015-08-26T15:12:00+00:00" pubdate data-updated="true"><i class="icon-calendar"></i> August 26, 2015</time>
<span class="byline author vcard"><i class='icon-user'></i> Nolan Gilley</span>
<span><i class='icon-time'></i> four minutes reading time</span>
<span><i class='icon-time'></i> five minutes reading time</span>
<span>
<i class="icon-tags"></i>
<ul class="tags unstyled">
<li><a class='category' href='/blog/categories/user-stories/'>User-Stories</a></li>
<li>User-Stories</li>
</ul>
@ -158,87 +158,85 @@
The automation and script syntax here is using a deprecated and no longer supported format.
</p>
<div class="highlighter-coderay"><div class="CodeRay">
<div class="code"><pre><span class="key">mqtt</span>:
<span class="key">broker</span>: <span class="string"><span class="content">192.168.1.100</span></span>
<span class="key">port</span>: <span class="string"><span class="content">1883</span></span>
<span class="key">keepalive</span>: <span class="string"><span class="content">60</span></span>
<span class="key">qos</span>: <span class="string"><span class="content">0</span></span>
<div class="language-yaml highlighter-rouge"><pre class="highlight"><code><span class="s">mqtt</span><span class="pi">:</span>
<span class="s">broker</span><span class="pi">:</span> <span class="s">192.168.1.100</span>
<span class="s">port</span><span class="pi">:</span> <span class="s">1883</span>
<span class="s">keepalive</span><span class="pi">:</span> <span class="s">60</span>
<span class="s">qos</span><span class="pi">:</span> <span class="s">0</span>
<span class="key">sensor</span>:
<span class="key">platform</span>: <span class="string"><span class="content">mqtt</span></span>
<span class="key">name</span>: <span class="string"><span class="delimiter">&quot;</span><span class="content">Dryer Status</span><span class="delimiter">&quot;</span></span>
<span class="key">state_topic</span>: <span class="string"><span class="delimiter">&quot;</span><span class="content">sensor/dryer</span><span class="delimiter">&quot;</span></span>
<span class="key">unit_of_measurement</span>: <span class="string"><span class="delimiter">&quot;</span><span class="delimiter">&quot;</span></span>
<span class="s">sensor</span><span class="pi">:</span>
<span class="s">platform</span><span class="pi">:</span> <span class="s">mqtt</span>
<span class="s">name</span><span class="pi">:</span> <span class="s2">"</span><span class="s">Dryer</span><span class="nv"> </span><span class="s">Status"</span>
<span class="s">state_topic</span><span class="pi">:</span> <span class="s2">"</span><span class="s">sensor/dryer"</span>
<span class="s">unit_of_measurement</span><span class="pi">:</span> <span class="s2">"</span><span class="s">"</span>
<span class="key">sensor 2</span>:
<span class="key">platform</span>: <span class="string"><span class="content">mqtt</span></span>
<span class="key">name</span>: <span class="string"><span class="delimiter">&quot;</span><span class="content">Washer Status</span><span class="delimiter">&quot;</span></span>
<span class="key">state_topic</span>: <span class="string"><span class="delimiter">&quot;</span><span class="content">sensor/washer</span><span class="delimiter">&quot;</span></span>
<span class="key">unit_of_measurement</span>: <span class="string"><span class="delimiter">&quot;</span><span class="delimiter">&quot;</span></span>
<span class="s">sensor 2</span><span class="pi">:</span>
<span class="s">platform</span><span class="pi">:</span> <span class="s">mqtt</span>
<span class="s">name</span><span class="pi">:</span> <span class="s2">"</span><span class="s">Washer</span><span class="nv"> </span><span class="s">Status"</span>
<span class="s">state_topic</span><span class="pi">:</span> <span class="s2">"</span><span class="s">sensor/washer"</span>
<span class="s">unit_of_measurement</span><span class="pi">:</span> <span class="s2">"</span><span class="s">"</span>
<span class="key">automation</span>:
<span class="key">alias</span>: <span class="string"><span class="content">Dryer complete</span></span>
<span class="s">automation</span><span class="pi">:</span>
<span class="s">alias</span><span class="pi">:</span> <span class="s">Dryer complete</span>
<span class="key">platform</span>: <span class="string"><span class="content">state</span></span>
<span class="key">state_entity_id</span>: <span class="string"><span class="content">sensor.dryer_status</span></span>
<span class="key">state_from</span>: <span class="string"><span class="content">'Running'</span></span>
<span class="key">state_to</span>: <span class="string"><span class="content">'Complete'</span></span>
<span class="s">platform</span><span class="pi">:</span> <span class="s">state</span>
<span class="s">state_entity_id</span><span class="pi">:</span> <span class="s">sensor.dryer_status</span>
<span class="s">state_from</span><span class="pi">:</span> <span class="s1">'</span><span class="s">Running'</span>
<span class="s">state_to</span><span class="pi">:</span> <span class="s1">'</span><span class="s">Complete'</span>
<span class="key">execute_service</span>: <span class="string"><span class="content">script.turn_on</span></span>
<span class="key">service_entity_id</span>: <span class="string"><span class="content">script.dryer_complete</span></span>
<span class="s">execute_service</span><span class="pi">:</span> <span class="s">script.turn_on</span>
<span class="s">service_entity_id</span><span class="pi">:</span> <span class="s">script.dryer_complete</span>
<span class="key">automation 2</span>:
<span class="key">alias</span>: <span class="string"><span class="content">Dryer emptied</span></span>
<span class="s">automation 2</span><span class="pi">:</span>
<span class="s">alias</span><span class="pi">:</span> <span class="s">Dryer emptied</span>
<span class="key">platform</span>: <span class="string"><span class="content">state</span></span>
<span class="key">state_entity_id</span>: <span class="string"><span class="content">sensor.dryer_status</span></span>
<span class="key">state_from</span>: <span class="string"><span class="content">'Complete'</span></span>
<span class="key">state_to</span>: <span class="string"><span class="content">'Empty'</span></span>
<span class="s">platform</span><span class="pi">:</span> <span class="s">state</span>
<span class="s">state_entity_id</span><span class="pi">:</span> <span class="s">sensor.dryer_status</span>
<span class="s">state_from</span><span class="pi">:</span> <span class="s1">'</span><span class="s">Complete'</span>
<span class="s">state_to</span><span class="pi">:</span> <span class="s1">'</span><span class="s">Empty'</span>
<span class="key">execute_service</span>: <span class="string"><span class="content">script.turn_on</span></span>
<span class="key">service_entity_id</span>: <span class="string"><span class="content">script.dryer_cleared</span></span>
<span class="s">execute_service</span><span class="pi">:</span> <span class="s">script.turn_on</span>
<span class="s">service_entity_id</span><span class="pi">:</span> <span class="s">script.dryer_cleared</span>
<span class="key">script</span>:
<span class="key">dryer_complete</span>:
<span class="key">alias</span>: <span class="string"><span class="content">Dryer Complete Script</span></span>
<span class="key">sequence</span>:
- <span class="string"><span class="content">alias: Pushbullet Notification</span></span>
<span class="key">execute_service</span>: <span class="string"><span class="content">notify.notify</span></span>
<span class="key">service_data</span>:
<span class="key">message</span>: <span class="string"><span class="delimiter">&quot;</span><span class="content">The dryer has finished its cycle, please empty it!</span><span class="delimiter">&quot;</span></span>
- <span class="string"><span class="content">alias: Living Room Lights Red</span></span>
<span class="key">execute_service</span>: <span class="string"><span class="content">scene.turn_on</span></span>
<span class="key">service_data</span>:
<span class="key">entity_id</span>: <span class="string"><span class="content">scene.red</span></span>
- <span class="string"><span class="content">delay:</span><span class="content">
seconds: 1</span></span>
- <span class="string"><span class="content">alias: Living Room Lights Off</span></span>
<span class="key">execute_service</span>: <span class="string"><span class="content">light.turn_off</span></span>
<span class="key">service_data</span>:
<span class="key">entity_id</span>: <span class="string"><span class="content">group.living_room</span></span>
- <span class="string"><span class="content">delay:</span><span class="content">
seconds: 1</span></span>
- <span class="string"><span class="content">alias: Living Room Lights Red</span></span>
<span class="key">execute_service</span>: <span class="string"><span class="content">scene.turn_on</span></span>
<span class="key">service_data</span>:
<span class="key">entity_id</span>: <span class="string"><span class="content">scene.red</span></span>
<span class="s">script</span><span class="pi">:</span>
<span class="s">dryer_complete</span><span class="pi">:</span>
<span class="s">alias</span><span class="pi">:</span> <span class="s">Dryer Complete Script</span>
<span class="s">sequence</span><span class="pi">:</span>
<span class="pi">-</span> <span class="s">alias</span><span class="pi">:</span> <span class="s">Pushbullet Notification</span>
<span class="s">execute_service</span><span class="pi">:</span> <span class="s">notify.notify</span>
<span class="s">service_data</span><span class="pi">:</span>
<span class="s">message</span><span class="pi">:</span> <span class="s2">"</span><span class="s">The</span><span class="nv"> </span><span class="s">dryer</span><span class="nv"> </span><span class="s">has</span><span class="nv"> </span><span class="s">finished</span><span class="nv"> </span><span class="s">its</span><span class="nv"> </span><span class="s">cycle,</span><span class="nv"> </span><span class="s">please</span><span class="nv"> </span><span class="s">empty</span><span class="nv"> </span><span class="s">it!"</span>
<span class="pi">-</span> <span class="s">alias</span><span class="pi">:</span> <span class="s">Living Room Lights Red</span>
<span class="s">execute_service</span><span class="pi">:</span> <span class="s">scene.turn_on</span>
<span class="s">service_data</span><span class="pi">:</span>
<span class="s">entity_id</span><span class="pi">:</span> <span class="s">scene.red</span>
<span class="pi">-</span> <span class="s">delay</span><span class="pi">:</span>
<span class="s">seconds</span><span class="pi">:</span> <span class="s">1</span>
<span class="pi">-</span> <span class="s">alias</span><span class="pi">:</span> <span class="s">Living Room Lights Off</span>
<span class="s">execute_service</span><span class="pi">:</span> <span class="s">light.turn_off</span>
<span class="s">service_data</span><span class="pi">:</span>
<span class="s">entity_id</span><span class="pi">:</span> <span class="s">group.living_room</span>
<span class="pi">-</span> <span class="s">delay</span><span class="pi">:</span>
<span class="s">seconds</span><span class="pi">:</span> <span class="s">1</span>
<span class="pi">-</span> <span class="s">alias</span><span class="pi">:</span> <span class="s">Living Room Lights Red</span>
<span class="s">execute_service</span><span class="pi">:</span> <span class="s">scene.turn_on</span>
<span class="s">service_data</span><span class="pi">:</span>
<span class="s">entity_id</span><span class="pi">:</span> <span class="s">scene.red</span>
<span class="key">dryer_cleared</span>:
<span class="key">alias</span>: <span class="string"><span class="content">Dryer Cleared Script</span></span>
<span class="key">sequence</span>:
- <span class="string"><span class="content">alias: Living Room Lights Off</span></span>
<span class="key">execute_service</span>: <span class="string"><span class="content">light.turn_off</span></span>
<span class="key">service_data</span>:
<span class="key">entity_id</span>: <span class="string"><span class="content">group.living_room</span></span>
- <span class="string"><span class="content">delay:</span><span class="content">
seconds: 1</span></span>
- <span class="string"><span class="content">alias: Living Room Lights Normal</span></span>
<span class="key">execute_service</span>: <span class="string"><span class="content">scene.turn_on</span></span>
<span class="key">service_data</span>:
<span class="key">entity_id</span>: <span class="string"><span class="content">scene.normal</span></span>
</pre></div>
</div>
<span class="s">dryer_cleared</span><span class="pi">:</span>
<span class="s">alias</span><span class="pi">:</span> <span class="s">Dryer Cleared Script</span>
<span class="s">sequence</span><span class="pi">:</span>
<span class="pi">-</span> <span class="s">alias</span><span class="pi">:</span> <span class="s">Living Room Lights Off</span>
<span class="s">execute_service</span><span class="pi">:</span> <span class="s">light.turn_off</span>
<span class="s">service_data</span><span class="pi">:</span>
<span class="s">entity_id</span><span class="pi">:</span> <span class="s">group.living_room</span>
<span class="pi">-</span> <span class="s">delay</span><span class="pi">:</span>
<span class="s">seconds</span><span class="pi">:</span> <span class="s">1</span>
<span class="pi">-</span> <span class="s">alias</span><span class="pi">:</span> <span class="s">Living Room Lights Normal</span>
<span class="s">execute_service</span><span class="pi">:</span> <span class="s">scene.turn_on</span>
<span class="s">service_data</span><span class="pi">:</span>
<span class="s">entity_id</span><span class="pi">:</span> <span class="s">scene.normal</span>
</code></pre>
</div>
<p>Resources used:</p>
@ -320,7 +318,7 @@ The automation and script syntax here is using a deprecated and no longer suppor
<li class="post">
<a href="/blog/2016/08/13/foursquare-fast-com-ffmpeg-gpsd/">0.26: Foursquare, Fast.com, FFMPEG and GPSD</a>
<a href="/blog/2016/08/13/foursquare-fast.com-ffmpeg-gpsd/">0.26: Foursquare, Fast.com, FFMPEG and GPSD</a>
</li>

View file

@ -93,7 +93,7 @@
<ul class="tags unstyled">
<li><a class='category' href='/blog/categories/release-notes/'>Release-Notes</a></li>
<li>Release-Notes</li>
</ul>
@ -113,9 +113,9 @@
<ul>
<li>Each release will have a version number, starting with version 0.7. This was chosen because it shows that we have been around for some time but are not considering ourselves to be fully stable.</li>
<li>Each release will be pushed to PyPi. This will be the only supported method of distribution.</li>
<li>Home Assistant is available after installation as a command-line utility <code>hass</code>.</li>
<li>The default configuration location has been moved from <code>config</code> in the current working directory to <code>~/.homeassistant</code> (<code>%APPDATA%/.homeassistant</code> on Windows).</li>
<li>Requirements for components and platforms are no longer installed into the current Python environment (being virtual or not) but will be installed in <code>&lt;config-dir&gt;/lib</code>.</li>
<li>Home Assistant is available after installation as a command-line utility <code class="highlighter-rouge">hass</code>.</li>
<li>The default configuration location has been moved from <code class="highlighter-rouge">config</code> in the current working directory to <code class="highlighter-rouge">~/.homeassistant</code> (<code class="highlighter-rouge">%APPDATA%/.homeassistant</code> on Windows).</li>
<li>Requirements for components and platforms are no longer installed into the current Python environment (being virtual or not) but will be installed in <code class="highlighter-rouge">&lt;config-dir&gt;/lib</code>.</li>
</ul>
<p>A huge shout out to <a href="https://github.com/rmkraus">Ryan Kraus</a> for making this all possible. Please make sure you read <a href="/blog/2015/08/31/version-7-revamped-ui-and-improved-distribution/#read-more">the full blog post</a> for details on how to migrate your existing setup.</p>
@ -133,93 +133,81 @@
<h3><a class="title-link" name="migration-to-version-07" href="#migration-to-version-07"></a> Migration to version 0.7</h3>
<p>For this example, lets say we have an old Home Assistant installation in <code>/home/paulus/home-assistant</code>.</p>
<p>For this example, lets say we have an old Home Assistant installation in <code class="highlighter-rouge">/home/paulus/home-assistant</code>.</p>
<p>If you want to migrate your existing configuration to be used as the default configuration:</p>
<div class="highlighter-coderay"><div class="CodeRay">
<div class="code"><pre>$ cp -r /home/paulus/home-assistant ~/.homeassistant
</pre></div>
</div>
<div class="language-bash highlighter-rouge"><pre class="highlight"><code><span class="gp">$ </span>cp -r /home/paulus/home-assistant ~/.homeassistant
</code></pre>
</div>
<p>It If you want to have the configuration in a different location, for example <code>/home/paulus/home-assistant-config</code>, you will have to point Home Assistant at this configuration folder when launching:</p>
<p>It If you want to have the configuration in a different location, for example <code class="highlighter-rouge">/home/paulus/home-assistant-config</code>, you will have to point Home Assistant at this configuration folder when launching:</p>
<div class="highlighter-coderay"><div class="CodeRay">
<div class="code"><pre>$ hass --config /home/paulus/home-assistant-config
</pre></div>
</div>
<div class="language-bash highlighter-rouge"><pre class="highlight"><code><span class="gp">$ </span>hass --config /home/paulus/home-assistant-config
</code></pre>
</div>
<h3><a class="title-link" name="new-platforms" href="#new-platforms"></a> New platforms</h3>
<p>And last, but not least: new platforms!</p>
<p><strong>MQTT Sensors and Switches</strong><br />
<p><strong>MQTT Sensors and Switches</strong>
<img src="/images/supported_brands/mqtt.png" style="border:none; box-shadow: none; float: right;" height="50" /> <a href="https://github.com/sfam">@sfam</a> has blessed us with two more MQTT platforms to extend our integration with MQTTT: <a href="/components/sensor.mqtt/">sensor</a> and <a href="/components/switch.mqtt/">switch</a>. Both platforms require the MQTT component to be connected to a broker.</p>
<div class="highlighter-coderay"><div class="CodeRay">
<div class="code"><pre><span class="comment"># Example configuration.yml entr</span>
<span class="key">sensor</span>:
<span class="key">platform</span>: <span class="string"><span class="content">mqtt</span></span>
<span class="key">name</span>: <span class="string"><span class="delimiter">&quot;</span><span class="content">MQTT Sensor</span><span class="delimiter">&quot;</span></span>
<span class="key">state_topic</span>: <span class="string"><span class="delimiter">&quot;</span><span class="content">home/bedroom/temperature</span><span class="delimiter">&quot;</span></span>
<span class="key">unit_of_measurement</span>: <span class="string"><span class="delimiter">&quot;</span><span class="content">ºC</span><span class="delimiter">&quot;</span></span>
<div class="language-yaml highlighter-rouge"><pre class="highlight"><code><span class="c1"># Example configuration.yml entr</span>
<span class="s">sensor</span><span class="pi">:</span>
<span class="s">platform</span><span class="pi">:</span> <span class="s">mqtt</span>
<span class="s">name</span><span class="pi">:</span> <span class="s2">"</span><span class="s">MQTT</span><span class="nv"> </span><span class="s">Sensor"</span>
<span class="s">state_topic</span><span class="pi">:</span> <span class="s2">"</span><span class="s">home/bedroom/temperature"</span>
<span class="s">unit_of_measurement</span><span class="pi">:</span> <span class="s2">"</span><span class="s">ºC"</span>
<span class="key">switch</span>:
<span class="key">platform</span>: <span class="string"><span class="content">mqtt</span></span>
<span class="key">name</span>: <span class="string"><span class="delimiter">&quot;</span><span class="content">Bedroom Switch</span><span class="delimiter">&quot;</span></span>
<span class="key">state_topic</span>: <span class="string"><span class="delimiter">&quot;</span><span class="content">home/bedroom/switch1</span><span class="delimiter">&quot;</span></span>
<span class="key">command_topic</span>: <span class="string"><span class="delimiter">&quot;</span><span class="content">home/bedroom/switch1/set</span><span class="delimiter">&quot;</span></span>
<span class="key">payload_on</span>: <span class="string"><span class="delimiter">&quot;</span><span class="content">ON</span><span class="delimiter">&quot;</span></span>
<span class="key">payload_off</span>: <span class="string"><span class="delimiter">&quot;</span><span class="content">OFF</span><span class="delimiter">&quot;</span></span>
<span class="key">optimistic</span>: <span class="string"><span class="content">false</span></span>
</pre></div>
</div>
<span class="s">switch</span><span class="pi">:</span>
<span class="s">platform</span><span class="pi">:</span> <span class="s">mqtt</span>
<span class="s">name</span><span class="pi">:</span> <span class="s2">"</span><span class="s">Bedroom</span><span class="nv"> </span><span class="s">Switch"</span>
<span class="s">state_topic</span><span class="pi">:</span> <span class="s2">"</span><span class="s">home/bedroom/switch1"</span>
<span class="s">command_topic</span><span class="pi">:</span> <span class="s2">"</span><span class="s">home/bedroom/switch1/set"</span>
<span class="s">payload_on</span><span class="pi">:</span> <span class="s2">"</span><span class="s">ON"</span>
<span class="s">payload_off</span><span class="pi">:</span> <span class="s2">"</span><span class="s">OFF"</span>
<span class="s">optimistic</span><span class="pi">:</span> <span class="s">false</span>
</code></pre>
</div>
<p><strong>Actiontec MI424WR Verizon FIOS Wireless router</strong><br />
<p><strong>Actiontec MI424WR Verizon FIOS Wireless router</strong>
<img src="/images/supported_brands/actiontec.png" style="border:none; box-shadow: none; float: right;" height="50" /> <a href="https://github.com/nkgilley">Nolan</a> has contributed support for Actiontec wireless routers.</p>
<div class="highlighter-coderay"><div class="CodeRay">
<div class="code"><pre><span class="comment"># Example configuration.yaml entry</span>
<span class="key">device_tracker</span>:
<span class="key">platform</span>: <span class="string"><span class="content">actiontec</span></span>
<span class="key">host</span>: <span class="string"><span class="content">YOUR_ROUTER_IP</span></span>
<span class="key">username</span>: <span class="string"><span class="content">YOUR_ADMIN_USERNAME</span></span>
<span class="key">password</span>: <span class="string"><span class="content">YOUR_ADMIN_PASSWORD</span></span>
</pre></div>
</div>
<div class="language-yaml highlighter-rouge"><pre class="highlight"><code><span class="c1"># Example configuration.yaml entry</span>
<span class="s">device_tracker</span><span class="pi">:</span>
<span class="s">platform</span><span class="pi">:</span> <span class="s">actiontec</span>
<span class="s">host</span><span class="pi">:</span> <span class="s">YOUR_ROUTER_IP</span>
<span class="s">username</span><span class="pi">:</span> <span class="s">YOUR_ADMIN_USERNAME</span>
<span class="s">password</span><span class="pi">:</span> <span class="s">YOUR_ADMIN_PASSWORD</span>
</code></pre>
</div>
<p><strong>DHT temperature and humidty sensors</strong><br />
<p><strong>DHT temperature and humidty sensors</strong>
<a href="https://github.com/makemeasandwich">@MakeMeASandwich</a> has contributed support for DHT temperature and humidity sensors. It allows you to get the current temperature and humidity from a DHT11, DHT22, or AM2302 device.</p>
<div class="highlighter-coderay"><div class="CodeRay">
<div class="code"><pre><span class="comment"># Example configuration.yaml entry</span>
<span class="key">sensor</span>:
<span class="key">platform</span>: <span class="string"><span class="content">dht</span></span>
<span class="key">sensor</span>: <span class="string"><span class="content">DHT22</span></span>
<span class="key">pin</span>: <span class="string"><span class="content">23</span></span>
<span class="key">monitored_conditions</span>:
- <span class="string"><span class="content">temperature</span></span>
- <span class="string"><span class="content">humidity</span></span>
</pre></div>
</div>
<div class="language-yaml highlighter-rouge"><pre class="highlight"><code><span class="c1"># Example configuration.yaml entry</span>
<span class="s">sensor</span><span class="pi">:</span>
<span class="s">platform</span><span class="pi">:</span> <span class="s">dht</span>
<span class="s">sensor</span><span class="pi">:</span> <span class="s">DHT22</span>
<span class="s">pin</span><span class="pi">:</span> <span class="s">23</span>
<span class="s">monitored_conditions</span><span class="pi">:</span>
<span class="pi">-</span> <span class="s">temperature</span>
<span class="pi">-</span> <span class="s">humidity</span>
</code></pre>
</div>
<p><strong>Aruba device tracker</strong><br />
<p><strong>Aruba device tracker</strong>
<a href="https://github.com/michaelarnauts">Michael Arnauts</a> has contributed support for Aruba wireless routers for presence detection.</p>
<div class="highlighter-coderay"><div class="CodeRay">
<div class="code"><pre><span class="comment"># Example configuration.yaml entry</span>
<span class="key">device_tracker</span>:
<span class="key">platform</span>: <span class="string"><span class="content">aruba</span></span>
<span class="key">host</span>: <span class="string"><span class="content">YOUR_ACCESS_POINT_IP</span></span>
<span class="key">username</span>: <span class="string"><span class="content">YOUR_ADMIN_USERNAME</span></span>
<span class="key">password</span>: <span class="string"><span class="content">YOUR_ADMIN_PASSWORD</span></span>
</pre></div>
</div>
<div class="language-yaml highlighter-rouge"><pre class="highlight"><code><span class="c1"># Example configuration.yaml entry</span>
<span class="s">device_tracker</span><span class="pi">:</span>
<span class="s">platform</span><span class="pi">:</span> <span class="s">aruba</span>
<span class="s">host</span><span class="pi">:</span> <span class="s">YOUR_ACCESS_POINT_IP</span>
<span class="s">username</span><span class="pi">:</span> <span class="s">YOUR_ADMIN_USERNAME</span>
<span class="s">password</span><span class="pi">:</span> <span class="s">YOUR_ADMIN_PASSWORD</span>
</code></pre>
</div>
</article>
@ -294,7 +282,7 @@
<li class="post">
<a href="/blog/2016/08/13/foursquare-fast-com-ffmpeg-gpsd/">0.26: Foursquare, Fast.com, FFMPEG and GPSD</a>
<a href="/blog/2016/08/13/foursquare-fast.com-ffmpeg-gpsd/">0.26: Foursquare, Fast.com, FFMPEG and GPSD</a>
</li>

View file

@ -87,15 +87,15 @@
<div class="meta clearfix">
<time datetime="2015-09-11T09:19:38+00:00" pubdate data-updated="true"><i class="icon-calendar"></i> September 11, 2015</time>
<span class="byline author vcard"><i class='icon-user'></i> Fabian Affolter</span>
<span><i class='icon-time'></i> nine minutes reading time</span>
<span><i class='icon-time'></i> eight minutes reading time</span>
<span>
<i class="icon-tags"></i>
<ul class="tags unstyled">
<li><a class='category' href='/blog/categories/how-to/'>How-To</a></li>
<li>How-To</li>
<li><a class='category' href='/blog/categories/mqtt/'>MQTT</a></li>
<li>MQTT</li>
</ul>
@ -121,38 +121,24 @@
<h3><a class="title-link" name="manual-usage" href="#manual-usage"></a> Manual usage</h3>
<p>The simplest but not the coolest way as a human to interact with a Home Assistant sensor is launching a command manually. Lets create a “Mood” sensor. For simplicity Home Assistant and the MQTT broker are both running on the same host. The needed configuration snipplets to add to the <code>configuration.yaml</code> file consists of two parts: one for the broker and one for the sensor.</p>
<p>The simplest but not the coolest way as a human to interact with a Home Assistant sensor is launching a command manually. Lets create a “Mood” sensor. For simplicity Home Assistant and the MQTT broker are both running on the same host. The needed configuration snipplets to add to the <code class="highlighter-rouge">configuration.yaml</code> file consists of two parts: one for the broker and one for the sensor.</p>
<div class="highlighter-coderay"><table class="CodeRay"><tr>
<td class="line-numbers"><pre><a href="#n1" name="n1">1</a>
<a href="#n2" name="n2">2</a>
<a href="#n3" name="n3">3</a>
<a href="#n4" name="n4">4</a>
<a href="#n5" name="n5">5</a>
<a href="#n6" name="n6">6</a>
<a href="#n7" name="n7">7</a>
</pre></td>
<td class="code"><pre><span class="key">mqtt</span>:
<span class="key">broker</span>: <span class="string"><span class="content">127.0.0.1</span></span>
<div class="language-yaml highlighter-rouge"><pre class="highlight"><code><span class="s">mqtt</span><span class="pi">:</span>
<span class="s">broker</span><span class="pi">:</span> <span class="s">127.0.0.1</span>
<span class="key">sensor</span>:
- <span class="string"><span class="content">platform: mqtt</span></span>
<span class="key">name</span>: <span class="string"><span class="delimiter">&quot;</span><span class="content">Fabian's Mood</span><span class="delimiter">&quot;</span></span>
<span class="key">state_topic</span>: <span class="string"><span class="delimiter">&quot;</span><span class="content">home-assistant/fabian/mood</span><span class="delimiter">&quot;</span></span>
</pre></td>
</tr></table>
<span class="s">sensor</span><span class="pi">:</span>
<span class="pi">-</span> <span class="s">platform</span><span class="pi">:</span> <span class="s">mqtt</span>
<span class="s">name</span><span class="pi">:</span> <span class="s2">"</span><span class="s">Fabian's</span><span class="nv"> </span><span class="s">Mood"</span>
<span class="s">state_topic</span><span class="pi">:</span> <span class="s2">"</span><span class="s">home-assistant/fabian/mood"</span>
</code></pre>
</div>
<p>After a restart of Home Assistant the “Mood” sensor will show up in the frontend. For more details about the configuration of MQTT itself and the sensor, please refer to the <a href="https://home-assistant.io/components/mqtt/">MQTT component</a> or the <a href="https://home-assistant.io/components/sensor.mqtt/">MQTT sensor</a> documentation.</p>
<p>Now we can set the mood. The commandline tool (<code>mosquitto_pub</code>) which is shipped with <code>mosquitto</code> is used to send an MQTT message.</p>
<p>Now we can set the mood. The commandline tool (<code class="highlighter-rouge">mosquitto_pub</code>) which is shipped with <code class="highlighter-rouge">mosquitto</code> is used to send an MQTT message.</p>
<div class="highlighter-coderay"><table class="CodeRay"><tr>
<td class="line-numbers"><pre><a href="#n1" name="n1">1</a>
</pre></td>
<td class="code"><pre>$ mosquitto_pub -h 127.0.0.1 -t &quot;home-assistant/fabian/mood&quot; -m &quot;bad&quot;
</pre></td>
</tr></table>
<div class="language-bash highlighter-rouge"><pre class="highlight"><code><span class="gp">$ </span>mosquitto_pub -h 127.0.0.1 -t <span class="s2">"home-assistant/fabian/mood"</span> -m <span class="s2">"bad"</span>
</code></pre>
</div>
<p class="img">
@ -166,76 +152,44 @@
<p>The last section was pretty boring, I know. Nobody wants to send MQTT messages by hand if there is a computer on the desk. If you are playing the lottery this section is for you. If not, read it anyway because the lottery is just an example :-).</p>
<p>This example is using the <a href="https://eclipse.org/paho/clients/python/">Paho MQTT Python binding</a> because those binding should be available on the host where Home Assistant is running. If you want to use this example on another machine, please make sure that the bindings are installed (<code>pip3 install paho-mqtt</code>).</p>
<p>This example is using the <a href="https://eclipse.org/paho/clients/python/">Paho MQTT Python binding</a> because those binding should be available on the host where Home Assistant is running. If you want to use this example on another machine, please make sure that the bindings are installed (<code class="highlighter-rouge">pip3 install paho-mqtt</code>).</p>
<p>The first step is to add an additional MQTT sensor to the <code>configuration.yaml</code> file. The sensor will be called “Lottery” and the unit of measurement will be “No.”.</p>
<p>The first step is to add an additional MQTT sensor to the <code class="highlighter-rouge">configuration.yaml</code> file. The sensor will be called “Lottery” and the unit of measurement will be “No.”.</p>
<div class="highlighter-coderay"><table class="CodeRay"><tr>
<td class="line-numbers"><pre><a href="#n1" name="n1">1</a>
<a href="#n2" name="n2">2</a>
<a href="#n3" name="n3">3</a>
<a href="#n4" name="n4">4</a>
</pre></td>
<td class="code"><pre> - <span class="string"><span class="content">platform: mqtt</span></span>
<span class="key">name</span>: <span class="string"><span class="delimiter">&quot;</span><span class="content">Lottery</span><span class="delimiter">&quot;</span></span>
<span class="key">state_topic</span>: <span class="string"><span class="delimiter">&quot;</span><span class="content">home-assistant/lottery/number</span><span class="delimiter">&quot;</span></span>
<span class="key">unit_of_measurement</span>: <span class="string"><span class="delimiter">&quot;</span><span class="content">No.</span><span class="delimiter">&quot;</span></span>
</pre></td>
</tr></table>
<div class="language-yaml highlighter-rouge"><pre class="highlight"><code> <span class="pi">-</span> <span class="s">platform</span><span class="pi">:</span> <span class="s">mqtt</span>
<span class="s">name</span><span class="pi">:</span> <span class="s2">"</span><span class="s">Lottery"</span>
<span class="s">state_topic</span><span class="pi">:</span> <span class="s2">"</span><span class="s">home-assistant/lottery/number"</span>
<span class="s">unit_of_measurement</span><span class="pi">:</span> <span class="s2">"</span><span class="s">No."</span>
</code></pre>
</div>
<p>Dont forget to restart Home Assistant to make the configuration active.</p>
<p>To play, we need numbers from 1 to 49 which can be marked on the ticket. Those numbers should be random and displayed in the Home Assistant frontend. The Python script below is another simple example on how to send MQTT messages from the commandline; this time in a loop. For further information and examples please check the <a href="https://eclipse.org/paho/clients/python/docs/">Paho MQTT</a> documentation.</p>
<div class="highlighter-coderay"><table class="CodeRay"><tr>
<td class="line-numbers"><pre><a href="#n1" name="n1">1</a>
<a href="#n2" name="n2">2</a>
<a href="#n3" name="n3">3</a>
<a href="#n4" name="n4">4</a>
<a href="#n5" name="n5">5</a>
<a href="#n6" name="n6">6</a>
<a href="#n7" name="n7">7</a>
<a href="#n8" name="n8">8</a>
<a href="#n9" name="n9">9</a>
<strong><a href="#n10" name="n10">10</a></strong>
<a href="#n11" name="n11">11</a>
<a href="#n12" name="n12">12</a>
<a href="#n13" name="n13">13</a>
<a href="#n14" name="n14">14</a>
<a href="#n15" name="n15">15</a>
<a href="#n16" name="n16">16</a>
<a href="#n17" name="n17">17</a>
<a href="#n18" name="n18">18</a>
<a href="#n19" name="n19">19</a>
<strong><a href="#n20" name="n20">20</a></strong>
<a href="#n21" name="n21">21</a>
<a href="#n22" name="n22">22</a>
</pre></td>
<td class="code"><pre><span class="comment">#!/usr/bin/python3</span>
<span class="comment">#</span>
<span class="keyword">import</span> <span class="include">time</span>
<span class="keyword">import</span> <span class="include">random</span>
<span class="keyword">import</span> <span class="include">paho.mqtt.client</span> <span class="keyword">as</span> mqtt
<span class="keyword">import</span> <span class="include">paho.mqtt.publish</span> <span class="keyword">as</span> publish
<div class="language-python highlighter-rouge"><pre class="highlight"><code><span class="c">#!/usr/bin/python3</span>
<span class="c">#</span>
<span class="kn">import</span> <span class="nn">time</span>
<span class="kn">import</span> <span class="nn">random</span>
<span class="kn">import</span> <span class="nn">paho.mqtt.client</span> <span class="kn">as</span> <span class="nn">mqtt</span>
<span class="kn">import</span> <span class="nn">paho.mqtt.publish</span> <span class="kn">as</span> <span class="nn">publish</span>
broker = <span class="string"><span class="delimiter">'</span><span class="content">127.0.0.1</span><span class="delimiter">'</span></span>
state_topic = <span class="string"><span class="delimiter">'</span><span class="content">home-assistant/lottery/number</span><span class="delimiter">'</span></span>
delay = <span class="integer">5</span>
<span class="n">broker</span> <span class="o">=</span> <span class="s">'127.0.0.1'</span>
<span class="n">state_topic</span> <span class="o">=</span> <span class="s">'home-assistant/lottery/number'</span>
<span class="n">delay</span> <span class="o">=</span> <span class="mi">5</span>
<span class="comment"># Send a single message to set the mood</span>
publish.single(<span class="string"><span class="delimiter">'</span><span class="content">home-assistant/fabian/mood</span><span class="delimiter">'</span></span>, <span class="string"><span class="delimiter">'</span><span class="content">good</span><span class="delimiter">'</span></span>, hostname=broker)
<span class="c"># Send a single message to set the mood</span>
<span class="n">publish</span><span class="o">.</span><span class="n">single</span><span class="p">(</span><span class="s">'home-assistant/fabian/mood'</span><span class="p">,</span> <span class="s">'good'</span><span class="p">,</span> <span class="n">hostname</span><span class="o">=</span><span class="n">broker</span><span class="p">)</span>
<span class="comment"># Send messages in a loop</span>
client = mqtt.Client(<span class="string"><span class="delimiter">&quot;</span><span class="content">ha-client</span><span class="delimiter">&quot;</span></span>)
client.connect(broker)
client.loop_start()
<span class="c"># Send messages in a loop</span>
<span class="n">client</span> <span class="o">=</span> <span class="n">mqtt</span><span class="o">.</span><span class="n">Client</span><span class="p">(</span><span class="s">"ha-client"</span><span class="p">)</span>
<span class="n">client</span><span class="o">.</span><span class="n">connect</span><span class="p">(</span><span class="n">broker</span><span class="p">)</span>
<span class="n">client</span><span class="o">.</span><span class="n">loop_start</span><span class="p">()</span>
<span class="keyword">while</span> <span class="predefined-constant">True</span>:
client.publish(state_topic, random.randrange(<span class="integer">0</span>, <span class="integer">50</span>, <span class="integer">1</span>))
time.sleep(delay)
</pre></td>
</tr></table>
<span class="k">while</span> <span class="bp">True</span><span class="p">:</span>
<span class="n">client</span><span class="o">.</span><span class="n">publish</span><span class="p">(</span><span class="n">state_topic</span><span class="p">,</span> <span class="n">random</span><span class="o">.</span><span class="n">randrange</span><span class="p">(</span><span class="mi">0</span><span class="p">,</span> <span class="mi">50</span><span class="p">,</span> <span class="mi">1</span><span class="p">))</span>
<span class="n">time</span><span class="o">.</span><span class="n">sleep</span><span class="p">(</span><span class="n">delay</span><span class="p">)</span>
</code></pre>
</div>
<p>Every 5 seconds a message with a new number is sent to the broker and picked up by Home Assistant. By the way, my mood is much better now.</p>
@ -258,162 +212,84 @@ client.loop_start()
<p>The <a href="http://knolleary.github.io/pubsubclient/">MQTT client</a> for the Arduino needs to be available in your Arduino IDE. Below you will find a sketch which could act as a starting point. Please modify the IP addresses, the MAC address, and the pin as needed and upload the sketch to your Arduino.</p>
<div class="highlighter-coderay"><table class="CodeRay"><tr>
<td class="line-numbers"><pre><a href="#n1" name="n1">1</a>
<a href="#n2" name="n2">2</a>
<a href="#n3" name="n3">3</a>
<a href="#n4" name="n4">4</a>
<a href="#n5" name="n5">5</a>
<a href="#n6" name="n6">6</a>
<a href="#n7" name="n7">7</a>
<a href="#n8" name="n8">8</a>
<a href="#n9" name="n9">9</a>
<strong><a href="#n10" name="n10">10</a></strong>
<a href="#n11" name="n11">11</a>
<a href="#n12" name="n12">12</a>
<a href="#n13" name="n13">13</a>
<a href="#n14" name="n14">14</a>
<a href="#n15" name="n15">15</a>
<a href="#n16" name="n16">16</a>
<a href="#n17" name="n17">17</a>
<a href="#n18" name="n18">18</a>
<a href="#n19" name="n19">19</a>
<strong><a href="#n20" name="n20">20</a></strong>
<a href="#n21" name="n21">21</a>
<a href="#n22" name="n22">22</a>
<a href="#n23" name="n23">23</a>
<a href="#n24" name="n24">24</a>
<a href="#n25" name="n25">25</a>
<a href="#n26" name="n26">26</a>
<a href="#n27" name="n27">27</a>
<a href="#n28" name="n28">28</a>
<a href="#n29" name="n29">29</a>
<strong><a href="#n30" name="n30">30</a></strong>
<a href="#n31" name="n31">31</a>
<a href="#n32" name="n32">32</a>
<a href="#n33" name="n33">33</a>
<a href="#n34" name="n34">34</a>
<a href="#n35" name="n35">35</a>
<a href="#n36" name="n36">36</a>
<a href="#n37" name="n37">37</a>
<a href="#n38" name="n38">38</a>
<a href="#n39" name="n39">39</a>
<strong><a href="#n40" name="n40">40</a></strong>
<a href="#n41" name="n41">41</a>
<a href="#n42" name="n42">42</a>
<a href="#n43" name="n43">43</a>
<a href="#n44" name="n44">44</a>
<a href="#n45" name="n45">45</a>
<a href="#n46" name="n46">46</a>
<a href="#n47" name="n47">47</a>
<a href="#n48" name="n48">48</a>
<a href="#n49" name="n49">49</a>
<strong><a href="#n50" name="n50">50</a></strong>
<a href="#n51" name="n51">51</a>
<a href="#n52" name="n52">52</a>
<a href="#n53" name="n53">53</a>
<a href="#n54" name="n54">54</a>
<a href="#n55" name="n55">55</a>
<a href="#n56" name="n56">56</a>
<a href="#n57" name="n57">57</a>
<a href="#n58" name="n58">58</a>
<a href="#n59" name="n59">59</a>
<strong><a href="#n60" name="n60">60</a></strong>
<a href="#n61" name="n61">61</a>
<a href="#n62" name="n62">62</a>
<a href="#n63" name="n63">63</a>
<a href="#n64" name="n64">64</a>
<a href="#n65" name="n65">65</a>
<a href="#n66" name="n66">66</a>
<a href="#n67" name="n67">67</a>
<a href="#n68" name="n68">68</a>
</pre></td>
<td class="code"><pre><span class="comment">/*
<div class="language-c highlighter-rouge"><pre class="highlight"><code><span class="cm">/*
This sketch is based on the basic MQTT example by
http://knolleary.github.io/pubsubclient/
*/</span>
<span class="preprocessor">#include</span> <span class="include">&lt;SPI.h&gt;</span>
<span class="preprocessor">#include</span> <span class="include">&lt;Ethernet.h&gt;</span>
<span class="preprocessor">#include</span> <span class="include">&lt;PubSubClient.h&gt;</span>
<span class="cp">#include &lt;SPI.h&gt;
#include &lt;Ethernet.h&gt;
#include &lt;PubSubClient.h&gt;
</span>
<span class="cp">#define DEBUG 1 // Debug output to serial console
</span>
<span class="c1">// Device settings
</span><span class="n">IPAddress</span> <span class="n">deviceIp</span><span class="p">(</span><span class="mi">192</span><span class="p">,</span> <span class="mi">168</span><span class="p">,</span> <span class="mi">0</span><span class="p">,</span> <span class="mi">43</span><span class="p">);</span>
<span class="n">byte</span> <span class="n">deviceMac</span><span class="p">[]</span> <span class="o">=</span> <span class="p">{</span> <span class="mh">0xAB</span><span class="p">,</span> <span class="mh">0xCD</span><span class="p">,</span> <span class="mh">0xFE</span><span class="p">,</span> <span class="mh">0xFE</span><span class="p">,</span> <span class="mh">0xFE</span><span class="p">,</span> <span class="mh">0xFE</span> <span class="p">};</span>
<span class="kt">char</span><span class="o">*</span> <span class="n">deviceId</span> <span class="o">=</span> <span class="s">"sensor01"</span><span class="p">;</span> <span class="c1">// Name of the sensor
</span><span class="kt">char</span><span class="o">*</span> <span class="n">stateTopic</span> <span class="o">=</span> <span class="s">"home-assistant/sensor01/brightness"</span><span class="p">;</span> <span class="c1">// MQTT topic where values are published
</span><span class="kt">int</span> <span class="n">sensorPin</span> <span class="o">=</span> <span class="n">A0</span><span class="p">;</span> <span class="c1">// Pin to which the sensor is connected to
</span><span class="kt">char</span> <span class="n">buf</span><span class="p">[</span><span class="mi">4</span><span class="p">];</span> <span class="c1">// Buffer to store the sensor value
</span><span class="kt">int</span> <span class="n">updateInterval</span> <span class="o">=</span> <span class="mi">1000</span><span class="p">;</span> <span class="c1">// Interval in miliseconds
</span>
<span class="c1">// MQTT server settings
</span><span class="n">IPAddress</span> <span class="n">mqttServer</span><span class="p">(</span><span class="mi">192</span><span class="p">,</span> <span class="mi">168</span><span class="p">,</span> <span class="mi">0</span><span class="p">,</span> <span class="mi">12</span><span class="p">);</span>
<span class="kt">int</span> <span class="n">mqttPort</span> <span class="o">=</span> <span class="mi">1883</span><span class="p">;</span>
<span class="preprocessor">#define</span> DEBUG <span class="integer">1</span> <span class="comment">// Debug output to serial console</span>
<span class="n">EthernetClient</span> <span class="n">ethClient</span><span class="p">;</span>
<span class="n">PubSubClient</span> <span class="n">client</span><span class="p">(</span><span class="n">ethClient</span><span class="p">);</span>
<span class="comment">// Device settings</span>
IPAddress deviceIp(<span class="integer">192</span>, <span class="integer">168</span>, <span class="integer">0</span>, <span class="integer">43</span>);
byte deviceMac[] = { <span class="hex">0xAB</span>, <span class="hex">0xCD</span>, <span class="hex">0xFE</span>, <span class="hex">0xFE</span>, <span class="hex">0xFE</span>, <span class="hex">0xFE</span> };
<span class="predefined-type">char</span>* deviceId = <span class="string"><span class="delimiter">&quot;</span><span class="content">sensor01</span><span class="delimiter">&quot;</span></span>; <span class="comment">// Name of the sensor</span>
<span class="predefined-type">char</span>* stateTopic = <span class="string"><span class="delimiter">&quot;</span><span class="content">home-assistant/sensor01/brightness</span><span class="delimiter">&quot;</span></span>; <span class="comment">// MQTT topic where values are published</span>
<span class="predefined-type">int</span> sensorPin = A0; <span class="comment">// Pin to which the sensor is connected to</span>
<span class="predefined-type">char</span> buf[<span class="integer">4</span>]; <span class="comment">// Buffer to store the sensor value</span>
<span class="predefined-type">int</span> updateInterval = <span class="integer">1000</span>; <span class="comment">// Interval in miliseconds</span>
<span class="kt">void</span> <span class="nf">reconnect</span><span class="p">()</span> <span class="p">{</span>
<span class="k">while</span> <span class="p">(</span><span class="o">!</span><span class="n">client</span><span class="p">.</span><span class="n">connected</span><span class="p">())</span> <span class="p">{</span>
<span class="cp">#if DEBUG
</span> <span class="n">Serial</span><span class="p">.</span><span class="n">print</span><span class="p">(</span><span class="s">"Attempting MQTT connection..."</span><span class="p">);</span>
<span class="cp">#endif
</span> <span class="k">if</span> <span class="p">(</span><span class="n">client</span><span class="p">.</span><span class="n">connect</span><span class="p">(</span><span class="n">deviceId</span><span class="p">))</span> <span class="p">{</span>
<span class="cp">#if DEBUG
</span> <span class="n">Serial</span><span class="p">.</span><span class="n">println</span><span class="p">(</span><span class="s">"connected"</span><span class="p">);</span>
<span class="cp">#endif
</span> <span class="p">}</span> <span class="k">else</span> <span class="p">{</span>
<span class="cp">#if DEBUG
</span> <span class="n">Serial</span><span class="p">.</span><span class="n">print</span><span class="p">(</span><span class="s">"failed, rc="</span><span class="p">);</span>
<span class="n">Serial</span><span class="p">.</span><span class="n">print</span><span class="p">(</span><span class="n">client</span><span class="p">.</span><span class="n">state</span><span class="p">());</span>
<span class="n">Serial</span><span class="p">.</span><span class="n">println</span><span class="p">(</span><span class="s">" try again in 5 seconds"</span><span class="p">);</span>
<span class="cp">#endif
</span> <span class="n">delay</span><span class="p">(</span><span class="mi">5000</span><span class="p">);</span>
<span class="p">}</span>
<span class="p">}</span>
<span class="p">}</span>
<span class="comment">// MQTT server settings</span>
IPAddress mqttServer(<span class="integer">192</span>, <span class="integer">168</span>, <span class="integer">0</span>, <span class="integer">12</span>);
<span class="predefined-type">int</span> mqttPort = <span class="integer">1883</span>;
<span class="kt">void</span> <span class="nf">setup</span><span class="p">()</span> <span class="p">{</span>
<span class="n">Serial</span><span class="p">.</span><span class="n">begin</span><span class="p">(</span><span class="mi">57600</span><span class="p">);</span>
<span class="n">client</span><span class="p">.</span><span class="n">setServer</span><span class="p">(</span><span class="n">mqttServer</span><span class="p">,</span> <span class="n">mqttPort</span><span class="p">);</span>
<span class="n">Ethernet</span><span class="p">.</span><span class="n">begin</span><span class="p">(</span><span class="n">deviceMac</span><span class="p">,</span> <span class="n">deviceIp</span><span class="p">);</span>
<span class="n">delay</span><span class="p">(</span><span class="mi">1500</span><span class="p">);</span>
<span class="p">}</span>
EthernetClient ethClient;
PubSubClient client(ethClient);
<span class="kt">void</span> <span class="nf">loop</span><span class="p">()</span> <span class="p">{</span>
<span class="k">if</span> <span class="p">(</span><span class="o">!</span><span class="n">client</span><span class="p">.</span><span class="n">connected</span><span class="p">())</span> <span class="p">{</span>
<span class="n">reconnect</span><span class="p">();</span>
<span class="p">}</span>
<span class="n">client</span><span class="p">.</span><span class="n">loop</span><span class="p">();</span>
<span class="directive">void</span> reconnect() {
<span class="keyword">while</span> (!client.connected()) {
<span class="preprocessor">#if</span> DEBUG
Serial.print(<span class="string"><span class="delimiter">&quot;</span><span class="content">Attempting MQTT connection...</span><span class="delimiter">&quot;</span></span>);
<span class="preprocessor">#endif</span>
<span class="keyword">if</span> (client.connect(deviceId)) {
<span class="preprocessor">#if</span> DEBUG
Serial.println(<span class="string"><span class="delimiter">&quot;</span><span class="content">connected</span><span class="delimiter">&quot;</span></span>);
<span class="preprocessor">#endif</span>
} <span class="keyword">else</span> {
<span class="preprocessor">#if</span> DEBUG
Serial.print(<span class="string"><span class="delimiter">&quot;</span><span class="content">failed, rc=</span><span class="delimiter">&quot;</span></span>);
Serial.print(client.state());
Serial.println(<span class="string"><span class="delimiter">&quot;</span><span class="content"> try again in 5 seconds</span><span class="delimiter">&quot;</span></span>);
<span class="preprocessor">#endif</span>
delay(<span class="integer">5000</span>);
}
}
}
<span class="directive">void</span> setup() {
Serial.begin(<span class="integer">57600</span>);
client.setServer(mqttServer, mqttPort);
Ethernet.begin(deviceMac, deviceIp);
delay(<span class="integer">1500</span>);
}
<span class="directive">void</span> loop() {
<span class="keyword">if</span> (!client.connected()) {
reconnect();
}
client.loop();
<span class="predefined-type">int</span> sensorValue = analogRead(sensorPin);
<span class="preprocessor">#if</span> DEBUG
Serial.print(<span class="string"><span class="delimiter">&quot;</span><span class="content">Sensor value: </span><span class="delimiter">&quot;</span></span>);
Serial.println(sensorValue);
<span class="preprocessor">#endif</span>
client.publish(stateTopic, itoa(sensorValue, buf, <span class="integer">10</span>));
delay(updateInterval);
}
</pre></td>
</tr></table>
<span class="kt">int</span> <span class="n">sensorValue</span> <span class="o">=</span> <span class="n">analogRead</span><span class="p">(</span><span class="n">sensorPin</span><span class="p">);</span>
<span class="cp">#if DEBUG
</span> <span class="n">Serial</span><span class="p">.</span><span class="n">print</span><span class="p">(</span><span class="s">"Sensor value: "</span><span class="p">);</span>
<span class="n">Serial</span><span class="p">.</span><span class="n">println</span><span class="p">(</span><span class="n">sensorValue</span><span class="p">);</span>
<span class="cp">#endif
</span> <span class="n">client</span><span class="p">.</span><span class="n">publish</span><span class="p">(</span><span class="n">stateTopic</span><span class="p">,</span> <span class="n">itoa</span><span class="p">(</span><span class="n">sensorValue</span><span class="p">,</span> <span class="n">buf</span><span class="p">,</span> <span class="mi">10</span><span class="p">));</span>
<span class="n">delay</span><span class="p">(</span><span class="n">updateInterval</span><span class="p">);</span>
<span class="p">}</span>
</code></pre>
</div>
<p>The Arduino will send the value of the sensor every second. To use the data in Home Assistant, add an additional MQTT sensor to the <code>configuration.yaml</code> file.</p>
<p>The Arduino will send the value of the sensor every second. To use the data in Home Assistant, add an additional MQTT sensor to the <code class="highlighter-rouge">configuration.yaml</code> file.</p>
<div class="highlighter-coderay"><table class="CodeRay"><tr>
<td class="line-numbers"><pre><a href="#n1" name="n1">1</a>
<a href="#n2" name="n2">2</a>
<a href="#n3" name="n3">3</a>
<a href="#n4" name="n4">4</a>
</pre></td>
<td class="code"><pre> - <span class="string"><span class="content">platform: mqtt</span></span>
<span class="key">name</span>: <span class="string"><span class="delimiter">&quot;</span><span class="content">Brightness</span><span class="delimiter">&quot;</span></span>
<span class="key">state_topic</span>: <span class="string"><span class="delimiter">&quot;</span><span class="content">home-assistant/sensor01/brightness</span><span class="delimiter">&quot;</span></span>
<span class="key">unit_of_measurement</span>: <span class="string"><span class="delimiter">&quot;</span><span class="content">cd</span><span class="delimiter">&quot;</span></span>
</pre></td>
</tr></table>
<div class="language-yaml highlighter-rouge"><pre class="highlight"><code> <span class="pi">-</span> <span class="s">platform</span><span class="pi">:</span> <span class="s">mqtt</span>
<span class="s">name</span><span class="pi">:</span> <span class="s2">"</span><span class="s">Brightness"</span>
<span class="s">state_topic</span><span class="pi">:</span> <span class="s2">"</span><span class="s">home-assistant/sensor01/brightness"</span>
<span class="s">unit_of_measurement</span><span class="pi">:</span> <span class="s2">"</span><span class="s">cd"</span>
</code></pre>
</div>
<p>After a restart of Home Assistant the values of your Arduino will be available.</p>
@ -497,7 +373,7 @@ PubSubClient client(ethClient);
<li class="post">
<a href="/blog/2016/08/13/foursquare-fast-com-ffmpeg-gpsd/">0.26: Foursquare, Fast.com, FFMPEG and GPSD</a>
<a href="/blog/2016/08/13/foursquare-fast.com-ffmpeg-gpsd/">0.26: Foursquare, Fast.com, FFMPEG and GPSD</a>
</li>

View file

@ -93,9 +93,9 @@
<ul class="tags unstyled">
<li><a class='category' href='/blog/categories/how-to/'>How-To</a></li>
<li>How-To</li>
<li><a class='category' href='/blog/categories/release-notes/'>Release-Notes</a></li>
<li>Release-Notes</li>
</ul>
@ -165,22 +165,20 @@
<img src="/images/blog/2015-09-ifttt/recipe-twitter.png" />
</p>
<p>This will tweet a message when an MQTT message is received that the smoke alarm has been triggered. Setup Maker channel with event name <code>HA_FIRE_ALARM</code> and Twitter channel to tweet the message in <code>value1</code>.</p>
<p>This will tweet a message when an MQTT message is received that the smoke alarm has been triggered. Setup Maker channel with event name <code class="highlighter-rouge">HA_FIRE_ALARM</code> and Twitter channel to tweet the message in <code class="highlighter-rouge">value1</code>.</p>
<div class="highlighter-coderay"><div class="CodeRay">
<div class="code"><pre><span class="comment"># Configuration.yaml entry</span>
<span class="key">automation</span>:
- <span class="string"><span class="content">alias: Post a tweet when fire alarm is triggered</span></span>
<span class="key">trigger</span>:
<span class="key">platform</span>: <span class="string"><span class="content">mqtt</span></span>
<span class="key">mqtt_topic</span>: <span class="string"><span class="content">home/alarm/fire</span></span>
<span class="key">mqtt_payload</span>: <span class="string"><span class="content">'on'</span></span>
<div class="language-yaml highlighter-rouge"><pre class="highlight"><code><span class="c1"># Configuration.yaml entry</span>
<span class="s">automation</span><span class="pi">:</span>
<span class="pi">-</span> <span class="s">alias</span><span class="pi">:</span> <span class="s">Post a tweet when fire alarm is triggered</span>
<span class="s">trigger</span><span class="pi">:</span>
<span class="s">platform</span><span class="pi">:</span> <span class="s">mqtt</span>
<span class="s">mqtt_topic</span><span class="pi">:</span> <span class="s">home/alarm/fire</span>
<span class="s">mqtt_payload</span><span class="pi">:</span> <span class="s1">'</span><span class="s">on'</span>
<span class="key">action</span>:
<span class="key">service</span>: <span class="string"><span class="content">ifttt.trigger</span></span>
<span class="key">data</span>: <span class="string"><span class="content">{&quot;event&quot;:&quot;HA_FIRE_ALARM&quot;, &quot;value1&quot;:&quot;The fire alarm just triggered!&quot;}</span></span>
</pre></div>
</div>
<span class="s">action</span><span class="pi">:</span>
<span class="s">service</span><span class="pi">:</span> <span class="s">ifttt.trigger</span>
<span class="s">data</span><span class="pi">:</span> <span class="pi">{</span><span class="s2">"</span><span class="s">event"</span><span class="pi">:</span><span class="s2">"</span><span class="s">HA_FIRE_ALARM"</span><span class="pi">,</span> <span class="s2">"</span><span class="s">value1"</span><span class="pi">:</span><span class="s2">"</span><span class="s">The</span><span class="nv"> </span><span class="s">fire</span><span class="nv"> </span><span class="s">alarm</span><span class="nv"> </span><span class="s">just</span><span class="nv"> </span><span class="s">triggered!"</span><span class="pi">}</span>
</code></pre>
</div>
<h2><a class="title-link" name="turn-on-lights-when-i-get-home" href="#turn-on-lights-when-i-get-home"></a> Turn on lights when I get home</h2>
@ -356,7 +354,7 @@
<li class="post">
<a href="/blog/2016/08/13/foursquare-fast-com-ffmpeg-gpsd/">0.26: Foursquare, Fast.com, FFMPEG and GPSD</a>
<a href="/blog/2016/08/13/foursquare-fast.com-ffmpeg-gpsd/">0.26: Foursquare, Fast.com, FFMPEG and GPSD</a>
</li>

View file

@ -93,7 +93,7 @@
<ul class="tags unstyled">
<li><a class='category' href='/blog/categories/how-to/'>How-To</a></li>
<li>How-To</li>
</ul>
@ -108,7 +108,7 @@
</header>
<p><img src="/images/supported_brands/glances.png" style="border:none; box-shadow: none; float: right;" height="80" /><br />
<p><img src="/images/supported_brands/glances.png" style="border:none; box-shadow: none; float: right;" height="80" />
Inspried by a <a href="https://github.com/home-assistant/home-assistant/issues/310">feature requests</a> I started looking into the available options to do monitoring of remote hosts. The feature request is about displaying system information in a similar way than the <a href="/components/sensor.systemmonitor/">systemmonitor</a> sensor does it for the local system. After a while I started to think that it would be a nice addition for a small home network where no full-blown system monitoring setup is present.</p>
<a name="read-more"></a>
@ -121,28 +121,22 @@ Inspried by a <a href="https://github.com/home-assistant/home-assistant/issues/3
<p>First some extra packages are needed beside Glances, especially the <a href="http://bottlepy.org/docs/dev/index.html">bottle</a> webserver. I guess that Glances is available for your distribution as well. Otherwise follow those <a href="https://github.com/nicolargo/glances#installation">instructions</a>.</p>
<div class="highlighter-coderay"><div class="CodeRay">
<div class="code"><pre>$ sudo dnf -y install glances python-bottle
</pre></div>
</div>
<div class="language-bash highlighter-rouge"><pre class="highlight"><code><span class="gp">$ </span>sudo dnf -y install glances python-bottle
</code></pre>
</div>
<p>On Fedora the Firewall settings are strict. Lets open port 61208 to allow other hosts to connect to that port. This is not needed if you just want to observe your local machine.</p>
<div class="highlighter-coderay"><div class="CodeRay">
<div class="code"><pre>$ sudo firewall-cmd --permanent --add-port=61208/tcp
$ sudo firewall-cmd --reload
</pre></div>
</div>
<div class="language-bash highlighter-rouge"><pre class="highlight"><code><span class="gp">$ </span>sudo firewall-cmd --permanent --add-port<span class="o">=</span>61208/tcp
<span class="gp">$ </span>sudo firewall-cmd --reload
</code></pre>
</div>
<p>Launch <code>glances</code> and keep an eye on the output.</p>
<p>Launch <code class="highlighter-rouge">glances</code> and keep an eye on the output.</p>
<div class="highlighter-coderay"><div class="CodeRay">
<div class="code"><pre>$ glances -w
<div class="language-bash highlighter-rouge"><pre class="highlight"><code><span class="gp">$ </span>glances -w
Glances web server started on http://0.0.0.0:61208/
</pre></div>
</div>
</code></pre>
</div>
<p>Now browse to http://IP_ADRRESS:61208/. You should see the webified view of Glances.</p>
@ -154,26 +148,22 @@ Glances web server started on http://0.0.0.0:61208/
<p>Another check is to access the API located at http://IP_ADRRESS:61208/api/2/mem/used and to confirm that a detail about your memory usage is provided as a JSON response. If so, you are good to proceed.</p>
<div class="highlighter-coderay"><div class="CodeRay">
<div class="code"><pre>$ curl -X GET http://IP_ADDRESS:61208/api/2/mem/used
{&quot;used&quot;: 203943936}
</pre></div>
</div>
<div class="language-bash highlighter-rouge"><pre class="highlight"><code><span class="gp">$ </span>curl -X GET http://IP_ADDRESS:61208/api/2/mem/used
<span class="o">{</span><span class="s2">"used"</span>: 203943936<span class="o">}</span>
</code></pre>
</div>
<p>Add the <a href="/components/sensor.glances/">glances sensor</a> entry to your <code>configuration.yaml</code> file and restart Home Assistant then.</p>
<p>Add the <a href="/components/sensor.glances/">glances sensor</a> entry to your <code class="highlighter-rouge">configuration.yaml</code> file and restart Home Assistant then.</p>
<div class="highlighter-coderay"><div class="CodeRay">
<div class="code"><pre><span class="comment"># Example configuration.yaml entry</span>
- <span class="string"><span class="content">platform: glances</span></span>
<span class="key">name</span>: <span class="string"><span class="content">NAS</span></span>
<span class="key">host</span>: <span class="string"><span class="content">IP_ADDRESS</span></span>
<span class="key">resources</span>:
- <span class="string"><span class="content">'disk_use_percent'</span></span>
- <span class="string"><span class="content">'disk_use'</span></span>
- <span class="string"><span class="content">'disk_free'</span></span>
</pre></div>
</div>
<div class="language-yaml highlighter-rouge"><pre class="highlight"><code><span class="c1"># Example configuration.yaml entry</span>
<span class="pi">-</span> <span class="s">platform</span><span class="pi">:</span> <span class="s">glances</span>
<span class="s">name</span><span class="pi">:</span> <span class="s">NAS</span>
<span class="s">host</span><span class="pi">:</span> <span class="s">IP_ADDRESS</span>
<span class="s">resources</span><span class="pi">:</span>
<span class="pi">-</span> <span class="s1">'</span><span class="s">disk_use_percent'</span>
<span class="pi">-</span> <span class="s1">'</span><span class="s">disk_use'</span>
<span class="pi">-</span> <span class="s1">'</span><span class="s">disk_free'</span>
</code></pre>
</div>
<p>If there are no error in the log file then you should see your new sensors.</p>
@ -257,7 +247,7 @@ Glances web server started on http://0.0.0.0:61208/
<li class="post">
<a href="/blog/2016/08/13/foursquare-fast-com-ffmpeg-gpsd/">0.26: Foursquare, Fast.com, FFMPEG and GPSD</a>
<a href="/blog/2016/08/13/foursquare-fast.com-ffmpeg-gpsd/">0.26: Foursquare, Fast.com, FFMPEG and GPSD</a>
</li>

View file

@ -93,7 +93,7 @@
<ul class="tags unstyled">
<li><a class='category' href='/blog/categories/release-notes/'>Release-Notes</a></li>
<li>Release-Notes</li>
</ul>
@ -112,56 +112,52 @@
<p>See <a href="https://github.com/home-assistant/home-assistant/releases/tag/0.7.3">GitHub</a> for more detailed release notes.</p>
<p><em>Migration note: the <code>scheduler</code> component has been removed in favor of the <code>automation</code> component.</em></p>
<p><em>Migration note: the <code class="highlighter-rouge">scheduler</code> component has been removed in favor of the <code class="highlighter-rouge">automation</code> component.</em></p>
<p><strong>Sonos</strong><br />
<p><strong>Sonos</strong>
<img src="/images/supported_brands/sonos.png" style="border:none; box-shadow: none; float: right;" height="50" /> Sonos support has been added by <a href="https://github.com/rhooper">@rhooper</a> and <a href="https://github.com/SEJeff">@SEJeff</a>. Home Assistant is now able to automatically detect Sonos devices in your network and set them up for you. It will allow you to control music playing on your Sonos and change the volume.</p>
<p><strong>iTunes and airplay speakers</strong><br />
<p><strong>iTunes and airplay speakers</strong>
<img src="/images/supported_brands/itunes.png" style="border:none; box-shadow: none; float: right;" height="50" /> <a href="https://github.com/maddox">@maddox</a> has contributed support for controlling iTunes and airplay speakers. For this to work you will have to run <a href="https://github.com/maddox/itunes-api">itunes-api</a> on your Mac as middleware.</p>
<div class="highlighter-coderay"><div class="CodeRay">
<div class="code"><pre><span class="comment"># Example configuration.yaml entry</span>
<span class="key">media_player</span>:
<span class="key">platform</span>: <span class="string"><span class="content">itunes</span></span>
<span class="key">name</span>: <span class="string"><span class="content">iTunes</span></span>
<span class="key">host</span>: <span class="string"><span class="content">http://192.168.1.50</span></span>
<span class="key">port</span>: <span class="string"><span class="content">8181</span></span>
</pre></div>
</div>
<div class="language-yaml highlighter-rouge"><pre class="highlight"><code><span class="c1"># Example configuration.yaml entry</span>
<span class="s">media_player</span><span class="pi">:</span>
<span class="s">platform</span><span class="pi">:</span> <span class="s">itunes</span>
<span class="s">name</span><span class="pi">:</span> <span class="s">iTunes</span>
<span class="s">host</span><span class="pi">:</span> <span class="s">http://192.168.1.50</span>
<span class="s">port</span><span class="pi">:</span> <span class="s">8181</span>
</code></pre>
</div>
<a name="read-more"></a>
<p><strong>Automation</strong><br />
<p><strong>Automation</strong>
Automation has gotten a lot of love. It now supports conditions, multiple triggers and new types of triggers. The best to get started with it is to head over to the new <a href="/getting-started/automation/">getting started with automation</a> page.</p>
<div class="highlighter-coderay"><div class="CodeRay">
<div class="code"><pre><span class="comment"># Example of entry in configuration.yaml</span>
<span class="key">automation</span>:
<span class="key">alias</span>: <span class="string"><span class="content">Light on in the evening</span></span>
<span class="key">trigger</span>:
- <span class="string"><span class="content">platform: sun</span></span>
<span class="key">event</span>: <span class="string"><span class="content">sunset</span></span>
<span class="key">offset</span>: <span class="string"><span class="delimiter">&quot;</span><span class="content">-01:00:00</span><span class="delimiter">&quot;</span></span>
- <span class="string"><span class="content">platform: state</span></span>
<span class="key">entity_id</span>: <span class="string"><span class="content">group.all_devices</span></span>
<span class="key">state</span>: <span class="string"><span class="content">home</span></span>
<span class="key">condition</span>:
- <span class="string"><span class="content">platform: state</span></span>
<span class="key">entity_id</span>: <span class="string"><span class="content">group.all_devices</span></span>
<span class="key">state</span>: <span class="string"><span class="content">home</span></span>
- <span class="string"><span class="content">platform: time</span></span>
<span class="key">after</span>: <span class="string"><span class="delimiter">&quot;</span><span class="content">16:00:00</span><span class="delimiter">&quot;</span></span>
<span class="key">before</span>: <span class="string"><span class="delimiter">&quot;</span><span class="content">23:00:00</span><span class="delimiter">&quot;</span></span>
<span class="key">action</span>:
<span class="key">service</span>: <span class="string"><span class="content">homeassistant.turn_on</span></span>
<span class="key">entity_id</span>: <span class="string"><span class="content">group.living_room</span></span>
</pre></div>
</div>
<div class="language-yaml highlighter-rouge"><pre class="highlight"><code><span class="c1"># Example of entry in configuration.yaml</span>
<span class="s">automation</span><span class="pi">:</span>
<span class="s">alias</span><span class="pi">:</span> <span class="s">Light on in the evening</span>
<span class="s">trigger</span><span class="pi">:</span>
<span class="pi">-</span> <span class="s">platform</span><span class="pi">:</span> <span class="s">sun</span>
<span class="s">event</span><span class="pi">:</span> <span class="s">sunset</span>
<span class="s">offset</span><span class="pi">:</span> <span class="s2">"</span><span class="s">-01:00:00"</span>
<span class="pi">-</span> <span class="s">platform</span><span class="pi">:</span> <span class="s">state</span>
<span class="s">entity_id</span><span class="pi">:</span> <span class="s">group.all_devices</span>
<span class="s">state</span><span class="pi">:</span> <span class="s">home</span>
<span class="s">condition</span><span class="pi">:</span>
<span class="pi">-</span> <span class="s">platform</span><span class="pi">:</span> <span class="s">state</span>
<span class="s">entity_id</span><span class="pi">:</span> <span class="s">group.all_devices</span>
<span class="s">state</span><span class="pi">:</span> <span class="s">home</span>
<span class="pi">-</span> <span class="s">platform</span><span class="pi">:</span> <span class="s">time</span>
<span class="s">after</span><span class="pi">:</span> <span class="s2">"</span><span class="s">16:00:00"</span>
<span class="s">before</span><span class="pi">:</span> <span class="s2">"</span><span class="s">23:00:00"</span>
<span class="s">action</span><span class="pi">:</span>
<span class="s">service</span><span class="pi">:</span> <span class="s">homeassistant.turn_on</span>
<span class="s">entity_id</span><span class="pi">:</span> <span class="s">group.living_room</span>
</code></pre>
</div>
<p><strong>Verisure Alarms</strong><br />
<p><strong>Verisure Alarms</strong>
<img src="/images/supported_brands/verisure.png" style="border:none; box-shadow: none; float: right;" height="50" /> We now support arming and disarming your verisure alarm from within Home Assistant thanks to added support by <a href="https://github.com/persandstrom">@persandstrom</a>.</p>
</article>
@ -236,7 +232,7 @@ Automation has gotten a lot of love. It now supports conditions, multiple trigge
<li class="post">
<a href="/blog/2016/08/13/foursquare-fast-com-ffmpeg-gpsd/">0.26: Foursquare, Fast.com, FFMPEG and GPSD</a>
<a href="/blog/2016/08/13/foursquare-fast.com-ffmpeg-gpsd/">0.26: Foursquare, Fast.com, FFMPEG and GPSD</a>
</li>

View file

@ -93,7 +93,7 @@
<ul class="tags unstyled">
<li><a class='category' href='/blog/categories/release-notes/'>Release-Notes</a></li>
<li>Release-Notes</li>
</ul>
@ -212,7 +212,7 @@ Map in Home Assistant showing two people and three zones (home, school, work)
<li class="post">
<a href="/blog/2016/08/13/foursquare-fast-com-ffmpeg-gpsd/">0.26: Foursquare, Fast.com, FFMPEG and GPSD</a>
<a href="/blog/2016/08/13/foursquare-fast.com-ffmpeg-gpsd/">0.26: Foursquare, Fast.com, FFMPEG and GPSD</a>
</li>

View file

@ -87,17 +87,17 @@
<div class="meta clearfix">
<time datetime="2015-10-11T19:10:00+00:00" pubdate data-updated="true"><i class="icon-calendar"></i> October 11, 2015</time>
<span class="byline author vcard"><i class='icon-user'></i> Paulus Schoutsen</span>
<span><i class='icon-time'></i> eight minutes reading time</span>
<span><i class='icon-time'></i> seven minutes reading time</span>
<span>
<i class="icon-tags"></i>
<ul class="tags unstyled">
<li><a class='category' href='/blog/categories/esp8266/'>ESP8266</a></li>
<li>ESP8266</li>
<li><a class='category' href='/blog/categories/how-to/'>How-To</a></li>
<li>How-To</li>
<li><a class='category' href='/blog/categories/mqtt/'>MQTT</a></li>
<li>MQTT</li>
</ul>
@ -181,13 +181,13 @@ Home Assistant will keep track of historical values and allow you to integrate i
</tbody>
</table>
<p><em>I picked <code>#2</code> and <code>14</code> myself, you can configure them in the sketch.</em></p>
<p><em>I picked <code class="highlighter-rouge">#2</code> and <code class="highlighter-rouge">14</code> myself, you can configure them in the sketch.</em></p>
<h3><a class="title-link" name="preparing-your-ide" href="#preparing-your-ide"></a> Preparing your IDE</h3>
<p>Follow <a href="https://github.com/esp8266/Arduino#installing-with-boards-manager">these instructions</a> on how to install and prepare the Arduino IDE for ESP8266 development.</p>
<p>After youre done installing, open the Arduino IDE, in the menu click on <code>sketch</code> -&gt; <code>include library</code> -&gt; <code>manage libraries</code> and install the following libraries:</p>
<p>After youre done installing, open the Arduino IDE, in the menu click on <code class="highlighter-rouge">sketch</code> -&gt; <code class="highlighter-rouge">include library</code> -&gt; <code class="highlighter-rouge">manage libraries</code> and install the following libraries:</p>
<ul>
<li>PubSubClient by Nick O Leary</li>
@ -199,289 +199,154 @@ Home Assistant will keep track of historical values and allow you to integrate i
<p>If you have followed the previous steps, youre all set.</p>
<ul>
<li>Open Arduino IDE and create a new sketch (<code>File</code> -&gt; <code>New</code>)</li>
<li>Open Arduino IDE and create a new sketch (<code class="highlighter-rouge">File</code> -&gt; <code class="highlighter-rouge">New</code>)</li>
<li>Copy and paste the below sketch to the Arduino IDE</li>
<li>Adjust the values line 6 - 14 to match your setup</li>
<li>Optional: If you want to connect to an MQTT server without a username or password, adjust line 62.</li>
<li>To have the ESP8266 accept our new sketch, we have to put it in upload mode. On the ESP8266 device keep the GPIO0 button pressed while pressing the reset button. The red led will glow half bright to indicate it is in upload mode.</li>
<li>Press the upload button in Arduino IDE</li>
<li>Open the serial monitor (<code>Tools</code> -&gt; <code>Serial Monitor</code>) to see the output from your device</li>
<li>Open the serial monitor (<code class="highlighter-rouge">Tools</code> -&gt; <code class="highlighter-rouge">Serial Monitor</code>) to see the output from your device</li>
</ul>
<p>This sketch will connect to your WiFi network and MQTT broker. It will read the temperature and humidity from the sensor every second. It will report it to the MQTT server if the difference is &gt; 1 since last reported value. Reports to the MQTT broker are sent with retain set to <code>True</code>. This means that anyone connecting to the MQTT topic will automatically be notified of the last reported value.</p>
<p>This sketch will connect to your WiFi network and MQTT broker. It will read the temperature and humidity from the sensor every second. It will report it to the MQTT server if the difference is &gt; 1 since last reported value. Reports to the MQTT broker are sent with retain set to <code class="highlighter-rouge">True</code>. This means that anyone connecting to the MQTT topic will automatically be notified of the last reported value.</p>
<div class="highlighter-coderay"><table class="CodeRay"><tr>
<td class="line-numbers"><pre><a href="#n1" name="n1">1</a>
<a href="#n2" name="n2">2</a>
<a href="#n3" name="n3">3</a>
<a href="#n4" name="n4">4</a>
<a href="#n5" name="n5">5</a>
<a href="#n6" name="n6">6</a>
<a href="#n7" name="n7">7</a>
<a href="#n8" name="n8">8</a>
<a href="#n9" name="n9">9</a>
<strong><a href="#n10" name="n10">10</a></strong>
<a href="#n11" name="n11">11</a>
<a href="#n12" name="n12">12</a>
<a href="#n13" name="n13">13</a>
<a href="#n14" name="n14">14</a>
<a href="#n15" name="n15">15</a>
<a href="#n16" name="n16">16</a>
<a href="#n17" name="n17">17</a>
<a href="#n18" name="n18">18</a>
<a href="#n19" name="n19">19</a>
<strong><a href="#n20" name="n20">20</a></strong>
<a href="#n21" name="n21">21</a>
<a href="#n22" name="n22">22</a>
<a href="#n23" name="n23">23</a>
<a href="#n24" name="n24">24</a>
<a href="#n25" name="n25">25</a>
<a href="#n26" name="n26">26</a>
<a href="#n27" name="n27">27</a>
<a href="#n28" name="n28">28</a>
<a href="#n29" name="n29">29</a>
<strong><a href="#n30" name="n30">30</a></strong>
<a href="#n31" name="n31">31</a>
<a href="#n32" name="n32">32</a>
<a href="#n33" name="n33">33</a>
<a href="#n34" name="n34">34</a>
<a href="#n35" name="n35">35</a>
<a href="#n36" name="n36">36</a>
<a href="#n37" name="n37">37</a>
<a href="#n38" name="n38">38</a>
<a href="#n39" name="n39">39</a>
<strong><a href="#n40" name="n40">40</a></strong>
<a href="#n41" name="n41">41</a>
<a href="#n42" name="n42">42</a>
<a href="#n43" name="n43">43</a>
<a href="#n44" name="n44">44</a>
<a href="#n45" name="n45">45</a>
<a href="#n46" name="n46">46</a>
<a href="#n47" name="n47">47</a>
<a href="#n48" name="n48">48</a>
<a href="#n49" name="n49">49</a>
<strong><a href="#n50" name="n50">50</a></strong>
<a href="#n51" name="n51">51</a>
<a href="#n52" name="n52">52</a>
<a href="#n53" name="n53">53</a>
<a href="#n54" name="n54">54</a>
<a href="#n55" name="n55">55</a>
<a href="#n56" name="n56">56</a>
<a href="#n57" name="n57">57</a>
<a href="#n58" name="n58">58</a>
<a href="#n59" name="n59">59</a>
<strong><a href="#n60" name="n60">60</a></strong>
<a href="#n61" name="n61">61</a>
<a href="#n62" name="n62">62</a>
<a href="#n63" name="n63">63</a>
<a href="#n64" name="n64">64</a>
<a href="#n65" name="n65">65</a>
<a href="#n66" name="n66">66</a>
<a href="#n67" name="n67">67</a>
<a href="#n68" name="n68">68</a>
<a href="#n69" name="n69">69</a>
<strong><a href="#n70" name="n70">70</a></strong>
<a href="#n71" name="n71">71</a>
<a href="#n72" name="n72">72</a>
<a href="#n73" name="n73">73</a>
<a href="#n74" name="n74">74</a>
<a href="#n75" name="n75">75</a>
<a href="#n76" name="n76">76</a>
<a href="#n77" name="n77">77</a>
<a href="#n78" name="n78">78</a>
<a href="#n79" name="n79">79</a>
<strong><a href="#n80" name="n80">80</a></strong>
<a href="#n81" name="n81">81</a>
<a href="#n82" name="n82">82</a>
<a href="#n83" name="n83">83</a>
<a href="#n84" name="n84">84</a>
<a href="#n85" name="n85">85</a>
<a href="#n86" name="n86">86</a>
<a href="#n87" name="n87">87</a>
<a href="#n88" name="n88">88</a>
<a href="#n89" name="n89">89</a>
<strong><a href="#n90" name="n90">90</a></strong>
<a href="#n91" name="n91">91</a>
<a href="#n92" name="n92">92</a>
<a href="#n93" name="n93">93</a>
<a href="#n94" name="n94">94</a>
<a href="#n95" name="n95">95</a>
<a href="#n96" name="n96">96</a>
<a href="#n97" name="n97">97</a>
<a href="#n98" name="n98">98</a>
<a href="#n99" name="n99">99</a>
<strong><a href="#n100" name="n100">100</a></strong>
<a href="#n101" name="n101">101</a>
<a href="#n102" name="n102">102</a>
<a href="#n103" name="n103">103</a>
<a href="#n104" name="n104">104</a>
<a href="#n105" name="n105">105</a>
<a href="#n106" name="n106">106</a>
<a href="#n107" name="n107">107</a>
<a href="#n108" name="n108">108</a>
<a href="#n109" name="n109">109</a>
<strong><a href="#n110" name="n110">110</a></strong>
<a href="#n111" name="n111">111</a>
</pre></td>
<td class="code"><pre><span class="preprocessor">#include</span> <span class="include">&lt;ESP8266WiFi.h&gt;</span>
<span class="preprocessor">#include</span> <span class="include">&lt;Wire.h&gt;</span>
<span class="preprocessor">#include</span> <span class="include">&lt;PubSubClient.h&gt;</span>
<span class="preprocessor">#include</span> <span class="include">&lt;Adafruit_HDC1000.h&gt;</span>
<div class="language-cpp highlighter-rouge"><pre class="highlight"><code><span class="cp">#include &lt;ESP8266WiFi.h&gt;
#include &lt;Wire.h&gt;
#include &lt;PubSubClient.h&gt;
#include &lt;Adafruit_HDC1000.h&gt;
</span>
<span class="cp">#define wifi_ssid "YOUR WIFI SSID"
#define wifi_password "WIFI PASSWORD"
</span>
<span class="cp">#define mqtt_server "YOUR_MQTT_SERVER_HOST"
#define mqtt_user "your_username"
#define mqtt_password "your_password"
</span>
<span class="cp">#define humidity_topic "sensor/humidity"
#define temperature_topic "sensor/temperature"
</span>
<span class="n">WiFiClient</span> <span class="n">espClient</span><span class="p">;</span>
<span class="n">PubSubClient</span> <span class="n">client</span><span class="p">(</span><span class="n">espClient</span><span class="p">);</span>
<span class="n">Adafruit_HDC1000</span> <span class="n">hdc</span> <span class="o">=</span> <span class="n">Adafruit_HDC1000</span><span class="p">();</span>
<span class="preprocessor">#define</span> wifi_ssid <span class="string"><span class="delimiter">&quot;</span><span class="content">YOUR WIFI SSID</span><span class="delimiter">&quot;</span></span>
<span class="preprocessor">#define</span> wifi_password <span class="string"><span class="delimiter">&quot;</span><span class="content">WIFI PASSWORD</span><span class="delimiter">&quot;</span></span>
<span class="kt">void</span> <span class="nf">setup</span><span class="p">()</span> <span class="p">{</span>
<span class="n">Serial</span><span class="p">.</span><span class="n">begin</span><span class="p">(</span><span class="mi">115200</span><span class="p">);</span>
<span class="n">setup_wifi</span><span class="p">();</span>
<span class="n">client</span><span class="p">.</span><span class="n">setServer</span><span class="p">(</span><span class="n">mqtt_server</span><span class="p">,</span> <span class="mi">1883</span><span class="p">);</span>
<span class="preprocessor">#define</span> mqtt_server <span class="string"><span class="delimiter">&quot;</span><span class="content">YOUR_MQTT_SERVER_HOST</span><span class="delimiter">&quot;</span></span>
<span class="preprocessor">#define</span> mqtt_user <span class="string"><span class="delimiter">&quot;</span><span class="content">your_username</span><span class="delimiter">&quot;</span></span>
<span class="preprocessor">#define</span> mqtt_password <span class="string"><span class="delimiter">&quot;</span><span class="content">your_password</span><span class="delimiter">&quot;</span></span>
<span class="c1">// Set SDA and SDL ports
</span> <span class="n">Wire</span><span class="p">.</span><span class="n">begin</span><span class="p">(</span><span class="mi">2</span><span class="p">,</span> <span class="mi">14</span><span class="p">);</span>
<span class="preprocessor">#define</span> humidity_topic <span class="string"><span class="delimiter">&quot;</span><span class="content">sensor/humidity</span><span class="delimiter">&quot;</span></span>
<span class="preprocessor">#define</span> temperature_topic <span class="string"><span class="delimiter">&quot;</span><span class="content">sensor/temperature</span><span class="delimiter">&quot;</span></span>
<span class="c1">// Start sensor
</span> <span class="k">if</span> <span class="p">(</span><span class="o">!</span><span class="n">hdc</span><span class="p">.</span><span class="n">begin</span><span class="p">())</span> <span class="p">{</span>
<span class="n">Serial</span><span class="p">.</span><span class="n">println</span><span class="p">(</span><span class="s">"Couldn't find sensor!"</span><span class="p">);</span>
<span class="k">while</span> <span class="p">(</span><span class="mi">1</span><span class="p">);</span>
<span class="p">}</span>
<span class="p">}</span>
WiFiClient espClient;
PubSubClient client(espClient);
Adafruit_HDC1000 hdc = Adafruit_HDC1000();
<span class="kt">void</span> <span class="nf">setup_wifi</span><span class="p">()</span> <span class="p">{</span>
<span class="n">delay</span><span class="p">(</span><span class="mi">10</span><span class="p">);</span>
<span class="c1">// We start by connecting to a WiFi network
</span> <span class="n">Serial</span><span class="p">.</span><span class="n">println</span><span class="p">();</span>
<span class="n">Serial</span><span class="p">.</span><span class="n">print</span><span class="p">(</span><span class="s">"Connecting to "</span><span class="p">);</span>
<span class="n">Serial</span><span class="p">.</span><span class="n">println</span><span class="p">(</span><span class="n">wifi_ssid</span><span class="p">);</span>
<span class="directive">void</span> setup() {
Serial.begin(<span class="integer">115200</span>);
setup_wifi();
client.setServer(mqtt_server, <span class="integer">1883</span>);
<span class="n">WiFi</span><span class="p">.</span><span class="n">begin</span><span class="p">(</span><span class="n">wifi_ssid</span><span class="p">,</span> <span class="n">wifi_password</span><span class="p">);</span>
<span class="comment">// Set SDA and SDL ports</span>
Wire.begin(<span class="integer">2</span>, <span class="integer">14</span>);
<span class="k">while</span> <span class="p">(</span><span class="n">WiFi</span><span class="p">.</span><span class="n">status</span><span class="p">()</span> <span class="o">!=</span> <span class="n">WL_CONNECTED</span><span class="p">)</span> <span class="p">{</span>
<span class="n">delay</span><span class="p">(</span><span class="mi">500</span><span class="p">);</span>
<span class="n">Serial</span><span class="p">.</span><span class="n">print</span><span class="p">(</span><span class="s">"."</span><span class="p">);</span>
<span class="p">}</span>
<span class="comment">// Start sensor</span>
<span class="keyword">if</span> (!hdc.begin()) {
Serial.println(<span class="string"><span class="delimiter">&quot;</span><span class="content">Couldn't find sensor!</span><span class="delimiter">&quot;</span></span>);
<span class="keyword">while</span> (<span class="integer">1</span>);
}
}
<span class="n">Serial</span><span class="p">.</span><span class="n">println</span><span class="p">(</span><span class="s">""</span><span class="p">);</span>
<span class="n">Serial</span><span class="p">.</span><span class="n">println</span><span class="p">(</span><span class="s">"WiFi connected"</span><span class="p">);</span>
<span class="n">Serial</span><span class="p">.</span><span class="n">println</span><span class="p">(</span><span class="s">"IP address: "</span><span class="p">);</span>
<span class="n">Serial</span><span class="p">.</span><span class="n">println</span><span class="p">(</span><span class="n">WiFi</span><span class="p">.</span><span class="n">localIP</span><span class="p">());</span>
<span class="p">}</span>
<span class="directive">void</span> setup_wifi() {
delay(<span class="integer">10</span>);
<span class="comment">// We start by connecting to a WiFi network</span>
Serial.println();
Serial.print(<span class="string"><span class="delimiter">&quot;</span><span class="content">Connecting to </span><span class="delimiter">&quot;</span></span>);
Serial.println(wifi_ssid);
<span class="kt">void</span> <span class="nf">reconnect</span><span class="p">()</span> <span class="p">{</span>
<span class="c1">// Loop until we're reconnected
</span> <span class="k">while</span> <span class="p">(</span><span class="o">!</span><span class="n">client</span><span class="p">.</span><span class="n">connected</span><span class="p">())</span> <span class="p">{</span>
<span class="n">Serial</span><span class="p">.</span><span class="n">print</span><span class="p">(</span><span class="s">"Attempting MQTT connection..."</span><span class="p">);</span>
<span class="c1">// Attempt to connect
</span> <span class="c1">// If you do not want to use a username and password, change next line to
</span> <span class="c1">// if (client.connect("ESP8266Client")) {
</span> <span class="k">if</span> <span class="p">(</span><span class="n">client</span><span class="p">.</span><span class="n">connect</span><span class="p">(</span><span class="s">"ESP8266Client"</span><span class="p">,</span> <span class="n">mqtt_user</span><span class="p">,</span> <span class="n">mqtt_password</span><span class="p">))</span> <span class="p">{</span>
<span class="n">Serial</span><span class="p">.</span><span class="n">println</span><span class="p">(</span><span class="s">"connected"</span><span class="p">);</span>
<span class="p">}</span> <span class="k">else</span> <span class="p">{</span>
<span class="n">Serial</span><span class="p">.</span><span class="n">print</span><span class="p">(</span><span class="s">"failed, rc="</span><span class="p">);</span>
<span class="n">Serial</span><span class="p">.</span><span class="n">print</span><span class="p">(</span><span class="n">client</span><span class="p">.</span><span class="n">state</span><span class="p">());</span>
<span class="n">Serial</span><span class="p">.</span><span class="n">println</span><span class="p">(</span><span class="s">" try again in 5 seconds"</span><span class="p">);</span>
<span class="c1">// Wait 5 seconds before retrying
</span> <span class="n">delay</span><span class="p">(</span><span class="mi">5000</span><span class="p">);</span>
<span class="p">}</span>
<span class="p">}</span>
<span class="p">}</span>
WiFi.begin(wifi_ssid, wifi_password);
<span class="kt">bool</span> <span class="nf">checkBound</span><span class="p">(</span><span class="kt">float</span> <span class="n">newValue</span><span class="p">,</span> <span class="kt">float</span> <span class="n">prevValue</span><span class="p">,</span> <span class="kt">float</span> <span class="n">maxDiff</span><span class="p">)</span> <span class="p">{</span>
<span class="k">return</span> <span class="o">!</span><span class="n">isnan</span><span class="p">(</span><span class="n">newValue</span><span class="p">)</span> <span class="o">&amp;&amp;</span>
<span class="p">(</span><span class="n">newValue</span> <span class="o">&lt;</span> <span class="n">prevValue</span> <span class="o">-</span> <span class="n">maxDiff</span> <span class="o">||</span> <span class="n">newValue</span> <span class="o">&gt;</span> <span class="n">prevValue</span> <span class="o">+</span> <span class="n">maxDiff</span><span class="p">);</span>
<span class="p">}</span>
<span class="keyword">while</span> (WiFi.status() != WL_CONNECTED) {
delay(<span class="integer">500</span>);
Serial.print(<span class="string"><span class="delimiter">&quot;</span><span class="content">.</span><span class="delimiter">&quot;</span></span>);
}
<span class="kt">long</span> <span class="n">lastMsg</span> <span class="o">=</span> <span class="mi">0</span><span class="p">;</span>
<span class="kt">float</span> <span class="n">temp</span> <span class="o">=</span> <span class="mf">0.0</span><span class="p">;</span>
<span class="kt">float</span> <span class="n">hum</span> <span class="o">=</span> <span class="mf">0.0</span><span class="p">;</span>
<span class="kt">float</span> <span class="n">diff</span> <span class="o">=</span> <span class="mf">1.0</span><span class="p">;</span>
Serial.println(<span class="string"><span class="delimiter">&quot;</span><span class="delimiter">&quot;</span></span>);
Serial.println(<span class="string"><span class="delimiter">&quot;</span><span class="content">WiFi connected</span><span class="delimiter">&quot;</span></span>);
Serial.println(<span class="string"><span class="delimiter">&quot;</span><span class="content">IP address: </span><span class="delimiter">&quot;</span></span>);
Serial.println(WiFi.localIP());
}
<span class="kt">void</span> <span class="nf">loop</span><span class="p">()</span> <span class="p">{</span>
<span class="k">if</span> <span class="p">(</span><span class="o">!</span><span class="n">client</span><span class="p">.</span><span class="n">connected</span><span class="p">())</span> <span class="p">{</span>
<span class="n">reconnect</span><span class="p">();</span>
<span class="p">}</span>
<span class="n">client</span><span class="p">.</span><span class="n">loop</span><span class="p">();</span>
<span class="directive">void</span> reconnect() {
<span class="comment">// Loop until we're reconnected</span>
<span class="keyword">while</span> (!client.connected()) {
Serial.print(<span class="string"><span class="delimiter">&quot;</span><span class="content">Attempting MQTT connection...</span><span class="delimiter">&quot;</span></span>);
<span class="comment">// Attempt to connect</span>
<span class="comment">// If you do not want to use a username and password, change next line to</span>
<span class="comment">// if (client.connect(&quot;ESP8266Client&quot;)) {</span>
<span class="keyword">if</span> (client.connect(<span class="string"><span class="delimiter">&quot;</span><span class="content">ESP8266Client</span><span class="delimiter">&quot;</span></span>, mqtt_user, mqtt_password)) {
Serial.println(<span class="string"><span class="delimiter">&quot;</span><span class="content">connected</span><span class="delimiter">&quot;</span></span>);
} <span class="keyword">else</span> {
Serial.print(<span class="string"><span class="delimiter">&quot;</span><span class="content">failed, rc=</span><span class="delimiter">&quot;</span></span>);
Serial.print(client.state());
Serial.println(<span class="string"><span class="delimiter">&quot;</span><span class="content"> try again in 5 seconds</span><span class="delimiter">&quot;</span></span>);
<span class="comment">// Wait 5 seconds before retrying</span>
delay(<span class="integer">5000</span>);
}
}
}
<span class="kt">long</span> <span class="n">now</span> <span class="o">=</span> <span class="n">millis</span><span class="p">();</span>
<span class="k">if</span> <span class="p">(</span><span class="n">now</span> <span class="o">-</span> <span class="n">lastMsg</span> <span class="o">&gt;</span> <span class="mi">1000</span><span class="p">)</span> <span class="p">{</span>
<span class="n">lastMsg</span> <span class="o">=</span> <span class="n">now</span><span class="p">;</span>
<span class="predefined-type">bool</span> checkBound(<span class="predefined-type">float</span> newValue, <span class="predefined-type">float</span> prevValue, <span class="predefined-type">float</span> maxDiff) {
<span class="keyword">return</span> !isnan(newValue) &amp;&amp;
(newValue &lt; prevValue - maxDiff || newValue &gt; prevValue + maxDiff);
}
<span class="kt">float</span> <span class="n">newTemp</span> <span class="o">=</span> <span class="n">hdc</span><span class="p">.</span><span class="n">readTemperature</span><span class="p">();</span>
<span class="kt">float</span> <span class="n">newHum</span> <span class="o">=</span> <span class="n">hdc</span><span class="p">.</span><span class="n">readHumidity</span><span class="p">();</span>
<span class="predefined-type">long</span> lastMsg = <span class="integer">0</span>;
<span class="predefined-type">float</span> temp = <span class="float">0</span><span class="float">.0</span>;
<span class="predefined-type">float</span> hum = <span class="float">0</span><span class="float">.0</span>;
<span class="predefined-type">float</span> diff = <span class="float">1</span><span class="float">.0</span>;
<span class="k">if</span> <span class="p">(</span><span class="n">checkBound</span><span class="p">(</span><span class="n">newTemp</span><span class="p">,</span> <span class="n">temp</span><span class="p">,</span> <span class="n">diff</span><span class="p">))</span> <span class="p">{</span>
<span class="n">temp</span> <span class="o">=</span> <span class="n">newTemp</span><span class="p">;</span>
<span class="n">Serial</span><span class="p">.</span><span class="n">print</span><span class="p">(</span><span class="s">"New temperature:"</span><span class="p">);</span>
<span class="n">Serial</span><span class="p">.</span><span class="n">println</span><span class="p">(</span><span class="n">String</span><span class="p">(</span><span class="n">temp</span><span class="p">).</span><span class="n">c_str</span><span class="p">());</span>
<span class="n">client</span><span class="p">.</span><span class="n">publish</span><span class="p">(</span><span class="n">temperature_topic</span><span class="p">,</span> <span class="n">String</span><span class="p">(</span><span class="n">temp</span><span class="p">).</span><span class="n">c_str</span><span class="p">(),</span> <span class="nb">true</span><span class="p">);</span>
<span class="p">}</span>
<span class="directive">void</span> loop() {
<span class="keyword">if</span> (!client.connected()) {
reconnect();
}
client.loop();
<span class="predefined-type">long</span> now = millis();
<span class="keyword">if</span> (now - lastMsg &gt; <span class="integer">1000</span>) {
lastMsg = now;
<span class="predefined-type">float</span> newTemp = hdc.readTemperature();
<span class="predefined-type">float</span> newHum = hdc.readHumidity();
<span class="keyword">if</span> (checkBound(newTemp, temp, diff)) {
temp = newTemp;
Serial.print(<span class="string"><span class="delimiter">&quot;</span><span class="content">New temperature:</span><span class="delimiter">&quot;</span></span>);
Serial.println(String(temp).c_str());
client.publish(temperature_topic, String(temp).c_str(), <span class="predefined-constant">true</span>);
}
<span class="keyword">if</span> (checkBound(newHum, hum, diff)) {
hum = newHum;
Serial.print(<span class="string"><span class="delimiter">&quot;</span><span class="content">New humidity:</span><span class="delimiter">&quot;</span></span>);
Serial.println(String(hum).c_str());
client.publish(humidity_topic, String(hum).c_str(), <span class="predefined-constant">true</span>);
}
}
}
</pre></td>
</tr></table>
<span class="k">if</span> <span class="p">(</span><span class="n">checkBound</span><span class="p">(</span><span class="n">newHum</span><span class="p">,</span> <span class="n">hum</span><span class="p">,</span> <span class="n">diff</span><span class="p">))</span> <span class="p">{</span>
<span class="n">hum</span> <span class="o">=</span> <span class="n">newHum</span><span class="p">;</span>
<span class="n">Serial</span><span class="p">.</span><span class="n">print</span><span class="p">(</span><span class="s">"New humidity:"</span><span class="p">);</span>
<span class="n">Serial</span><span class="p">.</span><span class="n">println</span><span class="p">(</span><span class="n">String</span><span class="p">(</span><span class="n">hum</span><span class="p">).</span><span class="n">c_str</span><span class="p">());</span>
<span class="n">client</span><span class="p">.</span><span class="n">publish</span><span class="p">(</span><span class="n">humidity_topic</span><span class="p">,</span> <span class="n">String</span><span class="p">(</span><span class="n">hum</span><span class="p">).</span><span class="n">c_str</span><span class="p">(),</span> <span class="nb">true</span><span class="p">);</span>
<span class="p">}</span>
<span class="p">}</span>
<span class="p">}</span>
</code></pre>
</div>
<h3><a class="title-link" name="configuring-home-assistant" href="#configuring-home-assistant"></a> Configuring Home Assistant</h3>
<p>The last step is to integrate the sensor values into Home Assistant. This can be done by setting up Home Assistant to connect to the MQTT broker and subscribe to the sensor topics.</p>
<div class="highlighter-coderay"><table class="CodeRay"><tr>
<td class="line-numbers"><pre><a href="#n1" name="n1">1</a>
<a href="#n2" name="n2">2</a>
<a href="#n3" name="n3">3</a>
<a href="#n4" name="n4">4</a>
<a href="#n5" name="n5">5</a>
<a href="#n6" name="n6">6</a>
<a href="#n7" name="n7">7</a>
<a href="#n8" name="n8">8</a>
<a href="#n9" name="n9">9</a>
<strong><a href="#n10" name="n10">10</a></strong>
<a href="#n11" name="n11">11</a>
<a href="#n12" name="n12">12</a>
<a href="#n13" name="n13">13</a>
<a href="#n14" name="n14">14</a>
<a href="#n15" name="n15">15</a>
<a href="#n16" name="n16">16</a>
<a href="#n17" name="n17">17</a>
<a href="#n18" name="n18">18</a>
</pre></td>
<td class="code"><pre><span class="key">mqtt</span>:
<span class="key">broker</span>: <span class="string"><span class="content">YOUR_MQTT_SERVER_HOST</span></span>
<span class="key">username</span>: <span class="string"><span class="content">your_username</span></span>
<span class="key">password</span>: <span class="string"><span class="content">your_password</span></span>
<div class="language-yaml highlighter-rouge"><pre class="highlight"><code><span class="s">mqtt</span><span class="pi">:</span>
<span class="s">broker</span><span class="pi">:</span> <span class="s">YOUR_MQTT_SERVER_HOST</span>
<span class="s">username</span><span class="pi">:</span> <span class="s">your_username</span>
<span class="s">password</span><span class="pi">:</span> <span class="s">your_password</span>
<span class="key">sensor</span>:
<span class="key">platform</span>: <span class="string"><span class="content">mqtt</span></span>
<span class="key">name</span>: <span class="string"><span class="delimiter">&quot;</span><span class="content">Temperature</span><span class="delimiter">&quot;</span></span>
<span class="key">state_topic</span>: <span class="string"><span class="delimiter">&quot;</span><span class="content">sensor/temperature</span><span class="delimiter">&quot;</span></span>
<span class="key">qos</span>: <span class="string"><span class="content">0</span></span>
<span class="key">unit_of_measurement</span>: <span class="string"><span class="delimiter">&quot;</span><span class="content">ºC</span><span class="delimiter">&quot;</span></span>
<span class="s">sensor</span><span class="pi">:</span>
<span class="s">platform</span><span class="pi">:</span> <span class="s">mqtt</span>
<span class="s">name</span><span class="pi">:</span> <span class="s2">"</span><span class="s">Temperature"</span>
<span class="s">state_topic</span><span class="pi">:</span> <span class="s2">"</span><span class="s">sensor/temperature"</span>
<span class="s">qos</span><span class="pi">:</span> <span class="s">0</span>
<span class="s">unit_of_measurement</span><span class="pi">:</span> <span class="s2">"</span><span class="s">ºC"</span>
<span class="key">sensor 2</span>:
<span class="key">platform</span>: <span class="string"><span class="content">mqtt</span></span>
<span class="key">name</span>: <span class="string"><span class="delimiter">&quot;</span><span class="content">Humidity</span><span class="delimiter">&quot;</span></span>
<span class="key">state_topic</span>: <span class="string"><span class="delimiter">&quot;</span><span class="content">sensor/humidity</span><span class="delimiter">&quot;</span></span>
<span class="key">qos</span>: <span class="string"><span class="content">0</span></span>
<span class="key">unit_of_measurement</span>: <span class="string"><span class="delimiter">&quot;</span><span class="content">%</span><span class="delimiter">&quot;</span></span>
</pre></td>
</tr></table>
<span class="s">sensor 2</span><span class="pi">:</span>
<span class="s">platform</span><span class="pi">:</span> <span class="s">mqtt</span>
<span class="s">name</span><span class="pi">:</span> <span class="s2">"</span><span class="s">Humidity"</span>
<span class="s">state_topic</span><span class="pi">:</span> <span class="s2">"</span><span class="s">sensor/humidity"</span>
<span class="s">qos</span><span class="pi">:</span> <span class="s">0</span>
<span class="s">unit_of_measurement</span><span class="pi">:</span> <span class="s2">"</span><span class="s">%"</span>
</code></pre>
</div>
</article>
@ -556,7 +421,7 @@ Adafruit_HDC1000 hdc = Adafruit_HDC1000();
<li class="post">
<a href="/blog/2016/08/13/foursquare-fast-com-ffmpeg-gpsd/">0.26: Foursquare, Fast.com, FFMPEG and GPSD</a>
<a href="/blog/2016/08/13/foursquare-fast.com-ffmpeg-gpsd/">0.26: Foursquare, Fast.com, FFMPEG and GPSD</a>
</li>

View file

@ -87,13 +87,13 @@
<div class="meta clearfix">
<time datetime="2015-10-11T17:10:00+00:00" pubdate data-updated="true"><i class="icon-calendar"></i> October 11, 2015</time>
<span class="byline author vcard"><i class='icon-user'></i> Paulus Schoutsen</span>
<span><i class='icon-time'></i> less than one minute reading time</span>
<span><i class='icon-time'></i> Less than one minute reading time</span>
<span>
<i class="icon-tags"></i>
<ul class="tags unstyled">
<li><a class='category' href='/blog/categories/release-notes/'>Release-Notes</a></li>
<li>Release-Notes</li>
</ul>
@ -201,7 +201,7 @@
<li class="post">
<a href="/blog/2016/08/13/foursquare-fast-com-ffmpeg-gpsd/">0.26: Foursquare, Fast.com, FFMPEG and GPSD</a>
<a href="/blog/2016/08/13/foursquare-fast.com-ffmpeg-gpsd/">0.26: Foursquare, Fast.com, FFMPEG and GPSD</a>
</li>

View file

@ -93,7 +93,7 @@
<ul class="tags unstyled">
<li><a class='category' href='/blog/categories/release-notes/'>Release-Notes</a></li>
<li>Release-Notes</li>
</ul>
@ -121,10 +121,10 @@
<li>Media Player: <a href="/components/media_player.firetv/">Amazon FireTV</a> now supported (<a href="https://github.com/happyleavesaoc">@happyleavesaoc</a>)</li>
<li>Device Tracker: <a href="/components/device_tracker.locative/">Geofancy</a> now supported (<a href="https://github.com/wind-rider">@wind-rider</a>)</li>
<li>New component <a href="/components/shell_command/">Shell Command</a> can expose shell commands as services (<a href="https://github.com/balloob">@balloob</a>)</li>
<li><a href="/components/script/">Scripts</a> can now be customized using <code>customize</code> key in <code>configuration.yaml</code> (<a href="https://github.com/balloob">@balloob</a>)</li>
<li><a href="/components/script/">Scripts</a> can now be customized using <code class="highlighter-rouge">customize</code> key in <code class="highlighter-rouge">configuration.yaml</code> (<a href="https://github.com/balloob">@balloob</a>)</li>
<li>Light: <a href="/components/light.hyperion/">Hyperion</a> now supported (<a href="https://github.com/MakeMeASandwich">@MakeMeASandwich</a>)</li>
<li>Sensor: <a href="/components/sensor.arest/">aRest</a> can now also read out pins (<a href="https://github.com/balloob">@balloob</a>)</li>
<li>Sensor: <a href="/components/sensor.forecast/">Forecast.io</a> now supports specifying units in <code>configuration.yaml</code> (<a href="https://github.com/balloob">@balloob</a>)</li>
<li>Sensor: <a href="/components/sensor.forecast/">Forecast.io</a> now supports specifying units in <code class="highlighter-rouge">configuration.yaml</code> (<a href="https://github.com/balloob">@balloob</a>)</li>
<li>Thermostat: <a href="/components/thermostat.heat_control/">Heat Control</a> has been completely rewritten (<a href="https://github.com/balloob">@balloob</a>)</li>
<li>Switch: <a href="/components/switch.rest/">Rest</a> now supported (<a href="https://github.com/bachp">@bachp</a>)</li>
<li>Media Player: <a href="/components/media_player.plex/">Plex</a> can now be auto discovered and configure itself (<a href="https://github.com/tomduijf">@tomduijf</a>)</li>
@ -139,16 +139,16 @@
<p>As part of this release we did some cleanup which introduced backwards incompatible changes:</p>
<p><strong>Heat Control thermostat no longer includes scheduling features.</strong><br />
<p><strong>Heat Control thermostat no longer includes scheduling features.</strong>
This feature has been removed completely. Use the <a href="/getting-started/automation/">automation component</a> instead to control target temperature.</p>
<p><strong>Config changed for calling a service from a script.</strong><br />
<code>execute_service:</code> has been replaced with <code>service:</code>. See <a href="/components/script/">component page</a> for example. The old method will continue working for some time.</p>
<p><strong>Config changed for calling a service from a script.</strong>
<code class="highlighter-rouge">execute_service:</code> has been replaced with <code class="highlighter-rouge">service:</code>. See <a href="/components/script/">component page</a> for example. The old method will continue working for some time.</p>
<p><strong>Scenes can no longer be turned off.</strong><br />
<p><strong>Scenes can no longer be turned off.</strong>
It is no longer possible to turn a scene off after it has been activated. The way it worked was unpredictable and causes a lot of confusion.</p>
<p><strong>Downloader treats relative paths now relative to the config dir instead of the current working dir.</strong><br />
<p><strong>Downloader treats relative paths now relative to the config dir instead of the current working dir.</strong>
This makes more sense as most people run Home Assistant as a daemon</p>
</article>
@ -223,7 +223,7 @@ This makes more sense as most people run Home Assistant as a daemon</p>
<li class="post">
<a href="/blog/2016/08/13/foursquare-fast-com-ffmpeg-gpsd/">0.26: Foursquare, Fast.com, FFMPEG and GPSD</a>
<a href="/blog/2016/08/13/foursquare-fast.com-ffmpeg-gpsd/">0.26: Foursquare, Fast.com, FFMPEG and GPSD</a>
</li>

View file

@ -93,7 +93,7 @@
<ul class="tags unstyled">
<li><a class='category' href='/blog/categories/release-notes/'>Release-Notes</a></li>
<li>Release-Notes</li>
</ul>
@ -108,15 +108,13 @@
</header>
<p><img src="/images/screenshots/custom-icons.png" style="float: right;" />We have all been hard at work to get this latest release ready. One of the big highlights in this release is the introduction of an extended iconset to be used in the frontend (credits to <a href="https://github.com/happyleavesaoc">@happyleavesaoc</a> for idea and prototype). To get started with customizing, pick any icon from <a href="https://MaterialDesignIcons.com">MaterialDesignIcons.com</a>, prefix the name with <code>mdi:</code> and stick it into your <code>customize</code> section in <code>configuration.yaml</code>:</p>
<p><img src="/images/screenshots/custom-icons.png" style="float: right;" />We have all been hard at work to get this latest release ready. One of the big highlights in this release is the introduction of an extended iconset to be used in the frontend (credits to <a href="https://github.com/happyleavesaoc">@happyleavesaoc</a> for idea and prototype). To get started with customizing, pick any icon from <a href="https://MaterialDesignIcons.com">MaterialDesignIcons.com</a>, prefix the name with <code class="highlighter-rouge">mdi:</code> and stick it into your <code class="highlighter-rouge">customize</code> section in <code class="highlighter-rouge">configuration.yaml</code>:</p>
<div class="highlighter-coderay"><div class="CodeRay">
<div class="code"><pre><span class="key">homeassistant</span>:
<span class="key">customize</span>:
<span class="key">switch.ac</span>:
<span class="key">icon</span>: <span class="string"><span class="content">'mdi:air-conditioner'</span></span>
</pre></div>
</div>
<div class="language-yaml highlighter-rouge"><pre class="highlight"><code><span class="s">homeassistant</span><span class="pi">:</span>
<span class="s">customize</span><span class="pi">:</span>
<span class="s">switch.ac</span><span class="pi">:</span>
<span class="s">icon</span><span class="pi">:</span> <span class="s1">'</span><span class="s">mdi:air-conditioner'</span>
</code></pre>
</div>
<h4>Breaking changes</h4>
@ -219,7 +217,7 @@
<li class="post">
<a href="/blog/2016/08/13/foursquare-fast-com-ffmpeg-gpsd/">0.26: Foursquare, Fast.com, FFMPEG and GPSD</a>
<a href="/blog/2016/08/13/foursquare-fast.com-ffmpeg-gpsd/">0.26: Foursquare, Fast.com, FFMPEG and GPSD</a>
</li>

View file

@ -93,7 +93,7 @@
<ul class="tags unstyled">
<li><a class='category' href='/blog/categories/survey/'>Survey</a></li>
<li>Survey</li>
</ul>
@ -259,7 +259,7 @@
<li class="post">
<a href="/blog/2016/08/13/foursquare-fast-com-ffmpeg-gpsd/">0.26: Foursquare, Fast.com, FFMPEG and GPSD</a>
<a href="/blog/2016/08/13/foursquare-fast.com-ffmpeg-gpsd/">0.26: Foursquare, Fast.com, FFMPEG and GPSD</a>
</li>

View file

@ -87,15 +87,15 @@
<div class="meta clearfix">
<time datetime="2015-12-05T23:39:00+00:00" pubdate data-updated="true"><i class="icon-calendar"></i> December 5, 2015</time>
<span class="byline author vcard"><i class='icon-user'></i> Paulus Schoutsen</span>
<span><i class='icon-time'></i> less than one minute reading time</span>
<span><i class='icon-time'></i> Less than one minute reading time</span>
<span>
<i class="icon-tags"></i>
<ul class="tags unstyled">
<li><a class='category' href='/blog/categories/community/'>Community</a></li>
<li>Community</li>
<li><a class='category' href='/blog/categories/video/'>Video</a></li>
<li>Video</li>
</ul>
@ -194,7 +194,7 @@
<li class="post">
<a href="/blog/2016/08/13/foursquare-fast-com-ffmpeg-gpsd/">0.26: Foursquare, Fast.com, FFMPEG and GPSD</a>
<a href="/blog/2016/08/13/foursquare-fast.com-ffmpeg-gpsd/">0.26: Foursquare, Fast.com, FFMPEG and GPSD</a>
</li>

View file

@ -87,13 +87,13 @@
<div class="meta clearfix">
<time datetime="2015-12-06T19:29:00+00:00" pubdate data-updated="true"><i class="icon-calendar"></i> December 6, 2015</time>
<span class="byline author vcard"><i class='icon-user'></i> Paulus Schoutsen</span>
<span><i class='icon-time'></i> less than one minute reading time</span>
<span><i class='icon-time'></i> Less than one minute reading time</span>
<span>
<i class="icon-tags"></i>
<ul class="tags unstyled">
<li><a class='category' href='/blog/categories/release-notes/'>Release-Notes</a></li>
<li>Release-Notes</li>
</ul>
@ -123,7 +123,7 @@
<li>Bunch of bug fixes and optimizations</li>
</ul>
<p>To update, run <code>pip3 install --upgrade homeassistant</code>.</p>
<p>To update, run <code class="highlighter-rouge">pip3 install --upgrade homeassistant</code>.</p>
<p class="img">
<img src="/images/screenshots/lock-and-rollershutter-card.png" />
@ -201,7 +201,7 @@
<li class="post">
<a href="/blog/2016/08/13/foursquare-fast-com-ffmpeg-gpsd/">0.26: Foursquare, Fast.com, FFMPEG and GPSD</a>
<a href="/blog/2016/08/13/foursquare-fast.com-ffmpeg-gpsd/">0.26: Foursquare, Fast.com, FFMPEG and GPSD</a>
</li>

View file

@ -93,7 +93,7 @@
<ul class="tags unstyled">
<li><a class='category' href='/blog/categories/how-to/'>How-To</a></li>
<li>How-To</li>
</ul>
@ -108,103 +108,87 @@
</header>
<p><img src="/images/supported_brands/influxdb.png" style="clear: right; border:none; box-shadow: none; float: right; margin-bottom: 12px;" width="200" /><img src="/images/supported_brands/grafana.png" style="clear: right; border:none; box-shadow: none; float: right; margin-bottom: 12px;" width="200" /><br />
<p><img src="/images/supported_brands/influxdb.png" style="clear: right; border:none; box-shadow: none; float: right; margin-bottom: 12px;" width="200" /><img src="/images/supported_brands/grafana.png" style="clear: right; border:none; box-shadow: none; float: right; margin-bottom: 12px;" width="200" />
The <a href="https://influxdb.com/">InfluxDB</a> database is a so-called time series database primarly designed to store sensor data and real-time analytics.</p>
<p>The <code>influxdb</code> component makes it possible to transfer all state changes from Home Assistant to an external <a href="https://influxdb.com/">InfluxDB</a> database.</p>
<p>The <code class="highlighter-rouge">influxdb</code> component makes it possible to transfer all state changes from Home Assistant to an external <a href="https://influxdb.com/">InfluxDB</a> database.</p>
<a name="read-more"></a>
<p>The first step is to install the InfluxDB packages. If you are not running Fedora, check the <a href="https://influxdb.com/docs/v0.9/introduction/installation.html">installation</a> section for further details.</p>
<div class="highlighter-coderay"><div class="CodeRay">
<div class="code"><pre>$ sudo dnf -y install http://influxdb.s3.amazonaws.com/influxdb-0.9.5.1-1.x86_64.rpm
</pre></div>
</div>
<div class="language-bash highlighter-rouge"><pre class="highlight"><code><span class="gp">$ </span>sudo dnf -y install http://influxdb.s3.amazonaws.com/influxdb-0.9.5.1-1.x86_64.rpm
</code></pre>
</div>
<p>Launch the InfluxDB service.</p>
<div class="highlighter-coderay"><div class="CodeRay">
<div class="code"><pre>$ sudo systemctl start influxdb
</pre></div>
</div>
<div class="language-bash highlighter-rouge"><pre class="highlight"><code><span class="gp">$ </span>sudo systemctl start influxdb
</code></pre>
</div>
<p>If everything went well, then the web interface of the database should be accessible at <a href="http://localhost:8083/">http://localhost:8083/</a>. Create a database <code>home_assistant</code> to use with Home Assistant either with the web interface or the commandline tool <code>influx</code>.</p>
<p>If everything went well, then the web interface of the database should be accessible at <a href="http://localhost:8083/">http://localhost:8083/</a>. Create a database <code class="highlighter-rouge">home_assistant</code> to use with Home Assistant either with the web interface or the commandline tool <code class="highlighter-rouge">influx</code>.</p>
<p class="img">
<img src="/images/blog/2015-12-influxdb/influxdb-frontend.png" />
InfluxDB web frontend
</p>
<div class="highlighter-coderay"><div class="CodeRay">
<div class="code"><pre>$ influx
Visit https://enterprise.influxdata.com to register for updates, InfluxDB server management, and monitoring.
<div class="language-bash highlighter-rouge"><pre class="highlight"><code><span class="gp">$ </span>influx
Visit https://enterprise.influxdata.com to register <span class="k">for </span>updates, InfluxDB server management, and monitoring.
Connected to http://localhost:8086 version 0.9.5.1
InfluxDB shell 0.9.5.1
&gt; CREATE DATABASE home_assistant
</pre></div>
</div>
<span class="gp">&gt; </span>CREATE DATABASE home_assistant
</code></pre>
</div>
<p>An optional step is to create a user. Keep in mind to adjust the configuration (add <code>username</code> and <code>password</code>) in the next step if you prefer to go this way.</p>
<p>An optional step is to create a user. Keep in mind to adjust the configuration (add <code class="highlighter-rouge">username</code> and <code class="highlighter-rouge">password</code>) in the next step if you prefer to go this way.</p>
<div class="highlighter-coderay"><div class="CodeRay">
<div class="code"><pre>&gt; CREATE USER &quot;home-assistant&quot; WITH PASSWORD 'password'
</pre></div>
</div>
<div class="language-bash highlighter-rouge"><pre class="highlight"><code><span class="gp">&gt; </span>CREATE USER <span class="s2">"home-assistant"</span> WITH PASSWORD <span class="s1">'password'</span>
</code></pre>
</div>
<p>To use the <code>influxdb</code> component in your installation, add the following to your <code>configuration.yaml</code> file:</p>
<p>To use the <code class="highlighter-rouge">influxdb</code> component in your installation, add the following to your <code class="highlighter-rouge">configuration.yaml</code> file:</p>
<div class="highlighter-coderay"><div class="CodeRay">
<div class="code"><pre><span class="key">influxdb</span>:
<span class="key">host</span>: <span class="string"><span class="content">127.0.0.1</span></span>
</pre></div>
</div>
<div class="language-yaml highlighter-rouge"><pre class="highlight"><code><span class="s">influxdb</span><span class="pi">:</span>
<span class="s">host</span><span class="pi">:</span> <span class="s">127.0.0.1</span>
</code></pre>
</div>
<p>After you restart Home Assistant you should see that the InfluxDB database gets filled. The <a href="https://influxdb.com/docs/v0.9/query_language/index.html">language</a> to query the database is similar to SQL.</p>
<div class="highlighter-coderay"><div class="CodeRay">
<div class="code"><pre>$ influx
[...]
&gt; USE home_assistant
<div class="language-bash highlighter-rouge"><pre class="highlight"><code><span class="gp">$ </span>influx
<span class="o">[</span>...]
<span class="gp">&gt; </span>USE home_assistant
Using database home_assistant
&gt; SELECT * FROM binary_sensor
<span class="gp">&gt; </span>SELECT <span class="k">*</span> FROM binary_sensor
name: binary_sensor
-------------------
time domain entity_id value
1449496577000000000 binary_sensor bathroom_door 0
1449496577000000000 binary_sensor bathroom_window 0
1449496577000000000 binary_sensor basement_door 0
1449496577000000000 binary_sensor basement_window 0
1449496684000000000 binary_sensor bathroom_window 1
[...]
</pre></div>
</div>
<span class="nb">time </span>domain entity_id value
1449496577000000000 binary_sensor bathroom_door 0
1449496577000000000 binary_sensor bathroom_window 0
1449496577000000000 binary_sensor basement_door 0
1449496577000000000 binary_sensor basement_window 0
1449496684000000000 binary_sensor bathroom_window 1
<span class="o">[</span>...]
</code></pre>
</div>
<p><a href="http://grafana.org/">Grafana</a> is a dashboard that can create graphs from different sources including InfluxDB. The installation is simple, and there are detailed steps for many different configurations on the <a href="http://docs.grafana.org/installation/">Grafana installation</a> page. For a recent system that is running Fedora:</p>
<div class="highlighter-coderay"><div class="CodeRay">
<div class="code"><pre>$ sudo dnf -y install https://grafanarel.s3.amazonaws.com/builds/grafana-2.5.0-1.x86_64.rpm
</pre></div>
</div>
<div class="language-bash highlighter-rouge"><pre class="highlight"><code><span class="gp">$ </span>sudo dnf -y install https://grafanarel.s3.amazonaws.com/builds/grafana-2.5.0-1.x86_64.rpm
</code></pre>
</div>
<p>Start the grafana server.</p>
<div class="highlighter-coderay"><div class="CodeRay">
<div class="code"><pre>$ sudo systemctl daemon-reload
$ sudo systemctl start grafana-server
$ sudo systemctl status grafana-server
</pre></div>
</div>
<div class="language-bash highlighter-rouge"><pre class="highlight"><code><span class="gp">$ </span>sudo systemctl daemon-reload
<span class="gp">$ </span>sudo systemctl start grafana-server
<span class="gp">$ </span>sudo systemctl status grafana-server
</code></pre>
</div>
<p>Login with the username <code>admin</code> and the password <code>admin</code> at <a href="http://localhost:3000/login">http://localhost:3000/login</a>. Now follow the <a href="http://docs.grafana.org/datasources/influxdb/">InfluxDB setup instructions</a>.</p>
<p>Login with the username <code class="highlighter-rouge">admin</code> and the password <code class="highlighter-rouge">admin</code> at <a href="http://localhost:3000/login">http://localhost:3000/login</a>. Now follow the <a href="http://docs.grafana.org/datasources/influxdb/">InfluxDB setup instructions</a>.</p>
<p>Now you can start to create dashboards and graphs. You have various options to get the data from the graph. The next image just shows a screenshot of the setting for a temperature sensor.</p>
@ -292,7 +276,7 @@ $ sudo systemctl status grafana-server
<li class="post">
<a href="/blog/2016/08/13/foursquare-fast-com-ffmpeg-gpsd/">0.26: Foursquare, Fast.com, FFMPEG and GPSD</a>
<a href="/blog/2016/08/13/foursquare-fast.com-ffmpeg-gpsd/">0.26: Foursquare, Fast.com, FFMPEG and GPSD</a>
</li>

View file

@ -93,7 +93,7 @@
<ul class="tags unstyled">
<li><a class='category' href='/blog/categories/how-to/'>How-To</a></li>
<li>How-To</li>
</ul>
@ -108,7 +108,7 @@
</header>
<p><img src="/images/blog/2015-12-tasker/tasker-logo.png" style="clear: right; border:none; box-shadow: none; float: right; margin-bottom: 12px;" width="200" /><br />
<p><img src="/images/blog/2015-12-tasker/tasker-logo.png" style="clear: right; border:none; box-shadow: none; float: right; margin-bottom: 12px;" width="200" />
In this tutorial I will explain how you can activate Tasker tasks from Home Assistant command line switches. We are going to set up a switch that when toggled will make your Android device say either “On” or “Off”.</p>
<p>You could also do this with the automation component instead so whenever you put your house to sleep mode for example your Android device will open up Google Play Books or the Kindle app ready for you to read as well as dimming your lights, but this tutorial is all about the switches.</p>
@ -123,7 +123,7 @@ In this tutorial I will explain how you can activate Tasker tasks from Home Assi
<img src="/images/blog/2015-12-tasker/screenshot-1.png" />
</p>
<p>Now type in <code>SayOn</code> in the <code>Message</code> box and you should see a box appear on the right with a URL in it, this is what we will be using in the Python script later on so save that for later. Do the same thing again but this time replace <code>SayOn</code> with <code>SayOff</code>. Now just click the <code>Send message now!</code> button to test that your commands will get sent to your Android device, if they do you will see a toast message at the bottom of your screen like this one.</p>
<p>Now type in <code class="highlighter-rouge">SayOn</code> in the <code class="highlighter-rouge">Message</code> box and you should see a box appear on the right with a URL in it, this is what we will be using in the Python script later on so save that for later. Do the same thing again but this time replace <code class="highlighter-rouge">SayOn</code> with <code class="highlighter-rouge">SayOff</code>. Now just click the <code class="highlighter-rouge">Send message now!</code> button to test that your commands will get sent to your Android device, if they do you will see a toast message at the bottom of your screen like this one.</p>
<p class="img">
<img src="/images/blog/2015-12-tasker/screenshot-2.png" height="450" />
@ -131,41 +131,37 @@ In this tutorial I will explain how you can activate Tasker tasks from Home Assi
<h3>Tasker Setup</h3>
<p>Open up Tasker and make sure youre in the <code>PROFILES</code> tab, then select the plus icon to create a new profile. Select <code>Event</code> -&gt; <code>Plugin</code> -&gt; <code>AutoRemote</code> -&gt; <code>AutoRemote</code> and then the pencil icon to configure the AutoRemote event. Select <code>Message Filter</code> and enter in <code>SayOn</code> then go back until it asks you for a task. Select <code>New task</code> then just leave the next field blank and select the tick icon. <br />
This is where well configure our task, so select the plus icon to select an action. Select <code>Alert</code> -&gt; <code>Say</code> to add a Say action. Enter <code>On</code> in the text field and go back to test your task, make sure your media volume is up then select the play icon, you should hear your device say “On”.</p>
<p>Open up Tasker and make sure youre in the <code class="highlighter-rouge">PROFILES</code> tab, then select the plus icon to create a new profile. Select <code class="highlighter-rouge">Event</code> -&gt; <code class="highlighter-rouge">Plugin</code> -&gt; <code class="highlighter-rouge">AutoRemote</code> -&gt; <code class="highlighter-rouge">AutoRemote</code> and then the pencil icon to configure the AutoRemote event. Select <code class="highlighter-rouge">Message Filter</code> and enter in <code class="highlighter-rouge">SayOn</code> then go back until it asks you for a task. Select <code class="highlighter-rouge">New task</code> then just leave the next field blank and select the tick icon.
This is where well configure our task, so select the plus icon to select an action. Select <code class="highlighter-rouge">Alert</code> -&gt; <code class="highlighter-rouge">Say</code> to add a Say action. Enter <code class="highlighter-rouge">On</code> in the text field and go back to test your task, make sure your media volume is up then select the play icon, you should hear your device say “On”.</p>
<p class="img">
<img src="/images/blog/2015-12-tasker/screenshot-3.png" height="450" />
</p>
<p>Now you can go back to the main Tasker screen and create another profile but this time replace <code>SayOn</code> with <code>SayOff</code> and <code>On</code> with <code>Off</code>. After youve done that go to the main screen again and select the menu button at the top then <code>Exit</code> and <code>Save first</code> to make sure everything is saved properly.</p>
<p>Now you can go back to the main Tasker screen and create another profile but this time replace <code class="highlighter-rouge">SayOn</code> with <code class="highlighter-rouge">SayOff</code> and <code class="highlighter-rouge">On</code> with <code class="highlighter-rouge">Off</code>. After youve done that go to the main screen again and select the menu button at the top then <code class="highlighter-rouge">Exit</code> and <code class="highlighter-rouge">Save first</code> to make sure everything is saved properly.</p>
<h3>Python Script</h3>
<p>Now its time to set it up the script, so create a new Python script and name it <code>On.py</code> then enter this code:</p>
<p>Now its time to set it up the script, so create a new Python script and name it <code class="highlighter-rouge">On.py</code> then enter this code:</p>
<div class="highlighter-coderay"><div class="CodeRay">
<div class="code"><pre><span class="keyword">import</span> <span class="include">requests</span>
requests.get(<span class="string"><span class="delimiter">'</span><span class="content">[URL]</span><span class="delimiter">'</span></span>)
</pre></div>
</div>
<div class="language-python highlighter-rouge"><pre class="highlight"><code><span class="kn">import</span> <span class="nn">requests</span>
<span class="n">requests</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="s">'[URL]'</span><span class="p">)</span>
</code></pre>
</div>
<p>Enter in your “On” URL then save it. Create another script but this time call it <code>Off.py</code> and enter your “off” URL instead.</p>
<p>Enter in your “On” URL then save it. Create another script but this time call it <code class="highlighter-rouge">Off.py</code> and enter your “off” URL instead.</p>
<h3>Home Assistant Configuration</h3>
<p>Add a command line switch to your Home Assistant configuration:</p>
<div class="highlighter-coderay"><div class="CodeRay">
<div class="code"><pre><span class="key">switch</span>:
<span class="key">platform</span>: <span class="string"><span class="content">command_switch</span></span>
<span class="key">switches</span>:
<span class="key">tasker_say</span>:
<span class="key">oncmd</span>: <span class="string"><span class="content">python &quot;[LocationOfOnScript]&quot;</span></span>
<span class="key">offcmd</span>: <span class="string"><span class="content">python &quot;[LocationOfOffScript]&quot;</span></span>
</pre></div>
</div>
<div class="language-yaml highlighter-rouge"><pre class="highlight"><code><span class="s">switch</span><span class="pi">:</span>
<span class="s">platform</span><span class="pi">:</span> <span class="s">command_switch</span>
<span class="s">switches</span><span class="pi">:</span>
<span class="s">tasker_say</span><span class="pi">:</span>
<span class="s">oncmd</span><span class="pi">:</span> <span class="s">python "[LocationOfOnScript]"</span>
<span class="s">offcmd</span><span class="pi">:</span> <span class="s">python "[LocationOfOffScript]"</span>
</code></pre>
</div>
<p>Now load up Home Assistant and whenever you toggle the switch you created your Android device will respond with either “On” or “Off”. :-)</p>
@ -242,7 +238,7 @@ requests.get(<span class="string"><span class="delimiter">'</span><span class="c
<li class="post">
<a href="/blog/2016/08/13/foursquare-fast-com-ffmpeg-gpsd/">0.26: Foursquare, Fast.com, FFMPEG and GPSD</a>
<a href="/blog/2016/08/13/foursquare-fast.com-ffmpeg-gpsd/">0.26: Foursquare, Fast.com, FFMPEG and GPSD</a>
</li>

View file

@ -93,7 +93,7 @@
<ul class="tags unstyled">
<li><a class='category' href='/blog/categories/public-service-announcement/'>Public-Service-Announcement</a></li>
<li>Public-Service-Announcement</li>
</ul>
@ -214,7 +214,7 @@ Philips Hue FAQ entries regarding 3rd party light bulbs.
<li class="post">
<a href="/blog/2016/08/13/foursquare-fast-com-ffmpeg-gpsd/">0.26: Foursquare, Fast.com, FFMPEG and GPSD</a>
<a href="/blog/2016/08/13/foursquare-fast.com-ffmpeg-gpsd/">0.26: Foursquare, Fast.com, FFMPEG and GPSD</a>
</li>

View file

@ -87,13 +87,13 @@
<div class="meta clearfix">
<time datetime="2015-12-13T18:05:00+00:00" pubdate data-updated="true"><i class="icon-calendar"></i> December 13, 2015</time>
<span class="byline author vcard"><i class='icon-user'></i> Paulus Schoutsen & Martin Hjelmare</span>
<span><i class='icon-time'></i> four minutes reading time</span>
<span><i class='icon-time'></i> five minutes reading time</span>
<span>
<i class="icon-tags"></i>
<ul class="tags unstyled">
<li><a class='category' href='/blog/categories/how-to/'>How-To</a></li>
<li>How-To</li>
</ul>
@ -148,61 +148,53 @@
<p>Lets Encrypt will give you a free 90-day certificate if you pass their domain validation challenge. Domains are validated by having certain data be accessible on your domain for Lets Encrypt (<a href="https://letsencrypt.org/how-it-works/">they describe it better themselves</a>).</p>
<p>Assuming that your home is behind a router, the first thing to do is to set up port forwarding from your router to your computer that will run Lets Encrypt. For the Lets Encrypt set up we need to forward external port <code>80</code> to internal port <code>80</code> (http connections). This can be set up by accessing your router admin interface (<a href="http://portforward.com">Site with port forwarding instructions per router</a>). This port forward must be active whenever you want to request a new certificate from Lets Encrypt, typically every three months. If you normally dont use or have an app that listens to port <code>80</code>, it should be safe to leave the port open. This will make renewing certificates easier.</p>
<p>Assuming that your home is behind a router, the first thing to do is to set up port forwarding from your router to your computer that will run Lets Encrypt. For the Lets Encrypt set up we need to forward external port <code class="highlighter-rouge">80</code> to internal port <code class="highlighter-rouge">80</code> (http connections). This can be set up by accessing your router admin interface (<a href="http://portforward.com">Site with port forwarding instructions per router</a>). This port forward must be active whenever you want to request a new certificate from Lets Encrypt, typically every three months. If you normally dont use or have an app that listens to port <code class="highlighter-rouge">80</code>, it should be safe to leave the port open. This will make renewing certificates easier.</p>
<p>Now youre ready to install and run the client that requests certificates from Lets Encrypt. The following example will use the platform independent script to install and run the <a href="https://certbot.eff.org/">certbot</a> client from Lets Encrypt. If there is a certbot package for your OS, its recommended to install the package instead of the platform independent script. Read the <a href="https://certbot.eff.org/">docs</a> for more information. There are also other clients that might offer more customization and options. See the <a href="https://letsencrypt.org/docs/client-options/">client options page</a> at Lets Encrypt.</p>
<div class="highlighter-coderay"><div class="CodeRay">
<div class="code"><pre>$ mkdir certbot
$ cd certbot/
$ wget https://dl.eff.org/certbot-auto
$ chmod a+x certbot-auto
$ ./certbot-auto certonly --standalone \
--standalone-supported-challenges http-01 \
--email your@email.address \
<div class="language-bash highlighter-rouge"><pre class="highlight"><code><span class="gp">$ </span>mkdir certbot
<span class="gp">$ </span><span class="nb">cd </span>certbot/
<span class="gp">$ </span>wget https://dl.eff.org/certbot-auto
<span class="gp">$ </span>chmod a+x certbot-auto
<span class="gp">$ </span>./certbot-auto certonly --standalone <span class="se">\</span>
--standalone-supported-challenges http-01 <span class="se">\</span>
--email your@email.address <span class="se">\</span>
-d hass-example.duckdns.org
</pre></div>
</div>
</code></pre>
</div>
<p>If youre using Docker, run the following command to generate the required keys:</p>
<div class="highlighter-coderay"><div class="CodeRay">
<div class="code"><pre>sudo mkdir /etc/letsencrypt /var/lib/letsencrypt
sudo docker run -it --rm -p 80:80 --name certbot \
-v &quot;/etc/letsencrypt:/etc/letsencrypt&quot; \
-v &quot;/var/lib/letsencrypt:/var/lib/letsencrypt&quot; \
quay.io/letsencrypt/letsencrypt:latest certonly \
--standalone --standalone-supported-challenges http-01 \
<div class="language-bash highlighter-rouge"><pre class="highlight"><code>sudo mkdir /etc/letsencrypt /var/lib/letsencrypt
sudo docker run -it --rm -p 80:80 --name certbot <span class="se">\</span>
-v <span class="s2">"/etc/letsencrypt:/etc/letsencrypt"</span> <span class="se">\</span>
-v <span class="s2">"/var/lib/letsencrypt:/var/lib/letsencrypt"</span> <span class="se">\</span>
quay.io/letsencrypt/letsencrypt:latest certonly <span class="se">\</span>
--standalone --standalone-supported-challenges http-01 <span class="se">\</span>
--email your@email.address -d hass-example.duckdns.org
</pre></div>
</div>
</code></pre>
</div>
<p>With either method your certificate will be generated and put in the directory <code>/etc/letsencrypt/live/hass-example.duckdns.org</code>. As the lifetime is only 90 days, you will have to repeat this every 90 days. Theres a special command to simplify renewing certificates:</p>
<p>With either method your certificate will be generated and put in the directory <code class="highlighter-rouge">/etc/letsencrypt/live/hass-example.duckdns.org</code>. As the lifetime is only 90 days, you will have to repeat this every 90 days. Theres a special command to simplify renewing certificates:</p>
<div class="highlighter-coderay"><div class="CodeRay">
<div class="code"><pre>./certbot-auto renew --quiet --no-self-upgrade --standalone \
<div class="language-bash highlighter-rouge"><pre class="highlight"><code>./certbot-auto renew --quiet --no-self-upgrade --standalone <span class="se">\</span>
--standalone-supported-challenges http-01
</pre></div>
</div>
</code></pre>
</div>
<p><img width="60" src="/images/favicon-192x192.png" style="float: right; border:none; box-shadow: none;" /></p>
<h3><a class="title-link" name="home-assistant" href="#home-assistant"></a> Home Assistant</h3>
<p>Before updating the Home Assistant configuration, we have to forward port <code>443</code> (https connections) to port <code>8123</code> on the computer that will run Home Assistant. Do this in your router configuration as previously done for port <code>80</code>.</p>
<p>Before updating the Home Assistant configuration, we have to forward port <code class="highlighter-rouge">443</code> (https connections) to port <code class="highlighter-rouge">8123</code> on the computer that will run Home Assistant. Do this in your router configuration as previously done for port <code class="highlighter-rouge">80</code>.</p>
<p>The final step is to point Home Assistant at the generated certificates. Before you do this, make sure that the user running Home Assistant has read access to the folder that holds the certificates.</p>
<div class="highlighter-coderay"><div class="CodeRay">
<div class="code"><pre><span class="key">http</span>:
<span class="key">api_password</span>: <span class="string"><span class="content">YOUR_SECRET_PASSWORD</span></span>
<span class="key">ssl_certificate</span>: <span class="string"><span class="content">/etc/letsencrypt/live/hass-example.duckdns.org/fullchain.pem</span></span>
<span class="key">ssl_key</span>: <span class="string"><span class="content">/etc/letsencrypt/live/hass-example.duckdns.org/privkey.pem</span></span>
</pre></div>
</div>
<div class="language-yaml highlighter-rouge"><pre class="highlight"><code><span class="s">http</span><span class="pi">:</span>
<span class="s">api_password</span><span class="pi">:</span> <span class="s">YOUR_SECRET_PASSWORD</span>
<span class="s">ssl_certificate</span><span class="pi">:</span> <span class="s">/etc/letsencrypt/live/hass-example.duckdns.org/fullchain.pem</span>
<span class="s">ssl_key</span><span class="pi">:</span> <span class="s">/etc/letsencrypt/live/hass-example.duckdns.org/privkey.pem</span>
</code></pre>
</div>
<p>You can now navigate to https://hass-example.duckdns.org and enjoy encryption!</p>
@ -281,7 +273,7 @@ sudo docker run -it --rm -p 80:80 --name certbot \
<li class="post">
<a href="/blog/2016/08/13/foursquare-fast-com-ffmpeg-gpsd/">0.26: Foursquare, Fast.com, FFMPEG and GPSD</a>
<a href="/blog/2016/08/13/foursquare-fast.com-ffmpeg-gpsd/">0.26: Foursquare, Fast.com, FFMPEG and GPSD</a>
</li>

View file

@ -93,7 +93,7 @@
<ul class="tags unstyled">
<li><a class='category' href='/blog/categories/release-notes/'>Release-Notes</a></li>
<li>Release-Notes</li>
</ul>
@ -137,17 +137,15 @@
<p>This release introduces templates. This will allow you to parse data before it gets processed or create messages for notifications on the fly based on data within Home Assistant. The notification component and the new Alexa/Amazon Echo component are both using the new template functionality to render responses. A template editor has been added to the developer tool section in the app so you can get instant feedback if your templates are working or not.</p>
<div class="highlighter-coderay"><div class="CodeRay">
<div class="code"><pre>The temperature at home is {{ states('sensor.temperature') }}.
</pre></div>
</div>
<div class="language-text highlighter-rouge"><pre class="highlight"><code>The temperature at home is {{ states('sensor.temperature') }}.
</code></pre>
</div>
<p>More information and examples can be found in the <a href="/topics/templating/">template documentation</a>.</p>
<h3>Breaking changes</h3>
<p>Templates will now be the only way to extract data from raw sources like REST, CommandSensor or MQTT. This will replace any specific option that used to do this before. This means that <code>precision</code>, <code>factor</code>, <code>attribute</code> or <code>json_path</code> etc will no longer work.</p>
<p>Templates will now be the only way to extract data from raw sources like REST, CommandSensor or MQTT. This will replace any specific option that used to do this before. This means that <code class="highlighter-rouge">precision</code>, <code class="highlighter-rouge">factor</code>, <code class="highlighter-rouge">attribute</code> or <code class="highlighter-rouge">json_path</code> etc will no longer work.</p>
<p>Affected components and platforms:</p>
@ -235,7 +233,7 @@
<li class="post">
<a href="/blog/2016/08/13/foursquare-fast-com-ffmpeg-gpsd/">0.26: Foursquare, Fast.com, FFMPEG and GPSD</a>
<a href="/blog/2016/08/13/foursquare-fast.com-ffmpeg-gpsd/">0.26: Foursquare, Fast.com, FFMPEG and GPSD</a>
</li>