Site updated at 2016-08-31 05:05:07 UTC

This commit is contained in:
Travis CI 2016-08-31 05:05:07 +00:00
parent e9165c0f8b
commit 1fb5b5b9ea
136 changed files with 2212 additions and 1236 deletions

View file

@ -169,6 +169,12 @@
<ul class="divided">
<li class="post">
<a href="/blog/2016/08/31/esp8266-and-micropython-part2/">ESP8266 and MicroPython - Part 2</a>
</li>
<li class="post">
<a href="/blog/2016/08/28/notifications-hue-fake-unification/">0.27 is here to break eggs and take names: notifications, Hue fakery, safety and unification come to Home Assistant</a>
</li>
@ -192,12 +198,6 @@
</li>
<li class="post">
<a href="/blog/2016/08/07/optimizing-the-home-assistant-mobile-web-app/">Optimizing the Home Assistant mobile web app</a>
</li>
</ul>
</section>

View file

@ -224,6 +224,12 @@ This article will try to explain how they all relate.</p>
<ul class="divided">
<li class="post">
<a href="/blog/2016/08/31/esp8266-and-micropython-part2/">ESP8266 and MicroPython - Part 2</a>
</li>
<li class="post">
<a href="/blog/2016/08/28/notifications-hue-fake-unification/">0.27 is here to break eggs and take names: notifications, Hue fakery, safety and unification come to Home Assistant</a>
</li>
@ -247,12 +253,6 @@ This article will try to explain how they all relate.</p>
</li>
<li class="post">
<a href="/blog/2016/08/07/optimizing-the-home-assistant-mobile-web-app/">Optimizing the Home Assistant mobile web app</a>
</li>
</ul>
</section>

View file

@ -204,6 +204,12 @@
<ul class="divided">
<li class="post">
<a href="/blog/2016/08/31/esp8266-and-micropython-part2/">ESP8266 and MicroPython - Part 2</a>
</li>
<li class="post">
<a href="/blog/2016/08/28/notifications-hue-fake-unification/">0.27 is here to break eggs and take names: notifications, Hue fakery, safety and unification come to Home Assistant</a>
</li>
@ -227,12 +233,6 @@
</li>
<li class="post">
<a href="/blog/2016/08/07/optimizing-the-home-assistant-mobile-web-app/">Optimizing the Home Assistant mobile web app</a>
</li>
</ul>
</section>

View file

@ -181,6 +181,12 @@
<ul class="divided">
<li class="post">
<a href="/blog/2016/08/31/esp8266-and-micropython-part2/">ESP8266 and MicroPython - Part 2</a>
</li>
<li class="post">
<a href="/blog/2016/08/28/notifications-hue-fake-unification/">0.27 is here to break eggs and take names: notifications, Hue fakery, safety and unification come to Home Assistant</a>
</li>
@ -204,12 +210,6 @@
</li>
<li class="post">
<a href="/blog/2016/08/07/optimizing-the-home-assistant-mobile-web-app/">Optimizing the Home Assistant mobile web app</a>
</li>
</ul>
</section>

View file

@ -184,6 +184,12 @@
<ul class="divided">
<li class="post">
<a href="/blog/2016/08/31/esp8266-and-micropython-part2/">ESP8266 and MicroPython - Part 2</a>
</li>
<li class="post">
<a href="/blog/2016/08/28/notifications-hue-fake-unification/">0.27 is here to break eggs and take names: notifications, Hue fakery, safety and unification come to Home Assistant</a>
</li>
@ -207,12 +213,6 @@
</li>
<li class="post">
<a href="/blog/2016/08/07/optimizing-the-home-assistant-mobile-web-app/">Optimizing the Home Assistant mobile web app</a>
</li>
</ul>
</section>

View file

@ -192,6 +192,12 @@ Home Assistant now supports <code class="highlighter-rouge">--open-ui</code> and
<ul class="divided">
<li class="post">
<a href="/blog/2016/08/31/esp8266-and-micropython-part2/">ESP8266 and MicroPython - Part 2</a>
</li>
<li class="post">
<a href="/blog/2016/08/28/notifications-hue-fake-unification/">0.27 is here to break eggs and take names: notifications, Hue fakery, safety and unification come to Home Assistant</a>
</li>
@ -215,12 +221,6 @@ Home Assistant now supports <code class="highlighter-rouge">--open-ui</code> and
</li>
<li class="post">
<a href="/blog/2016/08/07/optimizing-the-home-assistant-mobile-web-app/">Optimizing the Home Assistant mobile web app</a>
</li>
</ul>
</section>

View file

@ -200,6 +200,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/08/31/esp8266-and-micropython-part2/">ESP8266 and MicroPython - Part 2</a>
</li>
<li class="post">
<a href="/blog/2016/08/28/notifications-hue-fake-unification/">0.27 is here to break eggs and take names: notifications, Hue fakery, safety and unification come to Home Assistant</a>
</li>
@ -223,12 +229,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/08/07/optimizing-the-home-assistant-mobile-web-app/">Optimizing the Home Assistant mobile web app</a>
</li>
</ul>
</section>

View file

@ -185,6 +185,12 @@
<ul class="divided">
<li class="post">
<a href="/blog/2016/08/31/esp8266-and-micropython-part2/">ESP8266 and MicroPython - Part 2</a>
</li>
<li class="post">
<a href="/blog/2016/08/28/notifications-hue-fake-unification/">0.27 is here to break eggs and take names: notifications, Hue fakery, safety and unification come to Home Assistant</a>
</li>
@ -208,12 +214,6 @@
</li>
<li class="post">
<a href="/blog/2016/08/07/optimizing-the-home-assistant-mobile-web-app/">Optimizing the Home Assistant mobile web app</a>
</li>
</ul>
</section>

View file

@ -175,6 +175,12 @@
<ul class="divided">
<li class="post">
<a href="/blog/2016/08/31/esp8266-and-micropython-part2/">ESP8266 and MicroPython - Part 2</a>
</li>
<li class="post">
<a href="/blog/2016/08/28/notifications-hue-fake-unification/">0.27 is here to break eggs and take names: notifications, Hue fakery, safety and unification come to Home Assistant</a>
</li>
@ -198,12 +204,6 @@
</li>
<li class="post">
<a href="/blog/2016/08/07/optimizing-the-home-assistant-mobile-web-app/">Optimizing the Home Assistant mobile web app</a>
</li>
</ul>
</section>

View file

@ -176,6 +176,12 @@ The old logo, the new detailed logo and the new simple logo.
<ul class="divided">
<li class="post">
<a href="/blog/2016/08/31/esp8266-and-micropython-part2/">ESP8266 and MicroPython - Part 2</a>
</li>
<li class="post">
<a href="/blog/2016/08/28/notifications-hue-fake-unification/">0.27 is here to break eggs and take names: notifications, Hue fakery, safety and unification come to Home Assistant</a>
</li>
@ -199,12 +205,6 @@ The old logo, the new detailed logo and the new simple logo.
</li>
<li class="post">
<a href="/blog/2016/08/07/optimizing-the-home-assistant-mobile-web-app/">Optimizing the Home Assistant mobile web app</a>
</li>
</ul>
</section>

View file

@ -209,6 +209,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/08/31/esp8266-and-micropython-part2/">ESP8266 and MicroPython - Part 2</a>
</li>
<li class="post">
<a href="/blog/2016/08/28/notifications-hue-fake-unification/">0.27 is here to break eggs and take names: notifications, Hue fakery, safety and unification come to Home Assistant</a>
</li>
@ -232,12 +238,6 @@ An initial version of voice control for Home Assistant has landed. The current i
</li>
<li class="post">
<a href="/blog/2016/08/07/optimizing-the-home-assistant-mobile-web-app/">Optimizing the Home Assistant mobile web app</a>
</li>
</ul>
</section>

View file

@ -244,6 +244,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/08/31/esp8266-and-micropython-part2/">ESP8266 and MicroPython - Part 2</a>
</li>
<li class="post">
<a href="/blog/2016/08/28/notifications-hue-fake-unification/">0.27 is here to break eggs and take names: notifications, Hue fakery, safety and unification come to Home Assistant</a>
</li>
@ -267,12 +273,6 @@ I (Paulus) have contributed a scene component. A user can create scenes that cap
</li>
<li class="post">
<a href="/blog/2016/08/07/optimizing-the-home-assistant-mobile-web-app/">Optimizing the Home Assistant mobile web app</a>
</li>
</ul>
</section>

View file

@ -255,6 +255,12 @@
<ul class="divided">
<li class="post">
<a href="/blog/2016/08/31/esp8266-and-micropython-part2/">ESP8266 and MicroPython - Part 2</a>
</li>
<li class="post">
<a href="/blog/2016/08/28/notifications-hue-fake-unification/">0.27 is here to break eggs and take names: notifications, Hue fakery, safety and unification come to Home Assistant</a>
</li>
@ -278,12 +284,6 @@
</li>
<li class="post">
<a href="/blog/2016/08/07/optimizing-the-home-assistant-mobile-web-app/">Optimizing the Home Assistant mobile web app</a>
</li>
</ul>
</section>

View file

@ -196,6 +196,12 @@
<ul class="divided">
<li class="post">
<a href="/blog/2016/08/31/esp8266-and-micropython-part2/">ESP8266 and MicroPython - Part 2</a>
</li>
<li class="post">
<a href="/blog/2016/08/28/notifications-hue-fake-unification/">0.27 is here to break eggs and take names: notifications, Hue fakery, safety and unification come to Home Assistant</a>
</li>
@ -219,12 +225,6 @@
</li>
<li class="post">
<a href="/blog/2016/08/07/optimizing-the-home-assistant-mobile-web-app/">Optimizing the Home Assistant mobile web app</a>
</li>
</ul>
</section>

View file

@ -276,6 +276,12 @@ Before diving into the newly supported devices and services, I want to highlight
<ul class="divided">
<li class="post">
<a href="/blog/2016/08/31/esp8266-and-micropython-part2/">ESP8266 and MicroPython - Part 2</a>
</li>
<li class="post">
<a href="/blog/2016/08/28/notifications-hue-fake-unification/">0.27 is here to break eggs and take names: notifications, Hue fakery, safety and unification come to Home Assistant</a>
</li>
@ -299,12 +305,6 @@ Before diving into the newly supported devices and services, I want to highlight
</li>
<li class="post">
<a href="/blog/2016/08/07/optimizing-the-home-assistant-mobile-web-app/">Optimizing the Home Assistant mobile web app</a>
</li>
</ul>
</section>

View file

@ -327,6 +327,12 @@ This switch platform allows you to control your motion detection setting on your
<ul class="divided">
<li class="post">
<a href="/blog/2016/08/31/esp8266-and-micropython-part2/">ESP8266 and MicroPython - Part 2</a>
</li>
<li class="post">
<a href="/blog/2016/08/28/notifications-hue-fake-unification/">0.27 is here to break eggs and take names: notifications, Hue fakery, safety and unification come to Home Assistant</a>
</li>
@ -350,12 +356,6 @@ This switch platform allows you to control your motion detection setting on your
</li>
<li class="post">
<a href="/blog/2016/08/07/optimizing-the-home-assistant-mobile-web-app/">Optimizing the Home Assistant mobile web app</a>
</li>
</ul>
</section>

View file

@ -283,6 +283,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/08/31/esp8266-and-micropython-part2/">ESP8266 and MicroPython - Part 2</a>
</li>
<li class="post">
<a href="/blog/2016/08/28/notifications-hue-fake-unification/">0.27 is here to break eggs and take names: notifications, Hue fakery, safety and unification come to Home Assistant</a>
</li>
@ -306,12 +312,6 @@ Fabian has added support for <a href="https://forecast.io/">Forecast.io</a> to g
</li>
<li class="post">
<a href="/blog/2016/08/07/optimizing-the-home-assistant-mobile-web-app/">Optimizing the Home Assistant mobile web app</a>
</li>
</ul>
</section>

View file

@ -268,6 +268,12 @@ Support for Temper temperature sensors has been contributed by <a href="https://
<ul class="divided">
<li class="post">
<a href="/blog/2016/08/31/esp8266-and-micropython-part2/">ESP8266 and MicroPython - Part 2</a>
</li>
<li class="post">
<a href="/blog/2016/08/28/notifications-hue-fake-unification/">0.27 is here to break eggs and take names: notifications, Hue fakery, safety and unification come to Home Assistant</a>
</li>
@ -291,12 +297,6 @@ Support for Temper temperature sensors has been contributed by <a href="https://
</li>
<li class="post">
<a href="/blog/2016/08/07/optimizing-the-home-assistant-mobile-web-app/">Optimizing the Home Assistant mobile web app</a>
</li>
</ul>
</section>

View file

@ -192,6 +192,12 @@
<ul class="divided">
<li class="post">
<a href="/blog/2016/08/31/esp8266-and-micropython-part2/">ESP8266 and MicroPython - Part 2</a>
</li>
<li class="post">
<a href="/blog/2016/08/28/notifications-hue-fake-unification/">0.27 is here to break eggs and take names: notifications, Hue fakery, safety and unification come to Home Assistant</a>
</li>
@ -215,12 +221,6 @@
</li>
<li class="post">
<a href="/blog/2016/08/07/optimizing-the-home-assistant-mobile-web-app/">Optimizing the Home Assistant mobile web app</a>
</li>
</ul>
</section>

View file

@ -305,6 +305,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/08/31/esp8266-and-micropython-part2/">ESP8266 and MicroPython - Part 2</a>
</li>
<li class="post">
<a href="/blog/2016/08/28/notifications-hue-fake-unification/">0.27 is here to break eggs and take names: notifications, Hue fakery, safety and unification come to Home Assistant</a>
</li>
@ -328,12 +334,6 @@ The automation and script syntax here is using a deprecated and no longer suppor
</li>
<li class="post">
<a href="/blog/2016/08/07/optimizing-the-home-assistant-mobile-web-app/">Optimizing the Home Assistant mobile web app</a>
</li>
</ul>
</section>

View file

@ -269,6 +269,12 @@
<ul class="divided">
<li class="post">
<a href="/blog/2016/08/31/esp8266-and-micropython-part2/">ESP8266 and MicroPython - Part 2</a>
</li>
<li class="post">
<a href="/blog/2016/08/28/notifications-hue-fake-unification/">0.27 is here to break eggs and take names: notifications, Hue fakery, safety and unification come to Home Assistant</a>
</li>
@ -292,12 +298,6 @@
</li>
<li class="post">
<a href="/blog/2016/08/07/optimizing-the-home-assistant-mobile-web-app/">Optimizing the Home Assistant mobile web app</a>
</li>
</ul>
</section>

View file

@ -360,6 +360,12 @@
<ul class="divided">
<li class="post">
<a href="/blog/2016/08/31/esp8266-and-micropython-part2/">ESP8266 and MicroPython - Part 2</a>
</li>
<li class="post">
<a href="/blog/2016/08/28/notifications-hue-fake-unification/">0.27 is here to break eggs and take names: notifications, Hue fakery, safety and unification come to Home Assistant</a>
</li>
@ -383,12 +389,6 @@
</li>
<li class="post">
<a href="/blog/2016/08/07/optimizing-the-home-assistant-mobile-web-app/">Optimizing the Home Assistant mobile web app</a>
</li>
</ul>
</section>

View file

@ -341,6 +341,12 @@
<ul class="divided">
<li class="post">
<a href="/blog/2016/08/31/esp8266-and-micropython-part2/">ESP8266 and MicroPython - Part 2</a>
</li>
<li class="post">
<a href="/blog/2016/08/28/notifications-hue-fake-unification/">0.27 is here to break eggs and take names: notifications, Hue fakery, safety and unification come to Home Assistant</a>
</li>
@ -364,12 +370,6 @@
</li>
<li class="post">
<a href="/blog/2016/08/07/optimizing-the-home-assistant-mobile-web-app/">Optimizing the Home Assistant mobile web app</a>
</li>
</ul>
</section>

View file

@ -234,6 +234,12 @@ Glances web server started on http://0.0.0.0:61208/
<ul class="divided">
<li class="post">
<a href="/blog/2016/08/31/esp8266-and-micropython-part2/">ESP8266 and MicroPython - Part 2</a>
</li>
<li class="post">
<a href="/blog/2016/08/28/notifications-hue-fake-unification/">0.27 is here to break eggs and take names: notifications, Hue fakery, safety and unification come to Home Assistant</a>
</li>
@ -257,12 +263,6 @@ Glances web server started on http://0.0.0.0:61208/
</li>
<li class="post">
<a href="/blog/2016/08/07/optimizing-the-home-assistant-mobile-web-app/">Optimizing the Home Assistant mobile web app</a>
</li>
</ul>
</section>

View file

@ -219,6 +219,12 @@ Automation has gotten a lot of love. It now supports conditions, multiple trigge
<ul class="divided">
<li class="post">
<a href="/blog/2016/08/31/esp8266-and-micropython-part2/">ESP8266 and MicroPython - Part 2</a>
</li>
<li class="post">
<a href="/blog/2016/08/28/notifications-hue-fake-unification/">0.27 is here to break eggs and take names: notifications, Hue fakery, safety and unification come to Home Assistant</a>
</li>
@ -242,12 +248,6 @@ Automation has gotten a lot of love. It now supports conditions, multiple trigge
</li>
<li class="post">
<a href="/blog/2016/08/07/optimizing-the-home-assistant-mobile-web-app/">Optimizing the Home Assistant mobile web app</a>
</li>
</ul>
</section>

View file

@ -199,6 +199,12 @@ Map in Home Assistant showing two people and three zones (home, school, work)
<ul class="divided">
<li class="post">
<a href="/blog/2016/08/31/esp8266-and-micropython-part2/">ESP8266 and MicroPython - Part 2</a>
</li>
<li class="post">
<a href="/blog/2016/08/28/notifications-hue-fake-unification/">0.27 is here to break eggs and take names: notifications, Hue fakery, safety and unification come to Home Assistant</a>
</li>
@ -222,12 +228,6 @@ Map in Home Assistant showing two people and three zones (home, school, work)
</li>
<li class="post">
<a href="/blog/2016/08/07/optimizing-the-home-assistant-mobile-web-app/">Optimizing the Home Assistant mobile web app</a>
</li>
</ul>
</section>

View file

@ -408,6 +408,12 @@ Home Assistant will keep track of historical values and allow you to integrate i
<ul class="divided">
<li class="post">
<a href="/blog/2016/08/31/esp8266-and-micropython-part2/">ESP8266 and MicroPython - Part 2</a>
</li>
<li class="post">
<a href="/blog/2016/08/28/notifications-hue-fake-unification/">0.27 is here to break eggs and take names: notifications, Hue fakery, safety and unification come to Home Assistant</a>
</li>
@ -431,12 +437,6 @@ Home Assistant will keep track of historical values and allow you to integrate i
</li>
<li class="post">
<a href="/blog/2016/08/07/optimizing-the-home-assistant-mobile-web-app/">Optimizing the Home Assistant mobile web app</a>
</li>
</ul>
</section>

View file

@ -188,6 +188,12 @@
<ul class="divided">
<li class="post">
<a href="/blog/2016/08/31/esp8266-and-micropython-part2/">ESP8266 and MicroPython - Part 2</a>
</li>
<li class="post">
<a href="/blog/2016/08/28/notifications-hue-fake-unification/">0.27 is here to break eggs and take names: notifications, Hue fakery, safety and unification come to Home Assistant</a>
</li>
@ -211,12 +217,6 @@
</li>
<li class="post">
<a href="/blog/2016/08/07/optimizing-the-home-assistant-mobile-web-app/">Optimizing the Home Assistant mobile web app</a>
</li>
</ul>
</section>

View file

@ -210,6 +210,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/08/31/esp8266-and-micropython-part2/">ESP8266 and MicroPython - Part 2</a>
</li>
<li class="post">
<a href="/blog/2016/08/28/notifications-hue-fake-unification/">0.27 is here to break eggs and take names: notifications, Hue fakery, safety and unification come to Home Assistant</a>
</li>
@ -233,12 +239,6 @@ This makes more sense as most people run Home Assistant as a daemon</p>
</li>
<li class="post">
<a href="/blog/2016/08/07/optimizing-the-home-assistant-mobile-web-app/">Optimizing the Home Assistant mobile web app</a>
</li>
</ul>
</section>

View file

@ -204,6 +204,12 @@
<ul class="divided">
<li class="post">
<a href="/blog/2016/08/31/esp8266-and-micropython-part2/">ESP8266 and MicroPython - Part 2</a>
</li>
<li class="post">
<a href="/blog/2016/08/28/notifications-hue-fake-unification/">0.27 is here to break eggs and take names: notifications, Hue fakery, safety and unification come to Home Assistant</a>
</li>
@ -227,12 +233,6 @@
</li>
<li class="post">
<a href="/blog/2016/08/07/optimizing-the-home-assistant-mobile-web-app/">Optimizing the Home Assistant mobile web app</a>
</li>
</ul>
</section>

View file

@ -246,6 +246,12 @@
<ul class="divided">
<li class="post">
<a href="/blog/2016/08/31/esp8266-and-micropython-part2/">ESP8266 and MicroPython - Part 2</a>
</li>
<li class="post">
<a href="/blog/2016/08/28/notifications-hue-fake-unification/">0.27 is here to break eggs and take names: notifications, Hue fakery, safety and unification come to Home Assistant</a>
</li>
@ -269,12 +275,6 @@
</li>
<li class="post">
<a href="/blog/2016/08/07/optimizing-the-home-assistant-mobile-web-app/">Optimizing the Home Assistant mobile web app</a>
</li>
</ul>
</section>

View file

@ -181,6 +181,12 @@
<ul class="divided">
<li class="post">
<a href="/blog/2016/08/31/esp8266-and-micropython-part2/">ESP8266 and MicroPython - Part 2</a>
</li>
<li class="post">
<a href="/blog/2016/08/28/notifications-hue-fake-unification/">0.27 is here to break eggs and take names: notifications, Hue fakery, safety and unification come to Home Assistant</a>
</li>
@ -204,12 +210,6 @@
</li>
<li class="post">
<a href="/blog/2016/08/07/optimizing-the-home-assistant-mobile-web-app/">Optimizing the Home Assistant mobile web app</a>
</li>
</ul>
</section>

View file

@ -188,6 +188,12 @@
<ul class="divided">
<li class="post">
<a href="/blog/2016/08/31/esp8266-and-micropython-part2/">ESP8266 and MicroPython - Part 2</a>
</li>
<li class="post">
<a href="/blog/2016/08/28/notifications-hue-fake-unification/">0.27 is here to break eggs and take names: notifications, Hue fakery, safety and unification come to Home Assistant</a>
</li>
@ -211,12 +217,6 @@
</li>
<li class="post">
<a href="/blog/2016/08/07/optimizing-the-home-assistant-mobile-web-app/">Optimizing the Home Assistant mobile web app</a>
</li>
</ul>
</section>

View file

@ -263,6 +263,12 @@ name: binary_sensor
<ul class="divided">
<li class="post">
<a href="/blog/2016/08/31/esp8266-and-micropython-part2/">ESP8266 and MicroPython - Part 2</a>
</li>
<li class="post">
<a href="/blog/2016/08/28/notifications-hue-fake-unification/">0.27 is here to break eggs and take names: notifications, Hue fakery, safety and unification come to Home Assistant</a>
</li>
@ -286,12 +292,6 @@ name: binary_sensor
</li>
<li class="post">
<a href="/blog/2016/08/07/optimizing-the-home-assistant-mobile-web-app/">Optimizing the Home Assistant mobile web app</a>
</li>
</ul>
</section>

View file

@ -225,6 +225,12 @@ This is where well configure our task, so select the plus icon to select an a
<ul class="divided">
<li class="post">
<a href="/blog/2016/08/31/esp8266-and-micropython-part2/">ESP8266 and MicroPython - Part 2</a>
</li>
<li class="post">
<a href="/blog/2016/08/28/notifications-hue-fake-unification/">0.27 is here to break eggs and take names: notifications, Hue fakery, safety and unification come to Home Assistant</a>
</li>
@ -248,12 +254,6 @@ This is where well configure our task, so select the plus icon to select an a
</li>
<li class="post">
<a href="/blog/2016/08/07/optimizing-the-home-assistant-mobile-web-app/">Optimizing the Home Assistant mobile web app</a>
</li>
</ul>
</section>

View file

@ -201,6 +201,12 @@ Philips Hue FAQ entries regarding 3rd party light bulbs.
<ul class="divided">
<li class="post">
<a href="/blog/2016/08/31/esp8266-and-micropython-part2/">ESP8266 and MicroPython - Part 2</a>
</li>
<li class="post">
<a href="/blog/2016/08/28/notifications-hue-fake-unification/">0.27 is here to break eggs and take names: notifications, Hue fakery, safety and unification come to Home Assistant</a>
</li>
@ -224,12 +230,6 @@ Philips Hue FAQ entries regarding 3rd party light bulbs.
</li>
<li class="post">
<a href="/blog/2016/08/07/optimizing-the-home-assistant-mobile-web-app/">Optimizing the Home Assistant mobile web app</a>
</li>
</ul>
</section>

View file

@ -260,6 +260,12 @@ sudo docker run -it --rm -p 80:80 --name certbot <span class="se">\</span>
<ul class="divided">
<li class="post">
<a href="/blog/2016/08/31/esp8266-and-micropython-part2/">ESP8266 and MicroPython - Part 2</a>
</li>
<li class="post">
<a href="/blog/2016/08/28/notifications-hue-fake-unification/">0.27 is here to break eggs and take names: notifications, Hue fakery, safety and unification come to Home Assistant</a>
</li>
@ -283,12 +289,6 @@ sudo docker run -it --rm -p 80:80 --name certbot <span class="se">\</span>
</li>
<li class="post">
<a href="/blog/2016/08/07/optimizing-the-home-assistant-mobile-web-app/">Optimizing the Home Assistant mobile web app</a>
</li>
</ul>
</section>

View file

@ -220,6 +220,12 @@
<ul class="divided">
<li class="post">
<a href="/blog/2016/08/31/esp8266-and-micropython-part2/">ESP8266 and MicroPython - Part 2</a>
</li>
<li class="post">
<a href="/blog/2016/08/28/notifications-hue-fake-unification/">0.27 is here to break eggs and take names: notifications, Hue fakery, safety and unification come to Home Assistant</a>
</li>
@ -243,12 +249,6 @@
</li>
<li class="post">
<a href="/blog/2016/08/07/optimizing-the-home-assistant-mobile-web-app/">Optimizing the Home Assistant mobile web app</a>
</li>
</ul>
</section>

View file

@ -202,6 +202,12 @@
<ul class="divided">
<li class="post">
<a href="/blog/2016/08/31/esp8266-and-micropython-part2/">ESP8266 and MicroPython - Part 2</a>
</li>
<li class="post">
<a href="/blog/2016/08/28/notifications-hue-fake-unification/">0.27 is here to break eggs and take names: notifications, Hue fakery, safety and unification come to Home Assistant</a>
</li>
@ -225,12 +231,6 @@
</li>
<li class="post">
<a href="/blog/2016/08/07/optimizing-the-home-assistant-mobile-web-app/">Optimizing the Home Assistant mobile web app</a>
</li>
</ul>
</section>

View file

@ -206,6 +206,12 @@
<ul class="divided">
<li class="post">
<a href="/blog/2016/08/31/esp8266-and-micropython-part2/">ESP8266 and MicroPython - Part 2</a>
</li>
<li class="post">
<a href="/blog/2016/08/28/notifications-hue-fake-unification/">0.27 is here to break eggs and take names: notifications, Hue fakery, safety and unification come to Home Assistant</a>
</li>
@ -229,12 +235,6 @@
</li>
<li class="post">
<a href="/blog/2016/08/07/optimizing-the-home-assistant-mobile-web-app/">Optimizing the Home Assistant mobile web app</a>
</li>
</ul>
</section>

View file

@ -208,6 +208,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/08/31/esp8266-and-micropython-part2/">ESP8266 and MicroPython - Part 2</a>
</li>
<li class="post">
<a href="/blog/2016/08/28/notifications-hue-fake-unification/">0.27 is here to break eggs and take names: notifications, Hue fakery, safety and unification come to Home Assistant</a>
</li>
@ -231,12 +237,6 @@ Example of the new views in the frontend. <a href="/components/group/">Learn mor
</li>
<li class="post">
<a href="/blog/2016/08/07/optimizing-the-home-assistant-mobile-web-app/">Optimizing the Home Assistant mobile web app</a>
</li>
</ul>
</section>

View file

@ -379,6 +379,12 @@ Z-Wave light bulb |
<ul class="divided">
<li class="post">
<a href="/blog/2016/08/31/esp8266-and-micropython-part2/">ESP8266 and MicroPython - Part 2</a>
</li>
<li class="post">
<a href="/blog/2016/08/28/notifications-hue-fake-unification/">0.27 is here to break eggs and take names: notifications, Hue fakery, safety and unification come to Home Assistant</a>
</li>
@ -402,12 +408,6 @@ Z-Wave light bulb |
</li>
<li class="post">
<a href="/blog/2016/08/07/optimizing-the-home-assistant-mobile-web-app/">Optimizing the Home Assistant mobile web app</a>
</li>
</ul>
</section>

View file

@ -345,6 +345,12 @@
<ul class="divided">
<li class="post">
<a href="/blog/2016/08/31/esp8266-and-micropython-part2/">ESP8266 and MicroPython - Part 2</a>
</li>
<li class="post">
<a href="/blog/2016/08/28/notifications-hue-fake-unification/">0.27 is here to break eggs and take names: notifications, Hue fakery, safety and unification come to Home Assistant</a>
</li>
@ -368,12 +374,6 @@
</li>
<li class="post">
<a href="/blog/2016/08/07/optimizing-the-home-assistant-mobile-web-app/">Optimizing the Home Assistant mobile web app</a>
</li>
</ul>
</section>

View file

@ -211,6 +211,12 @@
<ul class="divided">
<li class="post">
<a href="/blog/2016/08/31/esp8266-and-micropython-part2/">ESP8266 and MicroPython - Part 2</a>
</li>
<li class="post">
<a href="/blog/2016/08/28/notifications-hue-fake-unification/">0.27 is here to break eggs and take names: notifications, Hue fakery, safety and unification come to Home Assistant</a>
</li>
@ -234,12 +240,6 @@
</li>
<li class="post">
<a href="/blog/2016/08/07/optimizing-the-home-assistant-mobile-web-app/">Optimizing the Home Assistant mobile web app</a>
</li>
</ul>
</section>

View file

@ -295,6 +295,12 @@
<ul class="divided">
<li class="post">
<a href="/blog/2016/08/31/esp8266-and-micropython-part2/">ESP8266 and MicroPython - Part 2</a>
</li>
<li class="post">
<a href="/blog/2016/08/28/notifications-hue-fake-unification/">0.27 is here to break eggs and take names: notifications, Hue fakery, safety and unification come to Home Assistant</a>
</li>
@ -318,12 +324,6 @@
</li>
<li class="post">
<a href="/blog/2016/08/07/optimizing-the-home-assistant-mobile-web-app/">Optimizing the Home Assistant mobile web app</a>
</li>
</ul>
</section>

View file

@ -219,6 +219,12 @@ Hold your NFC tag against the belly of Garfield to unlock the alarm.
<ul class="divided">
<li class="post">
<a href="/blog/2016/08/31/esp8266-and-micropython-part2/">ESP8266 and MicroPython - Part 2</a>
</li>
<li class="post">
<a href="/blog/2016/08/28/notifications-hue-fake-unification/">0.27 is here to break eggs and take names: notifications, Hue fakery, safety and unification come to Home Assistant</a>
</li>
@ -242,12 +248,6 @@ Hold your NFC tag against the belly of Garfield to unlock the alarm.
</li>
<li class="post">
<a href="/blog/2016/08/07/optimizing-the-home-assistant-mobile-web-app/">Optimizing the Home Assistant mobile web app</a>
</li>
</ul>
</section>

View file

@ -210,6 +210,12 @@
<ul class="divided">
<li class="post">
<a href="/blog/2016/08/31/esp8266-and-micropython-part2/">ESP8266 and MicroPython - Part 2</a>
</li>
<li class="post">
<a href="/blog/2016/08/28/notifications-hue-fake-unification/">0.27 is here to break eggs and take names: notifications, Hue fakery, safety and unification come to Home Assistant</a>
</li>
@ -233,12 +239,6 @@
</li>
<li class="post">
<a href="/blog/2016/08/07/optimizing-the-home-assistant-mobile-web-app/">Optimizing the Home Assistant mobile web app</a>
</li>
</ul>
</section>

View file

@ -214,6 +214,12 @@ player state attributes. This change affects automations, scripts and scenes.</l
<ul class="divided">
<li class="post">
<a href="/blog/2016/08/31/esp8266-and-micropython-part2/">ESP8266 and MicroPython - Part 2</a>
</li>
<li class="post">
<a href="/blog/2016/08/28/notifications-hue-fake-unification/">0.27 is here to break eggs and take names: notifications, Hue fakery, safety and unification come to Home Assistant</a>
</li>
@ -237,12 +243,6 @@ player state attributes. This change affects automations, scripts and scenes.</l
</li>
<li class="post">
<a href="/blog/2016/08/07/optimizing-the-home-assistant-mobile-web-app/">Optimizing the Home Assistant mobile web app</a>
</li>
</ul>
</section>

View file

@ -223,6 +223,12 @@
<ul class="divided">
<li class="post">
<a href="/blog/2016/08/31/esp8266-and-micropython-part2/">ESP8266 and MicroPython - Part 2</a>
</li>
<li class="post">
<a href="/blog/2016/08/28/notifications-hue-fake-unification/">0.27 is here to break eggs and take names: notifications, Hue fakery, safety and unification come to Home Assistant</a>
</li>
@ -246,12 +252,6 @@
</li>
<li class="post">
<a href="/blog/2016/08/07/optimizing-the-home-assistant-mobile-web-app/">Optimizing the Home Assistant mobile web app</a>
</li>
</ul>
</section>

View file

@ -179,6 +179,12 @@
<ul class="divided">
<li class="post">
<a href="/blog/2016/08/31/esp8266-and-micropython-part2/">ESP8266 and MicroPython - Part 2</a>
</li>
<li class="post">
<a href="/blog/2016/08/28/notifications-hue-fake-unification/">0.27 is here to break eggs and take names: notifications, Hue fakery, safety and unification come to Home Assistant</a>
</li>
@ -202,12 +208,6 @@
</li>
<li class="post">
<a href="/blog/2016/08/07/optimizing-the-home-assistant-mobile-web-app/">Optimizing the Home Assistant mobile web app</a>
</li>
</ul>
</section>

View file

@ -185,6 +185,12 @@
<ul class="divided">
<li class="post">
<a href="/blog/2016/08/31/esp8266-and-micropython-part2/">ESP8266 and MicroPython - Part 2</a>
</li>
<li class="post">
<a href="/blog/2016/08/28/notifications-hue-fake-unification/">0.27 is here to break eggs and take names: notifications, Hue fakery, safety and unification come to Home Assistant</a>
</li>
@ -208,12 +214,6 @@
</li>
<li class="post">
<a href="/blog/2016/08/07/optimizing-the-home-assistant-mobile-web-app/">Optimizing the Home Assistant mobile web app</a>
</li>
</ul>
</section>

View file

@ -193,6 +193,12 @@
<ul class="divided">
<li class="post">
<a href="/blog/2016/08/31/esp8266-and-micropython-part2/">ESP8266 and MicroPython - Part 2</a>
</li>
<li class="post">
<a href="/blog/2016/08/28/notifications-hue-fake-unification/">0.27 is here to break eggs and take names: notifications, Hue fakery, safety and unification come to Home Assistant</a>
</li>
@ -216,12 +222,6 @@
</li>
<li class="post">
<a href="/blog/2016/08/07/optimizing-the-home-assistant-mobile-web-app/">Optimizing the Home Assistant mobile web app</a>
</li>
</ul>
</section>

View file

@ -177,6 +177,12 @@
<ul class="divided">
<li class="post">
<a href="/blog/2016/08/31/esp8266-and-micropython-part2/">ESP8266 and MicroPython - Part 2</a>
</li>
<li class="post">
<a href="/blog/2016/08/28/notifications-hue-fake-unification/">0.27 is here to break eggs and take names: notifications, Hue fakery, safety and unification come to Home Assistant</a>
</li>
@ -200,12 +206,6 @@
</li>
<li class="post">
<a href="/blog/2016/08/07/optimizing-the-home-assistant-mobile-web-app/">Optimizing the Home Assistant mobile web app</a>
</li>
</ul>
</section>

View file

@ -194,6 +194,12 @@
<ul class="divided">
<li class="post">
<a href="/blog/2016/08/31/esp8266-and-micropython-part2/">ESP8266 and MicroPython - Part 2</a>
</li>
<li class="post">
<a href="/blog/2016/08/28/notifications-hue-fake-unification/">0.27 is here to break eggs and take names: notifications, Hue fakery, safety and unification come to Home Assistant</a>
</li>
@ -217,12 +223,6 @@
</li>
<li class="post">
<a href="/blog/2016/08/07/optimizing-the-home-assistant-mobile-web-app/">Optimizing the Home Assistant mobile web app</a>
</li>
</ul>
</section>

View file

@ -212,6 +212,12 @@
<ul class="divided">
<li class="post">
<a href="/blog/2016/08/31/esp8266-and-micropython-part2/">ESP8266 and MicroPython - Part 2</a>
</li>
<li class="post">
<a href="/blog/2016/08/28/notifications-hue-fake-unification/">0.27 is here to break eggs and take names: notifications, Hue fakery, safety and unification come to Home Assistant</a>
</li>
@ -235,12 +241,6 @@
</li>
<li class="post">
<a href="/blog/2016/08/07/optimizing-the-home-assistant-mobile-web-app/">Optimizing the Home Assistant mobile web app</a>
</li>
</ul>
</section>

View file

@ -299,6 +299,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/08/31/esp8266-and-micropython-part2/">ESP8266 and MicroPython - Part 2</a>
</li>
<li class="post">
<a href="/blog/2016/08/28/notifications-hue-fake-unification/">0.27 is here to break eggs and take names: notifications, Hue fakery, safety and unification come to Home Assistant</a>
</li>
@ -322,12 +328,6 @@ For example, my wife works next door - and I couldnt detect whether shes a
</li>
<li class="post">
<a href="/blog/2016/08/07/optimizing-the-home-assistant-mobile-web-app/">Optimizing the Home Assistant mobile web app</a>
</li>
</ul>
</section>

View file

@ -175,6 +175,12 @@
<ul class="divided">
<li class="post">
<a href="/blog/2016/08/31/esp8266-and-micropython-part2/">ESP8266 and MicroPython - Part 2</a>
</li>
<li class="post">
<a href="/blog/2016/08/28/notifications-hue-fake-unification/">0.27 is here to break eggs and take names: notifications, Hue fakery, safety and unification come to Home Assistant</a>
</li>
@ -198,12 +204,6 @@
</li>
<li class="post">
<a href="/blog/2016/08/07/optimizing-the-home-assistant-mobile-web-app/">Optimizing the Home Assistant mobile web app</a>
</li>
</ul>
</section>

View file

@ -257,6 +257,12 @@
<ul class="divided">
<li class="post">
<a href="/blog/2016/08/31/esp8266-and-micropython-part2/">ESP8266 and MicroPython - Part 2</a>
</li>
<li class="post">
<a href="/blog/2016/08/28/notifications-hue-fake-unification/">0.27 is here to break eggs and take names: notifications, Hue fakery, safety and unification come to Home Assistant</a>
</li>
@ -280,12 +286,6 @@
</li>
<li class="post">
<a href="/blog/2016/08/07/optimizing-the-home-assistant-mobile-web-app/">Optimizing the Home Assistant mobile web app</a>
</li>
</ul>
</section>

View file

@ -175,6 +175,12 @@
<ul class="divided">
<li class="post">
<a href="/blog/2016/08/31/esp8266-and-micropython-part2/">ESP8266 and MicroPython - Part 2</a>
</li>
<li class="post">
<a href="/blog/2016/08/28/notifications-hue-fake-unification/">0.27 is here to break eggs and take names: notifications, Hue fakery, safety and unification come to Home Assistant</a>
</li>
@ -198,12 +204,6 @@
</li>
<li class="post">
<a href="/blog/2016/08/07/optimizing-the-home-assistant-mobile-web-app/">Optimizing the Home Assistant mobile web app</a>
</li>
</ul>
</section>

View file

@ -189,6 +189,12 @@
<ul class="divided">
<li class="post">
<a href="/blog/2016/08/31/esp8266-and-micropython-part2/">ESP8266 and MicroPython - Part 2</a>
</li>
<li class="post">
<a href="/blog/2016/08/28/notifications-hue-fake-unification/">0.27 is here to break eggs and take names: notifications, Hue fakery, safety and unification come to Home Assistant</a>
</li>
@ -212,12 +218,6 @@
</li>
<li class="post">
<a href="/blog/2016/08/07/optimizing-the-home-assistant-mobile-web-app/">Optimizing the Home Assistant mobile web app</a>
</li>
</ul>
</section>

View file

@ -208,6 +208,12 @@
<ul class="divided">
<li class="post">
<a href="/blog/2016/08/31/esp8266-and-micropython-part2/">ESP8266 and MicroPython - Part 2</a>
</li>
<li class="post">
<a href="/blog/2016/08/28/notifications-hue-fake-unification/">0.27 is here to break eggs and take names: notifications, Hue fakery, safety and unification come to Home Assistant</a>
</li>
@ -231,12 +237,6 @@
</li>
<li class="post">
<a href="/blog/2016/08/07/optimizing-the-home-assistant-mobile-web-app/">Optimizing the Home Assistant mobile web app</a>
</li>
</ul>
</section>

View file

@ -179,6 +179,12 @@
<ul class="divided">
<li class="post">
<a href="/blog/2016/08/31/esp8266-and-micropython-part2/">ESP8266 and MicroPython - Part 2</a>
</li>
<li class="post">
<a href="/blog/2016/08/28/notifications-hue-fake-unification/">0.27 is here to break eggs and take names: notifications, Hue fakery, safety and unification come to Home Assistant</a>
</li>
@ -202,12 +208,6 @@
</li>
<li class="post">
<a href="/blog/2016/08/07/optimizing-the-home-assistant-mobile-web-app/">Optimizing the Home Assistant mobile web app</a>
</li>
</ul>
</section>

View file

@ -315,6 +315,12 @@
<ul class="divided">
<li class="post">
<a href="/blog/2016/08/31/esp8266-and-micropython-part2/">ESP8266 and MicroPython - Part 2</a>
</li>
<li class="post">
<a href="/blog/2016/08/28/notifications-hue-fake-unification/">0.27 is here to break eggs and take names: notifications, Hue fakery, safety and unification come to Home Assistant</a>
</li>
@ -338,12 +344,6 @@
</li>
<li class="post">
<a href="/blog/2016/08/07/optimizing-the-home-assistant-mobile-web-app/">Optimizing the Home Assistant mobile web app</a>
</li>
</ul>
</section>

View file

@ -195,6 +195,12 @@
<ul class="divided">
<li class="post">
<a href="/blog/2016/08/31/esp8266-and-micropython-part2/">ESP8266 and MicroPython - Part 2</a>
</li>
<li class="post">
<a href="/blog/2016/08/28/notifications-hue-fake-unification/">0.27 is here to break eggs and take names: notifications, Hue fakery, safety and unification come to Home Assistant</a>
</li>
@ -218,12 +224,6 @@
</li>
<li class="post">
<a href="/blog/2016/08/07/optimizing-the-home-assistant-mobile-web-app/">Optimizing the Home Assistant mobile web app</a>
</li>
</ul>
</section>

View file

@ -229,6 +229,12 @@
<ul class="divided">
<li class="post">
<a href="/blog/2016/08/31/esp8266-and-micropython-part2/">ESP8266 and MicroPython - Part 2</a>
</li>
<li class="post">
<a href="/blog/2016/08/28/notifications-hue-fake-unification/">0.27 is here to break eggs and take names: notifications, Hue fakery, safety and unification come to Home Assistant</a>
</li>
@ -252,12 +258,6 @@
</li>
<li class="post">
<a href="/blog/2016/08/07/optimizing-the-home-assistant-mobile-web-app/">Optimizing the Home Assistant mobile web app</a>
</li>
</ul>
</section>

View file

@ -200,6 +200,12 @@
<ul class="divided">
<li class="post">
<a href="/blog/2016/08/31/esp8266-and-micropython-part2/">ESP8266 and MicroPython - Part 2</a>
</li>
<li class="post">
<a href="/blog/2016/08/28/notifications-hue-fake-unification/">0.27 is here to break eggs and take names: notifications, Hue fakery, safety and unification come to Home Assistant</a>
</li>
@ -223,12 +229,6 @@
</li>
<li class="post">
<a href="/blog/2016/08/07/optimizing-the-home-assistant-mobile-web-app/">Optimizing the Home Assistant mobile web app</a>
</li>
</ul>
</section>

View file

@ -222,6 +222,12 @@
<ul class="divided">
<li class="post">
<a href="/blog/2016/08/31/esp8266-and-micropython-part2/">ESP8266 and MicroPython - Part 2</a>
</li>
<li class="post">
<a href="/blog/2016/08/28/notifications-hue-fake-unification/">0.27 is here to break eggs and take names: notifications, Hue fakery, safety and unification come to Home Assistant</a>
</li>
@ -245,12 +251,6 @@
</li>
<li class="post">
<a href="/blog/2016/08/07/optimizing-the-home-assistant-mobile-web-app/">Optimizing the Home Assistant mobile web app</a>
</li>
</ul>
</section>

View file

@ -276,6 +276,12 @@ target_dir /tmp
<ul class="divided">
<li class="post">
<a href="/blog/2016/08/31/esp8266-and-micropython-part2/">ESP8266 and MicroPython - Part 2</a>
</li>
<li class="post">
<a href="/blog/2016/08/28/notifications-hue-fake-unification/">0.27 is here to break eggs and take names: notifications, Hue fakery, safety and unification come to Home Assistant</a>
</li>
@ -299,12 +305,6 @@ target_dir /tmp
</li>
<li class="post">
<a href="/blog/2016/08/07/optimizing-the-home-assistant-mobile-web-app/">Optimizing the Home Assistant mobile web app</a>
</li>
</ul>
</section>

View file

@ -223,6 +223,12 @@
<ul class="divided">
<li class="post">
<a href="/blog/2016/08/31/esp8266-and-micropython-part2/">ESP8266 and MicroPython - Part 2</a>
</li>
<li class="post">
<a href="/blog/2016/08/28/notifications-hue-fake-unification/">0.27 is here to break eggs and take names: notifications, Hue fakery, safety and unification come to Home Assistant</a>
</li>
@ -246,12 +252,6 @@
</li>
<li class="post">
<a href="/blog/2016/08/07/optimizing-the-home-assistant-mobile-web-app/">Optimizing the Home Assistant mobile web app</a>
</li>
</ul>
</section>

View file

@ -218,6 +218,12 @@ Over a year ago I participated in the <a href="https://www.kickstarter.com/proje
<ul class="divided">
<li class="post">
<a href="/blog/2016/08/31/esp8266-and-micropython-part2/">ESP8266 and MicroPython - Part 2</a>
</li>
<li class="post">
<a href="/blog/2016/08/28/notifications-hue-fake-unification/">0.27 is here to break eggs and take names: notifications, Hue fakery, safety and unification come to Home Assistant</a>
</li>
@ -241,12 +247,6 @@ Over a year ago I participated in the <a href="https://www.kickstarter.com/proje
</li>
<li class="post">
<a href="/blog/2016/08/07/optimizing-the-home-assistant-mobile-web-app/">Optimizing the Home Assistant mobile web app</a>
</li>
</ul>
</section>

View file

@ -218,6 +218,12 @@
<ul class="divided">
<li class="post">
<a href="/blog/2016/08/31/esp8266-and-micropython-part2/">ESP8266 and MicroPython - Part 2</a>
</li>
<li class="post">
<a href="/blog/2016/08/28/notifications-hue-fake-unification/">0.27 is here to break eggs and take names: notifications, Hue fakery, safety and unification come to Home Assistant</a>
</li>
@ -241,12 +247,6 @@
</li>
<li class="post">
<a href="/blog/2016/08/07/optimizing-the-home-assistant-mobile-web-app/">Optimizing the Home Assistant mobile web app</a>
</li>
</ul>
</section>

View file

@ -270,6 +270,12 @@ SQLite version 3.11.0 2016-02-15 17:29:24
<ul class="divided">
<li class="post">
<a href="/blog/2016/08/31/esp8266-and-micropython-part2/">ESP8266 and MicroPython - Part 2</a>
</li>
<li class="post">
<a href="/blog/2016/08/28/notifications-hue-fake-unification/">0.27 is here to break eggs and take names: notifications, Hue fakery, safety and unification come to Home Assistant</a>
</li>
@ -293,12 +299,6 @@ SQLite version 3.11.0 2016-02-15 17:29:24
</li>
<li class="post">
<a href="/blog/2016/08/07/optimizing-the-home-assistant-mobile-web-app/">Optimizing the Home Assistant mobile web app</a>
</li>
</ul>
</section>

View file

@ -235,6 +235,12 @@ One of the graphs created with this tutorial.
<ul class="divided">
<li class="post">
<a href="/blog/2016/08/31/esp8266-and-micropython-part2/">ESP8266 and MicroPython - Part 2</a>
</li>
<li class="post">
<a href="/blog/2016/08/28/notifications-hue-fake-unification/">0.27 is here to break eggs and take names: notifications, Hue fakery, safety and unification come to Home Assistant</a>
</li>
@ -258,12 +264,6 @@ One of the graphs created with this tutorial.
</li>
<li class="post">
<a href="/blog/2016/08/07/optimizing-the-home-assistant-mobile-web-app/">Optimizing the Home Assistant mobile web app</a>
</li>
</ul>
</section>

View file

@ -322,6 +322,12 @@ If a module is missing then you need to download is it from <a href="https://git
<ul class="divided">
<li class="post">
<a href="/blog/2016/08/31/esp8266-and-micropython-part2/">ESP8266 and MicroPython - Part 2</a>
</li>
<li class="post">
<a href="/blog/2016/08/28/notifications-hue-fake-unification/">0.27 is here to break eggs and take names: notifications, Hue fakery, safety and unification come to Home Assistant</a>
</li>
@ -345,12 +351,6 @@ If a module is missing then you need to download is it from <a href="https://git
</li>
<li class="post">
<a href="/blog/2016/08/07/optimizing-the-home-assistant-mobile-web-app/">Optimizing the Home Assistant mobile web app</a>
</li>
</ul>
</section>

View file

@ -237,6 +237,12 @@
<ul class="divided">
<li class="post">
<a href="/blog/2016/08/31/esp8266-and-micropython-part2/">ESP8266 and MicroPython - Part 2</a>
</li>
<li class="post">
<a href="/blog/2016/08/28/notifications-hue-fake-unification/">0.27 is here to break eggs and take names: notifications, Hue fakery, safety and unification come to Home Assistant</a>
</li>
@ -260,12 +266,6 @@
</li>
<li class="post">
<a href="/blog/2016/08/07/optimizing-the-home-assistant-mobile-web-app/">Optimizing the Home Assistant mobile web app</a>
</li>
</ul>
</section>

View file

@ -274,6 +274,12 @@
<ul class="divided">
<li class="post">
<a href="/blog/2016/08/31/esp8266-and-micropython-part2/">ESP8266 and MicroPython - Part 2</a>
</li>
<li class="post">
<a href="/blog/2016/08/28/notifications-hue-fake-unification/">0.27 is here to break eggs and take names: notifications, Hue fakery, safety and unification come to Home Assistant</a>
</li>
@ -297,12 +303,6 @@
</li>
<li class="post">
<a href="/blog/2016/08/07/optimizing-the-home-assistant-mobile-web-app/">Optimizing the Home Assistant mobile web app</a>
</li>
</ul>
</section>

View file

@ -310,6 +310,12 @@
<ul class="divided">
<li class="post">
<a href="/blog/2016/08/31/esp8266-and-micropython-part2/">ESP8266 and MicroPython - Part 2</a>
</li>
<li class="post">
<a href="/blog/2016/08/28/notifications-hue-fake-unification/">0.27 is here to break eggs and take names: notifications, Hue fakery, safety and unification come to Home Assistant</a>
</li>
@ -333,8 +339,6 @@
</li>
</ul>
</section>

View file

@ -236,6 +236,12 @@
<ul class="divided">
<li class="post">
<a href="/blog/2016/08/31/esp8266-and-micropython-part2/">ESP8266 and MicroPython - Part 2</a>
</li>
<li class="post">
<a href="/blog/2016/08/28/notifications-hue-fake-unification/">0.27 is here to break eggs and take names: notifications, Hue fakery, safety and unification come to Home Assistant</a>
</li>
@ -255,12 +261,6 @@
<li class="post">
<a href="/blog/2016/08/07/optimizing-the-home-assistant-mobile-web-app/">Optimizing the Home Assistant mobile web app</a>
</li>
</ul>
</section>

View file

@ -290,6 +290,12 @@
<ul class="divided">
<li class="post">
<a href="/blog/2016/08/31/esp8266-and-micropython-part2/">ESP8266 and MicroPython - Part 2</a>
</li>
<li class="post">
<a href="/blog/2016/08/28/notifications-hue-fake-unification/">0.27 is here to break eggs and take names: notifications, Hue fakery, safety and unification come to Home Assistant</a>
</li>
@ -309,12 +315,6 @@
</li>
<li class="post">
<a href="/blog/2016/08/07/optimizing-the-home-assistant-mobile-web-app/">Optimizing the Home Assistant mobile web app</a>
</li>
</ul>
</section>

View file

@ -176,6 +176,12 @@ Heatmap
<ul class="divided">
<li class="post">
<a href="/blog/2016/08/31/esp8266-and-micropython-part2/">ESP8266 and MicroPython - Part 2</a>
</li>
<li class="post">
<a href="/blog/2016/08/28/notifications-hue-fake-unification/">0.27 is here to break eggs and take names: notifications, Hue fakery, safety and unification come to Home Assistant</a>
</li>
@ -195,12 +201,6 @@ Heatmap
</li>
<li class="post">
<a href="/blog/2016/08/07/optimizing-the-home-assistant-mobile-web-app/">Optimizing the Home Assistant mobile web app</a>
</li>
</ul>
</section>

View file

@ -345,6 +345,12 @@
<ul class="divided">
<li class="post">
<a href="/blog/2016/08/31/esp8266-and-micropython-part2/">ESP8266 and MicroPython - Part 2</a>
</li>
<li class="post">
@ -364,12 +370,6 @@
</li>
<li class="post">
<a href="/blog/2016/08/07/optimizing-the-home-assistant-mobile-web-app/">Optimizing the Home Assistant mobile web app</a>
</li>
</ul>
</section>

View file

@ -0,0 +1,347 @@
<!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>ESP8266 and MicroPython - Part 2 - Home Assistant</title>
<meta name="author" content="Fabian Affolter">
<meta name="description" content="Using MicroPython and MQTT on ESP8266 based devices and Home Assistant.">
<meta name="viewport" content="width=device-width">
<link rel="canonical" href="https://home-assistant.io/blog/2016/08/31/esp8266-and-micropython-part2/">
<meta property="fb:app_id" content="338291289691179">
<meta property="og:title" content="ESP8266 and MicroPython - Part 2">
<meta property="og:site_name" content="Home Assistant">
<meta property="og:url" content="https://home-assistant.io/blog/2016/08/31/esp8266-and-micropython-part2/">
<meta property="og:type" content="article">
<meta property="og:description" content="Using MicroPython and MQTT on ESP8266 based devices and Home Assistant.">
<meta property="og:image" content="https://home-assistant.io/images/blog/2016-07-micropython/social.png">
<meta name="twitter:card" content="summary_large_image">
<meta name="twitter:site" content="@home_assistant">
<meta name="twitter:title" content="ESP8266 and MicroPython - Part 2">
<meta name="twitter:description" content="Using MicroPython and MQTT on ESP8266 based devices and Home Assistant.">
<meta name="twitter:image" content="https://home-assistant.io/images/blog/2016-07-micropython/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">ESP8266 and MicroPython - Part 2</h1>
<div class="meta clearfix">
<time datetime="2016-08-31T04:17:25+00:00" pubdate data-updated="true"><i class="icon-calendar"></i> August 31, 2016</time>
<span class="byline author vcard"><i class='icon-user'></i> Fabian Affolter</span>
<span><i class='icon-time'></i> three minutes reading time</span>
<span>
<i class="icon-tags"></i>
<ul class="tags unstyled">
<li>ESP8266</li>
<li>How-To</li>
<li>MQTT</li>
<li>Micropython</li>
</ul>
</span>
<a class='comments'
href="#disqus_thread"
>Comments</a>
</div>
</header>
<p><img src="/images/blog/2016-07-micropython/micropython.png" style="clear: right; border:none; box-shadow: none; float: right; margin-bottom: 12px;" width="200" />
So, part 1 of <a href="/blog/2016/07/28/esp8266-and-micropython-part1/">ESP8266 and MicroPython</a> was pretty lame, right? Instead of getting information out of Home Assistant we are going a step forward and create our own sensor which is sending details about its state to a Home Assistant instance.</p>
<a name="read-more"></a>
<p>Beside <a href="https://en.wikipedia.org/wiki/POST_(HTTP)">HTTP POST</a> requests, MQTT is the quickest way (from the authors point of view) to publish information with DIY devices.</p>
<p>You have to make a decision: Do you want to pull or to poll? For slowly changing values like temperature its perfectly fine to wait a couple of seconds to retrieve the value. If its a motion detector the state change should be available instantly. This means the sensor must take initiative.</p>
<p>An example for pulling is <a href="/components/sensor.arest/">aREST</a>. This is a great way to work with the ESP8266 based units and the Ardunio IDE.</p>
<h3><a class="title-link" name="mqtt" href="#mqtt"></a> MQTT</h3>
<p>You can find a simple examples for publishing and subscribing with MQTT in the <a href="https://github.com/micropython/micropython-lib">MicroPython</a> library overview in the section for <a href="https://github.com/micropython/micropython-lib/tree/master/umqtt.simple">umqtt</a>.</p>
<p>The example below is adopted from the work of <a href="https://github.com/davea">@davea</a> as we dont want to re-invent the wheel. The configuration feature is crafty and simplyfies the code with the usage of a file called <code class="highlighter-rouge">/config.json</code> which stores the configuration details. The ESP8266 device will send the value of a pin every 5 seconds.</p>
<div class="language-python highlighter-rouge"><pre class="highlight"><code><span class="kn">import</span> <span class="nn">machine</span>
<span class="kn">import</span> <span class="nn">time</span>
<span class="kn">import</span> <span class="nn">ubinascii</span>
<span class="kn">import</span> <span class="nn">webrepl</span>
<span class="kn">from</span> <span class="nn">umqtt.simple</span> <span class="kn">import</span> <span class="n">MQTTClient</span>
<span class="c"># These defaults are overwritten with the contents of /config.json by load_config()</span>
<span class="n">CONFIG</span> <span class="o">=</span> <span class="p">{</span>
<span class="s">"broker"</span><span class="p">:</span> <span class="s">"192.168.1.19"</span><span class="p">,</span>
<span class="s">"sensor_pin"</span><span class="p">:</span> <span class="mi">0</span><span class="p">,</span>
<span class="s">"client_id"</span><span class="p">:</span> <span class="n">b</span><span class="s">"esp8266_"</span> <span class="o">+</span> <span class="n">ubinascii</span><span class="o">.</span><span class="n">hexlify</span><span class="p">(</span><span class="n">machine</span><span class="o">.</span><span class="n">unique_id</span><span class="p">()),</span>
<span class="s">"topic"</span><span class="p">:</span> <span class="n">b</span><span class="s">"home"</span><span class="p">,</span>
<span class="p">}</span>
<span class="n">client</span> <span class="o">=</span> <span class="bp">None</span>
<span class="n">sensor_pin</span> <span class="o">=</span> <span class="bp">None</span>
<span class="k">def</span> <span class="nf">setup_pins</span><span class="p">():</span>
<span class="k">global</span> <span class="n">sensor_pin</span>
<span class="n">sensor_pin</span> <span class="o">=</span> <span class="n">machine</span><span class="o">.</span><span class="n">ADC</span><span class="p">(</span><span class="n">CONFIG</span><span class="p">[</span><span class="s">'sensor_pin'</span><span class="p">])</span>
<span class="k">def</span> <span class="nf">load_config</span><span class="p">():</span>
<span class="kn">import</span> <span class="nn">ujson</span> <span class="kn">as</span> <span class="nn">json</span>
<span class="k">try</span><span class="p">:</span>
<span class="k">with</span> <span class="nb">open</span><span class="p">(</span><span class="s">"/config.json"</span><span class="p">)</span> <span class="k">as</span> <span class="n">f</span><span class="p">:</span>
<span class="n">config</span> <span class="o">=</span> <span class="n">json</span><span class="o">.</span><span class="n">loads</span><span class="p">(</span><span class="n">f</span><span class="o">.</span><span class="n">read</span><span class="p">())</span>
<span class="k">except</span> <span class="p">(</span><span class="nb">OSError</span><span class="p">,</span> <span class="nb">ValueError</span><span class="p">):</span>
<span class="k">print</span><span class="p">(</span><span class="s">"Couldn't load /config.json"</span><span class="p">)</span>
<span class="n">save_config</span><span class="p">()</span>
<span class="k">else</span><span class="p">:</span>
<span class="n">CONFIG</span><span class="o">.</span><span class="n">update</span><span class="p">(</span><span class="n">config</span><span class="p">)</span>
<span class="k">print</span><span class="p">(</span><span class="s">"Loaded config from /config.json"</span><span class="p">)</span>
<span class="k">def</span> <span class="nf">save_config</span><span class="p">():</span>
<span class="kn">import</span> <span class="nn">ujson</span> <span class="kn">as</span> <span class="nn">json</span>
<span class="k">try</span><span class="p">:</span>
<span class="k">with</span> <span class="nb">open</span><span class="p">(</span><span class="s">"/config.json"</span><span class="p">,</span> <span class="s">"w"</span><span class="p">)</span> <span class="k">as</span> <span class="n">f</span><span class="p">:</span>
<span class="n">f</span><span class="o">.</span><span class="n">write</span><span class="p">(</span><span class="n">json</span><span class="o">.</span><span class="n">dumps</span><span class="p">(</span><span class="n">CONFIG</span><span class="p">))</span>
<span class="k">except</span> <span class="nb">OSError</span><span class="p">:</span>
<span class="k">print</span><span class="p">(</span><span class="s">"Couldn't save /config.json"</span><span class="p">)</span>
<span class="k">def</span> <span class="nf">main</span><span class="p">():</span>
<span class="n">client</span> <span class="o">=</span> <span class="n">MQTTClient</span><span class="p">(</span><span class="n">CONFIG</span><span class="p">[</span><span class="s">'client_id'</span><span class="p">],</span> <span class="n">CONFIG</span><span class="p">[</span><span class="s">'broker'</span><span class="p">])</span>
<span class="n">client</span><span class="o">.</span><span class="n">connect</span><span class="p">()</span>
<span class="k">print</span><span class="p">(</span><span class="s">"Connected to {}"</span><span class="o">.</span><span class="n">format</span><span class="p">(</span><span class="n">CONFIG</span><span class="p">[</span><span class="s">'broker'</span><span class="p">]))</span>
<span class="k">while</span> <span class="bp">True</span><span class="p">:</span>
<span class="n">data</span> <span class="o">=</span> <span class="n">sensor_pin</span><span class="o">.</span><span class="n">read</span><span class="p">()</span>
<span class="n">client</span><span class="o">.</span><span class="n">publish</span><span class="p">(</span><span class="s">'{}/{}'</span><span class="o">.</span><span class="n">format</span><span class="p">(</span><span class="n">CONFIG</span><span class="p">[</span><span class="s">'topic'</span><span class="p">],</span>
<span class="n">CONFIG</span><span class="p">[</span><span class="s">'client_id'</span><span class="p">]),</span>
<span class="nb">bytes</span><span class="p">(</span><span class="nb">str</span><span class="p">(</span><span class="n">data</span><span class="p">),</span> <span class="s">'utf-8'</span><span class="p">))</span>
<span class="k">print</span><span class="p">(</span><span class="s">'Sensor state: {}'</span><span class="o">.</span><span class="n">format</span><span class="p">(</span><span class="n">data</span><span class="p">))</span>
<span class="n">time</span><span class="o">.</span><span class="n">sleep</span><span class="p">(</span><span class="mi">5</span><span class="p">)</span>
<span class="k">if</span> <span class="n">__name__</span> <span class="o">==</span> <span class="s">'__main__'</span><span class="p">:</span>
<span class="n">load_config</span><span class="p">()</span>
<span class="n">setup_pins</span><span class="p">()</span>
<span class="n">main</span><span class="p">()</span>
</code></pre>
</div>
<p>Subscribe to the topic <code class="highlighter-rouge">home/#</code> or create a <a href="/components/sensor.mqtt/">MQTT sensor</a> to check if the sensor values are published.</p>
<div class="language-bash highlighter-rouge"><pre class="highlight"><code><span class="gp">$ </span>mosquitto_sub -h 192.168.1.19 -v -t <span class="s2">"home/#"</span>
</code></pre>
</div>
<div class="language-yaml highlighter-rouge"><pre class="highlight"><code><span class="s">sensor</span><span class="pi">:</span>
<span class="pi">-</span> <span class="s">platform</span><span class="pi">:</span> <span class="s">mqtt</span>
<span class="s">state_topic</span><span class="pi">:</span> <span class="s2">"</span><span class="s">home/esp8266_[last</span><span class="nv"> </span><span class="s">part</span><span class="nv"> </span><span class="s">of</span><span class="nv"> </span><span class="s">the</span><span class="nv"> </span><span class="s">MAC</span><span class="nv"> </span><span class="s">address]"</span>
<span class="s">name</span><span class="pi">:</span> <span class="s2">"</span><span class="s">MicroPython"</span>
</code></pre>
</div>
<p><a href="https://github.com/davea">@davea</a> created <a href="https://github.com/davea/sonoff-mqtt">sonoff-mqtt</a>. This code will work on ESP8622 based devices too and shows how to use a button to control a relay.</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>
<li><div class="fb-like" data-href="https://www.facebook.com/homeassistantio/" data-layout="standard" data-action="like" data-size="small" data-show-faces="true" data-share="false"></div></li>
</ul>
</section>
<div id="fb-root"></div>
<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>
<script>(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/all.js#appId=338291289691179&xfbml=1";fjs.parentNode.insertBefore(js,fjs);}(document,'script','facebook-jssdk'));</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/08/31/esp8266-and-micropython-part2/"
data-counturl="https://home-assistant.io/blog/2016/08/31/esp8266-and-micropython-part2/" >Tweet</a>
<div class="fb-share-button" style='top: -6px;'
data-href="https://home-assistant.io/blog/2016/08/31/esp8266-and-micropython-part2/"
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>
<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/08/28/notifications-hue-fake-unification/">0.27 is here to break eggs and take names: notifications, Hue fakery, safety and unification come to Home Assistant</a>
</li>
<li class="post">
<a href="/blog/2016/08/19/github-style-calendar-heatmap-of-device-data/">Github-style calendar heatmap of device data</a>
</li>
<li class="post">
<a href="/blog/2016/08/16/we-have-apps-now/">We Have Apps Now</a>
</li>
<li class="post">
<a href="/blog/2016/08/13/foursquare-fast-com-ffmpeg-gpsd/">0.26: Foursquare, Fast.com, FFMPEG and GPSD</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://facebook.com/homeassistantio'><i class="icon-facebook"></i></a>
<a rel="me" href='https://plus.google.com/110560654828510104551'><i class="icon-google-plus"></i></a>
<a rel="me" href='https://github.com/home-assistant/home-assistant'><i class="icon-github"></i></a>
<div class="credit">
Contact us at <a href='mailto:hello@home-assistant.io'>hello@home-assistant.io</a>.<br>
Website powered by <a href='http://jekyllrb.com/'>Jekyll</a> and the <a href='https://github.com/coogie/oscailte'>Oscalite theme</a>.<br />
Hosted by <a href='https://pages.github.com/'>GitHub</a> and served by <a href='https://cloudflare.com'>CloudFlare</a>.
</div>
</div>
</div>
</div>
</div>
</footer>
<script>
var _gaq=[['_setAccount','UA-57927901-1'],['_trackPageview']];
(function(d,t){var g=d.createElement(t),s=d.getElementsByTagName(t)[0];
g.src=('https:'==location.protocol?'//ssl':'//www')+'.google-analytics.com/ga.js';
s.parentNode.insertBefore(g,s)}(document,'script'));
</script>
<script>
var disqus_shortname = 'home-assistant';
// var disqus_developer = 1;
var disqus_identifier = 'https://home-assistant.io/blog/2016/08/31/esp8266-and-micropython-part2/';
var disqus_url = 'https://home-assistant.io/blog/2016/08/31/esp8266-and-micropython-part2/';
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

@ -2731,6 +2731,44 @@
</div>
</article>
<article>
<div class="grid">
<div class="grid__item one-fifth palm-one-whole">
<time datetime="2016-08-31T04:17:25+00:00" pubdate>
<span class='month'>Aug</span> <span class='day'>31</span>
</time>
</div>
<div class="grid__item four-fifths palm-one-whole">
<h1 class="gamma"><a href="/blog/2016/08/31/esp8266-and-micropython-part2/">ESP8266 and MicroPython - Part 2</a></h1>
<footer class="meta">
<span>
<i class="icon-tags"></i>
<ul class="tags unstyled">
<li>ESP8266</li>
<li>How-To</li>
<li>MQTT</li>
<li>Micropython</li>
</ul>
</span>
</footer>
<hr class="divider">
</div>
</div>
</article>
</div>
@ -2788,6 +2826,12 @@
<ul class="divided">
<li class="post">
<a href="/blog/2016/08/31/esp8266-and-micropython-part2/">ESP8266 and MicroPython - Part 2</a>
</li>
<li class="post">
<a href="/blog/2016/08/28/notifications-hue-fake-unification/">0.27 is here to break eggs and take names: notifications, Hue fakery, safety and unification come to Home Assistant</a>
</li>
@ -2811,12 +2855,6 @@
</li>
<li class="post">
<a href="/blog/2016/08/07/optimizing-the-home-assistant-mobile-web-app/">Optimizing the Home Assistant mobile web app</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-08-30T21:57:10+00:00</updated>
<updated>2016-08-31T05:03:39+00:00</updated>
<id>https://home-assistant.io/</id>
<author>
<name><![CDATA[Home Assistant]]></name>

View file

@ -258,6 +258,12 @@
<ul class="divided">
<li class="post">
<a href="/blog/2016/08/31/esp8266-and-micropython-part2/">ESP8266 and MicroPython - Part 2</a>
</li>
<li class="post">
<a href="/blog/2016/08/28/notifications-hue-fake-unification/">0.27 is here to break eggs and take names: notifications, Hue fakery, safety and unification come to Home Assistant</a>
</li>
@ -281,12 +287,6 @@
</li>
<li class="post">
<a href="/blog/2016/08/07/optimizing-the-home-assistant-mobile-web-app/">Optimizing the Home Assistant mobile web app</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-08-30T21:57:10+00:00</updated>
<updated>2016-08-31T05:03:39+00:00</updated>
<id>https://home-assistant.io/</id>
<author>
<name><![CDATA[Home Assistant]]></name>

View file

@ -189,6 +189,12 @@
<ul class="divided">
<li class="post">
<a href="/blog/2016/08/31/esp8266-and-micropython-part2/">ESP8266 and MicroPython - Part 2</a>
</li>
<li class="post">
<a href="/blog/2016/08/28/notifications-hue-fake-unification/">0.27 is here to break eggs and take names: notifications, Hue fakery, safety and unification come to Home Assistant</a>
</li>
@ -212,12 +218,6 @@
</li>
<li class="post">
<a href="/blog/2016/08/07/optimizing-the-home-assistant-mobile-web-app/">Optimizing the Home Assistant mobile web app</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-08-30T21:57:10+00:00</updated>
<updated>2016-08-31T05:03:39+00:00</updated>
<id>https://home-assistant.io/</id>
<author>
<name><![CDATA[Home Assistant]]></name>
@ -13,6 +13,108 @@
<generator uri="http://octopress.org/">Octopress</generator>
<entry>
<title type="html"><![CDATA[ESP8266 and MicroPython - Part 2]]></title>
<link href="https://home-assistant.io/blog/2016/08/31/esp8266-and-micropython-part2/"/>
<updated>2016-08-31T04:17:25+00:00</updated>
<id>https://home-assistant.io/blog/2016/08/31/esp8266-and-micropython-part2</id>
<content type="html"><![CDATA[<img src='https://home-assistant.io/images/blog/2016-07-micropython/micropython.png' style='clear: right; border:none; box-shadow: none; float: right; margin-bottom: 12px;' width='200' />
So, part 1 of [ESP8266 and MicroPython](/blog/2016/07/28/esp8266-and-micropython-part1/) was pretty lame, right? Instead of getting information out of Home Assistant we are going a step forward and create our own sensor which is sending details about its state to a Home Assistant instance.
<!--more-->
Beside [HTTP POST](https://en.wikipedia.org/wiki/POST_(HTTP)) requests, MQTT is the quickest way (from the author's point of view) to publish information with DIY devices.
You have to make a decision: Do you want to pull or to poll? For slowly changing values like temperature it's perfectly fine to wait a couple of seconds to retrieve the value. If it's a motion detector the state change should be available instantly. This means the sensor must take initiative.
An example for pulling is [aREST](/components/sensor.arest/). This is a great way to work with the ESP8266 based units and the Ardunio IDE.
### <a class='title-link' name='mqtt' href='#mqtt'></a> MQTT
You can find a simple examples for publishing and subscribing with MQTT in the [MicroPython](https://github.com/micropython/micropython-lib) library overview in the section for [umqtt](https://github.com/micropython/micropython-lib/tree/master/umqtt.simple).
The example below is adopted from the work of [@davea](https://github.com/davea) as we don't want to re-invent the wheel. The configuration feature is crafty and simplyfies the code with the usage of a file called `/config.json` which stores the configuration details. The ESP8266 device will send the value of a pin every 5 seconds.
```python
import machine
import time
import ubinascii
import webrepl
from umqtt.simple import MQTTClient
# These defaults are overwritten with the contents of /config.json by load_config()
CONFIG = {
"broker": "192.168.1.19",
"sensor_pin": 0,
"client_id": b"esp8266_" + ubinascii.hexlify(machine.unique_id()),
"topic": b"home",
}
client = None
sensor_pin = None
def setup_pins():
global sensor_pin
sensor_pin = machine.ADC(CONFIG['sensor_pin'])
def load_config():
import ujson as json
try:
with open("/config.json") as f:
config = json.loads(f.read())
except (OSError, ValueError):
print("Couldn't load /config.json")
save_config()
else:
CONFIG.update(config)
print("Loaded config from /config.json")
def save_config():
import ujson as json
try:
with open("/config.json", "w") as f:
f.write(json.dumps(CONFIG))
except OSError:
print("Couldn't save /config.json")
def main():
client = MQTTClient(CONFIG['client_id'], CONFIG['broker'])
client.connect()
print("Connected to {}".format(CONFIG['broker']))
while True:
data = sensor_pin.read()
client.publish('{}/{}'.format(CONFIG['topic'],
CONFIG['client_id']),
bytes(str(data), 'utf-8'))
print('Sensor state: {}'.format(data))
time.sleep(5)
if __name__ == '__main__':
load_config()
setup_pins()
main()
```
Subscribe to the topic `home/#` or create a [MQTT sensor](/components/sensor.mqtt/) to check if the sensor values are published.
```bash
$ mosquitto_sub -h 192.168.1.19 -v -t "home/#"
```
```yaml
sensor:
- platform: mqtt
state_topic: "home/esp8266_[last part of the MAC address]"
name: "MicroPython"
```
[@davea](https://github.com/davea) created [sonoff-mqtt](https://github.com/davea/sonoff-mqtt). This code will work on ESP8622 based devices too and shows how to use a button to control a relay.
]]></content>
</entry>
<entry>
<title type="html"><![CDATA[ESP8266 and MicroPython - Part 1]]></title>
<link href="https://home-assistant.io/blog/2016/07/28/esp8266-and-micropython-part1/"/>

View file

@ -98,6 +98,44 @@
<h2>2016</h2>
<article>
<div class="grid">
<div class="grid__item one-fifth palm-one-whole">
<time datetime="2016-08-31T04:17:25+00:00" pubdate>
<span class='month'>Aug</span> <span class='day'>31</span>
</time>
</div>
<div class="grid__item four-fifths palm-one-whole">
<h1 class="gamma"><a href="/blog/2016/08/31/esp8266-and-micropython-part2/">ESP8266 and MicroPython - Part 2</a></h1>
<footer class="meta">
<span>
<i class="icon-tags"></i>
<ul class="tags unstyled">
<li><a class='category' href='/blog/categories/esp8266/'>ESP8266</a></li>
<li><a class='category' href='/blog/categories/how-to/'>How-To</a></li>
<li><a class='category' href='/blog/categories/mqtt/'>MQTT</a></li>
<li><a class='category' href='/blog/categories/micropython/'>Micropython</a></li>
</ul>
</span>
</footer>
<hr class="divider">
</div>
</div>
</article>
<article>
<div class="grid">
@ -228,6 +266,12 @@
<ul class="divided">
<li class="post">
<a href="/blog/2016/08/31/esp8266-and-micropython-part2/">ESP8266 and MicroPython - Part 2</a>
</li>
<li class="post">
<a href="/blog/2016/08/28/notifications-hue-fake-unification/">0.27 is here to break eggs and take names: notifications, Hue fakery, safety and unification come to Home Assistant</a>
</li>
@ -251,12 +295,6 @@
</li>
<li class="post">
<a href="/blog/2016/08/07/optimizing-the-home-assistant-mobile-web-app/">Optimizing the Home Assistant mobile web app</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-08-30T21:57:10+00:00</updated>
<updated>2016-08-31T05:03:39+00:00</updated>
<id>https://home-assistant.io/</id>
<author>
<name><![CDATA[Home Assistant]]></name>
@ -13,6 +13,108 @@
<generator uri="http://octopress.org/">Octopress</generator>
<entry>
<title type="html"><![CDATA[ESP8266 and MicroPython - Part 2]]></title>
<link href="https://home-assistant.io/blog/2016/08/31/esp8266-and-micropython-part2/"/>
<updated>2016-08-31T04:17:25+00:00</updated>
<id>https://home-assistant.io/blog/2016/08/31/esp8266-and-micropython-part2</id>
<content type="html"><![CDATA[<img src='https://home-assistant.io/images/blog/2016-07-micropython/micropython.png' style='clear: right; border:none; box-shadow: none; float: right; margin-bottom: 12px;' width='200' />
So, part 1 of [ESP8266 and MicroPython](/blog/2016/07/28/esp8266-and-micropython-part1/) was pretty lame, right? Instead of getting information out of Home Assistant we are going a step forward and create our own sensor which is sending details about its state to a Home Assistant instance.
<!--more-->
Beside [HTTP POST](https://en.wikipedia.org/wiki/POST_(HTTP)) requests, MQTT is the quickest way (from the author's point of view) to publish information with DIY devices.
You have to make a decision: Do you want to pull or to poll? For slowly changing values like temperature it's perfectly fine to wait a couple of seconds to retrieve the value. If it's a motion detector the state change should be available instantly. This means the sensor must take initiative.
An example for pulling is [aREST](/components/sensor.arest/). This is a great way to work with the ESP8266 based units and the Ardunio IDE.
### <a class='title-link' name='mqtt' href='#mqtt'></a> MQTT
You can find a simple examples for publishing and subscribing with MQTT in the [MicroPython](https://github.com/micropython/micropython-lib) library overview in the section for [umqtt](https://github.com/micropython/micropython-lib/tree/master/umqtt.simple).
The example below is adopted from the work of [@davea](https://github.com/davea) as we don't want to re-invent the wheel. The configuration feature is crafty and simplyfies the code with the usage of a file called `/config.json` which stores the configuration details. The ESP8266 device will send the value of a pin every 5 seconds.
```python
import machine
import time
import ubinascii
import webrepl
from umqtt.simple import MQTTClient
# These defaults are overwritten with the contents of /config.json by load_config()
CONFIG = {
"broker": "192.168.1.19",
"sensor_pin": 0,
"client_id": b"esp8266_" + ubinascii.hexlify(machine.unique_id()),
"topic": b"home",
}
client = None
sensor_pin = None
def setup_pins():
global sensor_pin
sensor_pin = machine.ADC(CONFIG['sensor_pin'])
def load_config():
import ujson as json
try:
with open("/config.json") as f:
config = json.loads(f.read())
except (OSError, ValueError):
print("Couldn't load /config.json")
save_config()
else:
CONFIG.update(config)
print("Loaded config from /config.json")
def save_config():
import ujson as json
try:
with open("/config.json", "w") as f:
f.write(json.dumps(CONFIG))
except OSError:
print("Couldn't save /config.json")
def main():
client = MQTTClient(CONFIG['client_id'], CONFIG['broker'])
client.connect()
print("Connected to {}".format(CONFIG['broker']))
while True:
data = sensor_pin.read()
client.publish('{}/{}'.format(CONFIG['topic'],
CONFIG['client_id']),
bytes(str(data), 'utf-8'))
print('Sensor state: {}'.format(data))
time.sleep(5)
if __name__ == '__main__':
load_config()
setup_pins()
main()
```
Subscribe to the topic `home/#` or create a [MQTT sensor](/components/sensor.mqtt/) to check if the sensor values are published.
```bash
$ mosquitto_sub -h 192.168.1.19 -v -t "home/#"
```
```yaml
sensor:
- platform: mqtt
state_topic: "home/esp8266_[last part of the MAC address]"
name: "MicroPython"
```
[@davea](https://github.com/davea) created [sonoff-mqtt](https://github.com/davea/sonoff-mqtt). This code will work on ESP8622 based devices too and shows how to use a button to control a relay.
]]></content>
</entry>
<entry>
<title type="html"><![CDATA[Github-style calendar heatmap of device data]]></title>
<link href="https://home-assistant.io/blog/2016/08/19/github-style-calendar-heatmap-of-device-data/"/>
@ -390,115 +492,6 @@ One of the graphs created with this tutorial.
Thanks to the magic of Jupyter, all of the code is customizable: want to selectively display your data, only covering a specific entity? Sure thing! Want to change the properties of the plots? No problem!
While you learn and explore your IoT data, we will be working on providing more ready-to-use Jupyter Notebooks. Feel free to ask questions or provide suggestions. Would you like to see a specific visualization? Is there a particular facet of data youre interested in? Lets talk about it, lets dive into the world of data together!
]]></content>
</entry>
<entry>
<title type="html"><![CDATA[Visualize your IoT data]]></title>
<link href="https://home-assistant.io/blog/2016/07/19/visualizing-your-iot-data/"/>
<updated>2016-07-19T16:00:00+00:00</updated>
<id>https://home-assistant.io/blog/2016/07/19/visualizing-your-iot-data</id>
<content type="html"><![CDATA[<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' />
The [history component](/components/history/) 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.
This blog post will show you ways to export data for reporting, visualization, or further analysis of automation rules.
<!--more-->
In this blog post I use the temperature of the [Aare](https://en.wikipedia.org/wiki/Aare) river close to where I live as a show case. The temperatures were recorded with the [Swiss Hydrological Data sensor](/components/sensor.swiss_hydrological_data/) and the name of the sensor is `sensor.aare`.
The database is stored at `<path to config dir>/.homeassistant/home-assistant_v2.db` as [SQLite database](https://www.sqlite.org/). In all examples we are going to use the path: `/home/ha/.homeassistant/home-assistant_v2.db`
If you are just curious what's stored in your database then you can use the `sqlite3` command-line tool or a graphical one like [DB Browser for SQLite](http://sqlitebrowser.org/).
The table that is holding the states is called `states`. The `events` tables is responsible for storing the events which occurred. So, we will first check how many entries there are in the `states` table. `sqlite3` 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. It's recommended to work with a copy.
```bash
$ sqlite3 /home/ha/.homeassistant/home-assistant_v2.db
SQLite version 3.11.0 2016-02-15 17:29:24
sqlite> SELECT count(*) FROM states;
24659
```
Let's have a look at a sample [SQL](https://en.wikipedia.org/wiki/SQL) query. This query will show all states in a period for the sensor `sensor.aare`.
```sql
SELECT state, last_changed 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';
```
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 `Unknown` or peaks.
If the above query is executed in DB Browser for SQLite you would be able to save the sensor's graph as png.
<p class='img'>
<img src='https://home-assistant.io/images/blog/2016-07-reporting/db-browser.png' />
Visualization with DB Browser for SQLite
</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 [CSV](https://en.wikipedia.org/wiki/Comma-separated_values).
```bash
$ sqlite3 -header -csv /home/ha/.homeassistant/home-assistant_v2.db "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';" > sensor.csv
```
The ordering for the `SELECT` 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 it's LibreOffice Calc.
<p class='img'>
<img src='https://home-assistant.io/images/blog/2016-07-reporting/libreoffice-import.png' />
Import of the CSV file
</p>
After the import a graph can be created over the existing data.
<p class='img'>
<img src='https://home-assistant.io/images/blog/2016-07-reporting/libreoffice-graph.png' />
Graph in LibreOffice
</p>
You can also use [matplotlib](http://matplotlib.org/) 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.
```python
import sqlite3
from matplotlib import dates
import matplotlib.pyplot as plt
import homeassistant.util.dt as dt
values = []
timestamps = []
conn = sqlite3.connect('/home/ha/.homeassistant/home-assistant_v2.db')
data = conn.execute("SELECT state, last_changed 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'")
for x in data:
timestamps.append(dates.date2num(dt.parse_datetime(x[1])))
values.append(float(x[0]))
plt.plot_date(x=timestamps, y=values, fmt="r-")
plt.ylabel('Temperature')
plt.xlabel('Time line')
plt.savefig('sensor.png')
```
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 class='img'>
<img src='https://home-assistant.io/images/blog/2016-07-reporting/mpl-sensor.png' />
Sensor graph generated by matplotlib
</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 [forum](https://community.home-assistant.io/).
]]></content>
</entry>

View file

@ -98,6 +98,44 @@
<h2>2016</h2>
<article>
<div class="grid">
<div class="grid__item one-fifth palm-one-whole">
<time datetime="2016-08-31T04:17:25+00:00" pubdate>
<span class='month'>Aug</span> <span class='day'>31</span>
</time>
</div>
<div class="grid__item four-fifths palm-one-whole">
<h1 class="gamma"><a href="/blog/2016/08/31/esp8266-and-micropython-part2/">ESP8266 and MicroPython - Part 2</a></h1>
<footer class="meta">
<span>
<i class="icon-tags"></i>
<ul class="tags unstyled">
<li><a class='category' href='/blog/categories/esp8266/'>ESP8266</a></li>
<li><a class='category' href='/blog/categories/how-to/'>How-To</a></li>
<li><a class='category' href='/blog/categories/mqtt/'>MQTT</a></li>
<li><a class='category' href='/blog/categories/micropython/'>Micropython</a></li>
</ul>
</span>
</footer>
<hr class="divider">
</div>
</div>
</article>
<article>
<div class="grid">
@ -720,6 +758,12 @@
<ul class="divided">
<li class="post">
<a href="/blog/2016/08/31/esp8266-and-micropython-part2/">ESP8266 and MicroPython - Part 2</a>
</li>
<li class="post">
<a href="/blog/2016/08/28/notifications-hue-fake-unification/">0.27 is here to break eggs and take names: notifications, Hue fakery, safety and unification come to Home Assistant</a>
</li>
@ -743,12 +787,6 @@
</li>
<li class="post">
<a href="/blog/2016/08/07/optimizing-the-home-assistant-mobile-web-app/">Optimizing the Home Assistant mobile web app</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-08-30T21:57:10+00:00</updated>
<updated>2016-08-31T05:03:39+00:00</updated>
<id>https://home-assistant.io/</id>
<author>
<name><![CDATA[Home Assistant]]></name>

View file

@ -225,6 +225,12 @@
<ul class="divided">
<li class="post">
<a href="/blog/2016/08/31/esp8266-and-micropython-part2/">ESP8266 and MicroPython - Part 2</a>
</li>
<li class="post">
<a href="/blog/2016/08/28/notifications-hue-fake-unification/">0.27 is here to break eggs and take names: notifications, Hue fakery, safety and unification come to Home Assistant</a>
</li>
@ -248,12 +254,6 @@
</li>
<li class="post">
<a href="/blog/2016/08/07/optimizing-the-home-assistant-mobile-web-app/">Optimizing the Home Assistant mobile web app</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-08-30T21:57:10+00:00</updated>
<updated>2016-08-31T05:03:39+00:00</updated>
<id>https://home-assistant.io/</id>
<author>
<name><![CDATA[Home Assistant]]></name>

View file

@ -284,6 +284,12 @@
<ul class="divided">
<li class="post">
<a href="/blog/2016/08/31/esp8266-and-micropython-part2/">ESP8266 and MicroPython - Part 2</a>
</li>
<li class="post">
<a href="/blog/2016/08/28/notifications-hue-fake-unification/">0.27 is here to break eggs and take names: notifications, Hue fakery, safety and unification come to Home Assistant</a>
</li>
@ -307,12 +313,6 @@
</li>
<li class="post">
<a href="/blog/2016/08/07/optimizing-the-home-assistant-mobile-web-app/">Optimizing the Home Assistant mobile web app</a>
</li>
</ul>
</section>

View file

@ -4,7 +4,7 @@
<title><![CDATA[Category: IoT-Data | Home Assistant]]></title>
<link href="https://home-assistant.io/blog/categories/iot-data/atom.xml" rel="self"/>
<link href="https://home-assistant.io/"/>
<updated>2016-08-30T21:57:10+00:00</updated>
<updated>2016-08-31T05:03:39+00:00</updated>
<id>https://home-assistant.io/</id>
<author>
<name><![CDATA[Home Assistant]]></name>

View file

@ -255,6 +255,12 @@
<ul class="divided">
<li class="post">
<a href="/blog/2016/08/31/esp8266-and-micropython-part2/">ESP8266 and MicroPython - Part 2</a>
</li>
<li class="post">
<a href="/blog/2016/08/28/notifications-hue-fake-unification/">0.27 is here to break eggs and take names: notifications, Hue fakery, safety and unification come to Home Assistant</a>
</li>
@ -278,12 +284,6 @@
</li>
<li class="post">
<a href="/blog/2016/08/07/optimizing-the-home-assistant-mobile-web-app/">Optimizing the Home Assistant mobile web app</a>
</li>
</ul>
</section>

View file

@ -4,7 +4,7 @@
<title><![CDATA[Category: Micropython | Home Assistant]]></title>
<link href="https://home-assistant.io/blog/categories/micropython/atom.xml" rel="self"/>
<link href="https://home-assistant.io/"/>
<updated>2016-08-30T21:57:10+00:00</updated>
<updated>2016-08-31T05:03:39+00:00</updated>
<id>https://home-assistant.io/</id>
<author>
<name><![CDATA[Home Assistant]]></name>
@ -13,6 +13,108 @@
<generator uri="http://octopress.org/">Octopress</generator>
<entry>
<title type="html"><![CDATA[ESP8266 and MicroPython - Part 2]]></title>
<link href="https://home-assistant.io/blog/2016/08/31/esp8266-and-micropython-part2/"/>
<updated>2016-08-31T04:17:25+00:00</updated>
<id>https://home-assistant.io/blog/2016/08/31/esp8266-and-micropython-part2</id>
<content type="html"><![CDATA[<img src='https://home-assistant.io/images/blog/2016-07-micropython/micropython.png' style='clear: right; border:none; box-shadow: none; float: right; margin-bottom: 12px;' width='200' />
So, part 1 of [ESP8266 and MicroPython](/blog/2016/07/28/esp8266-and-micropython-part1/) was pretty lame, right? Instead of getting information out of Home Assistant we are going a step forward and create our own sensor which is sending details about its state to a Home Assistant instance.
<!--more-->
Beside [HTTP POST](https://en.wikipedia.org/wiki/POST_(HTTP)) requests, MQTT is the quickest way (from the author's point of view) to publish information with DIY devices.
You have to make a decision: Do you want to pull or to poll? For slowly changing values like temperature it's perfectly fine to wait a couple of seconds to retrieve the value. If it's a motion detector the state change should be available instantly. This means the sensor must take initiative.
An example for pulling is [aREST](/components/sensor.arest/). This is a great way to work with the ESP8266 based units and the Ardunio IDE.
### <a class='title-link' name='mqtt' href='#mqtt'></a> MQTT
You can find a simple examples for publishing and subscribing with MQTT in the [MicroPython](https://github.com/micropython/micropython-lib) library overview in the section for [umqtt](https://github.com/micropython/micropython-lib/tree/master/umqtt.simple).
The example below is adopted from the work of [@davea](https://github.com/davea) as we don't want to re-invent the wheel. The configuration feature is crafty and simplyfies the code with the usage of a file called `/config.json` which stores the configuration details. The ESP8266 device will send the value of a pin every 5 seconds.
```python
import machine
import time
import ubinascii
import webrepl
from umqtt.simple import MQTTClient
# These defaults are overwritten with the contents of /config.json by load_config()
CONFIG = {
"broker": "192.168.1.19",
"sensor_pin": 0,
"client_id": b"esp8266_" + ubinascii.hexlify(machine.unique_id()),
"topic": b"home",
}
client = None
sensor_pin = None
def setup_pins():
global sensor_pin
sensor_pin = machine.ADC(CONFIG['sensor_pin'])
def load_config():
import ujson as json
try:
with open("/config.json") as f:
config = json.loads(f.read())
except (OSError, ValueError):
print("Couldn't load /config.json")
save_config()
else:
CONFIG.update(config)
print("Loaded config from /config.json")
def save_config():
import ujson as json
try:
with open("/config.json", "w") as f:
f.write(json.dumps(CONFIG))
except OSError:
print("Couldn't save /config.json")
def main():
client = MQTTClient(CONFIG['client_id'], CONFIG['broker'])
client.connect()
print("Connected to {}".format(CONFIG['broker']))
while True:
data = sensor_pin.read()
client.publish('{}/{}'.format(CONFIG['topic'],
CONFIG['client_id']),
bytes(str(data), 'utf-8'))
print('Sensor state: {}'.format(data))
time.sleep(5)
if __name__ == '__main__':
load_config()
setup_pins()
main()
```
Subscribe to the topic `home/#` or create a [MQTT sensor](/components/sensor.mqtt/) to check if the sensor values are published.
```bash
$ mosquitto_sub -h 192.168.1.19 -v -t "home/#"
```
```yaml
sensor:
- platform: mqtt
state_topic: "home/esp8266_[last part of the MAC address]"
name: "MicroPython"
```
[@davea](https://github.com/davea) created [sonoff-mqtt](https://github.com/davea/sonoff-mqtt). This code will work on ESP8622 based devices too and shows how to use a button to control a relay.
]]></content>
</entry>
<entry>
<title type="html"><![CDATA[ESP8266 and MicroPython - Part 1]]></title>
<link href="https://home-assistant.io/blog/2016/07/28/esp8266-and-micropython-part1/"/>

View file

@ -98,6 +98,44 @@
<h2>2016</h2>
<article>
<div class="grid">
<div class="grid__item one-fifth palm-one-whole">
<time datetime="2016-08-31T04:17:25+00:00" pubdate>
<span class='month'>Aug</span> <span class='day'>31</span>
</time>
</div>
<div class="grid__item four-fifths palm-one-whole">
<h1 class="gamma"><a href="/blog/2016/08/31/esp8266-and-micropython-part2/">ESP8266 and MicroPython - Part 2</a></h1>
<footer class="meta">
<span>
<i class="icon-tags"></i>
<ul class="tags unstyled">
<li><a class='category' href='/blog/categories/esp8266/'>ESP8266</a></li>
<li><a class='category' href='/blog/categories/how-to/'>How-To</a></li>
<li><a class='category' href='/blog/categories/mqtt/'>MQTT</a></li>
<li><a class='category' href='/blog/categories/micropython/'>Micropython</a></li>
</ul>
</span>
</footer>
<hr class="divider">
</div>
</div>
</article>
<article>
<div class="grid">
@ -189,6 +227,12 @@
<ul class="divided">
<li class="post">
<a href="/blog/2016/08/31/esp8266-and-micropython-part2/">ESP8266 and MicroPython - Part 2</a>
</li>
<li class="post">
<a href="/blog/2016/08/28/notifications-hue-fake-unification/">0.27 is here to break eggs and take names: notifications, Hue fakery, safety and unification come to Home Assistant</a>
</li>
@ -212,12 +256,6 @@
</li>
<li class="post">
<a href="/blog/2016/08/07/optimizing-the-home-assistant-mobile-web-app/">Optimizing the Home Assistant mobile web app</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-08-30T21:57:10+00:00</updated>
<updated>2016-08-31T05:03:39+00:00</updated>
<id>https://home-assistant.io/</id>
<author>
<name><![CDATA[Home Assistant]]></name>
@ -13,6 +13,108 @@
<generator uri="http://octopress.org/">Octopress</generator>
<entry>
<title type="html"><![CDATA[ESP8266 and MicroPython - Part 2]]></title>
<link href="https://home-assistant.io/blog/2016/08/31/esp8266-and-micropython-part2/"/>
<updated>2016-08-31T04:17:25+00:00</updated>
<id>https://home-assistant.io/blog/2016/08/31/esp8266-and-micropython-part2</id>
<content type="html"><![CDATA[<img src='https://home-assistant.io/images/blog/2016-07-micropython/micropython.png' style='clear: right; border:none; box-shadow: none; float: right; margin-bottom: 12px;' width='200' />
So, part 1 of [ESP8266 and MicroPython](/blog/2016/07/28/esp8266-and-micropython-part1/) was pretty lame, right? Instead of getting information out of Home Assistant we are going a step forward and create our own sensor which is sending details about its state to a Home Assistant instance.
<!--more-->
Beside [HTTP POST](https://en.wikipedia.org/wiki/POST_(HTTP)) requests, MQTT is the quickest way (from the author's point of view) to publish information with DIY devices.
You have to make a decision: Do you want to pull or to poll? For slowly changing values like temperature it's perfectly fine to wait a couple of seconds to retrieve the value. If it's a motion detector the state change should be available instantly. This means the sensor must take initiative.
An example for pulling is [aREST](/components/sensor.arest/). This is a great way to work with the ESP8266 based units and the Ardunio IDE.
### <a class='title-link' name='mqtt' href='#mqtt'></a> MQTT
You can find a simple examples for publishing and subscribing with MQTT in the [MicroPython](https://github.com/micropython/micropython-lib) library overview in the section for [umqtt](https://github.com/micropython/micropython-lib/tree/master/umqtt.simple).
The example below is adopted from the work of [@davea](https://github.com/davea) as we don't want to re-invent the wheel. The configuration feature is crafty and simplyfies the code with the usage of a file called `/config.json` which stores the configuration details. The ESP8266 device will send the value of a pin every 5 seconds.
```python
import machine
import time
import ubinascii
import webrepl
from umqtt.simple import MQTTClient
# These defaults are overwritten with the contents of /config.json by load_config()
CONFIG = {
"broker": "192.168.1.19",
"sensor_pin": 0,
"client_id": b"esp8266_" + ubinascii.hexlify(machine.unique_id()),
"topic": b"home",
}
client = None
sensor_pin = None
def setup_pins():
global sensor_pin
sensor_pin = machine.ADC(CONFIG['sensor_pin'])
def load_config():
import ujson as json
try:
with open("/config.json") as f:
config = json.loads(f.read())
except (OSError, ValueError):
print("Couldn't load /config.json")
save_config()
else:
CONFIG.update(config)
print("Loaded config from /config.json")
def save_config():
import ujson as json
try:
with open("/config.json", "w") as f:
f.write(json.dumps(CONFIG))
except OSError:
print("Couldn't save /config.json")
def main():
client = MQTTClient(CONFIG['client_id'], CONFIG['broker'])
client.connect()
print("Connected to {}".format(CONFIG['broker']))
while True:
data = sensor_pin.read()
client.publish('{}/{}'.format(CONFIG['topic'],
CONFIG['client_id']),
bytes(str(data), 'utf-8'))
print('Sensor state: {}'.format(data))
time.sleep(5)
if __name__ == '__main__':
load_config()
setup_pins()
main()
```
Subscribe to the topic `home/#` or create a [MQTT sensor](/components/sensor.mqtt/) to check if the sensor values are published.
```bash
$ mosquitto_sub -h 192.168.1.19 -v -t "home/#"
```
```yaml
sensor:
- platform: mqtt
state_topic: "home/esp8266_[last part of the MAC address]"
name: "MicroPython"
```
[@davea](https://github.com/davea) created [sonoff-mqtt](https://github.com/davea/sonoff-mqtt). This code will work on ESP8622 based devices too and shows how to use a button to control a relay.
]]></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/"/>

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