Site updated at 2016-07-19 19:44:18 UTC

This commit is contained in:
Travis CI 2016-07-19 19:44:18 +00:00
parent 3139e57b1c
commit eba36391fb
122 changed files with 1709 additions and 1247 deletions

152
atom.xml
View file

@ -4,7 +4,7 @@
<title><![CDATA[Home Assistant]]></title>
<link href="https://home-assistant.io/atom.xml" rel="self"/>
<link href="https://home-assistant.io/"/>
<updated>2016-07-19T13:52:21+00:00</updated>
<updated>2016-07-19T19:43:12+00:00</updated>
<id>https://home-assistant.io/</id>
<author>
<name><![CDATA[Paulus Schoutsen]]></name>
@ -13,6 +13,123 @@
<generator uri="http://octopress.org/">Octopress</generator>
<entry>
<title type="html"><![CDATA[Exporting Home Assistant information]]></title>
<link href="https://home-assistant.io/blog/2016/07/19/exporting-processing-data/"/>
<updated>2016-07-19T16:00:00+00:00</updated>
<id>https://home-assistant.io/blog/2016/07/19/exporting-processing-data</id>
<content type="html"><![CDATA[<p><img src="https://home-assistant.io/images/blog/2016-07-reporting/mpl-sensor.png" style="clear: right; border:none; box-shadow: none; float: right; margin-bottom: 12px;" width="200" /></p>
<p>The <a href="https://home-assistant.io/components/history/">history component</a> is tracking everything that is going on within Home Assistant. This means that you have access to all stored information about your home. Our history is not a full-fledged graphical processing and visualization component as you may know from systems and network monitoring tools. The current limitation is that you only can select a day for a visual output of your information and not a period. Also, there is no possibility to drill down on a specific entity.</p>
<p>This blog post will show you ways to export data for reporting, visualization, or further analysis of automation rules.</p>
<!--more-->
<p>In this blog post I use the temperature of the <a href="https://en.wikipedia.org/wiki/Aare">Aare</a> river close to where I live as a show case. The temperatures were recorded with the <a href="https://home-assistant.io/components/sensor.swiss_hydrological_data/">Swiss Hydrological Data sensor</a> and the name of the sensor is <code>sensor.aare</code>.</p>
<p>The database is stored at <code>&lt;path to config dir&gt;/.homeassistant/home-assistant_v2.db</code> as <a href="https://www.sqlite.org/">SQLite database</a>. In all examples we are going to use the path: <code>/home/ha/.homeassistant/home-assistant_v2.db</code></p>
<p>If you are just curious whats stored in your database then you can use the <code>sqlite3</code> command-line tool or a graphical one like <a href="http://sqlitebrowser.org/">DB Browser for SQLite</a>.</p>
<p>The table that is holding the states is called <code>states</code>. The <code>events</code> tables is responsible for storing the events which occurred. So, we will first check how many entries there are in the <code>states</code> table. <code>sqlite3</code> needs to know where the databases is located. To work with your database make sure that Home Assistant is not running or create a copy of the existing database. Its recommended to work with a copy.</p>
<div class="highlighter-coderay"><div class="CodeRay">
<div class="code"><pre>$ sqlite3 /home/ha/.homeassistant/home-assistant_v2.db
SQLite version 3.11.0 2016-02-15 17:29:24
sqlite&gt; SELECT count(*) FROM states;
24659
</pre></div>
</div>
</div>
<p>Lets have a look at a sample <a href="https://en.wikipedia.org/wiki/SQL">SQL</a> query. This query will show all states in a period for the sensor <code>sensor.aare</code>.</p>
<div class="highlighter-coderay"><div class="CodeRay">
<div class="code"><pre><span class="class">SELECT</span> state, last_changed <span class="keyword">FROM</span> states
<span class="keyword">WHERE</span>
entity_id = <span class="string"><span class="delimiter">'</span><span class="content">sensor.aare</span><span class="delimiter">'</span></span>
<span class="keyword">AND</span>
last_changed <span class="keyword">BETWEEN</span>
<span class="string"><span class="delimiter">'</span><span class="content">2016-07-05 00:00:00.000000</span><span class="delimiter">'</span></span> <span class="keyword">AND</span> <span class="string"><span class="delimiter">'</span><span class="content">2016-07-07 00:00:00.000000</span><span class="delimiter">'</span></span>;
</pre></div>
</div>
</div>
<p>The SQL statement can be formed that it fits exactly what you need. This means that you can process the data in any way you want for further use. Often it makes sense to eliminate certain entries like <code>Unknown</code> or peaks.</p>
<p>If the above query is executed in DB Browser for SQLite you would be able to save the sensors graph as png.</p>
<p class="img">
<img src="https://home-assistant.io/images/blog/2016-07-reporting/db-browser.png" />
Visualization with DB Browser for SQLite
</p>
<p>You may ask: Why not do this with LibreOffice Calc or another spreadsheet application? As most spreadsheet applications are not able to work directly with SQLite database we are going to export the data from the database to <a href="https://en.wikipedia.org/wiki/Comma-separated_values">CSV</a>.</p>
<div class="highlighter-coderay"><div class="CodeRay">
<div class="code"><pre>$ sqlite3 -header -csv /home/ha/.homeassistant/home-assistant_v2.db &quot;SELECT last_changed, state FROM states WHERE entity_id = 'sensor.aare' AND last_changed BETWEEN '2016-07-05 00:00:00.000000' AND '2016-07-07 00:00:00.000000';&quot; &gt; sensor.csv
</pre></div>
</div>
</div>
<p>The ordering for the <code>SELECT</code> was changed to get the time stamps first and then the state. Now we can import the CSV file into the application of your choice, here its LibreOffice Calc.</p>
<p class="img">
<img src="https://home-assistant.io/images/blog/2016-07-reporting/libreoffice-import.png" />
Import of the CSV file
</p>
<p>After the import a graph can be created over the existing data.</p>
<p class="img">
<img src="https://home-assistant.io/images/blog/2016-07-reporting/libreoffice-graph.png" />
Graph in LibreOffice
</p>
<p>You can also use <a href="http://matplotlib.org/">matplotlib</a> to generate graphs as an alternative to a spreadsheet application. This is a powerful Python 2D plotting library. With the built-in support for SQLite in Python it will only take a couple lines of code to visualize your data.</p>
<div class="highlighter-coderay"><div class="CodeRay">
<div class="code"><pre><span class="keyword">import</span> <span class="include">sqlite3</span>
<span class="keyword">from</span> <span class="include">matplotlib</span> <span class="keyword">import</span> <span class="include">dates</span>
<span class="keyword">import</span> <span class="include">matplotlib.pyplot</span> <span class="keyword">as</span> plt
<span class="keyword">import</span> <span class="include">homeassistant.util.dt</span> <span class="keyword">as</span> dt
values = []
timestamps = []
conn = sqlite3.connect(<span class="string"><span class="delimiter">'</span><span class="content">/home/ha/.homeassistant/home-assistant_v2.db</span><span class="delimiter">'</span></span>)
data = conn.execute(<span class="string"><span class="delimiter">&quot;</span><span class="content">SELECT state, last_changed FROM states WHERE </span><span class="delimiter">&quot;</span></span>
<span class="string"><span class="delimiter">&quot;</span><span class="content">entity_id = 'sensor.aare' AND last_changed BETWEEN </span><span class="delimiter">&quot;</span></span>
<span class="string"><span class="delimiter">&quot;</span><span class="content">'2016-07-05 00:00:00.000000' AND </span><span class="delimiter">&quot;</span></span>
<span class="string"><span class="delimiter">&quot;</span><span class="content">'2016-07-07 00:00:00.000000'</span><span class="delimiter">&quot;</span></span>)
<span class="keyword">for</span> x <span class="keyword">in</span> data:
timestamps.append(dates.date2num(dt.parse_datetime(x[<span class="integer">1</span>])))
values.append(<span class="predefined">float</span>(x[<span class="integer">0</span>]))
plt.plot_date(x=timestamps, y=values, fmt=<span class="string"><span class="delimiter">&quot;</span><span class="content">r-</span><span class="delimiter">&quot;</span></span>)
plt.ylabel(<span class="string"><span class="delimiter">'</span><span class="content">Temperature</span><span class="delimiter">'</span></span>)
plt.xlabel(<span class="string"><span class="delimiter">'</span><span class="content">Time line</span><span class="delimiter">'</span></span>)
plt.savefig(<span class="string"><span class="delimiter">'</span><span class="content">sensor.png</span><span class="delimiter">'</span></span>)
</pre></div>
</div>
</div>
<p>Creating a connection to the database and executing a query is similar to the ways already seen. The return values from the query are splitted into two lists. The time stamps must be converted in an value which is accepted by matplotlib and then the graph is generated and saved as image.</p>
<p class="img">
<img src="https://home-assistant.io/images/blog/2016-07-reporting/mpl-sensor.png" />
Sensor graph generated by matplotlib
</p>
<p>Most of the graphs are pretty ugly. So, further beautification will be needed. If you have created a nice report including some amazing graphs then the Home Assistant community would be grateful for sharing them in our <a href="https://community.home-assistant.io/">forum</a>.</p>
]]></content>
</entry>
<entry>
<title type="html"><![CDATA[0.24: SQLAlchemy, KNX, Join by Joaoapps, and SimpliSafe.]]></title>
<link href="https://home-assistant.io/blog/2016/07/16/sqlalchemy-knx-join-simplisafe/"/>
@ -1181,39 +1298,6 @@ For example, my wife works next door - and I couldnt detect whether shes a
<p>Today it has been almost 1.5 years since we started the website. We now have <a href="https://home-assistant.io/components/">264 components and platforms</a> under our belt and have been honored with 1.5 million page views ✨. And hopefully we now also have documentation that our community deserves.</p>
<p>Finally, if you see some content that could use more clarifcation or is outdated, dont hesitate to use the Edit in GitHub link that is present on each page.</p>
]]></content>
</entry>
<entry>
<title type="html"><![CDATA[0.17: Onkyo, Panasonic, GTFS and config validation]]></title>
<link href="https://home-assistant.io/blog/2016/04/09/onkyo-panasonic-gtfs-and-config-validation/"/>
<updated>2016-04-09T06:10:00+00:00</updated>
<id>https://home-assistant.io/blog/2016/04/09/onkyo-panasonic-gtfs-and-config-validation</id>
<content type="html"><![CDATA[<p>Another awesome release ready to hit your homes. YAML can be hard for beginners and more experienced automators. So to help catch those pesky errors that sneak into your files weve been hard at work to introduce config validation! Especially huge thanks to <a href="https://github.com/jaharkes/">@jaharkes</a> for his hard work on this. Config validation is still in its early stages. More common platforms and components have been added but we didnt do everything yet.</p>
<p>When we encounter an invalid config we will now write a warning to your logs. You can see those in the frontend by clicking on the last developer tool. Were looking into options to make it more clear - it is a work in progress.</p>
<p>Another big thing is the addition of GTFS support. You probably dont know it, but GTFS is the standard that public transit companies all over the world use to distribute their schedule. This means that you can now have the time of the next bus/train/etc right in your frontend.</p>
<p><img src="https://home-assistant.io/images/supported_brands/onkyo.png" style="clear: right; margin-left: 5px; border:none; box-shadow: none; float: right; margin-bottom: 16px;" width="150" /><img src="https://home-assistant.io/images/supported_brands/loop.png" style="clear: right; margin-left: 5px; border:none; box-shadow: none; float: right; margin-bottom: 16px;" width="150" /><img src="https://home-assistant.io/images/supported_brands/panasonic.png" style="clear: right; margin-left: 5px; border:none; box-shadow: none; float: right; margin-bottom: 16px;" width="150" /></p>
<ul>
<li>Config validation (<a href="https://github.com/balloob/">@balloob</a>, <a href="https://github.com/jaharkes/">@jaharkes</a>)</li>
<li>Sensor: <a href="https://home-assistant.io/components/sensor.gtfs/">GTFS</a> support (public transit open standard) (<a href="https://github.com/robbiet480/">@robbiet480</a>)</li>
<li>Camera: <a href="https://home-assistant.io/components/camera.rpi_camera/">Raspberry PI</a> support added (<a href="https://github.com/LucaSoldi/">@LucaSoldi</a>)</li>
<li>Z-Wave: improved startup reliability (<a href="https://github.com/srcLurker/">@srcLurker</a>)</li>
<li>Media Player: <a href="https://home-assistant.io/components/media_player.onkyo/">Onkyo receiver</a> now supported (<a href="https://github.com/danieljkemp/">@danieljkemp</a>)</li>
<li>Sensor: <a href="https://home-assistant.io/components/sensor.loop_energy/">Loop Energy</a> now supported (<a href="https://github.com/pavoni/">@pavoni</a>)</li>
<li>Thermostat: <a href="https://home-assistant.io/components/thermostat.zwave/">Z-Wave</a> now supported (<a href="https://github.com/coteyr/">@coteyr</a>, <a href="https://github.com/turbokongen/">@turbokongen</a>, <a href="https://github.com/luxus/">@luxus</a>)</li>
<li>Sensor: <a href="https://home-assistant.io/components/sensor.nzbget/">NZBGet</a> now supported (<a href="https://github.com/justyns/">@justyns</a>)</li>
<li>Media Player: <a href="https://home-assistant.io/components/media_player.panasonic_viera/">Panasonic Viera TV</a> now supported (<a href="https://github.com/florianholzapfel/">@florianholzapfel</a>)</li>
<li>Thermostats: Use whole degrees if user uses Fahrenheit (<a href="https://github.com/JshWright/">@JshWright</a>)</li>
<li>Frontend: more material love (<a href="https://github.com/balloob/">@balloob</a>)</li>
</ul>
<h3>Breaking changes</h3>
<p>As of now we are not aware of any breaking changes. However, it might be that Home Assistant will not start for you because of an invalid configuration. A common mistake that people are making is that they are still referring to <code>execute_service</code> in their script configs. This should be <code>service</code>.</p>
]]></content>
</entry>

View file

@ -179,6 +179,12 @@
<ul class="divided">
<li class="post">
<a href="/blog/2016/07/19/exporting-processing-data/">Exporting Home Assistant information</a>
</li>
<li class="post">
<a href="/blog/2016/07/16/sqlalchemy-knx-join-simplisafe/">0.24: SQLAlchemy, KNX, Join by Joaoapps, and SimpliSafe.</a>
</li>
@ -202,12 +208,6 @@
</li>
<li class="post">
<a href="/blog/2016/06/18/pandora-bt-home-hub-5-and-local-file-camera/">0.22: Pandora, BT Home Hub 5 and local file camera.</a>
</li>
</ul>
</section>

View file

@ -234,6 +234,12 @@ This article will try to explain how they all relate.</p>
<ul class="divided">
<li class="post">
<a href="/blog/2016/07/19/exporting-processing-data/">Exporting Home Assistant information</a>
</li>
<li class="post">
<a href="/blog/2016/07/16/sqlalchemy-knx-join-simplisafe/">0.24: SQLAlchemy, KNX, Join by Joaoapps, and SimpliSafe.</a>
</li>
@ -257,12 +263,6 @@ This article will try to explain how they all relate.</p>
</li>
<li class="post">
<a href="/blog/2016/06/18/pandora-bt-home-hub-5-and-local-file-camera/">0.22: Pandora, BT Home Hub 5 and local file camera.</a>
</li>
</ul>
</section>

View file

@ -218,6 +218,12 @@ api_key=ABCDEFGHJKLMNOPQRSTUVXYZ
<ul class="divided">
<li class="post">
<a href="/blog/2016/07/19/exporting-processing-data/">Exporting Home Assistant information</a>
</li>
<li class="post">
<a href="/blog/2016/07/16/sqlalchemy-knx-join-simplisafe/">0.24: SQLAlchemy, KNX, Join by Joaoapps, and SimpliSafe.</a>
</li>
@ -241,12 +247,6 @@ api_key=ABCDEFGHJKLMNOPQRSTUVXYZ
</li>
<li class="post">
<a href="/blog/2016/06/18/pandora-bt-home-hub-5-and-local-file-camera/">0.22: Pandora, BT Home Hub 5 and local file camera.</a>
</li>
</ul>
</section>

View file

@ -193,6 +193,12 @@
<ul class="divided">
<li class="post">
<a href="/blog/2016/07/19/exporting-processing-data/">Exporting Home Assistant information</a>
</li>
<li class="post">
<a href="/blog/2016/07/16/sqlalchemy-knx-join-simplisafe/">0.24: SQLAlchemy, KNX, Join by Joaoapps, and SimpliSafe.</a>
</li>
@ -216,12 +222,6 @@
</li>
<li class="post">
<a href="/blog/2016/06/18/pandora-bt-home-hub-5-and-local-file-camera/">0.22: Pandora, BT Home Hub 5 and local file camera.</a>
</li>
</ul>
</section>

View file

@ -196,6 +196,12 @@ password=YOUR_PASSWORD
<ul class="divided">
<li class="post">
<a href="/blog/2016/07/19/exporting-processing-data/">Exporting Home Assistant information</a>
</li>
<li class="post">
<a href="/blog/2016/07/16/sqlalchemy-knx-join-simplisafe/">0.24: SQLAlchemy, KNX, Join by Joaoapps, and SimpliSafe.</a>
</li>
@ -219,12 +225,6 @@ password=YOUR_PASSWORD
</li>
<li class="post">
<a href="/blog/2016/06/18/pandora-bt-home-hub-5-and-local-file-camera/">0.22: Pandora, BT Home Hub 5 and local file camera.</a>
</li>
</ul>
</section>

View file

@ -202,6 +202,12 @@ Home Assistant now supports <code>--open-ui</code> and <code>--demo-mode</code>
<ul class="divided">
<li class="post">
<a href="/blog/2016/07/19/exporting-processing-data/">Exporting Home Assistant information</a>
</li>
<li class="post">
<a href="/blog/2016/07/16/sqlalchemy-knx-join-simplisafe/">0.24: SQLAlchemy, KNX, Join by Joaoapps, and SimpliSafe.</a>
</li>
@ -225,12 +231,6 @@ Home Assistant now supports <code>--open-ui</code> and <code>--demo-mode</code>
</li>
<li class="post">
<a href="/blog/2016/06/18/pandora-bt-home-hub-5-and-local-file-camera/">0.22: Pandora, BT Home Hub 5 and local file camera.</a>
</li>
</ul>
</section>

View file

@ -210,6 +210,12 @@ Events are saved in a local database. Google Graphs is used to draw the graph. D
<ul class="divided">
<li class="post">
<a href="/blog/2016/07/19/exporting-processing-data/">Exporting Home Assistant information</a>
</li>
<li class="post">
<a href="/blog/2016/07/16/sqlalchemy-knx-join-simplisafe/">0.24: SQLAlchemy, KNX, Join by Joaoapps, and SimpliSafe.</a>
</li>
@ -233,12 +239,6 @@ Events are saved in a local database. Google Graphs is used to draw the graph. D
</li>
<li class="post">
<a href="/blog/2016/06/18/pandora-bt-home-hub-5-and-local-file-camera/">0.22: Pandora, BT Home Hub 5 and local file camera.</a>
</li>
</ul>
</section>

View file

@ -195,6 +195,12 @@
<ul class="divided">
<li class="post">
<a href="/blog/2016/07/19/exporting-processing-data/">Exporting Home Assistant information</a>
</li>
<li class="post">
<a href="/blog/2016/07/16/sqlalchemy-knx-join-simplisafe/">0.24: SQLAlchemy, KNX, Join by Joaoapps, and SimpliSafe.</a>
</li>
@ -218,12 +224,6 @@
</li>
<li class="post">
<a href="/blog/2016/06/18/pandora-bt-home-hub-5-and-local-file-camera/">0.22: Pandora, BT Home Hub 5 and local file camera.</a>
</li>
</ul>
</section>

View file

@ -185,6 +185,12 @@
<ul class="divided">
<li class="post">
<a href="/blog/2016/07/19/exporting-processing-data/">Exporting Home Assistant information</a>
</li>
<li class="post">
<a href="/blog/2016/07/16/sqlalchemy-knx-join-simplisafe/">0.24: SQLAlchemy, KNX, Join by Joaoapps, and SimpliSafe.</a>
</li>
@ -208,12 +214,6 @@
</li>
<li class="post">
<a href="/blog/2016/06/18/pandora-bt-home-hub-5-and-local-file-camera/">0.22: Pandora, BT Home Hub 5 and local file camera.</a>
</li>
</ul>
</section>

View file

@ -186,6 +186,12 @@ The old logo, the new detailed logo and the new simple logo.
<ul class="divided">
<li class="post">
<a href="/blog/2016/07/19/exporting-processing-data/">Exporting Home Assistant information</a>
</li>
<li class="post">
<a href="/blog/2016/07/16/sqlalchemy-knx-join-simplisafe/">0.24: SQLAlchemy, KNX, Join by Joaoapps, and SimpliSafe.</a>
</li>
@ -209,12 +215,6 @@ The old logo, the new detailed logo and the new simple logo.
</li>
<li class="post">
<a href="/blog/2016/06/18/pandora-bt-home-hub-5-and-local-file-camera/">0.22: Pandora, BT Home Hub 5 and local file camera.</a>
</li>
</ul>
</section>

View file

@ -225,6 +225,12 @@ An initial version of voice control for Home Assistant has landed. The current i
<ul class="divided">
<li class="post">
<a href="/blog/2016/07/19/exporting-processing-data/">Exporting Home Assistant information</a>
</li>
<li class="post">
<a href="/blog/2016/07/16/sqlalchemy-knx-join-simplisafe/">0.24: SQLAlchemy, KNX, Join by Joaoapps, and SimpliSafe.</a>
</li>
@ -248,12 +254,6 @@ An initial version of voice control for Home Assistant has landed. The current i
</li>
<li class="post">
<a href="/blog/2016/06/18/pandora-bt-home-hub-5-and-local-file-camera/">0.22: Pandora, BT Home Hub 5 and local file camera.</a>
</li>
</ul>
</section>

View file

@ -262,6 +262,12 @@ I (Paulus) have contributed a scene component. A user can create scenes that cap
<ul class="divided">
<li class="post">
<a href="/blog/2016/07/19/exporting-processing-data/">Exporting Home Assistant information</a>
</li>
<li class="post">
<a href="/blog/2016/07/16/sqlalchemy-knx-join-simplisafe/">0.24: SQLAlchemy, KNX, Join by Joaoapps, and SimpliSafe.</a>
</li>
@ -285,12 +291,6 @@ I (Paulus) have contributed a scene component. A user can create scenes that cap
</li>
<li class="post">
<a href="/blog/2016/06/18/pandora-bt-home-hub-5-and-local-file-camera/">0.22: Pandora, BT Home Hub 5 and local file camera.</a>
</li>
</ul>
</section>

View file

@ -273,6 +273,12 @@
<ul class="divided">
<li class="post">
<a href="/blog/2016/07/19/exporting-processing-data/">Exporting Home Assistant information</a>
</li>
<li class="post">
<a href="/blog/2016/07/16/sqlalchemy-knx-join-simplisafe/">0.24: SQLAlchemy, KNX, Join by Joaoapps, and SimpliSafe.</a>
</li>
@ -296,12 +302,6 @@
</li>
<li class="post">
<a href="/blog/2016/06/18/pandora-bt-home-hub-5-and-local-file-camera/">0.22: Pandora, BT Home Hub 5 and local file camera.</a>
</li>
</ul>
</section>

View file

@ -208,6 +208,12 @@
<ul class="divided">
<li class="post">
<a href="/blog/2016/07/19/exporting-processing-data/">Exporting Home Assistant information</a>
</li>
<li class="post">
<a href="/blog/2016/07/16/sqlalchemy-knx-join-simplisafe/">0.24: SQLAlchemy, KNX, Join by Joaoapps, and SimpliSafe.</a>
</li>
@ -231,12 +237,6 @@
</li>
<li class="post">
<a href="/blog/2016/06/18/pandora-bt-home-hub-5-and-local-file-camera/">0.22: Pandora, BT Home Hub 5 and local file camera.</a>
</li>
</ul>
</section>

View file

@ -300,6 +300,12 @@ Before diving into the newly supported devices and services, I want to highlight
<ul class="divided">
<li class="post">
<a href="/blog/2016/07/19/exporting-processing-data/">Exporting Home Assistant information</a>
</li>
<li class="post">
<a href="/blog/2016/07/16/sqlalchemy-knx-join-simplisafe/">0.24: SQLAlchemy, KNX, Join by Joaoapps, and SimpliSafe.</a>
</li>
@ -323,12 +329,6 @@ Before diving into the newly supported devices and services, I want to highlight
</li>
<li class="post">
<a href="/blog/2016/06/18/pandora-bt-home-hub-5-and-local-file-camera/">0.22: Pandora, BT Home Hub 5 and local file camera.</a>
</li>
</ul>
</section>

View file

@ -353,6 +353,12 @@ This switch platform allows you to control your motion detection setting on your
<ul class="divided">
<li class="post">
<a href="/blog/2016/07/19/exporting-processing-data/">Exporting Home Assistant information</a>
</li>
<li class="post">
<a href="/blog/2016/07/16/sqlalchemy-knx-join-simplisafe/">0.24: SQLAlchemy, KNX, Join by Joaoapps, and SimpliSafe.</a>
</li>
@ -376,12 +382,6 @@ This switch platform allows you to control your motion detection setting on your
</li>
<li class="post">
<a href="/blog/2016/06/18/pandora-bt-home-hub-5-and-local-file-camera/">0.22: Pandora, BT Home Hub 5 and local file camera.</a>
</li>
</ul>
</section>

View file

@ -305,6 +305,12 @@ Fabian has added support for <a href="https://forecast.io/">Forecast.io</a> to g
<ul class="divided">
<li class="post">
<a href="/blog/2016/07/19/exporting-processing-data/">Exporting Home Assistant information</a>
</li>
<li class="post">
<a href="/blog/2016/07/16/sqlalchemy-knx-join-simplisafe/">0.24: SQLAlchemy, KNX, Join by Joaoapps, and SimpliSafe.</a>
</li>
@ -328,12 +334,6 @@ Fabian has added support for <a href="https://forecast.io/">Forecast.io</a> to g
</li>
<li class="post">
<a href="/blog/2016/06/18/pandora-bt-home-hub-5-and-local-file-camera/">0.22: Pandora, BT Home Hub 5 and local file camera.</a>
</li>
</ul>
</section>

View file

@ -294,6 +294,12 @@ Support for Temper temperature sensors has been contributed by <a href="https://
<ul class="divided">
<li class="post">
<a href="/blog/2016/07/19/exporting-processing-data/">Exporting Home Assistant information</a>
</li>
<li class="post">
<a href="/blog/2016/07/16/sqlalchemy-knx-join-simplisafe/">0.24: SQLAlchemy, KNX, Join by Joaoapps, and SimpliSafe.</a>
</li>
@ -317,12 +323,6 @@ Support for Temper temperature sensors has been contributed by <a href="https://
</li>
<li class="post">
<a href="/blog/2016/06/18/pandora-bt-home-hub-5-and-local-file-camera/">0.22: Pandora, BT Home Hub 5 and local file camera.</a>
</li>
</ul>
</section>

View file

@ -204,6 +204,12 @@
<ul class="divided">
<li class="post">
<a href="/blog/2016/07/19/exporting-processing-data/">Exporting Home Assistant information</a>
</li>
<li class="post">
<a href="/blog/2016/07/16/sqlalchemy-knx-join-simplisafe/">0.24: SQLAlchemy, KNX, Join by Joaoapps, and SimpliSafe.</a>
</li>
@ -227,12 +233,6 @@
</li>
<li class="post">
<a href="/blog/2016/06/18/pandora-bt-home-hub-5-and-local-file-camera/">0.22: Pandora, BT Home Hub 5 and local file camera.</a>
</li>
</ul>
</section>

View file

@ -317,6 +317,12 @@ The automation and script syntax here is using a deprecated and no longer suppor
<ul class="divided">
<li class="post">
<a href="/blog/2016/07/19/exporting-processing-data/">Exporting Home Assistant information</a>
</li>
<li class="post">
<a href="/blog/2016/07/16/sqlalchemy-knx-join-simplisafe/">0.24: SQLAlchemy, KNX, Join by Joaoapps, and SimpliSafe.</a>
</li>
@ -340,12 +346,6 @@ The automation and script syntax here is using a deprecated and no longer suppor
</li>
<li class="post">
<a href="/blog/2016/06/18/pandora-bt-home-hub-5-and-local-file-camera/">0.22: Pandora, BT Home Hub 5 and local file camera.</a>
</li>
</ul>
</section>

View file

@ -291,6 +291,12 @@
<ul class="divided">
<li class="post">
<a href="/blog/2016/07/19/exporting-processing-data/">Exporting Home Assistant information</a>
</li>
<li class="post">
<a href="/blog/2016/07/16/sqlalchemy-knx-join-simplisafe/">0.24: SQLAlchemy, KNX, Join by Joaoapps, and SimpliSafe.</a>
</li>
@ -314,12 +320,6 @@
</li>
<li class="post">
<a href="/blog/2016/06/18/pandora-bt-home-hub-5-and-local-file-camera/">0.22: Pandora, BT Home Hub 5 and local file camera.</a>
</li>
</ul>
</section>

View file

@ -494,6 +494,12 @@ PubSubClient client(ethClient);
<ul class="divided">
<li class="post">
<a href="/blog/2016/07/19/exporting-processing-data/">Exporting Home Assistant information</a>
</li>
<li class="post">
<a href="/blog/2016/07/16/sqlalchemy-knx-join-simplisafe/">0.24: SQLAlchemy, KNX, Join by Joaoapps, and SimpliSafe.</a>
</li>
@ -517,12 +523,6 @@ PubSubClient client(ethClient);
</li>
<li class="post">
<a href="/blog/2016/06/18/pandora-bt-home-hub-5-and-local-file-camera/">0.22: Pandora, BT Home Hub 5 and local file camera.</a>
</li>
</ul>
</section>

View file

@ -353,6 +353,12 @@
<ul class="divided">
<li class="post">
<a href="/blog/2016/07/19/exporting-processing-data/">Exporting Home Assistant information</a>
</li>
<li class="post">
<a href="/blog/2016/07/16/sqlalchemy-knx-join-simplisafe/">0.24: SQLAlchemy, KNX, Join by Joaoapps, and SimpliSafe.</a>
</li>
@ -376,12 +382,6 @@
</li>
<li class="post">
<a href="/blog/2016/06/18/pandora-bt-home-hub-5-and-local-file-camera/">0.22: Pandora, BT Home Hub 5 and local file camera.</a>
</li>
</ul>
</section>

View file

@ -254,6 +254,12 @@ Glances web server started on http://0.0.0.0:61208/
<ul class="divided">
<li class="post">
<a href="/blog/2016/07/19/exporting-processing-data/">Exporting Home Assistant information</a>
</li>
<li class="post">
<a href="/blog/2016/07/16/sqlalchemy-knx-join-simplisafe/">0.24: SQLAlchemy, KNX, Join by Joaoapps, and SimpliSafe.</a>
</li>
@ -277,12 +283,6 @@ Glances web server started on http://0.0.0.0:61208/
</li>
<li class="post">
<a href="/blog/2016/06/18/pandora-bt-home-hub-5-and-local-file-camera/">0.22: Pandora, BT Home Hub 5 and local file camera.</a>
</li>
</ul>
</section>

View file

@ -233,6 +233,12 @@ Automation has gotten a lot of love. It now supports conditions, multiple trigge
<ul class="divided">
<li class="post">
<a href="/blog/2016/07/19/exporting-processing-data/">Exporting Home Assistant information</a>
</li>
<li class="post">
<a href="/blog/2016/07/16/sqlalchemy-knx-join-simplisafe/">0.24: SQLAlchemy, KNX, Join by Joaoapps, and SimpliSafe.</a>
</li>
@ -256,12 +262,6 @@ Automation has gotten a lot of love. It now supports conditions, multiple trigge
</li>
<li class="post">
<a href="/blog/2016/06/18/pandora-bt-home-hub-5-and-local-file-camera/">0.22: Pandora, BT Home Hub 5 and local file camera.</a>
</li>
</ul>
</section>

View file

@ -209,6 +209,12 @@ Map in Home Assistant showing two people and three zones (home, school, work)
<ul class="divided">
<li class="post">
<a href="/blog/2016/07/19/exporting-processing-data/">Exporting Home Assistant information</a>
</li>
<li class="post">
<a href="/blog/2016/07/16/sqlalchemy-knx-join-simplisafe/">0.24: SQLAlchemy, KNX, Join by Joaoapps, and SimpliSafe.</a>
</li>
@ -232,12 +238,6 @@ Map in Home Assistant showing two people and three zones (home, school, work)
</li>
<li class="post">
<a href="/blog/2016/06/18/pandora-bt-home-hub-5-and-local-file-camera/">0.22: Pandora, BT Home Hub 5 and local file camera.</a>
</li>
</ul>
</section>

View file

@ -553,6 +553,12 @@ Adafruit_HDC1000 hdc = Adafruit_HDC1000();
<ul class="divided">
<li class="post">
<a href="/blog/2016/07/19/exporting-processing-data/">Exporting Home Assistant information</a>
</li>
<li class="post">
<a href="/blog/2016/07/16/sqlalchemy-knx-join-simplisafe/">0.24: SQLAlchemy, KNX, Join by Joaoapps, and SimpliSafe.</a>
</li>
@ -576,12 +582,6 @@ Adafruit_HDC1000 hdc = Adafruit_HDC1000();
</li>
<li class="post">
<a href="/blog/2016/06/18/pandora-bt-home-hub-5-and-local-file-camera/">0.22: Pandora, BT Home Hub 5 and local file camera.</a>
</li>
</ul>
</section>

View file

@ -198,6 +198,12 @@
<ul class="divided">
<li class="post">
<a href="/blog/2016/07/19/exporting-processing-data/">Exporting Home Assistant information</a>
</li>
<li class="post">
<a href="/blog/2016/07/16/sqlalchemy-knx-join-simplisafe/">0.24: SQLAlchemy, KNX, Join by Joaoapps, and SimpliSafe.</a>
</li>
@ -221,12 +227,6 @@
</li>
<li class="post">
<a href="/blog/2016/06/18/pandora-bt-home-hub-5-and-local-file-camera/">0.22: Pandora, BT Home Hub 5 and local file camera.</a>
</li>
</ul>
</section>

View file

@ -220,6 +220,12 @@ This makes more sense as most people run Home Assistant as a daemon</p>
<ul class="divided">
<li class="post">
<a href="/blog/2016/07/19/exporting-processing-data/">Exporting Home Assistant information</a>
</li>
<li class="post">
<a href="/blog/2016/07/16/sqlalchemy-knx-join-simplisafe/">0.24: SQLAlchemy, KNX, Join by Joaoapps, and SimpliSafe.</a>
</li>
@ -243,12 +249,6 @@ This makes more sense as most people run Home Assistant as a daemon</p>
</li>
<li class="post">
<a href="/blog/2016/06/18/pandora-bt-home-hub-5-and-local-file-camera/">0.22: Pandora, BT Home Hub 5 and local file camera.</a>
</li>
</ul>
</section>

View file

@ -216,6 +216,12 @@
<ul class="divided">
<li class="post">
<a href="/blog/2016/07/19/exporting-processing-data/">Exporting Home Assistant information</a>
</li>
<li class="post">
<a href="/blog/2016/07/16/sqlalchemy-knx-join-simplisafe/">0.24: SQLAlchemy, KNX, Join by Joaoapps, and SimpliSafe.</a>
</li>
@ -239,12 +245,6 @@
</li>
<li class="post">
<a href="/blog/2016/06/18/pandora-bt-home-hub-5-and-local-file-camera/">0.22: Pandora, BT Home Hub 5 and local file camera.</a>
</li>
</ul>
</section>

View file

@ -256,6 +256,12 @@
<ul class="divided">
<li class="post">
<a href="/blog/2016/07/19/exporting-processing-data/">Exporting Home Assistant information</a>
</li>
<li class="post">
<a href="/blog/2016/07/16/sqlalchemy-knx-join-simplisafe/">0.24: SQLAlchemy, KNX, Join by Joaoapps, and SimpliSafe.</a>
</li>
@ -279,12 +285,6 @@
</li>
<li class="post">
<a href="/blog/2016/06/18/pandora-bt-home-hub-5-and-local-file-camera/">0.22: Pandora, BT Home Hub 5 and local file camera.</a>
</li>
</ul>
</section>

View file

@ -191,6 +191,12 @@
<ul class="divided">
<li class="post">
<a href="/blog/2016/07/19/exporting-processing-data/">Exporting Home Assistant information</a>
</li>
<li class="post">
<a href="/blog/2016/07/16/sqlalchemy-knx-join-simplisafe/">0.24: SQLAlchemy, KNX, Join by Joaoapps, and SimpliSafe.</a>
</li>
@ -214,12 +220,6 @@
</li>
<li class="post">
<a href="/blog/2016/06/18/pandora-bt-home-hub-5-and-local-file-camera/">0.22: Pandora, BT Home Hub 5 and local file camera.</a>
</li>
</ul>
</section>

View file

@ -198,6 +198,12 @@
<ul class="divided">
<li class="post">
<a href="/blog/2016/07/19/exporting-processing-data/">Exporting Home Assistant information</a>
</li>
<li class="post">
<a href="/blog/2016/07/16/sqlalchemy-knx-join-simplisafe/">0.24: SQLAlchemy, KNX, Join by Joaoapps, and SimpliSafe.</a>
</li>
@ -221,12 +227,6 @@
</li>
<li class="post">
<a href="/blog/2016/06/18/pandora-bt-home-hub-5-and-local-file-camera/">0.22: Pandora, BT Home Hub 5 and local file camera.</a>
</li>
</ul>
</section>

View file

@ -289,6 +289,12 @@ $ sudo systemctl status grafana-server
<ul class="divided">
<li class="post">
<a href="/blog/2016/07/19/exporting-processing-data/">Exporting Home Assistant information</a>
</li>
<li class="post">
<a href="/blog/2016/07/16/sqlalchemy-knx-join-simplisafe/">0.24: SQLAlchemy, KNX, Join by Joaoapps, and SimpliSafe.</a>
</li>
@ -312,12 +318,6 @@ $ sudo systemctl status grafana-server
</li>
<li class="post">
<a href="/blog/2016/06/18/pandora-bt-home-hub-5-and-local-file-camera/">0.22: Pandora, BT Home Hub 5 and local file camera.</a>
</li>
</ul>
</section>

View file

@ -239,6 +239,12 @@ requests.get(<span class="string"><span class="delimiter">'</span><span class="c
<ul class="divided">
<li class="post">
<a href="/blog/2016/07/19/exporting-processing-data/">Exporting Home Assistant information</a>
</li>
<li class="post">
<a href="/blog/2016/07/16/sqlalchemy-knx-join-simplisafe/">0.24: SQLAlchemy, KNX, Join by Joaoapps, and SimpliSafe.</a>
</li>
@ -262,12 +268,6 @@ requests.get(<span class="string"><span class="delimiter">'</span><span class="c
</li>
<li class="post">
<a href="/blog/2016/06/18/pandora-bt-home-hub-5-and-local-file-camera/">0.22: Pandora, BT Home Hub 5 and local file camera.</a>
</li>
</ul>
</section>

View file

@ -211,6 +211,12 @@ Philips Hue FAQ entries regarding 3rd party light bulbs.
<ul class="divided">
<li class="post">
<a href="/blog/2016/07/19/exporting-processing-data/">Exporting Home Assistant information</a>
</li>
<li class="post">
<a href="/blog/2016/07/16/sqlalchemy-knx-join-simplisafe/">0.24: SQLAlchemy, KNX, Join by Joaoapps, and SimpliSafe.</a>
</li>
@ -234,12 +240,6 @@ Philips Hue FAQ entries regarding 3rd party light bulbs.
</li>
<li class="post">
<a href="/blog/2016/06/18/pandora-bt-home-hub-5-and-local-file-camera/">0.22: Pandora, BT Home Hub 5 and local file camera.</a>
</li>
</ul>
</section>

View file

@ -278,6 +278,12 @@ sudo docker run -it --rm -p 80:80 --name certbot \
<ul class="divided">
<li class="post">
<a href="/blog/2016/07/19/exporting-processing-data/">Exporting Home Assistant information</a>
</li>
<li class="post">
<a href="/blog/2016/07/16/sqlalchemy-knx-join-simplisafe/">0.24: SQLAlchemy, KNX, Join by Joaoapps, and SimpliSafe.</a>
</li>
@ -301,12 +307,6 @@ sudo docker run -it --rm -p 80:80 --name certbot \
</li>
<li class="post">
<a href="/blog/2016/06/18/pandora-bt-home-hub-5-and-local-file-camera/">0.22: Pandora, BT Home Hub 5 and local file camera.</a>
</li>
</ul>
</section>

View file

@ -232,6 +232,12 @@
<ul class="divided">
<li class="post">
<a href="/blog/2016/07/19/exporting-processing-data/">Exporting Home Assistant information</a>
</li>
<li class="post">
<a href="/blog/2016/07/16/sqlalchemy-knx-join-simplisafe/">0.24: SQLAlchemy, KNX, Join by Joaoapps, and SimpliSafe.</a>
</li>
@ -255,12 +261,6 @@
</li>
<li class="post">
<a href="/blog/2016/06/18/pandora-bt-home-hub-5-and-local-file-camera/">0.22: Pandora, BT Home Hub 5 and local file camera.</a>
</li>
</ul>
</section>

View file

@ -212,6 +212,12 @@
<ul class="divided">
<li class="post">
<a href="/blog/2016/07/19/exporting-processing-data/">Exporting Home Assistant information</a>
</li>
<li class="post">
<a href="/blog/2016/07/16/sqlalchemy-knx-join-simplisafe/">0.24: SQLAlchemy, KNX, Join by Joaoapps, and SimpliSafe.</a>
</li>
@ -235,12 +241,6 @@
</li>
<li class="post">
<a href="/blog/2016/06/18/pandora-bt-home-hub-5-and-local-file-camera/">0.22: Pandora, BT Home Hub 5 and local file camera.</a>
</li>
</ul>
</section>

View file

@ -216,6 +216,12 @@
<ul class="divided">
<li class="post">
<a href="/blog/2016/07/19/exporting-processing-data/">Exporting Home Assistant information</a>
</li>
<li class="post">
<a href="/blog/2016/07/16/sqlalchemy-knx-join-simplisafe/">0.24: SQLAlchemy, KNX, Join by Joaoapps, and SimpliSafe.</a>
</li>
@ -239,12 +245,6 @@
</li>
<li class="post">
<a href="/blog/2016/06/18/pandora-bt-home-hub-5-and-local-file-camera/">0.22: Pandora, BT Home Hub 5 and local file camera.</a>
</li>
</ul>
</section>

View file

@ -218,6 +218,12 @@ Example of the new views in the frontend. <a href="/components/group/">Learn mor
<ul class="divided">
<li class="post">
<a href="/blog/2016/07/19/exporting-processing-data/">Exporting Home Assistant information</a>
</li>
<li class="post">
<a href="/blog/2016/07/16/sqlalchemy-knx-join-simplisafe/">0.24: SQLAlchemy, KNX, Join by Joaoapps, and SimpliSafe.</a>
</li>
@ -241,12 +247,6 @@ Example of the new views in the frontend. <a href="/components/group/">Learn mor
</li>
<li class="post">
<a href="/blog/2016/06/18/pandora-bt-home-hub-5-and-local-file-camera/">0.22: Pandora, BT Home Hub 5 and local file camera.</a>
</li>
</ul>
</section>

View file

@ -405,6 +405,12 @@ Z-Wave light bulb |
<ul class="divided">
<li class="post">
<a href="/blog/2016/07/19/exporting-processing-data/">Exporting Home Assistant information</a>
</li>
<li class="post">
<a href="/blog/2016/07/16/sqlalchemy-knx-join-simplisafe/">0.24: SQLAlchemy, KNX, Join by Joaoapps, and SimpliSafe.</a>
</li>
@ -428,12 +434,6 @@ Z-Wave light bulb |
</li>
<li class="post">
<a href="/blog/2016/06/18/pandora-bt-home-hub-5-and-local-file-camera/">0.22: Pandora, BT Home Hub 5 and local file camera.</a>
</li>
</ul>
</section>

View file

@ -355,6 +355,12 @@
<ul class="divided">
<li class="post">
<a href="/blog/2016/07/19/exporting-processing-data/">Exporting Home Assistant information</a>
</li>
<li class="post">
<a href="/blog/2016/07/16/sqlalchemy-knx-join-simplisafe/">0.24: SQLAlchemy, KNX, Join by Joaoapps, and SimpliSafe.</a>
</li>
@ -378,12 +384,6 @@
</li>
<li class="post">
<a href="/blog/2016/06/18/pandora-bt-home-hub-5-and-local-file-camera/">0.22: Pandora, BT Home Hub 5 and local file camera.</a>
</li>
</ul>
</section>

View file

@ -221,6 +221,12 @@
<ul class="divided">
<li class="post">
<a href="/blog/2016/07/19/exporting-processing-data/">Exporting Home Assistant information</a>
</li>
<li class="post">
<a href="/blog/2016/07/16/sqlalchemy-knx-join-simplisafe/">0.24: SQLAlchemy, KNX, Join by Joaoapps, and SimpliSafe.</a>
</li>
@ -244,12 +250,6 @@
</li>
<li class="post">
<a href="/blog/2016/06/18/pandora-bt-home-hub-5-and-local-file-camera/">0.22: Pandora, BT Home Hub 5 and local file camera.</a>
</li>
</ul>
</section>

View file

@ -323,6 +323,12 @@ output = audioresample ! audio/x-raw,rate=48000,channels=2,format=S16LE ! audioc
<ul class="divided">
<li class="post">
<a href="/blog/2016/07/19/exporting-processing-data/">Exporting Home Assistant information</a>
</li>
<li class="post">
<a href="/blog/2016/07/16/sqlalchemy-knx-join-simplisafe/">0.24: SQLAlchemy, KNX, Join by Joaoapps, and SimpliSafe.</a>
</li>
@ -346,12 +352,6 @@ output = audioresample ! audio/x-raw,rate=48000,channels=2,format=S16LE ! audioc
</li>
<li class="post">
<a href="/blog/2016/06/18/pandora-bt-home-hub-5-and-local-file-camera/">0.22: Pandora, BT Home Hub 5 and local file camera.</a>
</li>
</ul>
</section>

View file

@ -231,6 +231,12 @@ Hold your NFC tag against the belly of Garfield to unlock the alarm.
<ul class="divided">
<li class="post">
<a href="/blog/2016/07/19/exporting-processing-data/">Exporting Home Assistant information</a>
</li>
<li class="post">
<a href="/blog/2016/07/16/sqlalchemy-knx-join-simplisafe/">0.24: SQLAlchemy, KNX, Join by Joaoapps, and SimpliSafe.</a>
</li>
@ -254,12 +260,6 @@ Hold your NFC tag against the belly of Garfield to unlock the alarm.
</li>
<li class="post">
<a href="/blog/2016/06/18/pandora-bt-home-hub-5-and-local-file-camera/">0.22: Pandora, BT Home Hub 5 and local file camera.</a>
</li>
</ul>
</section>

View file

@ -220,6 +220,12 @@
<ul class="divided">
<li class="post">
<a href="/blog/2016/07/19/exporting-processing-data/">Exporting Home Assistant information</a>
</li>
<li class="post">
<a href="/blog/2016/07/16/sqlalchemy-knx-join-simplisafe/">0.24: SQLAlchemy, KNX, Join by Joaoapps, and SimpliSafe.</a>
</li>
@ -243,12 +249,6 @@
</li>
<li class="post">
<a href="/blog/2016/06/18/pandora-bt-home-hub-5-and-local-file-camera/">0.22: Pandora, BT Home Hub 5 and local file camera.</a>
</li>
</ul>
</section>

View file

@ -226,6 +226,12 @@ player state attributes. This change affects automations, scripts and scenes.</l
<ul class="divided">
<li class="post">
<a href="/blog/2016/07/19/exporting-processing-data/">Exporting Home Assistant information</a>
</li>
<li class="post">
<a href="/blog/2016/07/16/sqlalchemy-knx-join-simplisafe/">0.24: SQLAlchemy, KNX, Join by Joaoapps, and SimpliSafe.</a>
</li>
@ -249,12 +255,6 @@ player state attributes. This change affects automations, scripts and scenes.</l
</li>
<li class="post">
<a href="/blog/2016/06/18/pandora-bt-home-hub-5-and-local-file-camera/">0.22: Pandora, BT Home Hub 5 and local file camera.</a>
</li>
</ul>
</section>

View file

@ -237,6 +237,12 @@
<ul class="divided">
<li class="post">
<a href="/blog/2016/07/19/exporting-processing-data/">Exporting Home Assistant information</a>
</li>
<li class="post">
<a href="/blog/2016/07/16/sqlalchemy-knx-join-simplisafe/">0.24: SQLAlchemy, KNX, Join by Joaoapps, and SimpliSafe.</a>
</li>
@ -260,12 +266,6 @@
</li>
<li class="post">
<a href="/blog/2016/06/18/pandora-bt-home-hub-5-and-local-file-camera/">0.22: Pandora, BT Home Hub 5 and local file camera.</a>
</li>
</ul>
</section>

View file

@ -189,6 +189,12 @@
<ul class="divided">
<li class="post">
<a href="/blog/2016/07/19/exporting-processing-data/">Exporting Home Assistant information</a>
</li>
<li class="post">
<a href="/blog/2016/07/16/sqlalchemy-knx-join-simplisafe/">0.24: SQLAlchemy, KNX, Join by Joaoapps, and SimpliSafe.</a>
</li>
@ -212,12 +218,6 @@
</li>
<li class="post">
<a href="/blog/2016/06/18/pandora-bt-home-hub-5-and-local-file-camera/">0.22: Pandora, BT Home Hub 5 and local file camera.</a>
</li>
</ul>
</section>

View file

@ -195,6 +195,12 @@
<ul class="divided">
<li class="post">
<a href="/blog/2016/07/19/exporting-processing-data/">Exporting Home Assistant information</a>
</li>
<li class="post">
<a href="/blog/2016/07/16/sqlalchemy-knx-join-simplisafe/">0.24: SQLAlchemy, KNX, Join by Joaoapps, and SimpliSafe.</a>
</li>
@ -218,12 +224,6 @@
</li>
<li class="post">
<a href="/blog/2016/06/18/pandora-bt-home-hub-5-and-local-file-camera/">0.22: Pandora, BT Home Hub 5 and local file camera.</a>
</li>
</ul>
</section>

View file

@ -203,6 +203,12 @@
<ul class="divided">
<li class="post">
<a href="/blog/2016/07/19/exporting-processing-data/">Exporting Home Assistant information</a>
</li>
<li class="post">
<a href="/blog/2016/07/16/sqlalchemy-knx-join-simplisafe/">0.24: SQLAlchemy, KNX, Join by Joaoapps, and SimpliSafe.</a>
</li>
@ -226,12 +232,6 @@
</li>
<li class="post">
<a href="/blog/2016/06/18/pandora-bt-home-hub-5-and-local-file-camera/">0.22: Pandora, BT Home Hub 5 and local file camera.</a>
</li>
</ul>
</section>

View file

@ -187,6 +187,12 @@
<ul class="divided">
<li class="post">
<a href="/blog/2016/07/19/exporting-processing-data/">Exporting Home Assistant information</a>
</li>
<li class="post">
<a href="/blog/2016/07/16/sqlalchemy-knx-join-simplisafe/">0.24: SQLAlchemy, KNX, Join by Joaoapps, and SimpliSafe.</a>
</li>
@ -210,12 +216,6 @@
</li>
<li class="post">
<a href="/blog/2016/06/18/pandora-bt-home-hub-5-and-local-file-camera/">0.22: Pandora, BT Home Hub 5 and local file camera.</a>
</li>
</ul>
</section>

View file

@ -204,6 +204,12 @@
<ul class="divided">
<li class="post">
<a href="/blog/2016/07/19/exporting-processing-data/">Exporting Home Assistant information</a>
</li>
<li class="post">
<a href="/blog/2016/07/16/sqlalchemy-knx-join-simplisafe/">0.24: SQLAlchemy, KNX, Join by Joaoapps, and SimpliSafe.</a>
</li>
@ -227,12 +233,6 @@
</li>
<li class="post">
<a href="/blog/2016/06/18/pandora-bt-home-hub-5-and-local-file-camera/">0.22: Pandora, BT Home Hub 5 and local file camera.</a>
</li>
</ul>
</section>

View file

@ -222,6 +222,12 @@
<ul class="divided">
<li class="post">
<a href="/blog/2016/07/19/exporting-processing-data/">Exporting Home Assistant information</a>
</li>
<li class="post">
<a href="/blog/2016/07/16/sqlalchemy-knx-join-simplisafe/">0.24: SQLAlchemy, KNX, Join by Joaoapps, and SimpliSafe.</a>
</li>
@ -245,12 +251,6 @@
</li>
<li class="post">
<a href="/blog/2016/06/18/pandora-bt-home-hub-5-and-local-file-camera/">0.22: Pandora, BT Home Hub 5 and local file camera.</a>
</li>
</ul>
</section>

View file

@ -313,6 +313,12 @@ For example, my wife works next door - and I couldnt detect whether shes a
<ul class="divided">
<li class="post">
<a href="/blog/2016/07/19/exporting-processing-data/">Exporting Home Assistant information</a>
</li>
<li class="post">
<a href="/blog/2016/07/16/sqlalchemy-knx-join-simplisafe/">0.24: SQLAlchemy, KNX, Join by Joaoapps, and SimpliSafe.</a>
</li>
@ -336,12 +342,6 @@ For example, my wife works next door - and I couldnt detect whether shes a
</li>
<li class="post">
<a href="/blog/2016/06/18/pandora-bt-home-hub-5-and-local-file-camera/">0.22: Pandora, BT Home Hub 5 and local file camera.</a>
</li>
</ul>
</section>

View file

@ -185,6 +185,12 @@
<ul class="divided">
<li class="post">
<a href="/blog/2016/07/19/exporting-processing-data/">Exporting Home Assistant information</a>
</li>
<li class="post">
<a href="/blog/2016/07/16/sqlalchemy-knx-join-simplisafe/">0.24: SQLAlchemy, KNX, Join by Joaoapps, and SimpliSafe.</a>
</li>
@ -208,12 +214,6 @@
</li>
<li class="post">
<a href="/blog/2016/06/18/pandora-bt-home-hub-5-and-local-file-camera/">0.22: Pandora, BT Home Hub 5 and local file camera.</a>
</li>
</ul>
</section>

View file

@ -275,6 +275,12 @@
<ul class="divided">
<li class="post">
<a href="/blog/2016/07/19/exporting-processing-data/">Exporting Home Assistant information</a>
</li>
<li class="post">
<a href="/blog/2016/07/16/sqlalchemy-knx-join-simplisafe/">0.24: SQLAlchemy, KNX, Join by Joaoapps, and SimpliSafe.</a>
</li>
@ -298,12 +304,6 @@
</li>
<li class="post">
<a href="/blog/2016/06/18/pandora-bt-home-hub-5-and-local-file-camera/">0.22: Pandora, BT Home Hub 5 and local file camera.</a>
</li>
</ul>
</section>

View file

@ -185,6 +185,12 @@
<ul class="divided">
<li class="post">
<a href="/blog/2016/07/19/exporting-processing-data/">Exporting Home Assistant information</a>
</li>
<li class="post">
<a href="/blog/2016/07/16/sqlalchemy-knx-join-simplisafe/">0.24: SQLAlchemy, KNX, Join by Joaoapps, and SimpliSafe.</a>
</li>
@ -208,12 +214,6 @@
</li>
<li class="post">
<a href="/blog/2016/06/18/pandora-bt-home-hub-5-and-local-file-camera/">0.22: Pandora, BT Home Hub 5 and local file camera.</a>
</li>
</ul>
</section>

View file

@ -199,6 +199,12 @@
<ul class="divided">
<li class="post">
<a href="/blog/2016/07/19/exporting-processing-data/">Exporting Home Assistant information</a>
</li>
<li class="post">
<a href="/blog/2016/07/16/sqlalchemy-knx-join-simplisafe/">0.24: SQLAlchemy, KNX, Join by Joaoapps, and SimpliSafe.</a>
</li>
@ -222,12 +228,6 @@
</li>
<li class="post">
<a href="/blog/2016/06/18/pandora-bt-home-hub-5-and-local-file-camera/">0.22: Pandora, BT Home Hub 5 and local file camera.</a>
</li>
</ul>
</section>

View file

@ -220,6 +220,12 @@
<ul class="divided">
<li class="post">
<a href="/blog/2016/07/19/exporting-processing-data/">Exporting Home Assistant information</a>
</li>
<li class="post">
<a href="/blog/2016/07/16/sqlalchemy-knx-join-simplisafe/">0.24: SQLAlchemy, KNX, Join by Joaoapps, and SimpliSafe.</a>
</li>
@ -243,12 +249,6 @@
</li>
<li class="post">
<a href="/blog/2016/06/18/pandora-bt-home-hub-5-and-local-file-camera/">0.22: Pandora, BT Home Hub 5 and local file camera.</a>
</li>
</ul>
</section>

View file

@ -191,6 +191,12 @@
<ul class="divided">
<li class="post">
<a href="/blog/2016/07/19/exporting-processing-data/">Exporting Home Assistant information</a>
</li>
<li class="post">
<a href="/blog/2016/07/16/sqlalchemy-knx-join-simplisafe/">0.24: SQLAlchemy, KNX, Join by Joaoapps, and SimpliSafe.</a>
</li>
@ -214,12 +220,6 @@
</li>
<li class="post">
<a href="/blog/2016/06/18/pandora-bt-home-hub-5-and-local-file-camera/">0.22: Pandora, BT Home Hub 5 and local file camera.</a>
</li>
</ul>
</section>

View file

@ -329,6 +329,12 @@
<ul class="divided">
<li class="post">
<a href="/blog/2016/07/19/exporting-processing-data/">Exporting Home Assistant information</a>
</li>
<li class="post">
<a href="/blog/2016/07/16/sqlalchemy-knx-join-simplisafe/">0.24: SQLAlchemy, KNX, Join by Joaoapps, and SimpliSafe.</a>
</li>
@ -352,12 +358,6 @@
</li>
<li class="post">
<a href="/blog/2016/06/18/pandora-bt-home-hub-5-and-local-file-camera/">0.22: Pandora, BT Home Hub 5 and local file camera.</a>
</li>
</ul>
</section>

View file

@ -205,6 +205,12 @@
<ul class="divided">
<li class="post">
<a href="/blog/2016/07/19/exporting-processing-data/">Exporting Home Assistant information</a>
</li>
<li class="post">
<a href="/blog/2016/07/16/sqlalchemy-knx-join-simplisafe/">0.24: SQLAlchemy, KNX, Join by Joaoapps, and SimpliSafe.</a>
</li>
@ -228,12 +234,6 @@
</li>
<li class="post">
<a href="/blog/2016/06/18/pandora-bt-home-hub-5-and-local-file-camera/">0.22: Pandora, BT Home Hub 5 and local file camera.</a>
</li>
</ul>
</section>

View file

@ -239,6 +239,12 @@
<ul class="divided">
<li class="post">
<a href="/blog/2016/07/19/exporting-processing-data/">Exporting Home Assistant information</a>
</li>
<li class="post">
<a href="/blog/2016/07/16/sqlalchemy-knx-join-simplisafe/">0.24: SQLAlchemy, KNX, Join by Joaoapps, and SimpliSafe.</a>
</li>
@ -262,12 +268,6 @@
</li>
<li class="post">
<a href="/blog/2016/06/18/pandora-bt-home-hub-5-and-local-file-camera/">0.22: Pandora, BT Home Hub 5 and local file camera.</a>
</li>
</ul>
</section>

View file

@ -210,6 +210,12 @@
<ul class="divided">
<li class="post">
<a href="/blog/2016/07/19/exporting-processing-data/">Exporting Home Assistant information</a>
</li>
<li class="post">
<a href="/blog/2016/07/16/sqlalchemy-knx-join-simplisafe/">0.24: SQLAlchemy, KNX, Join by Joaoapps, and SimpliSafe.</a>
</li>
@ -233,12 +239,6 @@
</li>
<li class="post">
<a href="/blog/2016/06/18/pandora-bt-home-hub-5-and-local-file-camera/">0.22: Pandora, BT Home Hub 5 and local file camera.</a>
</li>
</ul>
</section>

View file

@ -234,6 +234,12 @@
<ul class="divided">
<li class="post">
<a href="/blog/2016/07/19/exporting-processing-data/">Exporting Home Assistant information</a>
</li>
<li class="post">
<a href="/blog/2016/07/16/sqlalchemy-knx-join-simplisafe/">0.24: SQLAlchemy, KNX, Join by Joaoapps, and SimpliSafe.</a>
</li>
@ -257,8 +263,6 @@
</li>
</ul>
</section>

View file

@ -300,6 +300,12 @@ target_dir /tmp
<ul class="divided">
<li class="post">
<a href="/blog/2016/07/19/exporting-processing-data/">Exporting Home Assistant information</a>
</li>
<li class="post">
<a href="/blog/2016/07/16/sqlalchemy-knx-join-simplisafe/">0.24: SQLAlchemy, KNX, Join by Joaoapps, and SimpliSafe.</a>
</li>
@ -319,12 +325,6 @@ target_dir /tmp
<li class="post">
<a href="/blog/2016/06/18/pandora-bt-home-hub-5-and-local-file-camera/">0.22: Pandora, BT Home Hub 5 and local file camera.</a>
</li>
</ul>
</section>

View file

@ -233,6 +233,12 @@
<ul class="divided">
<li class="post">
<a href="/blog/2016/07/19/exporting-processing-data/">Exporting Home Assistant information</a>
</li>
<li class="post">
<a href="/blog/2016/07/16/sqlalchemy-knx-join-simplisafe/">0.24: SQLAlchemy, KNX, Join by Joaoapps, and SimpliSafe.</a>
</li>
@ -252,12 +258,6 @@
</li>
<li class="post">
<a href="/blog/2016/06/18/pandora-bt-home-hub-5-and-local-file-camera/">0.22: Pandora, BT Home Hub 5 and local file camera.</a>
</li>
</ul>
</section>

View file

@ -236,6 +236,12 @@ $ hass --open-ui
<ul class="divided">
<li class="post">
<a href="/blog/2016/07/19/exporting-processing-data/">Exporting Home Assistant information</a>
</li>
<li class="post">
<a href="/blog/2016/07/16/sqlalchemy-knx-join-simplisafe/">0.24: SQLAlchemy, KNX, Join by Joaoapps, and SimpliSafe.</a>
</li>
@ -255,12 +261,6 @@ $ hass --open-ui
</li>
<li class="post">
<a href="/blog/2016/06/18/pandora-bt-home-hub-5-and-local-file-camera/">0.22: Pandora, BT Home Hub 5 and local file camera.</a>
</li>
</ul>
</section>

View file

@ -232,6 +232,12 @@ $ hass --script db_migrator --config /path/to/config
<ul class="divided">
<li class="post">
<a href="/blog/2016/07/19/exporting-processing-data/">Exporting Home Assistant information</a>
</li>
<li class="post">
@ -251,12 +257,6 @@ $ hass --script db_migrator --config /path/to/config
</li>
<li class="post">
<a href="/blog/2016/06/18/pandora-bt-home-hub-5-and-local-file-camera/">0.22: Pandora, BT Home Hub 5 and local file camera.</a>
</li>
</ul>
</section>

View file

@ -0,0 +1,365 @@
<!doctype html>
<!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]-->
<!--[if IE 7]> <html class="no-js lt-ie9 lt-ie8"> <![endif]-->
<!--[if IE 8]> <html class="no-js lt-ie9"> <![endif]-->
<!--[if gt IE 8]><!--> <html> <!--<![endif]-->
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title>Exporting Home Assistant information - Home Assistant</title>
<meta name="author" content="Paulus Schoutsen">
<meta name="description" content="Export, process, and visualize data stored by Home Assistant.">
<meta name="viewport" content="width=device-width">
<link rel="canonical" href="https://home-assistant.io/blog/2016/07/19/exporting-processing-data/">
<meta property="fb:app_id" content="338291289691179">
<meta property="og:title" content="Exporting Home Assistant information">
<meta property="og:site_name" content="Home Assistant">
<meta property="og:url" content="https://home-assistant.io/blog/2016/07/19/exporting-processing-data/">
<meta property="og:type" content="article">
<meta property="og:description" content="Export, process, and visualize data stored by Home Assistant.">
<meta property="og:image" content="https://home-assistant.io/images/social.png">
<meta name="twitter:card" content="summary_large_image">
<meta name="twitter:site" content="@home_assistant">
<meta name="twitter:creator" content="@fabaff">
<meta name="twitter:title" content="Exporting Home Assistant information">
<meta name="twitter:description" content="Export, process, and visualize data stored by Home Assistant.">
<meta name="twitter:image" content="https://home-assistant.io/images/social.png">
<link href="/stylesheets/screen.css" media="screen, projection" rel="stylesheet">
<link href="/atom.xml" rel="alternate" title="Home Assistant" type="application/atom+xml">
<link rel='shortcut icon' href='/images/favicon.ico' />
<link rel='icon' type='image/png' href='/images/favicon-192x192.png' sizes='192x192' />
</head>
<body >
<header>
<div class="grid-wrapper">
<div class="grid">
<div class="grid__item three-tenths lap-two-sixths palm-one-whole ha-title">
<a href="/" class="site-title">
<img width='40' src='/demo/favicon-192x192.png'>
<span>Home Assistant</span>
</a>
</div>
<div class="grid__item seven-tenths lap-four-sixths palm-one-whole">
<nav>
<input type="checkbox" id="toggle">
<label for="toggle" class="toggle" data-open="Main Menu" data-close="Close Menu"></label>
<ul class="menu pull-right">
<li><a href='/getting-started/'>Getting started</a></li>
<li><a href='/components/'>Components</a></li>
<li><a href='/cookbook/'>Examples</a></li>
<li><a href="/developers/">Developers</a></li>
<li><a href="/blog/">Blog</a></li>
<li><a href="/help/">Need help?</a></li>
</ul>
</nav>
</div>
</div>
</div>
</header>
<div class="grid-wrapper">
<div class="grid grid-center">
<div class="grid__item two-thirds lap-one-whole palm-one-whole">
<article class="post">
<header>
<h1 class="title indent">Exporting Home Assistant information</h1>
<div class="meta clearfix">
<time datetime="2016-07-19T16:00:00+00:00" pubdate data-updated="true"><i class="icon-calendar"></i> July 19, 2016</time>
<span class="byline author vcard"><i class='icon-user'></i> Fabian Affolter</span>
<span><i class='icon-time'></i> four 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>
</ul>
</span>
<a class='comments'
href="#disqus_thread"
>Comments</a>
</div>
</header>
<p><img src="/images/blog/2016-07-reporting/mpl-sensor.png" style="clear: right; border:none; box-shadow: none; float: right; margin-bottom: 12px;" width="200" /></p>
<p>The <a href="/components/history/">history component</a> is tracking everything that is going on within Home Assistant. This means that you have access to all stored information about your home. Our history is not a full-fledged graphical processing and visualization component as you may know from systems and network monitoring tools. The current limitation is that you only can select a day for a visual output of your information and not a period. Also, there is no possibility to drill down on a specific entity.</p>
<p>This blog post will show you ways to export data for reporting, visualization, or further analysis of automation rules.</p>
<a name="read-more"></a>
<p>In this blog post I use the temperature of the <a href="https://en.wikipedia.org/wiki/Aare">Aare</a> river close to where I live as a show case. The temperatures were recorded with the <a href="/components/sensor.swiss_hydrological_data/">Swiss Hydrological Data sensor</a> and the name of the sensor is <code>sensor.aare</code>.</p>
<p>The database is stored at <code>&lt;path to config dir&gt;/.homeassistant/home-assistant_v2.db</code> as <a href="https://www.sqlite.org/">SQLite database</a>. In all examples we are going to use the path: <code>/home/ha/.homeassistant/home-assistant_v2.db</code></p>
<p>If you are just curious whats stored in your database then you can use the <code>sqlite3</code> command-line tool or a graphical one like <a href="http://sqlitebrowser.org/">DB Browser for SQLite</a>.</p>
<p>The table that is holding the states is called <code>states</code>. The <code>events</code> tables is responsible for storing the events which occurred. So, we will first check how many entries there are in the <code>states</code> table. <code>sqlite3</code> needs to know where the databases is located. To work with your database make sure that Home Assistant is not running or create a copy of the existing database. Its recommended to work with a copy.</p>
<div class="highlighter-coderay"><div class="CodeRay">
<div class="code"><pre>$ sqlite3 /home/ha/.homeassistant/home-assistant_v2.db
SQLite version 3.11.0 2016-02-15 17:29:24
sqlite&gt; SELECT count(*) FROM states;
24659
</pre></div>
</div>
</div>
<p>Lets have a look at a sample <a href="https://en.wikipedia.org/wiki/SQL">SQL</a> query. This query will show all states in a period for the sensor <code>sensor.aare</code>.</p>
<div class="highlighter-coderay"><div class="CodeRay">
<div class="code"><pre><span class="class">SELECT</span> state, last_changed <span class="keyword">FROM</span> states
<span class="keyword">WHERE</span>
entity_id = <span class="string"><span class="delimiter">'</span><span class="content">sensor.aare</span><span class="delimiter">'</span></span>
<span class="keyword">AND</span>
last_changed <span class="keyword">BETWEEN</span>
<span class="string"><span class="delimiter">'</span><span class="content">2016-07-05 00:00:00.000000</span><span class="delimiter">'</span></span> <span class="keyword">AND</span> <span class="string"><span class="delimiter">'</span><span class="content">2016-07-07 00:00:00.000000</span><span class="delimiter">'</span></span>;
</pre></div>
</div>
</div>
<p>The SQL statement can be formed that it fits exactly what you need. This means that you can process the data in any way you want for further use. Often it makes sense to eliminate certain entries like <code>Unknown</code> or peaks.</p>
<p>If the above query is executed in DB Browser for SQLite you would be able to save the sensors graph as png.</p>
<p class="img">
<img src="/images/blog/2016-07-reporting/db-browser.png" />
Visualization with DB Browser for SQLite
</p>
<p>You may ask: Why not do this with LibreOffice Calc or another spreadsheet application? As most spreadsheet applications are not able to work directly with SQLite database we are going to export the data from the database to <a href="https://en.wikipedia.org/wiki/Comma-separated_values">CSV</a>.</p>
<div class="highlighter-coderay"><div class="CodeRay">
<div class="code"><pre>$ sqlite3 -header -csv /home/ha/.homeassistant/home-assistant_v2.db &quot;SELECT last_changed, state FROM states WHERE entity_id = 'sensor.aare' AND last_changed BETWEEN '2016-07-05 00:00:00.000000' AND '2016-07-07 00:00:00.000000';&quot; &gt; sensor.csv
</pre></div>
</div>
</div>
<p>The ordering for the <code>SELECT</code> was changed to get the time stamps first and then the state. Now we can import the CSV file into the application of your choice, here its LibreOffice Calc.</p>
<p class="img">
<img src="/images/blog/2016-07-reporting/libreoffice-import.png" />
Import of the CSV file
</p>
<p>After the import a graph can be created over the existing data.</p>
<p class="img">
<img src="/images/blog/2016-07-reporting/libreoffice-graph.png" />
Graph in LibreOffice
</p>
<p>You can also use <a href="http://matplotlib.org/">matplotlib</a> to generate graphs as an alternative to a spreadsheet application. This is a powerful Python 2D plotting library. With the built-in support for SQLite in Python it will only take a couple lines of code to visualize your data.</p>
<div class="highlighter-coderay"><div class="CodeRay">
<div class="code"><pre><span class="keyword">import</span> <span class="include">sqlite3</span>
<span class="keyword">from</span> <span class="include">matplotlib</span> <span class="keyword">import</span> <span class="include">dates</span>
<span class="keyword">import</span> <span class="include">matplotlib.pyplot</span> <span class="keyword">as</span> plt
<span class="keyword">import</span> <span class="include">homeassistant.util.dt</span> <span class="keyword">as</span> dt
values = []
timestamps = []
conn = sqlite3.connect(<span class="string"><span class="delimiter">'</span><span class="content">/home/ha/.homeassistant/home-assistant_v2.db</span><span class="delimiter">'</span></span>)
data = conn.execute(<span class="string"><span class="delimiter">&quot;</span><span class="content">SELECT state, last_changed FROM states WHERE </span><span class="delimiter">&quot;</span></span>
<span class="string"><span class="delimiter">&quot;</span><span class="content">entity_id = 'sensor.aare' AND last_changed BETWEEN </span><span class="delimiter">&quot;</span></span>
<span class="string"><span class="delimiter">&quot;</span><span class="content">'2016-07-05 00:00:00.000000' AND </span><span class="delimiter">&quot;</span></span>
<span class="string"><span class="delimiter">&quot;</span><span class="content">'2016-07-07 00:00:00.000000'</span><span class="delimiter">&quot;</span></span>)
<span class="keyword">for</span> x <span class="keyword">in</span> data:
timestamps.append(dates.date2num(dt.parse_datetime(x[<span class="integer">1</span>])))
values.append(<span class="predefined">float</span>(x[<span class="integer">0</span>]))
plt.plot_date(x=timestamps, y=values, fmt=<span class="string"><span class="delimiter">&quot;</span><span class="content">r-</span><span class="delimiter">&quot;</span></span>)
plt.ylabel(<span class="string"><span class="delimiter">'</span><span class="content">Temperature</span><span class="delimiter">'</span></span>)
plt.xlabel(<span class="string"><span class="delimiter">'</span><span class="content">Time line</span><span class="delimiter">'</span></span>)
plt.savefig(<span class="string"><span class="delimiter">'</span><span class="content">sensor.png</span><span class="delimiter">'</span></span>)
</pre></div>
</div>
</div>
<p>Creating a connection to the database and executing a query is similar to the ways already seen. The return values from the query are splitted into two lists. The time stamps must be converted in an value which is accepted by matplotlib and then the graph is generated and saved as image.</p>
<p class="img">
<img src="/images/blog/2016-07-reporting/mpl-sensor.png" />
Sensor graph generated by matplotlib
</p>
<p>Most of the graphs are pretty ugly. So, further beautification will be needed. If you have created a nice report including some amazing graphs then the Home Assistant community would be grateful for sharing them in our <a href="https://community.home-assistant.io/">forum</a>.</p>
</article>
<section id="disqus">
<h3 class="indent title">Comments</h3>
<div id="disqus_thread" aria-live="polite"><noscript>Please enable JavaScript to view the <a href="http://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript></div>
</section>
</div>
<aside id="sidebar" class="grid__item one-third lap-one-whole palm-one-whole">
<div class="grid">
<section class="aside-module grid__item one-whole lap-one-half">
<h1 class="title delta">About Home Assistant</h1>
<ul class="divided">
<li>
Home Assistant is an open-source home automation platform running on Python 3. Track and control all devices at home and automate control.
</li>
<li><a href='/getting-started/'>Get started with Home Assistant</a></li>
<li><a href='/demo/'>Try the online demo</a></li>
<li><a class="twitter-follow-button" href="https://twitter.com/Home_Assistant">Follow Home Assistant on Twitter</a></li>
</ul>
</section>
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.async=true;js.src='//platform.twitter.com/widgets.js';fjs.parentNode.insertBefore(js,fjs);}}(document, 'script', 'twitter-wjs');</script>
<section class="sharing aside-module grid__item one-whole lap-one-half">
<h1 class="title delta">Share this post</h1>
<a href="//twitter.com/share"
class="twitter-share-button"
data-via="home_assistant"
data-related="home_assistant"
data-url="https://home-assistant.io/blog/2016/07/19/exporting-processing-data/"
data-counturl="https://home-assistant.io/blog/2016/07/19/exporting-processing-data/" >Tweet</a>
<div class="fb-share-button" style='top: -6px;'
data-href="https://home-assistant.io/blog/2016/07/19/exporting-processing-data/"
data-layout="button_count">
</div>
<div class="g-plusone" data-size="standard"></div>
</section>
<script src="https://apis.google.com/js/platform.js" async defer></script>
<script>
window.fbAsyncInit = function() {
FB.init({appId: '338291289691179', xfbml: true, version: 'v2.2'});
};
(function(d, s, id){
var js, fjs = d.getElementsByTagName(s)[0];
if (d.getElementById(id)) {return;}
js = d.createElement(s); js.id = id; js.async = true;
js.src = "//connect.facebook.net/en_US/sdk.js";
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));
</script>
<section id="recent-posts" class="aside-module grid__item one-whole lap-one-half">
<h1 class="title delta">Recent Posts</h1>
<ul class="divided">
<li class="post">
<a href="/blog/2016/07/16/sqlalchemy-knx-join-simplisafe/">0.24: SQLAlchemy, KNX, Join by Joaoapps, and SimpliSafe.</a>
</li>
<li class="post">
<a href="/blog/2016/07/06/pocketchip-running-home-assistant/">PocketCHIP running Home Assistant</a>
</li>
<li class="post">
<a href="/blog/2016/07/01/envisalink-homematic-hdmi-cec-and-sony-bravia-tv/">0.23: Envisalink, Homematic, HDMI-CEC and Sony Bravia TV</a>
</li>
<li class="post">
<a href="/blog/2016/06/23/usb-webcams-and-home-assistant/">Using USB webcams with Home Assistant</a>
</li>
</ul>
</section>
</div>
</aside>
</div>
</div>
<footer>
<div class="grid-wrapper">
<div class="grid">
<div class="grid__item">
<div class="copyright">
<a rel="me" href='https://twitter.com/home_assistant'><i class="icon-twitter"></i></a>
<a rel="me" href='https://github.com/home-assistant/home-assistant'><i class="icon-github"></i></a>
<div class="credit">
Contact us at <a href='mailto:hello@home-assistant.io'>hello@home-assistant.io</a>.<br>
Website powered by <a href='http://jekyllrb.com/'>Jekyll</a> and the <a href='https://github.com/coogie/oscailte'>Oscalite theme</a>.<br />
Hosted by <a href='https://pages.github.com/'>GitHub</a> and served by <a href='https://cloudflare.com'>CloudFlare</a>.
</div>
</div>
</div>
</div>
</div>
</footer>
<script>
var _gaq=[['_setAccount','UA-57927901-1'],['_trackPageview']];
(function(d,t){var g=d.createElement(t),s=d.getElementsByTagName(t)[0];
g.src=('https:'==location.protocol?'//ssl':'//www')+'.google-analytics.com/ga.js';
s.parentNode.insertBefore(g,s)}(document,'script'));
</script>
<script>
var disqus_shortname = 'home-assistant';
// var disqus_developer = 1;
var disqus_identifier = 'https://home-assistant.io/blog/2016/07/19/exporting-processing-data/';
var disqus_url = 'https://home-assistant.io/blog/2016/07/19/exporting-processing-data/';
var disqus_script = 'embed.js';
(function () {
var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
dsq.src = '//' + disqus_shortname + '.disqus.com/' + disqus_script;
(document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
}());
</script>
</body>
</html>

View file

@ -98,6 +98,38 @@
<h2>2016</h2>
<article>
<div class="grid">
<div class="grid__item one-fifth palm-one-whole">
<time datetime="2016-07-19T16:00:00+00:00" pubdate>
<span class='month'>Jul</span> <span class='day'>19</span>
</time>
</div>
<div class="grid__item four-fifths palm-one-whole">
<h1 class="gamma"><a href="/blog/2016/07/19/exporting-processing-data/">Exporting Home Assistant information</a></h1>
<footer class="meta">
<span>
<i class="icon-tags"></i>
<ul class="tags unstyled">
<li><a class='category' href='/blog/categories/how-to/'>How-To</a></li>
</ul>
</span>
</footer>
<hr class="divider">
</div>
</div>
</article>
<article>
<div class="grid">
@ -2467,6 +2499,12 @@
<ul class="divided">
<li class="post">
<a href="/blog/2016/07/19/exporting-processing-data/">Exporting Home Assistant information</a>
</li>
<li class="post">
<a href="/blog/2016/07/16/sqlalchemy-knx-join-simplisafe/">0.24: SQLAlchemy, KNX, Join by Joaoapps, and SimpliSafe.</a>
</li>
@ -2490,12 +2528,6 @@
</li>
<li class="post">
<a href="/blog/2016/06/18/pandora-bt-home-hub-5-and-local-file-camera/">0.22: Pandora, BT Home Hub 5 and local file camera.</a>
</li>
</ul>
</section>

View file

@ -4,7 +4,7 @@
<title><![CDATA[Category: Community | Home Assistant]]></title>
<link href="https://home-assistant.io/blog/categories/community/atom.xml" rel="self"/>
<link href="https://home-assistant.io/"/>
<updated>2016-07-19T13:52:21+00:00</updated>
<updated>2016-07-19T19:43:12+00:00</updated>
<id>https://home-assistant.io/</id>
<author>
<name><![CDATA[Paulus Schoutsen]]></name>

View file

@ -268,6 +268,12 @@
<ul class="divided">
<li class="post">
<a href="/blog/2016/07/19/exporting-processing-data/">Exporting Home Assistant information</a>
</li>
<li class="post">
<a href="/blog/2016/07/16/sqlalchemy-knx-join-simplisafe/">0.24: SQLAlchemy, KNX, Join by Joaoapps, and SimpliSafe.</a>
</li>
@ -291,12 +297,6 @@
</li>
<li class="post">
<a href="/blog/2016/06/18/pandora-bt-home-hub-5-and-local-file-camera/">0.22: Pandora, BT Home Hub 5 and local file camera.</a>
</li>
</ul>
</section>

View file

@ -4,7 +4,7 @@
<title><![CDATA[Category: Device-Tracking | Home Assistant]]></title>
<link href="https://home-assistant.io/blog/categories/device-tracking/atom.xml" rel="self"/>
<link href="https://home-assistant.io/"/>
<updated>2016-07-19T13:52:21+00:00</updated>
<updated>2016-07-19T19:43:12+00:00</updated>
<id>https://home-assistant.io/</id>
<author>
<name><![CDATA[Paulus Schoutsen]]></name>

View file

@ -199,6 +199,12 @@
<ul class="divided">
<li class="post">
<a href="/blog/2016/07/19/exporting-processing-data/">Exporting Home Assistant information</a>
</li>
<li class="post">
<a href="/blog/2016/07/16/sqlalchemy-knx-join-simplisafe/">0.24: SQLAlchemy, KNX, Join by Joaoapps, and SimpliSafe.</a>
</li>
@ -222,12 +228,6 @@
</li>
<li class="post">
<a href="/blog/2016/06/18/pandora-bt-home-hub-5-and-local-file-camera/">0.22: Pandora, BT Home Hub 5 and local file camera.</a>
</li>
</ul>
</section>

View file

@ -4,7 +4,7 @@
<title><![CDATA[Category: ESP8266 | Home Assistant]]></title>
<link href="https://home-assistant.io/blog/categories/esp8266/atom.xml" rel="self"/>
<link href="https://home-assistant.io/"/>
<updated>2016-07-19T13:52:21+00:00</updated>
<updated>2016-07-19T19:43:12+00:00</updated>
<id>https://home-assistant.io/</id>
<author>
<name><![CDATA[Paulus Schoutsen]]></name>

View file

@ -199,6 +199,12 @@
<ul class="divided">
<li class="post">
<a href="/blog/2016/07/19/exporting-processing-data/">Exporting Home Assistant information</a>
</li>
<li class="post">
<a href="/blog/2016/07/16/sqlalchemy-knx-join-simplisafe/">0.24: SQLAlchemy, KNX, Join by Joaoapps, and SimpliSafe.</a>
</li>
@ -222,12 +228,6 @@
</li>
<li class="post">
<a href="/blog/2016/06/18/pandora-bt-home-hub-5-and-local-file-camera/">0.22: Pandora, BT Home Hub 5 and local file camera.</a>
</li>
</ul>
</section>

View file

@ -4,7 +4,7 @@
<title><![CDATA[Category: How-To | Home Assistant]]></title>
<link href="https://home-assistant.io/blog/categories/how-to/atom.xml" rel="self"/>
<link href="https://home-assistant.io/"/>
<updated>2016-07-19T13:52:21+00:00</updated>
<updated>2016-07-19T19:43:12+00:00</updated>
<id>https://home-assistant.io/</id>
<author>
<name><![CDATA[Paulus Schoutsen]]></name>
@ -13,6 +13,123 @@
<generator uri="http://octopress.org/">Octopress</generator>
<entry>
<title type="html"><![CDATA[Exporting Home Assistant information]]></title>
<link href="https://home-assistant.io/blog/2016/07/19/exporting-processing-data/"/>
<updated>2016-07-19T16:00:00+00:00</updated>
<id>https://home-assistant.io/blog/2016/07/19/exporting-processing-data</id>
<content type="html"><![CDATA[<p><img src="https://home-assistant.io/images/blog/2016-07-reporting/mpl-sensor.png" style="clear: right; border:none; box-shadow: none; float: right; margin-bottom: 12px;" width="200" /></p>
<p>The <a href="/components/history/">history component</a> is tracking everything that is going on within Home Assistant. This means that you have access to all stored information about your home. Our history is not a full-fledged graphical processing and visualization component as you may know from systems and network monitoring tools. The current limitation is that you only can select a day for a visual output of your information and not a period. Also, there is no possibility to drill down on a specific entity.</p>
<p>This blog post will show you ways to export data for reporting, visualization, or further analysis of automation rules.</p>
<!--more-->
<p>In this blog post I use the temperature of the <a href="https://en.wikipedia.org/wiki/Aare">Aare</a> river close to where I live as a show case. The temperatures were recorded with the <a href="/components/sensor.swiss_hydrological_data/">Swiss Hydrological Data sensor</a> and the name of the sensor is <code>sensor.aare</code>.</p>
<p>The database is stored at <code>&lt;path to config dir&gt;/.homeassistant/home-assistant_v2.db</code> as <a href="https://www.sqlite.org/">SQLite database</a>. In all examples we are going to use the path: <code>/home/ha/.homeassistant/home-assistant_v2.db</code></p>
<p>If you are just curious whats stored in your database then you can use the <code>sqlite3</code> command-line tool or a graphical one like <a href="http://sqlitebrowser.org/">DB Browser for SQLite</a>.</p>
<p>The table that is holding the states is called <code>states</code>. The <code>events</code> tables is responsible for storing the events which occurred. So, we will first check how many entries there are in the <code>states</code> table. <code>sqlite3</code> needs to know where the databases is located. To work with your database make sure that Home Assistant is not running or create a copy of the existing database. Its recommended to work with a copy.</p>
<div class="highlighter-coderay"><div class="CodeRay">
<div class="code"><pre>$ sqlite3 /home/ha/.homeassistant/home-assistant_v2.db
SQLite version 3.11.0 2016-02-15 17:29:24
sqlite&gt; SELECT count(*) FROM states;
24659
</pre></div>
</div>
</div>
<p>Lets have a look at a sample <a href="https://en.wikipedia.org/wiki/SQL">SQL</a> query. This query will show all states in a period for the sensor <code>sensor.aare</code>.</p>
<div class="highlighter-coderay"><div class="CodeRay">
<div class="code"><pre><span class="class">SELECT</span> state, last_changed <span class="keyword">FROM</span> states
<span class="keyword">WHERE</span>
entity_id = <span class="string"><span class="delimiter">'</span><span class="content">sensor.aare</span><span class="delimiter">'</span></span>
<span class="keyword">AND</span>
last_changed <span class="keyword">BETWEEN</span>
<span class="string"><span class="delimiter">'</span><span class="content">2016-07-05 00:00:00.000000</span><span class="delimiter">'</span></span> <span class="keyword">AND</span> <span class="string"><span class="delimiter">'</span><span class="content">2016-07-07 00:00:00.000000</span><span class="delimiter">'</span></span>;
</pre></div>
</div>
</div>
<p>The SQL statement can be formed that it fits exactly what you need. This means that you can process the data in any way you want for further use. Often it makes sense to eliminate certain entries like <code>Unknown</code> or peaks.</p>
<p>If the above query is executed in DB Browser for SQLite you would be able to save the sensors graph as png.</p>
<p class="img">
<img src="https://home-assistant.io/images/blog/2016-07-reporting/db-browser.png" />
Visualization with DB Browser for SQLite
</p>
<p>You may ask: Why not do this with LibreOffice Calc or another spreadsheet application? As most spreadsheet applications are not able to work directly with SQLite database we are going to export the data from the database to <a href="https://en.wikipedia.org/wiki/Comma-separated_values">CSV</a>.</p>
<div class="highlighter-coderay"><div class="CodeRay">
<div class="code"><pre>$ sqlite3 -header -csv /home/ha/.homeassistant/home-assistant_v2.db &quot;SELECT last_changed, state FROM states WHERE entity_id = 'sensor.aare' AND last_changed BETWEEN '2016-07-05 00:00:00.000000' AND '2016-07-07 00:00:00.000000';&quot; &gt; sensor.csv
</pre></div>
</div>
</div>
<p>The ordering for the <code>SELECT</code> was changed to get the time stamps first and then the state. Now we can import the CSV file into the application of your choice, here its LibreOffice Calc.</p>
<p class="img">
<img src="https://home-assistant.io/images/blog/2016-07-reporting/libreoffice-import.png" />
Import of the CSV file
</p>
<p>After the import a graph can be created over the existing data.</p>
<p class="img">
<img src="https://home-assistant.io/images/blog/2016-07-reporting/libreoffice-graph.png" />
Graph in LibreOffice
</p>
<p>You can also use <a href="http://matplotlib.org/">matplotlib</a> to generate graphs as an alternative to a spreadsheet application. This is a powerful Python 2D plotting library. With the built-in support for SQLite in Python it will only take a couple lines of code to visualize your data.</p>
<div class="highlighter-coderay"><div class="CodeRay">
<div class="code"><pre><span class="keyword">import</span> <span class="include">sqlite3</span>
<span class="keyword">from</span> <span class="include">matplotlib</span> <span class="keyword">import</span> <span class="include">dates</span>
<span class="keyword">import</span> <span class="include">matplotlib.pyplot</span> <span class="keyword">as</span> plt
<span class="keyword">import</span> <span class="include">homeassistant.util.dt</span> <span class="keyword">as</span> dt
values = []
timestamps = []
conn = sqlite3.connect(<span class="string"><span class="delimiter">'</span><span class="content">/home/ha/.homeassistant/home-assistant_v2.db</span><span class="delimiter">'</span></span>)
data = conn.execute(<span class="string"><span class="delimiter">&quot;</span><span class="content">SELECT state, last_changed FROM states WHERE </span><span class="delimiter">&quot;</span></span>
<span class="string"><span class="delimiter">&quot;</span><span class="content">entity_id = 'sensor.aare' AND last_changed BETWEEN </span><span class="delimiter">&quot;</span></span>
<span class="string"><span class="delimiter">&quot;</span><span class="content">'2016-07-05 00:00:00.000000' AND </span><span class="delimiter">&quot;</span></span>
<span class="string"><span class="delimiter">&quot;</span><span class="content">'2016-07-07 00:00:00.000000'</span><span class="delimiter">&quot;</span></span>)
<span class="keyword">for</span> x <span class="keyword">in</span> data:
timestamps.append(dates.date2num(dt.parse_datetime(x[<span class="integer">1</span>])))
values.append(<span class="predefined">float</span>(x[<span class="integer">0</span>]))
plt.plot_date(x=timestamps, y=values, fmt=<span class="string"><span class="delimiter">&quot;</span><span class="content">r-</span><span class="delimiter">&quot;</span></span>)
plt.ylabel(<span class="string"><span class="delimiter">'</span><span class="content">Temperature</span><span class="delimiter">'</span></span>)
plt.xlabel(<span class="string"><span class="delimiter">'</span><span class="content">Time line</span><span class="delimiter">'</span></span>)
plt.savefig(<span class="string"><span class="delimiter">'</span><span class="content">sensor.png</span><span class="delimiter">'</span></span>)
</pre></div>
</div>
</div>
<p>Creating a connection to the database and executing a query is similar to the ways already seen. The return values from the query are splitted into two lists. The time stamps must be converted in an value which is accepted by matplotlib and then the graph is generated and saved as image.</p>
<p class="img">
<img src="https://home-assistant.io/images/blog/2016-07-reporting/mpl-sensor.png" />
Sensor graph generated by matplotlib
</p>
<p>Most of the graphs are pretty ugly. So, further beautification will be needed. If you have created a nice report including some amazing graphs then the Home Assistant community would be grateful for sharing them in our <a href="https://community.home-assistant.io/">forum</a>.</p>
]]></content>
</entry>
<entry>
<title type="html"><![CDATA[PocketCHIP running Home Assistant]]></title>
<link href="https://home-assistant.io/blog/2016/07/06/pocketchip-running-home-assistant/"/>
@ -388,240 +505,6 @@ output = audioresample ! audio/x-raw,rate=48000,channels=2,format=S16LE ! audioc
</div>
</div>
]]></content>
</entry>
<entry>
<title type="html"><![CDATA[Smarter SmartThings with MQTT and Home Assistant]]></title>
<link href="https://home-assistant.io/blog/2016/02/09/smarter-smart-things-with-mqtt-and-home-assistant/"/>
<updated>2016-02-09T07:44:00+00:00</updated>
<id>https://home-assistant.io/blog/2016/02/09/Smarter-Smart-Things-with-MQTT-and-Home-Assistant</id>
<content type="html"><![CDATA[<p><em>This is a guest post by Home Assistant users <a href="https://github.com/jer">Jeremiah Wuenschel</a> and <a href="https://github.com/stjohnjohnson">St. John Johnson</a>.</em></p>
<p>So you own a <a href="http://smartthings.com">SmartThings</a> Hub. You probably bought it when you were looking to get into the whole Home Automation hobby because it worked with pretty much everything and offered you the ability to automate <strong>anything.</strong> After a week of ownership, you realized that building dashboards and automating required writing way more Groovy then you expected. Then one day you were browsing <a href="https://www.reddit.com/r/homeautomation">reddit</a> and discovered the amazingness that is Home Assistant! A solution that offered dashboards, graphs, working support for Nest, and REAL EASY automation!</p>
<p>You spent your weekend getting everything set up, showing it off to your significant other, but in the end you got stumped when it came to integrating with all your existing SmartThings toys. What do I do now? Should I buy another hub? Should I just buy a Z-Wave stick?</p>
<p>Thats where we came in. We wanted a solution that can bridge the awesomeness of Home Assistant with the SmartThings hub that works with almost everything.</p>
<p class="img">
<img src="https://home-assistant.io/images/blog/2016-02-smartthings/splash.png" />
</p>
<!--more-->
<h2>Glossary</h2>
<p>This is going to be a pretty detailed tutorial on setting up our SmartThings bridge. However, there are a couple key terms that <em>might</em> be new to you:</p>
<ul>
<li><a href="https://en.wikipedia.org/wiki/MQTT">MQTT</a>: A lightweight message protocol for listening and publishing events that happen. Many home automation platforms have built in support for this <a href="/components/mqtt/">(especially Home Assistant)</a>.</li>
<li><a href="https://www.docker.com/">Docker</a>: A tool for running applications that are self-contained. No need for installing any dependencies or worrying about conflicts. Installs easily on Linux and OSX.</li>
</ul>
<h2>Setting up the Bridge</h2>
<h3>MQTT</h3>
<p>Assuming that you already have Home Assistant and Smart Things running, you will first want to get an MQTT broker running. There are a handful of <a href="http://mosquitto.org/">MQTT</a> <a href="https://github.com/emqtt/emqttd">brokers</a> available in Open Source land. We chose <a href="http://www.mosca.io/">Mosca</a> for its simplicity.</p>
<p>There is very little you need to do to get Mosca running. The easiest approach is to use <a href="https://www.docker.com/">Docker</a>, and run a command like the following:</p>
<div class="highlighter-coderay"><div class="CodeRay">
<div class="code"><pre>$ docker run \
-d \
--name=&quot;mqtt&quot; \
-v /opt/mosca:/db \
-p 1883:1883 \
matteocollina/mosca
</pre></div>
</div>
</div>
<p>This will start Mosca up inside of a docker container, while keeping persistent storage for Mosca in <code>/opt/mosca</code>. The default configuration is the only thing we need to get things up and running.</p>
<p>If you dont want to mess with Docker and can get node.js installed without trouble, the <a href="https://github.com/mcollina/mosca#standalone">standalone</a> instructions are all you need.</p>
<h3>MQTT Bridge</h3>
<p>This is the small piece of magic that bridges the gap between MQTT and SmartThings. It is a node.js app, and like Mosca it is probably easiest to install with Docker:</p>
<div class="highlighter-coderay"><div class="CodeRay">
<div class="code"><pre>$ docker run \
-d \
--name=&quot;mqtt-bridge&quot; \
-v /opt/mqtt-bridge:/config \
-p 8080:8080 \
stjohnjohnson/smartthings-mqtt-bridge
</pre></div>
</div>
</div>
<p>The code for this bridge is <a href="https://github.com/stjohnjohnson/smartthings-mqtt-bridge">on Github</a> if you want to start it up independently.</p>
<p>The MQTT Bridge only needs to know where your MQTT broker lives. If you are using these docker commands as-is, edit <code>/opt/mqtt-bridge/config.yml</code> to look like this:</p>
<div class="highlighter-coderay"><div class="CodeRay">
<div class="code"><pre><span class="head"><span class="head">---</span></span>
<span class="key">mqtt</span>:
<span class="key">host</span>: <span class="string"><span class="content">&lt;IP of the host&gt;</span></span>
</pre></div>
</div>
</div>
<p>Restart the bridge, and you are ready to go:</p>
<div class="highlighter-coderay"><div class="CodeRay">
<div class="code"><pre>$ docker restart mqtt-bridge
</pre></div>
</div>
</div>
<h3>SmartThings Device</h3>
<p>The next step (and possibly the most confusing) is the device type. Go to the <a href="https://graph.api.smartthings.com/ide/devices">Smart Things Device IDE</a> and <code>Create New Device Handler</code>. Choose <code>From Code</code> and paste in the <a href="https://github.com/stjohnjohnson/smartthings-mqtt-bridge/blob/master/devicetypes/stj/mqtt-bridge.src/mqtt-bridge.groovy">MQTT Bridge Device Code</a>. Click <code>Save</code>, <code>Publish</code>, and then <code>For Me</code>.</p>
<p>Now to install your new Device Handler. Go back to <code>My Devices</code> in the IDE, and click <code>New Device</code>. Enter a name, and pick any random set of characters for the Device Network Id (this will automatically update later). For Type, scroll to the bottom of the list and find your newly created <code>MQTT Bridge</code>. Fill in the other boxes however you like.</p>
<p>Go back to <code>My Devices</code>, and click on your new device in the list. This will bring up a page that allows you to edit your devices Preferences. Click <code>edit</code> and fill in the 3 pieces of information it asks for.</p>
<ul>
<li>MQTT Bridge IP Address: &lt;IP address of the MQTT Bridge from the previous step&gt;</li>
<li>MQTT Bridge Port: &lt;8080 if you have changed nothing in the previous commands&gt;</li>
<li>MQTT Bridge MAC Address: &lt;Mac address of machine running the Bridge code&gt;</li>
</ul>
<p>This will create the link between SmartThings and the MQTT Bridge.</p>
<h3>SmartThings App</h3>
<p>The last step is to setup the SmartApp. After this, any registered devices will start sending their events to MQTT.</p>
<p>Go to the <a href="https://graph.api.smartthings.com/ide/apps">Smart App IDE</a>. Click <code>New SmartApp</code>, followed by <code>From Code</code>. Paste in the <a href="https://github.com/stjohnjohnson/smartthings-mqtt-bridge/blob/master/smartapps/stj/mqtt-bridge.src/mqtt-bridge.groovy">MQTT Bridge SmartApp code</a> and click <code>Save</code>. Click <code>Publish</code> and then <code>For Me</code>. In the SmartThings mobile app, add the new SmartApp and configure it with your devices and MQTT Bridge device. Clicking <code>done</code> will subscribe SmartThings to your MQTT broker and begin 2-way propagation of events.</p>
<h3>Configure Home Assistant</h3>
<p>To add SmartThings devices to Home Assistant over MQTT, first enable MQTT in Home Assistant:</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">localhost</span></span>
</pre></div>
</div>
</div>
<p>Replace <code>localhost</code> with the location of the running MQTT Broker. Devices from the MQTT Bridge are published to the path <code>smartthings/&lt;Device Name&gt;/&lt;Atribute&gt;</code></p>
<p>For example, my Dimmer Z-Wave Lamp is called “Fireplace Lights” in SmartThings. The following topics are published:</p>
<table>
<thead>
<tr>
<th>Topic</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>smartthings/Fireplace Lights/level</td>
<td>Brightness (0-99)</td>
</tr>
<tr>
<td>smartthings/Fireplace Lights/switch</td>
<td>Switch State (on/off)</td>
</tr>
</tbody>
</table>
<p>Here is an example Home Assistant config:</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">mqtt</span></span>
<span class="key">name</span>: <span class="string"><span class="delimiter">&quot;</span><span class="content">Fireplace Lights</span><span class="delimiter">&quot;</span></span>
<span class="key">state_topic</span>: <span class="string"><span class="delimiter">&quot;</span><span class="content">smartthings/Fireplace Lights/switch</span><span class="delimiter">&quot;</span></span>
<span class="key">command_topic</span>: <span class="string"><span class="delimiter">&quot;</span><span class="content">smartthings/Fireplace Lights/switch</span><span class="delimiter">&quot;</span></span>
<span class="key">brightness_state_topic</span>: <span class="string"><span class="delimiter">&quot;</span><span class="content">smartthings/Fireplace Lights/level</span><span class="delimiter">&quot;</span></span>
<span class="key">brightness_command_topic</span>: <span class="string"><span class="delimiter">&quot;</span><span class="content">smartthings/Fireplace Lights/level</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">retain</span>: <span class="string"><span class="content">true</span></span>
</pre></div>
</div>
</div>
<p>We recommend <code>retain: true</code> for every MQTT device in order to keep states in sync when things become disconnected.</p>
<p>Start digging through the <a href="/components/mqtt/">MQTT Components</a> in Home Assistant to find which components map to the new events being published to MQTT.</p>
<h3>Configuring with Docker-Compose</h3>
<p>Our personal preference for starting the whole suite of software is to use a single Docker-Compose file. Just create a file called <code>docker-compose.yml</code> like this:</p>
<div class="highlighter-coderay"><div class="CodeRay">
<div class="code"><pre><span class="key">mqtt</span>:
<span class="key">image</span>: <span class="string"><span class="content">matteocollina/mosca</span></span>
<span class="key">ports</span>:
- <span class="string"><span class="content">1883:1883</span></span>
<span class="key">mqttbridge</span>:
<span class="key">image</span>: <span class="string"><span class="content">stjohnjohnson/smartthings-mqtt-bridge</span></span>
<span class="key">volumes</span>:
- <span class="string"><span class="content">./mqtt-bridge:/config</span></span>
<span class="key">ports</span>:
- <span class="string"><span class="content">8080:8080</span></span>
<span class="key">links</span>:
- <span class="string"><span class="content">mqtt</span></span>
<span class="key">homeassistant</span>:
<span class="key">image</span>: <span class="string"><span class="content">homeassistant/home-assistant:latest</span></span>
<span class="key">ports</span>:
- <span class="string"><span class="content">80:80</span></span>
<span class="key">volumes</span>:
- <span class="string"><span class="content">./home-assistant:/config</span></span>
- <span class="string"><span class="content">/etc/localtime:/etc/localtime:ro</span></span>
<span class="key">links</span>:
- <span class="string"><span class="content">mqtt</span></span>
</pre></div>
</div>
</div>
<p>This will start home-assistant, MQTT, and the Bridge, in dependency order. All config can reference the name of the docker container instead of using IP addresses (e.g. mqtt for the broker host in Home Assistant).</p>
<h3>How it works</h3>
<p><strong>HTTP Endpoint</strong>: There are really only 2 ways to communicate with the SmartThings hub that we could find. The easiest approach is to create a RESTful SmartApp authenticated with OAuth that provides state changes via HTTP directly. This approach is pretty straightforward to implement, but it requires communication with the SmartThings cloud service, and cant be done entirely on your LAN. We hoped to keep all communication internal, and came up with a second approach.</p>
<p><strong>Custom Device Type:</strong> SmartThings custom device types allow developers to define handlers for HTTP events received directly over the local network by the SmartThings hub. Messages received are authenticated by MAC address, and can contain arbitrary strings in their payload. Since a Device Type is only ever tied to a single device, we need to add a SmartApp to the mix in order to translate events between individual devices and our special Home Assistant Bridge device. Here is what we have so far:</p>
<div class="highlighter-coderay"><div class="CodeRay">
<div class="code"><pre>Z-Wave Switch |
Zigbee motion sensor |&lt;---&gt; Bridge App &lt;---&gt; Bridge Device Type &lt;---&gt; &lt;Local network&gt;
Z-Wave light bulb |
</pre></div>
</div>
</div>
<p>On the Home Assistant side, there is a powerful platform available based on the MQTT lightweight message bus protocol. Everything from lights to switches to temperature sensors can be defined in Home Assistant as an MQTT component, so it makes for a convenient integration point. This requires an MQTT broker for handling the message bus, and one last piece to translate between the HTTP that SmartThings supports and MQTT.</p>
<p>Here is the final sequence of events:</p>
<p class="img">
<a href="https://home-assistant.io/images/blog/2016-02-smartthings/SmartThings-HomeAssistant.png">
<img src="https://home-assistant.io/images/blog/2016-02-smartthings/SmartThings-HomeAssistant.png" alt="SmartThings Bridge Sequence" />
</a>
SmartThings Bridge Sequence
</p>
<p>There are a lot of stops along the way for these events, but each piece is a simple translation layer to shuttle the events between systems.</p>
<h3>Future Improvements</h3>
<ul>
<li><strong>Raspberry pi</strong>: There is a lot of interest in getting this running on the Raspberry Pi. It only requires binaries compiled for ARM, so we plan to get ARM-compatible versions of the containers going at some point.</li>
<li><strong>Authentication for MQTT</strong>: At the moment, the MQTT bridge doesnt understand how to authenticate to MQTT, so only unauthenticated MQTT is supported. This is mitigated to some degree if you use our Docker Compose config, because MQTTs port is not actually shared publicly.</li>
<li><strong>Authentication for MQTT Bridge</strong>: Right now the bridge expects that anyone subscribing is the SmartThings hub. This could use proper authentication.</li>
</ul>
]]></content>
</entry>

View file

@ -98,6 +98,38 @@
<h2>2016</h2>
<article>
<div class="grid">
<div class="grid__item one-fifth palm-one-whole">
<time datetime="2016-07-19T16:00:00+00:00" pubdate>
<span class='month'>Jul</span> <span class='day'>19</span>
</time>
</div>
<div class="grid__item four-fifths palm-one-whole">
<h1 class="gamma"><a href="/blog/2016/07/19/exporting-processing-data/">Exporting Home Assistant information</a></h1>
<footer class="meta">
<span>
<i class="icon-tags"></i>
<ul class="tags unstyled">
<li><a class='category' href='/blog/categories/how-to/'>How-To</a></li>
</ul>
</span>
</footer>
<hr class="divider">
</div>
</div>
</article>
<article>
<div class="grid">
@ -560,6 +592,12 @@
<ul class="divided">
<li class="post">
<a href="/blog/2016/07/19/exporting-processing-data/">Exporting Home Assistant information</a>
</li>
<li class="post">
<a href="/blog/2016/07/16/sqlalchemy-knx-join-simplisafe/">0.24: SQLAlchemy, KNX, Join by Joaoapps, and SimpliSafe.</a>
</li>
@ -583,12 +621,6 @@
</li>
<li class="post">
<a href="/blog/2016/06/18/pandora-bt-home-hub-5-and-local-file-camera/">0.22: Pandora, BT Home Hub 5 and local file camera.</a>
</li>
</ul>
</section>

View file

@ -4,7 +4,7 @@
<title><![CDATA[Category: iBeacons | Home Assistant]]></title>
<link href="https://home-assistant.io/blog/categories/ibeacons/atom.xml" rel="self"/>
<link href="https://home-assistant.io/"/>
<updated>2016-07-19T13:52:21+00:00</updated>
<updated>2016-07-19T19:43:12+00:00</updated>
<id>https://home-assistant.io/</id>
<author>
<name><![CDATA[Paulus Schoutsen]]></name>

View file

@ -235,6 +235,12 @@
<ul class="divided">
<li class="post">
<a href="/blog/2016/07/19/exporting-processing-data/">Exporting Home Assistant information</a>
</li>
<li class="post">
<a href="/blog/2016/07/16/sqlalchemy-knx-join-simplisafe/">0.24: SQLAlchemy, KNX, Join by Joaoapps, and SimpliSafe.</a>
</li>
@ -258,12 +264,6 @@
</li>
<li class="post">
<a href="/blog/2016/06/18/pandora-bt-home-hub-5-and-local-file-camera/">0.22: Pandora, BT Home Hub 5 and local file camera.</a>
</li>
</ul>
</section>

View file

@ -4,7 +4,7 @@
<title><![CDATA[Category: Internet-of-Things | Home Assistant]]></title>
<link href="https://home-assistant.io/blog/categories/internet-of-things/atom.xml" rel="self"/>
<link href="https://home-assistant.io/"/>
<updated>2016-07-19T13:52:21+00:00</updated>
<updated>2016-07-19T19:43:12+00:00</updated>
<id>https://home-assistant.io/</id>
<author>
<name><![CDATA[Paulus Schoutsen]]></name>

View file

@ -294,6 +294,12 @@
<ul class="divided">
<li class="post">
<a href="/blog/2016/07/19/exporting-processing-data/">Exporting Home Assistant information</a>
</li>
<li class="post">
<a href="/blog/2016/07/16/sqlalchemy-knx-join-simplisafe/">0.24: SQLAlchemy, KNX, Join by Joaoapps, and SimpliSafe.</a>
</li>
@ -317,12 +323,6 @@
</li>
<li class="post">
<a href="/blog/2016/06/18/pandora-bt-home-hub-5-and-local-file-camera/">0.22: Pandora, BT Home Hub 5 and local file camera.</a>
</li>
</ul>
</section>

View file

@ -4,7 +4,7 @@
<title><![CDATA[Category: MQTT | Home Assistant]]></title>
<link href="https://home-assistant.io/blog/categories/mqtt/atom.xml" rel="self"/>
<link href="https://home-assistant.io/"/>
<updated>2016-07-19T13:52:21+00:00</updated>
<updated>2016-07-19T19:43:12+00:00</updated>
<id>https://home-assistant.io/</id>
<author>
<name><![CDATA[Paulus Schoutsen]]></name>

View file

@ -270,6 +270,12 @@
<ul class="divided">
<li class="post">
<a href="/blog/2016/07/19/exporting-processing-data/">Exporting Home Assistant information</a>
</li>
<li class="post">
<a href="/blog/2016/07/16/sqlalchemy-knx-join-simplisafe/">0.24: SQLAlchemy, KNX, Join by Joaoapps, and SimpliSafe.</a>
</li>
@ -293,12 +299,6 @@
</li>
<li class="post">
<a href="/blog/2016/06/18/pandora-bt-home-hub-5-and-local-file-camera/">0.22: Pandora, BT Home Hub 5 and local file camera.</a>
</li>
</ul>
</section>

View file

@ -4,7 +4,7 @@
<title><![CDATA[Category: Organisation | Home Assistant]]></title>
<link href="https://home-assistant.io/blog/categories/organisation/atom.xml" rel="self"/>
<link href="https://home-assistant.io/"/>
<updated>2016-07-19T13:52:21+00:00</updated>
<updated>2016-07-19T19:43:12+00:00</updated>
<id>https://home-assistant.io/</id>
<author>
<name><![CDATA[Paulus Schoutsen]]></name>

View file

@ -230,6 +230,12 @@
<ul class="divided">
<li class="post">
<a href="/blog/2016/07/19/exporting-processing-data/">Exporting Home Assistant information</a>
</li>
<li class="post">
<a href="/blog/2016/07/16/sqlalchemy-knx-join-simplisafe/">0.24: SQLAlchemy, KNX, Join by Joaoapps, and SimpliSafe.</a>
</li>
@ -253,12 +259,6 @@
</li>
<li class="post">
<a href="/blog/2016/06/18/pandora-bt-home-hub-5-and-local-file-camera/">0.22: Pandora, BT Home Hub 5 and local file camera.</a>
</li>
</ul>
</section>

View file

@ -4,7 +4,7 @@
<title><![CDATA[Category: OwnTracks | Home Assistant]]></title>
<link href="https://home-assistant.io/blog/categories/owntracks/atom.xml" rel="self"/>
<link href="https://home-assistant.io/"/>
<updated>2016-07-19T13:52:21+00:00</updated>
<updated>2016-07-19T19:43:12+00:00</updated>
<id>https://home-assistant.io/</id>
<author>
<name><![CDATA[Paulus Schoutsen]]></name>

View file

@ -235,6 +235,12 @@
<ul class="divided">
<li class="post">
<a href="/blog/2016/07/19/exporting-processing-data/">Exporting Home Assistant information</a>
</li>
<li class="post">
<a href="/blog/2016/07/16/sqlalchemy-knx-join-simplisafe/">0.24: SQLAlchemy, KNX, Join by Joaoapps, and SimpliSafe.</a>
</li>
@ -258,12 +264,6 @@
</li>
<li class="post">
<a href="/blog/2016/06/18/pandora-bt-home-hub-5-and-local-file-camera/">0.22: Pandora, BT Home Hub 5 and local file camera.</a>
</li>
</ul>
</section>

View file

@ -4,7 +4,7 @@
<title><![CDATA[Category: Presence-Detection | Home Assistant]]></title>
<link href="https://home-assistant.io/blog/categories/presence-detection/atom.xml" rel="self"/>
<link href="https://home-assistant.io/"/>
<updated>2016-07-19T13:52:21+00:00</updated>
<updated>2016-07-19T19:43:12+00:00</updated>
<id>https://home-assistant.io/</id>
<author>
<name><![CDATA[Paulus Schoutsen]]></name>

View file

@ -199,6 +199,12 @@
<ul class="divided">
<li class="post">
<a href="/blog/2016/07/19/exporting-processing-data/">Exporting Home Assistant information</a>
</li>
<li class="post">
<a href="/blog/2016/07/16/sqlalchemy-knx-join-simplisafe/">0.24: SQLAlchemy, KNX, Join by Joaoapps, and SimpliSafe.</a>
</li>
@ -222,12 +228,6 @@
</li>
<li class="post">
<a href="/blog/2016/06/18/pandora-bt-home-hub-5-and-local-file-camera/">0.22: Pandora, BT Home Hub 5 and local file camera.</a>
</li>
</ul>
</section>

View file

@ -4,7 +4,7 @@
<title><![CDATA[Category: Public-Service-Announcement | Home Assistant]]></title>
<link href="https://home-assistant.io/blog/categories/public-service-announcement/atom.xml" rel="self"/>
<link href="https://home-assistant.io/"/>
<updated>2016-07-19T13:52:21+00:00</updated>
<updated>2016-07-19T19:43:12+00:00</updated>
<id>https://home-assistant.io/</id>
<author>
<name><![CDATA[Paulus Schoutsen]]></name>

View file

@ -195,6 +195,12 @@
<ul class="divided">
<li class="post">
<a href="/blog/2016/07/19/exporting-processing-data/">Exporting Home Assistant information</a>
</li>
<li class="post">
<a href="/blog/2016/07/16/sqlalchemy-knx-join-simplisafe/">0.24: SQLAlchemy, KNX, Join by Joaoapps, and SimpliSafe.</a>
</li>
@ -218,12 +224,6 @@
</li>
<li class="post">
<a href="/blog/2016/06/18/pandora-bt-home-hub-5-and-local-file-camera/">0.22: Pandora, BT Home Hub 5 and local file camera.</a>
</li>
</ul>
</section>

View file

@ -4,7 +4,7 @@
<title><![CDATA[Category: Release-Notes | Home Assistant]]></title>
<link href="https://home-assistant.io/blog/categories/release-notes/atom.xml" rel="self"/>
<link href="https://home-assistant.io/"/>
<updated>2016-07-19T13:52:21+00:00</updated>
<updated>2016-07-19T19:43:12+00:00</updated>
<id>https://home-assistant.io/</id>
<author>
<name><![CDATA[Paulus Schoutsen]]></name>

View file

@ -1416,6 +1416,12 @@
<ul class="divided">
<li class="post">
<a href="/blog/2016/07/19/exporting-processing-data/">Exporting Home Assistant information</a>
</li>
<li class="post">
<a href="/blog/2016/07/16/sqlalchemy-knx-join-simplisafe/">0.24: SQLAlchemy, KNX, Join by Joaoapps, and SimpliSafe.</a>
</li>
@ -1439,12 +1445,6 @@
</li>
<li class="post">
<a href="/blog/2016/06/18/pandora-bt-home-hub-5-and-local-file-camera/">0.22: Pandora, BT Home Hub 5 and local file camera.</a>
</li>
</ul>
</section>

View file

@ -4,7 +4,7 @@
<title><![CDATA[Category: Survey | Home Assistant]]></title>
<link href="https://home-assistant.io/blog/categories/survey/atom.xml" rel="self"/>
<link href="https://home-assistant.io/"/>
<updated>2016-07-19T13:52:21+00:00</updated>
<updated>2016-07-19T19:43:12+00:00</updated>
<id>https://home-assistant.io/</id>
<author>
<name><![CDATA[Paulus Schoutsen]]></name>

View file

@ -195,6 +195,12 @@
<ul class="divided">
<li class="post">
<a href="/blog/2016/07/19/exporting-processing-data/">Exporting Home Assistant information</a>
</li>
<li class="post">
<a href="/blog/2016/07/16/sqlalchemy-knx-join-simplisafe/">0.24: SQLAlchemy, KNX, Join by Joaoapps, and SimpliSafe.</a>
</li>
@ -218,12 +224,6 @@
</li>
<li class="post">
<a href="/blog/2016/06/18/pandora-bt-home-hub-5-and-local-file-camera/">0.22: Pandora, BT Home Hub 5 and local file camera.</a>
</li>
</ul>
</section>

Some files were not shown because too many files have changed in this diff Show more