Site updated at 2017-07-27 06:58:01 UTC

This commit is contained in:
Travis CI 2017-07-27 06:58:01 +00:00
parent 888526dbf5
commit c860a27f33
202 changed files with 1531 additions and 1286 deletions

View file

@ -67,6 +67,81 @@
<div class="grid-wrapper">
<div class="grid grid-center">
<div class="grid__item two-thirds lap-one-whole palm-one-whole">
<article class="listing">
<header>
<h1 class="beta">
<a href="/blog/2017/04/25/influxdb-grafana-docker/">Setting up InfluxDB and Grafana using Docker</a>
</h1>
<div class="meta clearfix">
<time datetime="2017-04-25T08:04:05+00:00" pubdate data-updated="true"><i class="icon-calendar"></i> April 25, 2017</time>
<span class="byline author vcard"><i class='icon-user'></i> Alok Saboo</span>
<span><i class='icon-time'></i> two minutes reading time</span>
<span>
<i class="icon-tags"></i>
<ul class="tags unstyled">
<li>How-To</li>
</ul>
</span>
<a class='comments'
href="/blog/2017/04/25/influxdb-grafana-docker/#disqus_thread"
>Comments</a>
</div>
</header>
<div class="entry-content clearfix">
<p>Home Assistant collects volumes of (time series) data that are well suited for some fancy graphs. Although the <a href="https://home-assistant.io/components/history/">History</a> component provides some nice plots, I am sure you have always wanted those fancy <a href="https://grafana.com/">Grafana</a> plots. The problem, however, is that low-powered device such as Raspberry Pi that most of us use for our Home Assistant setup are not well suited for such operation.</p>
<p>Instead of running <a href="https://www.influxdata.com/">InfluxDB</a> and Grafana on a Raspberry Pi or a different system and go through the <a href="/blog/2015/12/07/influxdb-and-grafana/">classic approach of installing both tools separately</a>, you can run them in a Docker container on another machine. For this tutorial, I am using a Synology NAS, but the instructions should apply to other devices that can run Docker. Just follow the steps below:</p>
<ol>
<li>SSH into your NAS. You may have to run <code class="highlighter-rouge">sudo su</code> if you are getting permission errors.</li>
<li>Download the <a href="https://hub.docker.com/r/samuelebistoletti/docker-statsd-influxdb-grafana/">docker-statsd-influxdb-grafana</a> image using the command:
<code class="highlighter-rouge">docker pull samuelebistoletti/docker-statsd-influxdb-grafana</code></li>
<li>To start the container for the first-time launch:
<div class="highlighter-rouge"><pre class="highlight"><code>docker run -d \
--name docker-statsd-influxdb-grafana \
-p 3003:3003 \
-p 3004:8083 \
-p 8086:8086 \
-p 22022:22 \
-p 8125:8125/udp \
samuelebistoletti/docker-statsd-influxdb-grafana:latest
</code></pre>
</div>
</li>
<li>The image should now be running and both InfluxBD and Grafana should be now up and running.</li>
<li>You can access InfluxDB at http://NAS_IP_ADDRESS:3004/ and Grafana at http://NAS_IP_ADDRESS:3003/</li>
<li>Navigate to http://NAS_IP_ADDRESS:3004/ and create the database <code class="highlighter-rouge">home_assistant</code> using the command <code class="highlighter-rouge">CREATE DATABASE home_assistant</code>.
<p class="img">
<img src="/images/blog/2017-04-influxdb-grafana/create_HA_database.png" />
</p>
</li>
<li>Now, you need to configure Home Assistant to use InfluxDB. Since, we did not add any username/password to our database, we can simply add the following to our configuration.yaml (replace the IP address with that of the device running Docker) and restart Home Assistant to setup InfluxDB (you will have to fine tune it based on your preferences):
<div class="highlighter-rouge"><pre class="highlight"><code>influxdb:
host: 192.168.2.113
</code></pre>
</div>
</li>
<li>Next, we need to configure Grafana to use InfluxDB. Navigate to http://NAS_IP_ADDRESS:3003/ to access Grafana (login with username and password <code class="highlighter-rouge">root</code>) and add your first data source. Heres how you can configure Grafana to use InfluxDB database. Note that 192.168.2.113 is the IP address of my NAS.
<p class="img">
<img src="/images/blog/2017-04-influxdb-grafana/add_data_source.png" />
</p>
</li>
<li>You should see <code class="highlighter-rouge">Data source is working</code> if you have configured everything correctly.</li>
<li>With all that configured, you are now ready for the fun stuff. You can create as many dashboards as you want and then import the same in Home Assistant.</li>
<li>To add the Grafana dashboard in HA, use the following config:
<div class="highlighter-rouge"><pre class="highlight"><code>panel_iframe:
router:
title: 'Temperature'
url: 'http://192.168.2.113:3003/dashboard/db/temperature?edit&amp;tab=time%20range'
</code></pre>
</div>
<p>The URL can be obtained by clicking Share Dashboard link on your dashboard:</p>
<p class="img">
<img src="/images/blog/2017-04-influxdb-grafana/share_dashboard.png" />
</p>
</li>
</ol>
</div>
</article>
<hr>
<article class="listing">
<header>
<h1 class="beta">
@ -409,41 +484,6 @@ After automatic discovery, Home Assistant will ask the user to finish pairing wi
<div class="videoWrapper">
<iframe width="560" height="315" src="https://www.youtube.com/embed/osq_2-Qlan0" frameborder="0" allowfullscreen=""></iframe>
</div>
</div>
</article>
<hr>
<article class="listing">
<header>
<h1 class="beta">
<a href="/blog/2017/03/22/broken-dependencies/">0.40.2 and broken dependencies</a>
</h1>
<div class="meta clearfix">
<time datetime="2017-03-22T08:04:05+00:00" pubdate data-updated="true"><i class="icon-calendar"></i> March 22, 2017</time>
<span class="byline author vcard"><i class='icon-user'></i> Paulus Schoutsen</span>
<span><i class='icon-time'></i> Less than one minute reading time</span>
<span>
<i class="icon-tags"></i>
<ul class="tags unstyled">
<li>Release-Notes</li>
</ul>
</span>
<a class='comments'
href="/blog/2017/03/22/broken-dependencies/#disqus_thread"
>Comments</a>
</div>
</header>
<div class="entry-content clearfix">
<p>TL; DR: We have just released version 0.40.2 that includes a fix related to the installation of dependencies.</p>
<p>Some users in the last few days have been reporting that their Home Assistant installation fails to start with an error in the http component:</p>
<div class="highlighter-rouge"><pre class="highlight"><code>ImportError: No module named 'aiohttp.file_sender'
</code></pre>
</div>
<p>The problem is that Home Assistant did not handle the case where a dependency would want to install a core dependency of Home Assistant that is newer than what Home Assistant works with. For now, we have identified the following two components that can cause this issue:</p>
<ul>
<li>AppleTV (0.38+)</li>
<li>Android IP Webcam (0.40+)</li>
</ul>
<p>This issue has been resolved by 0.40.2. If you are on an impacted version and cannot upgrade to the latest version just yet, a temporary workaround will be to remove the <code class="highlighter-rouge">&lt;config dir&gt;/deps</code> directory and stop using the above mentioned integrations. In the case of AppleTV, you will also have to disable the discovery component to prevent it from being auto-detected.</p>
</div>
</article>
<hr>