home-assistant.github.io/atom.xml
2016-02-08 17:12:11 +00:00

1868 lines
123 KiB
XML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
<title><![CDATA[Home Assistant]]></title>
<link href="https://home-assistant.io/atom.xml" rel="self"/>
<link href="https://home-assistant.io/"/>
<updated>2016-02-08T17:11:51+00:00</updated>
<id>https://home-assistant.io/</id>
<author>
<name><![CDATA[Paulus Schoutsen]]></name>
</author>
<generator uri="http://octopress.org/">Octopress</generator>
<entry>
<title type="html"><![CDATA[0.12: Insteon, LIFX, Twitter and ZigBee]]></title>
<link href="https://home-assistant.io/blog/2016/01/30/insteon-lifx-twitter-and-zigbee/"/>
<updated>2016-01-30T08:22:00+00:00</updated>
<id>https://home-assistant.io/blog/2016/01/30/insteon-lifx-twitter-and-zigbee</id>
<content type="html"><![CDATA[<p>Another sprint has come to an end and it seems that we have not slowed down a single bit 🚀. 0.12 is full of new components, platforms and organizational additions.</p>
<p>I would like to give a shout out to <a href="https://github.com/pavoni">Greg Dowling (@pavoni)</a> as every release includes new work from him. He is constantly adding support for new platforms or improving the reliablity of existing components and platforms. Keep up the good work!</p>
<p>This release includes a very frequent requested feature: the ability to organize entities in different tabs in the frontend. See <a href="https://home-assistant.io/demo/">the demo</a> to see this in action and read more in the <a href="https://home-assistant.io/components/group/">group documentation</a> how to get started.</p>
<p class="img">
<a href="https://home-assistant.io/demo/"><img src="https://home-assistant.io/images/blog/2016-01-release-12/views.png" /></a>
Example of the new views in the frontend. <a href="https://home-assistant.io/components/group/">Learn more.</a>
</p>
<p><img src="https://home-assistant.io/images/supported_brands/insteon.png" style="clear: right; border:none; box-shadow: none; float: right; margin-bottom: 16px;" width="150" /><img src="https://home-assistant.io/images/supported_brands/lifx.png" style="clear: right; border:none; box-shadow: none; float: right; margin-bottom: 16px;" width="150" /><img src="https://home-assistant.io/images/supported_brands/twitter.png" style="clear: right; border:none; box-shadow: none; float: right; margin-bottom: 16px;" width="150" /><img src="https://home-assistant.io/images/supported_brands/zigbee.png" style="clear: right; border:none; box-shadow: none; float: right; margin-bottom: 16px;" width="150" /><img src="https://home-assistant.io/images/supported_brands/google_voice.png" style="clear: right; border:none; box-shadow: none; float: right; margin-bottom: 16px;" width="150" /></p>
<ul>
<li>Binary sensor: <a href="https://home-assistant.io/components/binary_sensor.command/">command sensor</a> added (<a href="https://github.com/Bart274">@Bart274</a>)</li>
<li><a href="https://home-assistant.io/components/nest/">Nest</a> support extended to include sensors and binary sensors (<a href="https://github.com/joshughes">@joshughes</a>)</li>
<li>Light: <a href="https://home-assistant.io/components/light.lifx/">LIFX</a> platform added (<a href="https://github.com/TangoAlpha">@TangoAlpha</a>)</li>
<li>Notify: <a href="https://home-assistant.io/components/notify.twitter/">Twitter</a> platform added (<a href="https://github.com/HydrelioxGitHub">@HydrelioxGitHub</a>)</li>
<li>Sensor: <a href="https://home-assistant.io/components/sensor.template/">Template</a> platform added (<a href="https://github.com/pavoni">@pavoni</a>)</li>
<li>Switch: <a href="https://home-assistant.io/components/wink/">Wink</a> platform now supports sirens (<a href="https://github.com/w1ll1am23">@w1ll1am23</a>)</li>
<li><a href="https://home-assistant.io/components/insteon_hub/">Insteon hub</a> support added (<a href="https://github.com/FreekingDean">@FreekingDean</a>)</li>
<li><a href="https://home-assistant.io/components/statsd/">Statsd</a> component added (<a href="https://github.com/michaelkuty">@michaelkuty</a>)</li>
<li>Light: <a href="https://home-assistant.io/components/light.rfxtrx/">Rfxtrx</a> platform now supports dimming (<a href="https://github.com/turbokongen">@turbokongen</a>)</li>
<li>Time scheduling (including <a href="https://home-assistant.io/components/automation/#time-trigger/">time automation</a>) now works with intervals (ie. <code>/5</code>) (<a href="https://github.com/kennedyshead">@kennedyshead</a>)</li>
<li>Sensor: <a href="https://home-assistant.io/components/sensor.onewire/">onewire</a> support added (<a href="https://github.com/deisi">@deisi</a>)</li>
<li><a href="https://home-assistant.io/components/zigbee/">Zigbee</a> support added (<a href="https://github.com/flyte">@flyte</a>)</li>
<li>Device Tracker: <a href="https://home-assistant.io/components/device_tracker.owntracks/">OwnTracks</a> can now track iBeacons (<a href="https://github.com/pavoni">@pavoni</a>)</li>
<li>Notify: <a href="https://home-assistant.io/components/notify.google_voice/">Google Voice SMS</a> platform added (<a href="https://github.com/w1ll1am23">@w1ll1am23</a>)</li>
<li>Toggle service added to <code>homeassistant</code>, <code>switch</code>, <code>light</code> and <code>media_player</code> (<a href="https://github.com/rmkraus">@rmkraus</a>)</li>
<li><a href="https://home-assistant.io/components/thermostat/">Thermostat</a> services added to control fans (<a href="https://github.com/auchter">@auchter</a>)</li>
<li>Improved Python automation: Event helpers are now also available as decorators for custom components (<a href="https://github.com/rmkraus">@rmkraus</a>)</li>
<li>Frontend: support added for tabs to show <a href="https://home-assistant.io/components/group/">different views</a> of your house (<a href="https://github.com/balloob">@balloob</a>)</li>
<li>Bugfixes by <a href="https://github.com/molobrakos">@molobrakos</a>, <a href="https://github.com/MartinHjelmare">@MartinHjelmare</a>, <a href="https://github.com/pavoni">@pavoni</a>, <a href="https://github.com/trollkarlen">@trollkarlen</a>, <a href="https://github.com/zmrow">@zmrow</a>, <a href="https://github.com/maddox">@maddox</a>, <a href="https://github.com/persandstrom">@persandstrom</a>, <a href="https://github.com/happyleavesaoc">@happyleavesaoc</a>, <a href="https://github.com/balloob">@balloob</a>, <a href="https://github.com/fabaff">@fabaff</a>, <a href="https://github.com/stefan-jonasson">@stefan-jonasson</a>, <a href="https://github.com/haraldnagel">@haraldnagel</a>.</li>
</ul>
<h3>Backwards incompatible changes</h3>
<ul>
<li>Nest config has moved from thermostat to the <a href="https://home-assistant.io/components/nest/">Nest component</a>.</li>
<li>Entity IDs for Z-Wave devices are now generated in a deterministic way causing all IDs to change starting this release. This is a one time change.</li>
</ul>
]]></content>
</entry>
<entry>
<title type="html"><![CDATA[Perfect Home Automation]]></title>
<link href="https://home-assistant.io/blog/2016/01/19/perfect-home-automation/"/>
<updated>2016-01-19T08:20:00+00:00</updated>
<id>https://home-assistant.io/blog/2016/01/19/perfect-home-automation</id>
<content type="html"><![CDATA[<p>People often ask me about my vision for Home Assistant. Before I can describe where I want to go with Home Assistant, I should first talk about how home automation would look in my ideal world. This will be the aim of this post. Im not going to focus on protocols, networks or specific hubs. Thats all implementation details. Instead, this post will focus on what is most important: the interaction between the users and their home.</p>
<h3>You should not have to adapt to technology.</h3>
<p>When people start using home automation, they always experience home control first: being able to control devices in new ways using a phone or computer. They believe the future is now and their app will be their remote for their lives. They only focus on what they are getting, not on what they are losing. You install some light bulbs and all of a sudden you are no longer able to use the light switches. Youll arrive at home at night and have to pull out your phone, open the app, let it connect and finally youll be able to turn on the light. All while turning the light on could have been a switch away.</p>
<p>Yes, you can solve this with presence detection. What if your phone runs out of battery? Youll have to resort to the switch again.</p>
<p>If you find that using your new home devices is cumbersome, the promise of home automation technology has failed you. Your lights should work with both a switch (or button) at the entrance of your room and via presence detection. Honestly, there are hardly any valid use cases for being able to control lights from your phone except for showing off.<br />
<!--more--></p>
<h3>You are not the only user of your home automation.</h3>
<p>People tend to forget that they are not the only ones in their home. As the developer of your house youre enthusiastic about the possibilities and are willing to overlook flaws. Chances are very high that the other people in your household have different hobbies and just want to mind their own business.</p>
<p>This means that everything you automate has to work flawlessly. If you successfully manage to cause a response to some stimulus 90% of the time, youre going to have a disproportionately poor experience 10% of the time. A common automation that fits this pattern is to fade the lights when you start watching a movie or series in the living room. It only works if everyone is watching.</p>
<h3>Limit the impact of false positives and negatives.</h3>
<p>With every automation, you always have to think: what will be the impact if it doesnt work? Home automation is composed of many different systems by many different vendors that speak many different protocols: things will go wrong. Its up to you to make sure that they have a limited impact when they fail. Ideally, devices should fall back to a pre-smart home experience. A Philips Hue bulb will act like a standard white light if turned on/off using a normal switch or when not connected to a hub. If things get worse when your system is out of order, your users will revolt. Take for example the Nest thermostat that <a href="http://www.nytimes.com/2016/01/14/fashion/nest-thermostat-glitch-battery-dies-software-freeze.html">had a bug in the beginning of January</a> which caused it to stop heating the house, yikes!</p>
<h3>The perfect app is no app.</h3>
<p>Home automation should blend with your current workflow, not replace it. For most devices, there is no faster way to control most devices than how you are already doing it today. Most of the time, the best app is no app. The only interface that can be more convenient, and is accessible for visitors of your home of all ages is a voice interface. The industry has realized this too and there are some major players focussing on voice interaction. Take Apple for example: the only way to control your HomeKit devices is with Siri. Amazon has taken it one step further with the Amazon Echo, providing an always-listening connected speaker/microphone for the living room. I expect a lot more companies to join this segment in 2016.</p>
<p>Voice interfaces are not perfect either. The speed at which you can issue commands is low because you have to wait for a response. There are also issues with the discoverability of commands, recognition of accents and dependency on the cloud for processing your voice. I believe that all but the first one are problems that are going to be solved eventually.</p>
<p>This however doesnt mean there isnt a place for apps, there definitely is. They are perfectly well-suited for checking in while youre away, browsing the state changes of your house or making the lights go all funky when there are kids visiting.</p>
<h3>Your system should run at home, not in the cloud.</h3>
<p>The cloud is a magical thing. Somewhere in the world there are computers collecting the data that your house generates, testing them against your automation rules and sending commands back when needed. The cloud will receive updates and improve itself over time so it is able to serve you better. Until its not. There are many reasons why your home might lose its connection to the cloud. The internet can stop working, an update might have gone wrong or the servers running the cloud crash.</p>
<p>When this happens, your house should be able to keep functioning. The cloud should be treated as an extension to your smart home instead of running it. That way youll avoid awkward situations like when Amazon AWS was down and the <a href="http://www.zdnet.com/article/the-night-alexa-lost-her-mind/">Amazon Echo stopped working</a>.</p>
<p><strong>Good home automation never annoys but is missed when it is not working.</strong></p>
<p><em>Thanks to Chris LaRose for this feedback and comments.</em></p>
]]></content>
</entry>
<entry>
<title type="html"><![CDATA[0.11: Extended support for DIY solutions]]></title>
<link href="https://home-assistant.io/blog/2016/01/17/extended-support-for-diy-solutions/"/>
<updated>2016-01-17T23:20:00+00:00</updated>
<id>https://home-assistant.io/blog/2016/01/17/extended-support-for-diy-solutions</id>
<content type="html"><![CDATA[<p>First release of 2016 and we are on 🔥! The <a href="https://github.com/balloob/home-assistant/">main repository</a> has passed 2500 ⭐ on GitHub (2596 ⭐ as of now). This release also has a <a href="https://github.com/balloob/home-assistant/pull/883#partial-users-participants">record number</a> of 20 contributors all working on improving and extending Home Assistant. With the continued growth, I am very excited to see what 2016 will bring us 🤘.</p>
<p><img src="https://home-assistant.io/images/supported_brands/mysensors.png" style="clear: right; border:none; box-shadow: none; float: right; margin-bottom: 16px;" width="150" /><img src="https://home-assistant.io/images/supported_brands/raspberry-pi.png" style="clear: right; border:none; box-shadow: none; float: right; margin-bottom: 16px;" width="50" /><img src="https://home-assistant.io/images/supported_brands/yr.png" style="clear: right; border:none; box-shadow: none; float: right; margin-bottom: 16px;" width="150" /><img src="https://home-assistant.io/images/supported_brands/telldus.png" style="clear: right; border:none; box-shadow: none; float: right; margin-bottom: 16px;" width="150" /><img src="https://home-assistant.io/images/supported_brands/free_mobile.png" style="clear: right; border:none; box-shadow: none; float: right; margin-bottom: 16px;" width="150" /><img src="https://home-assistant.io/images/supported_brands/netatmo.png" style="clear: right; border:none; box-shadow: none; float: right; margin-bottom: 16px;" width="150" /><img src="https://home-assistant.io/images/supported_brands/alarmdotcom.png" style="clear: right; border:none; box-shadow: none; float: right; margin-bottom: 16px;" width="150" /><img src="https://home-assistant.io/images/supported_brands/proliphix.png" style="clear: right; border:none; box-shadow: none; float: right; margin-bottom: 16px;" width="150" /></p>
<ul>
<li><a href="https://home-assistant.io/components/mysensors/">MySensors</a> revamped and switch support added (<a href="https://github.com/MartinHjelmare">@MartinHjelmare</a>)</li>
<li>Full refactor of RPi GPIO. Now includes <a href="https://home-assistant.io/components/binary_sensor.rpi_gpio/">binary sensor</a> and <a href="https://home-assistant.io/components/switch.rpi_gpio/">switch</a> (<a href="https://github.com/sfam">@sfam</a>)</li>
<li>Sensor: <a href="https://home-assistant.io/components/sensor.yr/">YR</a> platform added (<a href="https://github.com/danielhiversen">@danielhiversen</a>)</li>
<li>Device Tracker: Geofancy platform has been renamed to <a href="https://home-assistant.io/components/device_tracker.locative/">Locative</a> (<a href="https://github.com/philipbl">@philipbl</a>)</li>
<li>Automation: Add <a href="https://home-assistant.io/components/automation/#sun-condition/">sun condition</a> (<a href="https://github.com/philipbl">@philipbl</a>)</li>
<li>Switch: <a href="https://home-assistant.io/components/switch.command_switch/">command_switch</a> can now poll for state (<a href="https://github.com/happyleavesaoc">@happyleavesaoc</a>)</li>
<li>Switch: <a href="https://home-assistant.io/components/switch.wemo/">wemo</a> now uses subscription to states instead of polling (<a href="https://github.com/pavoni">@pavoni</a>)</li>
<li><a href="https://home-assistant.io/components/tellduslive/">Telldus Live</a> support added (<a href="https://github.com/molobrakos">@molobrakos</a>)</li>
<li><a href="https://home-assistant.io/components/vera/">Vera</a> now uses subscription to states instead of polling (<a href="https://github.com/pavoni">@pavoni</a>)</li>
<li>New <a href="https://home-assistant.io/getting-started/templating/#home-assistant-template-extensions/">template helper method</a> <code>is_state_attr(entity_id, name, value)</code> added (<a href="https://github.com/andythigpen">@andythigpen</a>)</li>
<li>Device tracker: <a href="https://home-assistant.io/components/device_tracker.owntracks/">OwnTracks</a> transition events now supported (<a href="https://github.com/xifle">@xifle</a>)</li>
<li>Light: <a href="https://home-assistant.io/components/light.hue/">Philips Hue</a> platform now supports multiple hubs (<a href="https://github.com/rhooper">@rhooper</a>)</li>
<li>Notify: <a href="https://home-assistant.io/components/notify.free_mobile/">Free Mobile</a> platform added (<a href="https://github.com/HydrelioxGitHub">@HydrelioxGitHub</a>)</li>
<li>New <a href="https://home-assistant.io/components/mqtt_eventstream/">MQTT Eventstream</a> component to connect two Home Assistant instances over MQTT (<a href="https://github.com/moonshot">@moonshot</a>)</li>
<li>Media player: <a href="https://home-assistant.io/components/media_player.cast/">Cast</a> huge stability improvements (<a href="https://github.com/rmkraus">@rmkraus</a>)</li>
<li>Media Player: <a href="https://home-assistant.io/components/media_player.universal/">Universal media player</a> added to combine multiple media players (<a href="https://github.com/rmkraus">@rmkraus</a>)</li>
<li>Sensor: <a href="https://home-assistant.io/components/sensor.netatmo/">Netatmo</a> platform added (<a href="https://github.com/HydrelioxGitHub">@HydrelioxGitHub</a>)</li>
<li>Alarm Control Panel: <a href="https://home-assistant.io/components/alarm_control_panel.alarmdotcom/">Alarm.com</a> platform added (<a href="https://github.com/Xorso">@Xorso</a>)</li>
<li>Thermostat: <a href="https://home-assistant.io/components/thermostat.proliphix/">Proliphix</a> platform added (<a href="https://github.com/sdague">@sdague</a>)</li>
<li>New component <a href="https://home-assistant.io/components/input_boolean/">input_boolean</a> will allow for customizing automation (<a href="https://github.com/balloob">@balloob</a>)</li>
<li>Support calling services via <a href="https://home-assistant.io/components/alexa/">Amazon Echo</a> (<a href="https://github.com/balloob">@balloob</a>)</li>
</ul>
<h3>Backwards incompatible changes</h3>
<ul>
<li>The <a href="https://home-assistant.io/components/binary_sensor.rpi_gpio/">RPi.GPIO sensor platform</a> has been moved to the <code>binary_sensor</code> component.</li>
<li><a href="https://home-assistant.io/components/sensor.mysensors/">MySensors sensor platform</a> now requires the <a href="https://home-assistant.io/components/mysensors/">MySensors</a> component to be configured.</li>
<li>Geofancy platform has been renamed to <a href="https://home-assistant.io/components/device_tracker.locative/">Locative</a>.</li>
</ul>
]]></content>
</entry>
<entry>
<title type="html"><![CDATA[0.10: Amazon Echo, iCloud, Dweet.io, Twitch and templating support!]]></title>
<link href="https://home-assistant.io/blog/2015/12/22/amazon-echo-icloud-and-templates/"/>
<updated>2015-12-22T09:30:00+00:00</updated>
<id>https://home-assistant.io/blog/2015/12/22/amazon-echo-icloud-and-templates</id>
<content type="html"><![CDATA[<p>Alrighty, its time for Home Assistant 0.10. A lot amazing things have changed and sadly we also had to introduce a bunch of backwards incompatible changes. I would like to give a big shoutout to Philip Lundrigan (<a href="https://github.com/philipbl">@philipbl</a>) who put a lot in effort in helping the migration to move towards using templates for a wide variety of platforms.</p>
<div class="videoWrapper">
<iframe width="560" height="315" src="https://www.youtube.com/embed/1Ke3mtWd_cQ" frameborder="0" allowfullscreen=""></iframe>
</div>
<p><img src="https://home-assistant.io/images/supported_brands/icloud.png" style="clear: right; border:none; box-shadow: none; float: right; margin-bottom: 16px;" width="150" /><img src="https://home-assistant.io/images/supported_brands/heatmiser.png" style="clear: right; border:none; box-shadow: none; float: right; margin-bottom: 16px;" width="150" /><img src="https://home-assistant.io/images/supported_brands/dweet.png" style="clear: right; border:none; box-shadow: none; float: right; margin-bottom: 16px;" width="150" /><img src="https://home-assistant.io/images/supported_brands/amazon-echo.png" style="clear: right; border:none; box-shadow: none; float: right; margin-bottom: 16px;" width="150" /><img src="https://home-assistant.io/images/supported_brands/eliq.png" style="clear: right; border:none; box-shadow: none; float: right; margin-bottom: 16px;" width="150" /></p>
<ul>
<li>Device tracker: <a href="https://home-assistant.io/components/device_tracker.icloud/">iCloud</a> platform added (<a href="https://github.com/xorso">@xorso</a>, <a href="https://github.com/kevinpanaro">@kevinpanaro</a>)</li>
<li>Frontend: Improved caching using service workers if served over SSL (<a href="https://github.com/balloob">@balloob</a>)</li>
<li>Sensor: <a href="https://home-assistant.io/components/sensor.twitch/">Twitch</a> platform added (<a href="https://github.com/happyleavesaoc">@happyleavesaoc</a>)</li>
<li><a href="https://home-assistant.io/getting-started/templating/">Template</a> support (<a href="https://github.com/balloob">@balloob</a>, <a href="https://github.com/philipbl">@philipbl</a>, <a href="https://github.com/fabaff">@fabaff</a>)</li>
<li>Thermostat: <a href="https://home-assistant.io/components/thermostat.heatmiser/">Heatmiser</a> platform added (<a href="https://github.com/andylockran">@andylockran</a>)</li>
<li>Sensor: <a href="https://home-assistant.io/components/sensor.dweet/">Dweet.io</a> platform added (<a href="https://github.com/fabaff">@fabaff</a>)</li>
<li><a href="https://home-assistant.io/components/alexa/">Alexa/Amazon echo</a> component added (<a href="https://github.com/balloob">@balloob</a>)</li>
<li>Device Tracker: <a href="https://home-assistant.io/components/device_tracker.fritz/">FritzBox</a> platform added (<a href="https://github.com/deisi">@deisi</a>, <a href="https://github.com/caiuspb">@caiuspb</a>)</li>
<li>Sensor: <a href="https://home-assistant.io/components/sensor.wink/">Wink</a> now supports the Egg minders (<a href="https://github.com/w1ll1am23">@w1ll1am23</a>)</li>
<li>Sensor: <a href="https://home-assistant.io/components/sensor.eliqonline/">ELIQ Online</a> platform added (<a href="https://github.com/molobrakos">@molobrakos</a>)</li>
<li>Binary sensor: <a href="https://home-assistant.io/components/binary_sensor.rest/">REST</a> platform added (<a href="https://github.com/fabaff">@fabaff</a>)</li>
<li>Sensor: <a href="https://home-assistant.io/components/sensor.torque/">Torque (OBD2)</a> platform added (<a href="https://github.com/happyleavesaoc">@happyleavesaoc</a>)</li>
</ul>
<!--more-->
<h3>Templates</h3>
<p>This release introduces templates. This will allow you to parse data before it gets processed or create messages for notifications on the fly based on data within Home Assistant. The notification component and the new Alexa/Amazon Echo component are both using the new template functionality to render responses. A template editor has been added to the developer tool section in the app so you can get instant feedback if your templates are working or not.</p>
<div class="highlighter-coderay"><div class="CodeRay">
<div class="code"><pre>The temperature at home is {{ states('sensor.temperature') }}.
</pre></div>
</div>
</div>
<p>More information and examples can be found in the <a href="https://home-assistant.io/getting-started/templating/">template documentation</a>.</p>
<h3>Breaking changes</h3>
<p>Templates will now be the only way to extract data from raw sources like REST, CommandSensor or MQTT. This will replace any specific option that used to do this before. This means that <code>precision</code>, <code>factor</code>, <code>attribute</code> or <code>json_path</code> etc will no longer work.</p>
<p>Affected components and platforms:</p>
<ul>
<li>sensor: <a href="https://home-assistant.io/components/sensor.arest/">arest</a></li>
<li>sensor: <a href="https://home-assistant.io/components/sensor.command_sensor/">command_sensor</a></li>
<li>sensor: <a href="https://home-assistant.io/components/sensor.rest/">rest</a></li>
<li>sensor: <a href="https://home-assistant.io/components/sensor.mqtt/">MQTT</a></li>
<li>switch: <a href="https://home-assistant.io/components/switch.mqtt/">MQTT</a></li>
<li>rollershutter: <a href="https://home-assistant.io/components/rollershutter.mqtt/">MQTT</a></li>
<li>light: <a href="https://home-assistant.io/components/light.mqtt/">MQTT</a></li>
<li>binary_sensor: <a href="https://home-assistant.io/components/binary_sensor.mqtt/">MQTT</a></li>
<li>automation: <a href="https://home-assistant.io/components/automation/#numeric-state-trigger/">numeric_state</a></li>
</ul>
]]></content>
</entry>
<entry>
<title type="html"><![CDATA[Set up encryption using Let's Encrypt]]></title>
<link href="https://home-assistant.io/blog/2015/12/13/setup-encryption-using-lets-encrypt/"/>
<updated>2015-12-13T18:05:00+00:00</updated>
<id>https://home-assistant.io/blog/2015/12/13/setup-encryption-using-lets-encrypt</id>
<content type="html"><![CDATA[<p>Exposing your Home Assistant instance outside of your network always has been tricky. You have to set up port forwarding on your router and most likely add a dynamic DNS service to work around your ISP changing your IP. After this you would be able to use Home Assistant from anywhere but there is one big red flag: no encryption.</p>
<p>This tutorial will take you through the steps to setup a dynamic DNS for your IP and allow trusted encrypted connection to it - for free using <a href="https://duckdns.org">DuckDNS</a> and <a href="https://letsencrypt.org">Lets Encrypt</a>.</p>
<p class="img">
<img src="https://home-assistant.io/images/blog/2015-12-lets-encrypt/letsencrypt-secured.png" />
</p>
<!--more-->
<h3><a class="title-link" name="requirements" href="#requirements"></a> Requirements</h3>
<p>The DuckDNS part of this tutorial has no requirements but there are a few requirements as of now to run the Lets Encrypt client.</p>
<ul>
<li>Direct connection to the internet or admin access to your router to set up port forwarding</li>
<li>A machine running a Unix-ish OS that include Python 2.6 or 2.7 (Docker can be used)</li>
</ul>
<p><img src="https://home-assistant.io/images/supported_brands/duckdns.png" style="clear: right; border:none; box-shadow: none; float: right; margin-left: 8px; margin-bottom: 8px;" width="60" /></p>
<h3><a class="title-link" name="duckdns" href="#duckdns"></a> DuckDNS</h3>
<p>The first step is to set up <a href="https://duckdns.org">DuckDNS</a>. This is a free dynamic DNS service that you can use to get a DuckDNS.org subdomain to point at your house. A dynamic DNS service works by having your home computer tell DuckDNS.org every 5 minutes what its IP is so that DuckDNS can make sure your domain name is set up correctly.</p>
<p>For this example we will assume our domain is hass-example.duckdns.org.</p>
<p>First step is to acquire and set up our domain name. For this, go to <a href="https://duckdns.org">DuckDNS</a>, log in with any of the supported login providers and add a domain. After this check out their <a href="https://www.duckdns.org/install.jsp">installation instructions</a> to finish your installation of DuckDNS. If youre on a Raspberry Pi, see Pi in the category Operating Systems.</p>
<p><img src="https://home-assistant.io/images/supported_brands/letsencrypt.png" style="clear: right; border:none; box-shadow: none; float: right; margin-left: 8px; margin-bottom: 8px;" width="60" /></p>
<h3><a class="title-link" name="lets-encrypt" href="#lets-encrypt"></a> Lets Encrypt</h3>
<p><a href="https://letsencrypt.org">Lets Encrypt</a> is a free, automated, and open certificate authority (CA). We will use this to acquire a certificate that can be used to encrypted our connection with Home Assistant.</p>
<p>Lets Encrypt will give you a free 90-day certificate if you pass their domain validation challenge. Domains are validated by having certain data be accessible on your domain for Lets Encrypt (<a href="https://letsencrypt.org/howitworks/technology/">they describe it better themselves</a>).</p>
<p>Assuming that your home is behind a router, the first thing to do is to set up port forwarding from your router to your computer that will run Lets Encrypt. For the Lets Encrypt set up we need to temporary forward ports <code>80</code> (http connections) and <code>443</code> (https connections). This can be set up by accessing your router admin interface (<a href="http://portforward.com">Site with port forwarding instructions per router</a>).</p>
<p>Now youre ready to run Lets Encrypt:</p>
<div class="highlighter-coderay"><div class="CodeRay">
<div class="code"><pre>$ git clone https://github.com/letsencrypt/letsencrypt
[…]
$ cd letsencrypt
$ ./letsencrypt-auto certonly --email $ ./letsencrypt-auto certonly --email your@email.address -d hass-example.duckdns.org
Updating letsencrypt and virtual environment dependencies.......
Running with virtualenv: sudo /path/letsencrypt/bin/letsencrypt certonly --email your@e-mail.address -d hass-example.duckdns.org
IMPORTANT NOTES:
- Congratulations! Your certificate and chain have been saved at
/etc/letsencrypt/live/hass-example.duckdns.org/fullchain.pem. Your cert
will expire on 2016-03-12. To obtain a new version of the
certificate in the future, simply run Let's Encrypt again.
- If like Let's Encrypt, please consider supporting our work by:
Donating to ISRG / Let's Encrypt: https://letsencrypt.org/donate
Donating to EFF: https://eff.org/donate-le
</pre></div>
</div>
</div>
<p>If youre using Docker, run the following command to generate the required keys:</p>
<div class="highlighter-coderay"><div class="CodeRay">
<div class="code"><pre>sudo mkdir /etc/letsencrypt /var/lib/letsencrypt
sudo docker run -it --rm -p 443:443 -p 80:80 --name letsencrypt \
-v &quot;/etc/letsencrypt:/etc/letsencrypt&quot; \
-v &quot;/var/lib/letsencrypt:/var/lib/letsencrypt&quot; \
quay.io/letsencrypt/letsencrypt:latest certonly \
--email your@e-mail.address -d hass-example.duckdns.org
</pre></div>
</div>
</div>
<p>With either method your certificate will be generated and put in the directory <code>/etc/letsencrypt/live/hass-example.duckdns.org</code>. As the lifetime is only 90 days, you will have to repeat this every 90 days.</p>
<p><img width="60" src="https://home-assistant.io/images/favicon-192x192.png" style="float: right; border:none; box-shadow: none;" /></p>
<h3><a class="title-link" name="home-assistant" href="#home-assistant"></a> Home Assistant</h3>
<p>Before updating the Home Assistant configuration, we have to update the port forwarding at your router config. We can drop the port forwarding for port <code>80</code> as we no longer care about unecrypted messages. Update port <code>443</code> to forward to port <code>8123</code> on the computer that will run Home Assistant.</p>
<p>The final step is to point Home Assistant at the generated certificates. Before you do this, make sure that the user running Home Assistant has read access to the folder that holds the certificates.</p>
<div class="highlighter-coderay"><div class="CodeRay">
<div class="code"><pre><span class="key">http</span>:
<span class="key">api_password</span>: <span class="string"><span class="content">YOUR_SECRET_PASSWORD</span></span>
<span class="key">ssl_certificate</span>: <span class="string"><span class="content">/etc/letsencrypt/live/hass.example.com/fullchain.pem</span></span>
<span class="key">ssl_key</span>: <span class="string"><span class="content">/etc/letsencrypt/live/hass.example.com/privkey.pem</span></span>
</pre></div>
</div>
</div>
<p>You can now navigate to https://hass-example.duckdns.org and enjoy encryption!</p>
<p><em>Big thanks to Fabian Affolter for his help and feedback on this article.</em></p>
]]></content>
</entry>
<entry>
<title type="html"><![CDATA[[Update: decision reversed!] Philips Hue blocks 3rd party lights]]></title>
<link href="https://home-assistant.io/blog/2015/12/12/philips-hue-blocks-3rd-party-bulbs/"/>
<updated>2015-12-12T18:44:00+00:00</updated>
<id>https://home-assistant.io/blog/2015/12/12/philips-hue-blocks-3rd-party-bulbs</id>
<content type="html"><![CDATA[<p><strong>Update Dec 16</strong>: Great news! Philips has decided to <a href="http://www.developers.meethue.com/documentation/friends-hue-update">reverse their decision</a> and is working on a software update to allow 3rd party light bulbs again.</p>
<p class="img">
<img src="https://home-assistant.io/images/blog/2015-12-philips-hue-3rd-party/philips-hue-reversed-faq.png" />
Philips Hue FAQ entries regarding reversing the decision.
</p>
<p><em>Original post:</em></p>
<!--more-->
<p>Philips Hue was one of the first to get smart lights accepted by the mainstream. Their Zigbee-based hub is rock solid, never crashes, great API and worked with other Zigbee light bulbs too. They are a bit expensive but the platform was worth every penny, till now.</p>
<p>Yesterday a thread on <a href="https://www.reddit.com/r/homeautomation/comments/3wet8h/fyi_the_hue_hub_is_now_blocking_third_party/">/r/homeautomation</a> published that Philips Hue now blocks all but their own bulbs and those of “friends of Hue”. I have been able to confirm this in the <a href="http://www2.meethue.com/en-us/support/search/?q=Another+brand">Philips Hue FAQ</a> (Update Dec 14: they have removed the entries - <a href="https://home-assistant.io/images/blog/2015-12-philips-hue-3rd-party/mirror.png">mirror here</a>):</p>
<p class="img">
<img src="https://home-assistant.io/images/blog/2015-12-philips-hue-3rd-party/philips-hue-faq.png" />
Philips Hue FAQ entries regarding 3rd party light bulbs.
</p>
<p>This means that after you update your Hue bridge to the latest version:</p>
<ul>
<li>As of now, you can still use your existing paired 3rd party light bulbs</li>
<li>You cannot pair new 3rd party light bulbs</li>
<li>Youre out of luck if for some reason you have to pair existing 3rd party light bulbs again</li>
<li>Resetting your hub will force pairing of all your bulbs again</li>
</ul>
<p>If you own a Philips Hue hub and are using 3rd party light bulbs, make sure you do not upgrade your hub if you want to be able to pair new 3rd party lightbulbs. But do realize that you are sitting on a ticking time bomb.</p>
<p>I have read, but have been unable to confirm it, that resetting your hub will force a software upgrade. So beware of that too.</p>
<p>I will no longer suggest people to buy into the Philips Hue ecosystem.</p>
]]></content>
</entry>
<entry>
<title type="html"><![CDATA[Activating Tasker tasks from Home Assistant using command line switches]]></title>
<link href="https://home-assistant.io/blog/2015/12/10/activating-tasker-tasks-from-home-assistant-using-command-line-switches/"/>
<updated>2015-12-10T10:39:41+00:00</updated>
<id>https://home-assistant.io/blog/2015/12/10/activating-tasker-tasks-from-home-assistant-using-command-line-switches</id>
<content type="html"><![CDATA[<p><img src="https://home-assistant.io/images/blog/2015-12-tasker/tasker-logo.png" style="clear: right; border:none; box-shadow: none; float: right; margin-bottom: 12px;" width="200" /><br />
In this tutorial I will explain how you can activate Tasker tasks from Home Assistant command line switches. We are going to set up a switch that when toggled will make your Android device say either “On” or “Off”.</p>
<p>You could also do this with the automation component instead so whenever you put your house to sleep mode for example your Android device will open up Google Play Books or the Kindle app ready for you to read as well as dimming your lights, but this tutorial is all about the switches.</p>
<!--more-->
<h3>AutoRemote URL</h3>
<p>First things first you should install <a href="https://play.google.com/store/apps/details?id=net.dinglisch.android.taskerm">Tasker</a> and <a href="https://play.google.com/store/apps/details?id=com.joaomgcd.autoremote">AutoRemote</a> onto your Android device and launch AutoRemote. You should see a URL above the QR code, visit it in your browser and it should bring up a page a bit like this.</p>
<p class="img">
<img src="https://home-assistant.io/images/blog/2015-12-tasker/screenshot-1.png" />
</p>
<p>Now type in <code>SayOn</code> in the <code>Message</code> box and you should see a box appear on the right with a URL in it, this is what we will be using in the Python script later on so save that for later. Do the same thing again but this time replace <code>SayOn</code> with <code>SayOff</code>. Now just click the <code>Send message now!</code> button to test that your commands will get sent to your Android device, if they do you will see a toast message at the bottom of your screen like this one.</p>
<p class="img">
<img src="https://home-assistant.io/images/blog/2015-12-tasker/screenshot-2.png" height="450" />
</p>
<h3>Tasker Setup</h3>
<p>Open up Tasker and make sure youre in the <code>PROFILES</code> tab, then select the plus icon to create a new profile. Select <code>Event</code> -&gt; <code>Plugin</code> -&gt; <code>AutoRemote</code> -&gt; <code>AutoRemote</code> and then the pencil icon to configure the AutoRemote event. Select <code>Message Filter</code> and enter in <code>SayOn</code> then go back until it asks you for a task. Select <code>New task</code> then just leave the next field blank and select the tick icon. <br />
This is where well configure our task, so select the plus icon to select an action. Select <code>Alert</code> -&gt; <code>Say</code> to add a Say action. Enter <code>On</code> in the text field and go back to test your task, make sure your media volume is up then select the play icon, you should hear your device say “On”.</p>
<p class="img">
<img src="https://home-assistant.io/images/blog/2015-12-tasker/screenshot-3.png" height="450" />
</p>
<p>Now you can go back to the main Tasker screen and create another profile but this time replace <code>SayOn</code> with <code>SayOff</code> and <code>On</code> with <code>Off</code>. After youve done that go to the main screen again and select the menu button at the top then <code>Exit</code> and <code>Save first</code> to make sure everything is saved properly.</p>
<h3>Python Script</h3>
<p>Now its time to set it up the script, so create a new Python script and name it <code>On.py</code> then enter this code:</p>
<div class="highlighter-coderay"><div class="CodeRay">
<div class="code"><pre><span class="keyword">import</span> <span class="include">requests</span>
requests.get(<span class="string"><span class="delimiter">'</span><span class="content">[URL]</span><span class="delimiter">'</span></span>)
</pre></div>
</div>
</div>
<p>Enter in your “On” URL then save it. Create another script but this time call it <code>Off.py</code> and enter your “off” URL instead.</p>
<h3>Home Assistant Configuration</h3>
<p>Add a command line switch to your Home Assistant configuration:</p>
<div class="highlighter-coderay"><div class="CodeRay">
<div class="code"><pre><span class="key">switch</span>:
<span class="key">platform</span>: <span class="string"><span class="content">command_switch</span></span>
<span class="key">switches</span>:
<span class="key">tasker_say</span>:
<span class="key">oncmd</span>: <span class="string"><span class="content">python &quot;[LocationOfOnScript]&quot;</span></span>
<span class="key">offcmd</span>: <span class="string"><span class="content">python &quot;[LocationOfOffScript]&quot;</span></span>
</pre></div>
</div>
</div>
<p>Now load up Home Assistant and whenever you toggle the switch you created your Android device will respond with either “On” or “Off”. :-)</p>
]]></content>
</entry>
<entry>
<title type="html"><![CDATA[InfluxDB and Grafana]]></title>
<link href="https://home-assistant.io/blog/2015/12/07/influxdb-and-grafana/"/>
<updated>2015-12-07T14:15:13+00:00</updated>
<id>https://home-assistant.io/blog/2015/12/07/influxdb-and-grafana</id>
<content type="html"><![CDATA[<p><img src="https://home-assistant.io/images/supported_brands/influxdb.png" style="clear: right; border:none; box-shadow: none; float: right; margin-bottom: 12px;" width="200" /><img src="https://home-assistant.io/images/supported_brands/grafana.png" style="clear: right; border:none; box-shadow: none; float: right; margin-bottom: 12px;" width="200" /><br />
The <a href="https://influxdb.com/">InfluxDB</a> database is a so-called time series database primarly designed to store sensor data and real-time analytics.</p>
<p>The <code>influxdb</code> component makes it possible to transfer all state changes from Home Assistant to an external <a href="https://influxdb.com/">InfluxDB</a> database.</p>
<!--more-->
<p>The first step is to install the InfluxDB packages. If you are not running Fedora, check the <a href="https://influxdb.com/docs/v0.9/introduction/installation.html">installation</a> section for further details.</p>
<div class="highlighter-coderay"><div class="CodeRay">
<div class="code"><pre>$ sudo dnf -y install http://influxdb.s3.amazonaws.com/influxdb-0.9.5.1-1.x86_64.rpm
</pre></div>
</div>
</div>
<p>Launch the InfluxDB service.</p>
<div class="highlighter-coderay"><div class="CodeRay">
<div class="code"><pre>$ sudo systemctl start influxdb
</pre></div>
</div>
</div>
<p>If everything went well, then the web interface of the database should be accessible at <a href="http://localhost:8083/">http://localhost:8083/</a>. Create a database <code>home_assistant</code> to use with Home Assistant either with the web interface or the commandline tool <code>influx</code>.</p>
<p class="img">
<img src="https://home-assistant.io/images/blog/2015-12-influxdb/influxdb-frontend.png" />
InfluxDB web frontend
</p>
<div class="highlighter-coderay"><div class="CodeRay">
<div class="code"><pre>$ influx
Visit https://enterprise.influxdata.com to register for updates, InfluxDB server management, and monitoring.
Connected to http://localhost:8086 version 0.9.5.1
InfluxDB shell 0.9.5.1
&gt; CREATE DATABASE home_assistant
</pre></div>
</div>
</div>
<p>An optional step is to create a user. Keep in mind to adjust the configuration (add <code>username</code> and <code>password</code>) in the next step if you prefer to go this way.</p>
<div class="highlighter-coderay"><div class="CodeRay">
<div class="code"><pre>&gt; CREATE USER &quot;home-assistant&quot; WITH PASSWORD 'password'
</pre></div>
</div>
</div>
<p>To use the <code>influxdb</code> component in your installation, add the following to your <code>configuration.yaml</code> file:</p>
<div class="highlighter-coderay"><div class="CodeRay">
<div class="code"><pre><span class="key">influxdb</span>:
<span class="key">host</span>: <span class="string"><span class="content">127.0.0.1</span></span>
</pre></div>
</div>
</div>
<p>After you restart Home Assistant you should see that the InfluxDB database gets filled. The <a href="https://influxdb.com/docs/v0.9/query_language/index.html">language</a> to query the database is similar to SQL.</p>
<div class="highlighter-coderay"><div class="CodeRay">
<div class="code"><pre>$ influx
[...]
&gt; USE home_assistant
Using database home_assistant
&gt; SELECT * FROM binary_sensor
name: binary_sensor
-------------------
time domain entity_id value
1449496577000000000 binary_sensor bathroom_door 0
1449496577000000000 binary_sensor bathroom_window 0
1449496577000000000 binary_sensor basement_door 0
1449496577000000000 binary_sensor basement_window 0
1449496684000000000 binary_sensor bathroom_window 1
[...]
</pre></div>
</div>
</div>
<p><a href="http://grafana.org/">Grafana</a> is a dashboard that can create graphs from different sources including InfluxDB. The installation is simple, and there are detailed steps for many different configurations on the <a href="http://docs.grafana.org/installation/">Grafana installation</a> page. For a recent system that is running Fedora:</p>
<div class="highlighter-coderay"><div class="CodeRay">
<div class="code"><pre>$ sudo dnf -y install https://grafanarel.s3.amazonaws.com/builds/grafana-2.5.0-1.x86_64.rpm
</pre></div>
</div>
</div>
<p>Start the grafana server.</p>
<div class="highlighter-coderay"><div class="CodeRay">
<div class="code"><pre>$ sudo systemctl daemon-reload
$ sudo systemctl start grafana-server
$ sudo systemctl status grafana-server
</pre></div>
</div>
</div>
<p>Login with the username <code>admin</code> and the password <code>admin</code> at <a href="http://localhost:3000/login">http://localhost:3000/login</a>. Now follow the <a href="http://docs.grafana.org/datasources/influxdb/">InfluxDB setup instructions</a>.</p>
<p>Now you can start to create dashboards and graphs. You have various options to get the data from the graph. The next image just shows a screenshot of the setting for a temperature sensor.</p>
<p class="img">
<img src="https://home-assistant.io/images/blog/2015-12-influxdb/grafana-settings.png" />
Grafana settings
</p>
<p>If the graph is not showing up in the dashboard you need to adjust the time range in the right upper corner. The graph is created for all state changes recorded by Home Assistant.</p>
<p class="img">
<img src="https://home-assistant.io/images/blog/2015-12-influxdb/grafana-graph.png" />
Grafana Temperature graph
</p>
]]></content>
</entry>
<entry>
<title type="html"><![CDATA[0.9: Rollershutters, locks, binary sensors and InfluxDB]]></title>
<link href="https://home-assistant.io/blog/2015/12/06/locks-rollershutters-binary-sensors-and-influxdb-support/"/>
<updated>2015-12-06T19:29:00+00:00</updated>
<id>https://home-assistant.io/blog/2015/12/06/locks-rollershutters-binary-sensors-and-influxdb-support</id>
<content type="html"><![CDATA[<p>Its been a few weeks but we managed to polish a nice new release of Home Assistant for yall!</p>
<p><img src="https://home-assistant.io/images/supported_brands/homematic.png" style="clear: right; border:none; box-shadow: none; float: right; margin-bottom: 16px;" width="238" /><img src="https://home-assistant.io/images/supported_brands/ecobee.png" style="clear: right; border:none; box-shadow: none; float: right; margin-bottom: 16px;" width="238" /><img src="https://home-assistant.io/images/supported_brands/influxdb.png" style="clear: right; border:none; box-shadow: none; float: right; margin-bottom: 16px;" width="238" /></p>
<ul>
<li>New <a href="https://home-assistant.io/components/lock/">lock component</a> including <a href="https://home-assistant.io/components/lock.wink/">Wink</a> support (<a href="https://github.com/miniconfig">@miniconfig</a>)</li>
<li>New <a href="https://home-assistant.io/components/binary_sensor/">binary sensor component</a> including <a href="https://home-assistant.io/components/binary_sensor.arest/">aRest</a> and <a href="https://home-assistant.io/components/binary_sensor.mqtt/">MQTT</a> support (<a href="https://github.com/fabaff">@fabaff</a>)</li>
<li>New <a href="https://home-assistant.io/components/rollershutter/">rollershutter component</a> including <a href="https://home-assistant.io/components/rollershutter.mqtt/">MQTT</a> support (<a href="https://github.com/sfam">@sfam</a>)</li>
<li>New <a href="https://home-assistant.io/components/influxdb/">InfluxDB component</a> to store data in InfluxDB (<a href="https://github.com/fabaff">@fabaff</a>)</li>
<li>Thermostat: <a href="https://home-assistant.io/components/thermostat.ecobee/">Ecobee</a> now supported (<a href="https://github.com/nkgilley">@nkgilley</a>)</li>
<li>Thermostat: <a href="https://home-assistant.io/components/thermostat.homematic/">Homematic</a> now supported (<a href="https://github.com/goir">@goir</a>)</li>
<li>Support for <a href="https://home-assistant.io/components/mqtt/#processing-json/">parsing JSON values</a> received over MQTT (<a href="https://github.com/mcdeck">@mcdeck</a>)</li>
<li>Bunch of bug fixes and optimizations</li>
</ul>
<p>To update, run <code>pip3 install --upgrade homeassistant</code>.</p>
<p class="img">
<img src="https://home-assistant.io/images/screenshots/lock-and-rollershutter-card.png" />
</p>
]]></content>
</entry>
<entry>
<title type="html"><![CDATA[Community Highlights]]></title>
<link href="https://home-assistant.io/blog/2015/12/05/community-highlights/"/>
<updated>2015-12-05T23:39:00+00:00</updated>
<id>https://home-assistant.io/blog/2015/12/05/community-highlights</id>
<content type="html"><![CDATA[<p>From time to time we come along things that are worth sharing with fellow Home Assisters. Here a list of some cool stuff from last week:</p>
<p>First is the public beta of <a href="https://letsencrypt.org/">Lets Encrypt</a>. Lets Encrypt is a new certificate authority that is free, automated and open. This means that it will now be very easy to secure your connection to Home Assistant while you are away from home. W1ll1am23 has written up <a href="https://automic.us/forum/viewtopic.php?f=4&amp;t=29">a guide how to get started</a>.</p>
<p>The next thing is a show-off of some of the cool stuff people do with Home Assistant. This is miniconfig talking to Home Assistant using the Amazon Echo!</p>
<div class="videoWrapper">
<iframe width="560" height="315" src="https://www.youtube.com/embed/9QQjklnSQKY" frameborder="0" allowfullscreen=""></iframe>
</div>
<p>And last but not least, Midwestern Mac did a <a href="http://www.midwesternmac.com/blogs/jeff-geerling/raspberry-pi-microsd-card">microSD card performance comparison</a> for the Raspberry Pi. If youre using a Pi, make sure to check it out!</p>
]]></content>
</entry>
<entry>
<title type="html"><![CDATA[Survey November 2015]]></title>
<link href="https://home-assistant.io/blog/2015/11/22/survey-november-2015/"/>
<updated>2015-11-22T14:51:18+00:00</updated>
<id>https://home-assistant.io/blog/2015/11/22/survey-november-2015</id>
<content type="html"><![CDATA[<p><img src="https://home-assistant.io/images/blog/2015-11-survey/releases.png" style="float: right; margin-left: 8px; margin-bottom: 8px;" height="120" />Around a week ago we started with the first survey. Now 30 people have participated. Thank you very much if you did. We think thats enough time to have some “only partially representative” data. Its hard to tell how many Home Assistant users are out there. Currently there are 215 members in our <a href="https://gitter.im/balloob/home-assistant">Gitter chat room</a> and last week <a href="https://pypi.python.org/pypi/homeassistant/">PyPI</a> counted 5063 downloads.</p>
<p>The idea was to anonymously collect some details about the usage of the different parts of Home Assistant and a little bit about the environment its running in.</p>
<!--more-->
<p>Thanks to Python, users are running Home Assistant on the most popular Linux distributions and other operating systems including OS X and Microsoft Windows. One quarter of the operating systems are unknown which leads to the assumption that it is possible to run Home Assistant on most of the available operation systems today. We hope that *BSD users have fun too. The Hardware platform of choice seems to be x86_64 and ARM.</p>
<p>Of course most users are running with the <a href="https://home-assistant.io/components/automation/">automation</a> component otherwise it would make much sense to use Home Assistant. The <a href="https://home-assistant.io/components/sun/">sun</a> component is used a lot too. We hope that this is not because this component is enabled by default.</p>
<p>The <a href="https://home-assistant.io/components/alarm_control_panel/">Alarm control panels</a> and the <a href="https://home-assistant.io/components/camera/">camera component</a> are both used by around one third of the participants of the survey. Its safe to say that they cover a niche, but they will gain momentum when people discover how they can build alarm systems with Home Assistant.</p>
<p><a href="https://home-assistant.io/components/light.hue/">Philips Hue</a> is the “winner” in the light category closely followed by <a href="components/light.mqtt/">MQTT lights</a>. <a href="https://home-assistant.io/components/media_player.cast/">Google Cast</a> and <a href="https://home-assistant.io/components/media_player.plex/"> Plex</a> are the top media player platforms. <a href="https://home-assistant.io/components/notify.pushbullet/">Pushbullet</a> is by far the most-used <a href="https://home-assistant.io/components/notify/">notification platform</a>. If you followed the recent efforts to improve this platform its comprehensible.</p>
<p>Its interesting to see that most of the sensor, switch, and thermostat platforms are used. A lot of people seem to be interested in the weather data provided by the <a href="https://home-assistant.io/components/sensor.forecast/">Forecast sensor</a>. The MQTT sensors and switches are deployed in almost 50% of all Home Assistant setups.</p>
<p class="img">
<img src="https://home-assistant.io/images/blog/2015-11-survey/releases.png" />
Home Assistant releases
</p>
<p class="img">
<img src="https://home-assistant.io/images/blog/2015-11-survey/os.png" />
Operating systems
</p>
<p class="img">
<img src="https://home-assistant.io/images/blog/2015-11-survey/platforms.png" />
Hardware platforms
</p>
<p class="img">
<img src="https://home-assistant.io/images/blog/2015-11-survey/components.png" />
Components
</p>
<p class="img">
<img src="https://home-assistant.io/images/blog/2015-11-survey/alarm-cameras.png" />
Alarm Control Panels and Cameras
</p>
<p class="img">
<img src="https://home-assistant.io/images/blog/2015-11-survey/trackers.png" />
Device trackers
</p>
<p class="img">
<img src="https://home-assistant.io/images/blog/2015-11-survey/lights.png" />
Lights
</p>
<p class="img">
<img src="https://home-assistant.io/images/blog/2015-11-survey/players.png" />
Media players
</p>
<p class="img">
<img src="https://home-assistant.io/images/blog/2015-11-survey/notifications.png" />
Notifications
</p>
<p class="img">
<img src="https://home-assistant.io/images/blog/2015-11-survey/sensors.png" />
Sensors
</p>
<p class="img">
<img src="https://home-assistant.io/images/blog/2015-11-survey/switches.png" />
Switches
</p>
<p class="img">
<img src="https://home-assistant.io/images/blog/2015-11-survey/thermostats.png" />
Thermostats
</p>
<p>The conclusion is that <a href="http://mqtt.org/">MQTT</a> is popular in almost every section from Alarm Control Panel, presence detection with <a href="http://owntracks.org/">owntracks</a>, sensors and switches, and now even for lights.</p>
<p>The interpretation of the data is up to you. Again, thanks for participating in this survey.</p>
]]></content>
</entry>
<entry>
<title type="html"><![CDATA[0.8: Honeywell Thermostats, Orvibo switches and Z-Wave switches and lights ]]></title>
<link href="https://home-assistant.io/blog/2015/11/16/zwave-switches-lights-and-honeywell-thermostats-now-supported/"/>
<updated>2015-11-16T21:27:00+00:00</updated>
<id>https://home-assistant.io/blog/2015/11/16/zwave-switches-lights-and-honeywell-thermostats-now-supported</id>
<content type="html"><![CDATA[<p><img src="https://home-assistant.io/images/screenshots/custom-icons.png" style="float: right;" />We have all been hard at work to get this latest release ready. One of the big highlights in this release is the introduction of an extended iconset to be used in the frontend (credits to <a href="https://github.com/happyleavesaoc">@happyleavesaoc</a> for idea and prototype). To get started with customizing, pick any icon from <a href="https://MaterialDesignIcons.com">MaterialDesignIcons.com</a>, prefix the name with <code>mdi:</code> and stick it into your <code>customize</code> section in <code>configuration.yaml</code>:</p>
<div class="highlighter-coderay"><div class="CodeRay">
<div class="code"><pre><span class="key">homeassistant</span>:
<span class="key">customize</span>:
<span class="key">switch.ac</span>:
<span class="key">icon</span>: <span class="string"><span class="content">'mdi:air-conditioner'</span></span>
</pre></div>
</div>
</div>
<h4>Breaking changes</h4>
<ul>
<li>Any existing zone icon will have to be replaced with one from <a href="https://MaterialDesignIcons.com">MaterialDesignIcons.com</a>.</li>
<li>LimitlessLED light services require colors to be specified in RGB instead of XY.</li>
</ul>
<h4>Changes</h4>
<p><img src="https://home-assistant.io/images/supported_brands/honeywell.png" style="clear: right; border:none; box-shadow: none; float: right; margin-bottom: 16px;" height="50" /><img src="https://home-assistant.io/images/supported_brands/orvibo.png" style="clear: right; border:none; box-shadow: none; float: right; margin-bottom: 16px;" height="50" /><img src="https://home-assistant.io/images/supported_brands/pushetta.png" style="clear: right; border:none; box-shadow: none; float: right; margin-bottom: 16px;" height="50" /></p>
<ul>
<li>Thermostat: <a href="https://home-assistant.io/components/thermostat.honeywell/">Honeywell</a> now supported (<a href="https://github.com/sander76">@sander76</a>)</li>
<li>Switch: <a href="https://home-assistant.io/components/switch.orvibo/">Orvibo</a> now supported (<a href="https://github.com/happyleavesaoc">@happyleavesaoc</a>)</li>
<li>Camera: <a href="https://home-assistant.io/components/camera.mjpeg/">mjpeg cameras</a> now supported (<a href="https://github.com/ryanturner">@ryanturner</a>)</li>
<li>Notify: <a href="https://home-assistant.io/components/notify.pushetta/">Pushetta</a> now supported (<a href="https://github.com/fabaff">@fabaff</a>)</li>
<li>Light: <a href="https://home-assistant.io/components/light.mqtt/">MQTT</a> now supported (<a href="https://github.com/hexxter">@hexxter</a>)</li>
<li>Light: <a href="https://home-assistant.io/components/zwave/">Z-Wave</a> now supported (<a href="https://github.com/leoc">@leoc</a>)</li>
<li>Switch: <a href="https://home-assistant.io/components/zwave/">Z-Wave</a> now supported (<a href="https://github.com/leoc">@leoc</a>)</li>
<li>New component <a href="https://home-assistant.io/components/logger/">logger</a> allows filtering logged data (<a href="https://github.com/badele">@badele</a>)</li>
<li>New component <a href="https://home-assistant.io/components/updater/">updater</a> will notify users if an update for Home Assistant is available (<a href="https://github.com/rmkraus">@rmkraus</a>)</li>
<li>Notify: <a href="https://home-assistant.io/components/notify.pushbullet/">PushBullet</a> now allows targeting contacts/channels/specific devices (<a href="https://github.com/tomduijf">@tomduijf</a>)</li>
<li>Light: Allow controlling color temperature (<a href="https://github.com/tomduijf">@tomduijf</a>)</li>
<li>Frontend: about page added (<a href="https://github.com/balloob">@balloob</a>)</li>
<li>Switch RGB as the color unit used in light component (<a href="https://github.com/balloob">@balloob</a>)</li>
<li>Re-install platform and component dependencies after a Home Assistant version upgrade (<a href="https://github.com/balloob">@balloob</a>)</li>
</ul>
]]></content>
</entry>
<entry>
<title type="html"><![CDATA[0.7.6: Amazon FireTV, Radiotherm thermostats]]></title>
<link href="https://home-assistant.io/blog/2015/10/26/firetv-and-radiotherm-now-supported/"/>
<updated>2015-10-26T18:10:00+00:00</updated>
<id>https://home-assistant.io/blog/2015/10/26/firetv-and-radiotherm-now-supported</id>
<content type="html"><![CDATA[<p>After two weeks of hard work Im proud to announce the release of Home Assistant v0.7.6. For this release the main focus was bugs, test coverage and documentation. And we exceeded expectations on all three fronts. Bugs have been squashed, <a href="https://coveralls.io/builds/3946399">test coverage increased to 85%</a> and thanks to the hard work by <a href="https://github.com/fabaff">@fabaff</a> and myself the <a href="https://home-assistant.io/components/">component section</a> on the website has gotten a complete revamp.</p>
<h4>Changes</h4>
<p><img src="https://home-assistant.io/images/supported_brands/radiotherm.png" style="border:none; box-shadow: none; float: right; margin-bottom: 16px;" height="50" /><img src="https://home-assistant.io/images/supported_brands/firetv.png" style="border:none; box-shadow: none; float: right; margin-bottom: 16px; clear: right;" height="50" /><img src="https://home-assistant.io/images/supported_brands/locative.png" style="border:none; box-shadow: none; float: right; margin-bottom: 16px; clear: right;" height="50" /></p>
<ul>
<li>Device tracker: Newer <a href="https://home-assistant.io/components/device_tracker.tplink/">TP-Link routers</a> now supported (<a href="https://github.com/mKeRix">@mKeRix</a>)</li>
<li>Alarm Control Panel: <a href="https://home-assistant.io/components/alarm_control_panel.manual/">Manual alarm</a> added (<a href="https://github.com/sfam">@sfam</a>)</li>
<li>Thermostat: <a href="https://home-assistant.io/components/thermostat.radiotherm/">Radiotherm</a> now supported (<a href="https://github.com/toddeye">@toddeye</a>)</li>
<li>Media Player: <a href="https://home-assistant.io/components/media_player.firetv/">Amazon FireTV</a> now supported (<a href="https://github.com/happyleavesaoc">@happyleavesaoc</a>)</li>
<li>Device Tracker: <a href="https://home-assistant.io/components/device_tracker.locative/">Geofancy</a> now supported (<a href="https://github.com/wind-rider">@wind-rider</a>)</li>
<li>New component <a href="https://home-assistant.io/components/shell_command/">Shell Command</a> can expose shell commands as services (<a href="https://github.com/balloob">@balloob</a>)</li>
<li><a href="https://home-assistant.io/components/script/">Scripts</a> can now be customized using <code>customize</code> key in <code>configuration.yaml</code> (<a href="https://github.com/balloob">@balloob</a>)</li>
<li>Light: <a href="https://home-assistant.io/components/light.hyperion/">Hyperion</a> now supported (<a href="https://github.com/MakeMeASandwich">@MakeMeASandwich</a>)</li>
<li>Sensor: <a href="https://home-assistant.io/components/sensor.arest/">aRest</a> can now also read out pins (<a href="https://github.com/balloob">@balloob</a>)</li>
<li>Sensor: <a href="https://home-assistant.io/components/sensor.forecast/">Forecast.io</a> now supports specifying units in <code>configuration.yaml</code> (<a href="https://github.com/balloob">@balloob</a>)</li>
<li>Thermostat: <a href="https://home-assistant.io/components/thermostat.heat_control/">Heat Control</a> has been completely rewritten (<a href="https://github.com/balloob">@balloob</a>)</li>
<li>Switch: <a href="https://home-assistant.io/components/switch.rest/">Rest</a> now supported (<a href="https://github.com/bachp">@bachp</a>)</li>
<li>Media Player: <a href="https://home-assistant.io/components/media_player.plex/">Plex</a> can now be auto discovered and configure itself (<a href="https://github.com/tomduijf">@tomduijf</a>)</li>
<li><a href="https://home-assistant.io/components/downloader/">Downloader</a> will now treat relative paths based on config dir (<a href="https://github.com/tomduijf">@tomduijf</a>)</li>
<li>Line Charts will use interpolation for sensor data and show current and target temperature for thermostats (<a href="https://github.com/balloob">@balloob</a>)</li>
<li>Device Tracker: <a href="https://home-assistant.io/components/device_tracker.ubus/">OpenWRT via ubus</a> now supported (<a href="https://github.com/krzynio">@krzynio</a>)</li>
</ul>
<!--more-->
<h4>Breaking changes</h4>
<p>As part of this release we did some cleanup which introduced backwards incompatible changes:</p>
<p><strong>Heat Control thermostat no longer includes scheduling features.</strong><br />
This feature has been removed completely. Use the <a href="https://home-assistant.io/components/automation/">automation component</a> instead to control target temperature.</p>
<p><strong>Config changed for calling a service from a script.</strong><br />
<code>execute_service:</code> has been replaced with <code>service:</code>. See <a href="https://home-assistant.io/components/script/">component page</a> for example. The old method will continue working for some time.</p>
<p><strong>Scenes can no longer be turned off.</strong><br />
It is no longer possible to turn a scene off after it has been activated. The way it worked was unpredictable and causes a lot of confusion.</p>
<p><strong>Downloader treats relative paths now relative to the config dir instead of the current working dir.</strong><br />
This makes more sense as most people run Home Assistant as a daemon</p>
]]></content>
</entry>
<entry>
<title type="html"><![CDATA[Report the temperature with ESP8266 to MQTT]]></title>
<link href="https://home-assistant.io/blog/2015/10/11/measure-temperature-with-esp8266-and-report-to-mqtt/"/>
<updated>2015-10-11T19:10:00+00:00</updated>
<id>https://home-assistant.io/blog/2015/10/11/measure-temperature-with-esp8266-and-report-to-mqtt</id>
<content type="html"><![CDATA[
<p>I recently learned about the ESP8266, a $5 chip that includes WiFi and is Arduino compatible. This means that all your DIY projects can now be done for a fraction of the price.</p>
<p>For this tutorial, Ill walk through how to get going with ESP8266, get the temperature and humidity and report it to MQTT where Home Asssistant can pick it up.</p>
<p class="img">
<img src="https://home-assistant.io/images/blog/2015-10-esp8266-temp/setup.png" />
Picture of the final setup (+ 2 LED for decoration)
</p>
<p class="img">
<img src="https://home-assistant.io/images/blog/2015-10-esp8266-temp/ha-sensor.png" />
Home Assistant will keep track of historical values and allow you to integrate it into automation.
</p>
<!--more-->
<h3>Components</h3>
<p>Ive been using Adafruit for my shopping:</p>
<ul>
<li><a href="http://www.adafruit.com/product/2471">Adafruit HUZZAH ESP8266 Breakout</a> (<a href="https://learn.adafruit.com/adafruit-huzzah-esp8266-breakout/assembly">assembly instructions</a>)</li>
<li><a href="http://www.adafruit.com/product/2635">Adafruit HDC1008 Temperature &amp; Humidity Sensor Breakout Board</a> (<a href="https://learn.adafruit.com/adafruit-hdc1008-temperature-and-humidity-sensor-breakout/assembly">assembly instructions</a>)</li>
<li><a href="https://home-assistant.io/components/mqtt/#picking-a-broker/">MQTT server</a></li>
</ul>
<p><em>Besides this, you will need the usual hardware prototype equipment: a breadboard, some wires, soldering iron + wire, Serial USB cable.</em></p>
<h3>Connections</h3>
<p>On your breadboard, make the following connections from your ESP8266 to the HDC1008:</p>
<table>
<thead>
<tr>
<th>ESP8266</th>
<th>HDC1008</th>
</tr>
</thead>
<tbody>
<tr>
<td>GND</td>
<td>GND</td>
</tr>
<tr>
<td>3V</td>
<td>Vin</td>
</tr>
<tr>
<td>14</td>
<td>SCL</td>
</tr>
<tr>
<td>#2</td>
<td>SDA</td>
</tr>
</tbody>
</table>
<p><em>I picked <code>#2</code> and <code>14</code> myself, you can configure them in the sketch.</em></p>
<h3>Preparing your IDE</h3>
<p>Follow <a href="https://github.com/esp8266/Arduino#installing-with-boards-manager">these instructions</a> on how to install and prepare the Arduino IDE for ESP8266 development.</p>
<p>After youre done installing, open the Arduino IDE, in the menu click on <code>sketch</code> -&gt; <code>include library</code> -&gt; <code>manage libraries</code> and install the following libraries:</p>
<ul>
<li>PubSubClient by Nick O Leary</li>
<li>Adafruit HDC1000</li>
</ul>
<h3>Sketch</h3>
<p>If you have followed the previous steps, youre all set.</p>
<ul>
<li>Open Arduino IDE and create a new sketch (<code>File</code> -&gt; <code>New</code>)</li>
<li>Copy and paste the below sketch to the Arduino IDE</li>
<li>Adjust the values line 6 - 14 to match your setup</li>
<li>Optional: If you want to connect to an MQTT server without a username or password, adjust line 63.</li>
<li>To have the ESP8266 accept our new sketch, we have to put it in upload mode. On the ESP8266 device keep the GPIO0 button pressed while pressing the reset button. The red led will glow half bright to indicate it is in upload mode.</li>
<li>Press the upload button in Arduino IDE</li>
<li>Open the serial monitor (<code>Tools</code> -&gt; <code>Serial Monitor</code>) to see the output from your device</li>
</ul>
<p>This sketch will connect to your WiFi network and MQTT broker. It will read the temperature and humidity from the sensor every second. It will report it to the MQTT server if the difference is &gt; 1 since last reported value. Reports to the MQTT broker are sent with retain set to <code>True</code>. This means that anyone connecting to the MQTT topic will automatically be notified of the last reported value.</p>
<div class="highlighter-coderay"><table class="CodeRay"><tr>
<td class="line-numbers"><pre><a href="#n1" name="n1">1</a>
<a href="#n2" name="n2">2</a>
<a href="#n3" name="n3">3</a>
<a href="#n4" name="n4">4</a>
<a href="#n5" name="n5">5</a>
<a href="#n6" name="n6">6</a>
<a href="#n7" name="n7">7</a>
<a href="#n8" name="n8">8</a>
<a href="#n9" name="n9">9</a>
<strong><a href="#n10" name="n10">10</a></strong>
<a href="#n11" name="n11">11</a>
<a href="#n12" name="n12">12</a>
<a href="#n13" name="n13">13</a>
<a href="#n14" name="n14">14</a>
<a href="#n15" name="n15">15</a>
<a href="#n16" name="n16">16</a>
<a href="#n17" name="n17">17</a>
<a href="#n18" name="n18">18</a>
<a href="#n19" name="n19">19</a>
<strong><a href="#n20" name="n20">20</a></strong>
<a href="#n21" name="n21">21</a>
<a href="#n22" name="n22">22</a>
<a href="#n23" name="n23">23</a>
<a href="#n24" name="n24">24</a>
<a href="#n25" name="n25">25</a>
<a href="#n26" name="n26">26</a>
<a href="#n27" name="n27">27</a>
<a href="#n28" name="n28">28</a>
<a href="#n29" name="n29">29</a>
<strong><a href="#n30" name="n30">30</a></strong>
<a href="#n31" name="n31">31</a>
<a href="#n32" name="n32">32</a>
<a href="#n33" name="n33">33</a>
<a href="#n34" name="n34">34</a>
<a href="#n35" name="n35">35</a>
<a href="#n36" name="n36">36</a>
<a href="#n37" name="n37">37</a>
<a href="#n38" name="n38">38</a>
<a href="#n39" name="n39">39</a>
<strong><a href="#n40" name="n40">40</a></strong>
<a href="#n41" name="n41">41</a>
<a href="#n42" name="n42">42</a>
<a href="#n43" name="n43">43</a>
<a href="#n44" name="n44">44</a>
<a href="#n45" name="n45">45</a>
<a href="#n46" name="n46">46</a>
<a href="#n47" name="n47">47</a>
<a href="#n48" name="n48">48</a>
<a href="#n49" name="n49">49</a>
<strong><a href="#n50" name="n50">50</a></strong>
<a href="#n51" name="n51">51</a>
<a href="#n52" name="n52">52</a>
<a href="#n53" name="n53">53</a>
<a href="#n54" name="n54">54</a>
<a href="#n55" name="n55">55</a>
<a href="#n56" name="n56">56</a>
<a href="#n57" name="n57">57</a>
<a href="#n58" name="n58">58</a>
<a href="#n59" name="n59">59</a>
<strong><a href="#n60" name="n60">60</a></strong>
<a href="#n61" name="n61">61</a>
<a href="#n62" name="n62">62</a>
<a href="#n63" name="n63">63</a>
<a href="#n64" name="n64">64</a>
<a href="#n65" name="n65">65</a>
<a href="#n66" name="n66">66</a>
<a href="#n67" name="n67">67</a>
<a href="#n68" name="n68">68</a>
<a href="#n69" name="n69">69</a>
<strong><a href="#n70" name="n70">70</a></strong>
<a href="#n71" name="n71">71</a>
<a href="#n72" name="n72">72</a>
<a href="#n73" name="n73">73</a>
<a href="#n74" name="n74">74</a>
<a href="#n75" name="n75">75</a>
<a href="#n76" name="n76">76</a>
<a href="#n77" name="n77">77</a>
<a href="#n78" name="n78">78</a>
<a href="#n79" name="n79">79</a>
<strong><a href="#n80" name="n80">80</a></strong>
<a href="#n81" name="n81">81</a>
<a href="#n82" name="n82">82</a>
<a href="#n83" name="n83">83</a>
<a href="#n84" name="n84">84</a>
<a href="#n85" name="n85">85</a>
<a href="#n86" name="n86">86</a>
<a href="#n87" name="n87">87</a>
<a href="#n88" name="n88">88</a>
<a href="#n89" name="n89">89</a>
<strong><a href="#n90" name="n90">90</a></strong>
<a href="#n91" name="n91">91</a>
<a href="#n92" name="n92">92</a>
<a href="#n93" name="n93">93</a>
<a href="#n94" name="n94">94</a>
<a href="#n95" name="n95">95</a>
<a href="#n96" name="n96">96</a>
<a href="#n97" name="n97">97</a>
<a href="#n98" name="n98">98</a>
<a href="#n99" name="n99">99</a>
<strong><a href="#n100" name="n100">100</a></strong>
<a href="#n101" name="n101">101</a>
<a href="#n102" name="n102">102</a>
<a href="#n103" name="n103">103</a>
<a href="#n104" name="n104">104</a>
<a href="#n105" name="n105">105</a>
<a href="#n106" name="n106">106</a>
<a href="#n107" name="n107">107</a>
<a href="#n108" name="n108">108</a>
<a href="#n109" name="n109">109</a>
</pre></td>
<td class="code"><pre><span class="preprocessor">#include</span> <span class="include">&lt;ESP8266WiFi.h&gt;</span>
<span class="preprocessor">#include</span> <span class="include">&lt;Wire.h&gt;</span>
<span class="preprocessor">#include</span> <span class="include">&lt;PubSubClient.h&gt;</span>
<span class="preprocessor">#include</span> <span class="include">&lt;Adafruit_HDC1000.h&gt;</span>
<span class="preprocessor">#define</span> wifi_ssid <span class="string"><span class="delimiter">&quot;</span><span class="content">YOUR WIFI SSID</span><span class="delimiter">&quot;</span></span>
<span class="preprocessor">#define</span> wifi_password <span class="string"><span class="delimiter">&quot;</span><span class="content">WIFI PASSWORD</span><span class="delimiter">&quot;</span></span>
<span class="preprocessor">#define</span> mqtt_server <span class="string"><span class="delimiter">&quot;</span><span class="content">YOUR_MQTT_SERVER_HOST</span><span class="delimiter">&quot;</span></span>
<span class="preprocessor">#define</span> mqtt_user <span class="string"><span class="delimiter">&quot;</span><span class="content">your_username</span><span class="delimiter">&quot;</span></span>
<span class="preprocessor">#define</span> mqtt_password <span class="string"><span class="delimiter">&quot;</span><span class="content">your_password</span><span class="delimiter">&quot;</span></span>
<span class="preprocessor">#define</span> humidity_topic <span class="string"><span class="delimiter">&quot;</span><span class="content">sensor/humidity</span><span class="delimiter">&quot;</span></span>
<span class="preprocessor">#define</span> temperature_topic <span class="string"><span class="delimiter">&quot;</span><span class="content">sensor/temperature</span><span class="delimiter">&quot;</span></span>
WiFiClient espClient;
PubSubClient client(espClient);
Adafruit_HDC1000 hdc = Adafruit_HDC1000();
<span class="directive">void</span> setup() {
Serial.begin(<span class="integer">115200</span>);
setup_wifi();
client.setServer(mqtt_server, <span class="integer">1883</span>);
<span class="comment">// Set SDA and SDL ports</span>
Wire.begin(<span class="integer">2</span>, <span class="integer">14</span>);
<span class="comment">// Start sensor</span>
<span class="keyword">if</span> (!hdc.begin()) {
Serial.println(<span class="string"><span class="delimiter">&quot;</span><span class="content">Couldn't find sensor!</span><span class="delimiter">&quot;</span></span>);
<span class="keyword">while</span> (<span class="integer">1</span>);
}}
<span class="directive">void</span> setup_wifi() {
delay(<span class="integer">10</span>);
<span class="comment">// We start by connecting to a WiFi network</span>
Serial.println();
Serial.print(<span class="string"><span class="delimiter">&quot;</span><span class="content">Connecting to </span><span class="delimiter">&quot;</span></span>);
Serial.println(wifi_ssid);
WiFi.begin(wifi_ssid, wifi_password);
<span class="keyword">while</span> (WiFi.status() != WL_CONNECTED) {
delay(<span class="integer">500</span>);
Serial.print(<span class="string"><span class="delimiter">&quot;</span><span class="content">.</span><span class="delimiter">&quot;</span></span>);
}
Serial.println(<span class="string"><span class="delimiter">&quot;</span><span class="delimiter">&quot;</span></span>);
Serial.println(<span class="string"><span class="delimiter">&quot;</span><span class="content">WiFi connected</span><span class="delimiter">&quot;</span></span>);
Serial.println(<span class="string"><span class="delimiter">&quot;</span><span class="content">IP address: </span><span class="delimiter">&quot;</span></span>);
Serial.println(WiFi.localIP());
}
<span class="directive">void</span> reconnect() {
<span class="comment">// Loop until we're reconnected</span>
<span class="keyword">while</span> (!client.connected()) {
Serial.print(<span class="string"><span class="delimiter">&quot;</span><span class="content">Attempting MQTT connection...</span><span class="delimiter">&quot;</span></span>);
<span class="comment">// Attempt to connect</span>
<span class="comment">// If you do not want to use a username and password, change next line to</span>
<span class="comment">// if (client.connect(&quot;ESP8266Client&quot;)) {</span>
<span class="keyword">if</span> (client.connect(<span class="string"><span class="delimiter">&quot;</span><span class="content">ESP8266Client</span><span class="delimiter">&quot;</span></span>, mqtt_user, mqtt_password)) {
Serial.println(<span class="string"><span class="delimiter">&quot;</span><span class="content">connected</span><span class="delimiter">&quot;</span></span>);
} <span class="keyword">else</span> {
Serial.print(<span class="string"><span class="delimiter">&quot;</span><span class="content">failed, rc=</span><span class="delimiter">&quot;</span></span>);
Serial.print(client.state());
Serial.println(<span class="string"><span class="delimiter">&quot;</span><span class="content"> try again in 5 seconds</span><span class="delimiter">&quot;</span></span>);
<span class="comment">// Wait 5 seconds before retrying</span>
delay(<span class="integer">5000</span>);
}
}
}
<span class="predefined-type">bool</span> checkBound(<span class="predefined-type">float</span> newValue, <span class="predefined-type">float</span> prevValue, <span class="predefined-type">float</span> maxDiff) {
<span class="keyword">return</span> newValue &lt; prevValue - maxDiff || newValue &gt; prevValue + maxDiff;
}
<span class="predefined-type">long</span> lastMsg = <span class="integer">0</span>;
<span class="predefined-type">float</span> temp = <span class="float">0</span><span class="float">.0</span>;
<span class="predefined-type">float</span> hum = <span class="float">0</span><span class="float">.0</span>;
<span class="predefined-type">float</span> diff = <span class="float">1</span><span class="float">.0</span>;
<span class="directive">void</span> loop() {
<span class="keyword">if</span> (!client.connected()) {
reconnect();
}
client.loop();
<span class="predefined-type">long</span> now = millis();
<span class="keyword">if</span> (now - lastMsg &gt; <span class="integer">1000</span>) {
lastMsg = now;
<span class="predefined-type">float</span> newTemp = hdc.readTemperature();
<span class="predefined-type">float</span> newHum = hdc.readHumidity();
<span class="keyword">if</span> (checkBound(newTemp, temp, diff)) {
temp = newTemp;
Serial.print(<span class="string"><span class="delimiter">&quot;</span><span class="content">New temperature:</span><span class="delimiter">&quot;</span></span>);
Serial.println(String(temp).c_str());
client.publish(temperature_topic, String(temp).c_str(), <span class="predefined-constant">true</span>);
}
<span class="keyword">if</span> (checkBound(newHum, hum, diff)) {
hum = newHum;
Serial.print(<span class="string"><span class="delimiter">&quot;</span><span class="content">New humidity:</span><span class="delimiter">&quot;</span></span>);
Serial.println(String(hum).c_str());
client.publish(humidity_topic, String(hum).c_str(), <span class="predefined-constant">true</span>);
}
}
}
</pre></td>
</tr></table>
</div>
<h3>Configuring Home Assistant</h3>
<p>The last step is to integrate the sensor values into Home Assistant. This can be done by setting up Home Assistant to connect to the MQTT broker and subscribe to the sensor topics.</p>
<div class="highlighter-coderay"><table class="CodeRay"><tr>
<td class="line-numbers"><pre><a href="#n1" name="n1">1</a>
<a href="#n2" name="n2">2</a>
<a href="#n3" name="n3">3</a>
<a href="#n4" name="n4">4</a>
<a href="#n5" name="n5">5</a>
<a href="#n6" name="n6">6</a>
<a href="#n7" name="n7">7</a>
<a href="#n8" name="n8">8</a>
<a href="#n9" name="n9">9</a>
<strong><a href="#n10" name="n10">10</a></strong>
<a href="#n11" name="n11">11</a>
<a href="#n12" name="n12">12</a>
<a href="#n13" name="n13">13</a>
<a href="#n14" name="n14">14</a>
<a href="#n15" name="n15">15</a>
<a href="#n16" name="n16">16</a>
<a href="#n17" name="n17">17</a>
<a href="#n18" name="n18">18</a>
</pre></td>
<td class="code"><pre><span class="key">mqtt</span>:
<span class="key">broker</span>: <span class="string"><span class="content">YOUR_MQTT_SERVER_HOST</span></span>
<span class="key">username</span>: <span class="string"><span class="content">your_username</span></span>
<span class="key">password</span>: <span class="string"><span class="content">your_password</span></span>
<span class="key">sensor</span>:
<span class="key">platform</span>: <span class="string"><span class="content">mqtt</span></span>
<span class="key">name</span>: <span class="string"><span class="delimiter">&quot;</span><span class="content">Temperature</span><span class="delimiter">&quot;</span></span>
<span class="key">state_topic</span>: <span class="string"><span class="delimiter">&quot;</span><span class="content">sensor/temperature</span><span class="delimiter">&quot;</span></span>
<span class="key">qos</span>: <span class="string"><span class="content">0</span></span>
<span class="key">unit_of_measurement</span>: <span class="string"><span class="delimiter">&quot;</span><span class="content">ºC</span><span class="delimiter">&quot;</span></span>
<span class="key">sensor 2</span>:
<span class="key">platform</span>: <span class="string"><span class="content">mqtt</span></span>
<span class="key">name</span>: <span class="string"><span class="delimiter">&quot;</span><span class="content">Humidity</span><span class="delimiter">&quot;</span></span>
<span class="key">state_topic</span>: <span class="string"><span class="delimiter">&quot;</span><span class="content">sensor/humidity</span><span class="delimiter">&quot;</span></span>
<span class="key">qos</span>: <span class="string"><span class="content">0</span></span>
<span class="key">unit_of_measurement</span>: <span class="string"><span class="delimiter">&quot;</span><span class="content">%</span><span class="delimiter">&quot;</span></span>
</pre></td>
</tr></table>
</div>
]]></content>
</entry>
<entry>
<title type="html"><![CDATA[0.7.5: Blinkstick, SNMP, Telegram]]></title>
<link href="https://home-assistant.io/blog/2015/10/11/rfxtrx-blinkstick-and-snmp-support/"/>
<updated>2015-10-11T17:10:00+00:00</updated>
<id>https://home-assistant.io/blog/2015/10/11/rfxtrx-blinkstick-and-snmp-support</id>
<content type="html"><![CDATA[<p>We discovered two issues annoying enough to warrent the release of 0.7.5:</p>
<ul>
<li>Home Assistant package did not include the CloudMQTT certificate.</li>
<li>A bug in the core caused issues when some platforms are loaded twice.</li>
</ul>
<p>This release also includes some new platforms (because they keep coming!):</p>
<p><img src="https://home-assistant.io/images/supported_brands/blinkstick.png" style="border:none; box-shadow: none; float: right;" height="50" /><img src="https://home-assistant.io/images/supported_brands/rfxtrx.png" style="border:none; box-shadow: none; float: right; clear: right;" height="50" /><img src="https://home-assistant.io/images/supported_brands/telegram.png" style="border:none; box-shadow: none; float: right; clear: right;" height="50" /></p>
<ul>
<li>Light: <a href="https://home-assistant.io/components/light.blinksticklight/">blinkstick platform</a> added (<a href="https://github.com/alanbowman">@alanbowman</a>)</li>
<li>Device Tracker: <a href="https://home-assistant.io/components/device_tracker.snmp/">SNMP platform</a> added (<a href="https://github.com/tomduijf">@tomduijf</a>)</li>
<li>Light: <a href="https://home-assistant.io/components/light.rfxtrx/">rfxtrx platform</a> added (<a href="https://github.com/badele">@badele</a>)</li>
<li>Switch: <a href="https://home-assistant.io/components/switch.rfxtrx/">rfxtrx platform</a> added (<a href="https://github.com/badele">@badele</a>)</li>
<li>Notify: <a href="https://home-assistant.io/components/notify.telegram/">telegram platform</a> added (<a href="https://github.com/fabaff">@fabaff</a>)</li>
</ul>
<p>Also, the media player was extended by <a href="https://github.com/maddox">@maddox</a> to support the play media command. This has been implemented for the <a href="https://home-assistant.io/components/media_player.itunes/">iTunes platform</a>.</p>
]]></content>
</entry>
<entry>
<title type="html"><![CDATA[Home Assistant goes geo with OwnTracks]]></title>
<link href="https://home-assistant.io/blog/2015/10/05/home-assistant-goes-geo-with-owntracks/"/>
<updated>2015-10-05T21:49:00+00:00</updated>
<id>https://home-assistant.io/blog/2015/10/05/home-assistant-goes-geo-with-owntracks</id>
<content type="html"><![CDATA[<p>A few weeks have past and it is time again for another release: version 0.7.4. This time were very glad to be able to introduce brand new integration with OwnTracks to allow tracking of people on a map. The geo support consists of three different parts:</p>
<ul>
<li><a href="https://home-assistant.io/components/device_tracker.owntracks/">OwnTracks platform for the device tracker</a> to get locations for devices</li>
<li>Brand new <a href="https://home-assistant.io/components/zone/">zone component</a> to define zones to identify locations and <a href="https://home-assistant.io/components/automation/#zone-trigger/">trigger automation</a></li>
<li>A map in the UI to see all this (<a href="https://home-assistant.io/demo/">see it in action in the demo</a>)</li>
</ul>
<p>We have added a new <a href="https://home-assistant.io/getting-started/presence-detection/">getting started section</a> to get up and running.</p>
<p class="img">
<img src="https://home-assistant.io/images/screenshots/map.png" />
Map in Home Assistant showing two people and three zones (home, school, work)
</p>
<p>Ofcourse more things happened in the last three weeks. Im moving away from my usual long post to a short summary of highlights:</p>
<p><a href="https://home-assistant.io/components/media_player.plex/">
<img src="https://home-assistant.io/images/supported_brands/plex.png" style="border:none; box-shadow: none; float: right;" height="50" />
</a></p>
<ul>
<li>Sensor: <a href="https://home-assistant.io/components/sensor.rest/">rest platform</a> added (<a href="https://github.com/fabaff">@fabaff</a>)</li>
<li>Alarm Control Panel: <a href="https://home-assistant.io/components/alarm_control_panel.mqtt/">MQTT platform</a> added (<a href="https://github.com/sfam">@sfam</a>)</li>
<li>Media Player: <a href="https://home-assistant.io/components/media_player.plex/">Plex platform</a> added (<a href="https://github.com/miniconfig, [@adrienbrault](https://github.com/adrienbrault)">@miniconfig</a></li>
<li>Dev Tools: services can now show description of fields (<a href="https://github.com/balloob">@balloob</a>)</li>
<li>MQTT: Support for certificates and improved error reporting (<a href="https://github.com/balloob">@balloob</a>)</li>
<li>Light: <a href="https://home-assistant.io/components/light.limitlessled/">limitlessled platform</a> extended with white light support (<a href="https://github.com/auchter">@auchter</a>)</li>
<li>Fuzzy matching for scenes (<a href="https://github.com/pavoni">@pavoni</a>)</li>
<li>Scene support for media player (<a href="https://github.com/maddox">@maddox</a>)</li>
</ul>
]]></content>
</entry>
<entry>
<title type="html"><![CDATA[Alarms, Sonos and iTunes now supported]]></title>
<link href="https://home-assistant.io/blog/2015/09/19/alarm-sonos-and-itunes-support/"/>
<updated>2015-09-19T21:47:00+00:00</updated>
<id>https://home-assistant.io/blog/2015/09/19/alarm-sonos-and-itunes-support</id>
<content type="html"><![CDATA[<p>Its like someone opened a can of rock solid developers and emptied it above our <a href="https://gitter.im/balloob/home-assistant">chat channel</a> because it exploded with great conversations and solid contributions. Featured in release 0.7.3: Sonos, iTunes, Alarm component and Automation upgrade.</p>
<p>See <a href="https://github.com/balloob/home-assistant/releases/tag/0.7.3">GitHub</a> for more detailed release notes.</p>
<p><em>Migration note: the <code>scheduler</code> component has been removed in favor of the <code>automation</code> component.</em></p>
<p><strong>Sonos</strong><br />
<img src="https://home-assistant.io/images/supported_brands/sonos.png" style="border:none; box-shadow: none; float: right;" height="50" /> Sonos support has been added by <a href="https://github.com/rhooper">@rhooper</a> and <a href="https://github.com/SEJeff">@SEJeff</a>. Home Assistant is now able to automatically detect Sonos devices in your network and set them up for you. It will allow you to control music playing on your Sonos and change the volume.</p>
<p><strong>iTunes and airplay speakers</strong><br />
<img src="https://home-assistant.io/images/supported_brands/itunes.png" style="border:none; box-shadow: none; float: right;" height="50" /> <a href="https://github.com/maddox">@maddox</a> has contributed support for controlling iTunes and airplay speakers. For this to work you will have to run <a href="https://github.com/maddox/itunes-api">itunes-api</a> on your Mac as middleware.</p>
<div class="highlighter-coderay"><div class="CodeRay">
<div class="code"><pre><span class="comment"># Example configuration.yaml entry</span>
<span class="key">media_player</span>:
<span class="key">platform</span>: <span class="string"><span class="content">itunes</span></span>
<span class="key">name</span>: <span class="string"><span class="content">iTunes</span></span>
<span class="key">host</span>: <span class="string"><span class="content">http://192.168.1.50</span></span>
<span class="key">port</span>: <span class="string"><span class="content">8181</span></span>
</pre></div>
</div>
</div>
<!--more-->
<p><strong>Automation</strong><br />
Automation has gotten a lot of love. It now supports conditions, multiple triggers and new types of triggers. The best to get started with it is to head over to the new <a href="https://home-assistant.io/getting-started/automation/">getting started with automation</a> page.</p>
<div class="highlighter-coderay"><div class="CodeRay">
<div class="code"><pre><span class="comment"># Example of entry in configuration.yaml</span>
<span class="key">automation</span>:
<span class="key">alias</span>: <span class="string"><span class="content">Light on in the evening</span></span>
<span class="key">trigger</span>:
- <span class="string"><span class="content">platform: sun</span></span>
<span class="key">event</span>: <span class="string"><span class="content">sunset</span></span>
<span class="key">offset</span>: <span class="string"><span class="delimiter">&quot;</span><span class="content">-01:00:00</span><span class="delimiter">&quot;</span></span>
- <span class="string"><span class="content">platform: state</span></span>
<span class="key">entity_id</span>: <span class="string"><span class="content">group.all_devices</span></span>
<span class="key">state</span>: <span class="string"><span class="content">home</span></span>
<span class="key">condition</span>:
- <span class="string"><span class="content">platform: state</span></span>
<span class="key">entity_id</span>: <span class="string"><span class="content">group.all_devices</span></span>
<span class="key">state</span>: <span class="string"><span class="content">home</span></span>
- <span class="string"><span class="content">platform: time</span></span>
<span class="key">after</span>: <span class="string"><span class="delimiter">&quot;</span><span class="content">16:00:00</span><span class="delimiter">&quot;</span></span>
<span class="key">before</span>: <span class="string"><span class="delimiter">&quot;</span><span class="content">23:00:00</span><span class="delimiter">&quot;</span></span>
<span class="key">action</span>:
<span class="key">service</span>: <span class="string"><span class="content">homeassistant.turn_on</span></span>
<span class="key">entity_id</span>: <span class="string"><span class="content">group.living_room</span></span>
</pre></div>
</div>
</div>
<p><strong>Verisure Alarms</strong><br />
<img src="https://home-assistant.io/images/supported_brands/verisure.png" style="border:none; box-shadow: none; float: right;" height="50" /> We now support arming and disarming your verisure alarm from within Home Assistant thanks to added support by <a href="https://github.com/persandstrom">@persandstrom</a>.</p>
]]></content>
</entry>
<entry>
<title type="html"><![CDATA[Remote Monitoring with Glances]]></title>
<link href="https://home-assistant.io/blog/2015/09/18/monitoring-with-glances-and-home-assistant/"/>
<updated>2015-09-18T09:00:00+00:00</updated>
<id>https://home-assistant.io/blog/2015/09/18/monitoring-with-glances-and-home-assistant</id>
<content type="html"><![CDATA[<p><img src="https://home-assistant.io/images/supported_brands/glances.png" style="border:none; box-shadow: none; float: right;" height="80" /><br />
Inspried by a <a href="https://github.com/balloob/home-assistant/issues/310">feature requests</a> I started looking into the available options to do monitoring of remote hosts. The feature request is about displaying system information in a similar way than the <a href="https://home-assistant.io/components/sensor.systemmonitor/">systemmonitor</a> sensor does it for the local system. After a while I started to think that it would be a nice addition for a small home network where no full-blown system monitoring setup is present.</p>
<!--more-->
<p>The basic problem is to get the data from the remote host. Starting with <a href="https://pypi.python.org/pypi/psutil">psutil</a> that is used by the systemmonitor sensor, a possible solution is only a click away and named <a href="https://github.com/nicolargo/glances">Glances</a>. Glances has a nice curses-based interface and a <a href="https://github.com/nicolargo/glances/wiki/The-Glances-RESTFULL-JSON-API">RESTful API</a>.</p>
<p>The <a href="https://home-assistant.io/components/sensor.glances/">Glances sensor</a> sensor uses that API to get all needed data.</p>
<p>In this post a default Fedora 22 Workstation installation is used on the host that should be monitored. In fact, it doesnt matter if the system is the local one or a remote one as long as Glances is available. With some adjustments it should work on your own systems too. The difference will be the package and the firewall management tools.</p>
<p>First some extra packages are needed beside Glances, especially the <a href="http://bottlepy.org/docs/dev/index.html">bottle</a> webserver. I guess that Glances is available for your distribution as well. Otherwise follow those <a href="https://github.com/nicolargo/glances#installation">instructions</a>.</p>
<div class="highlighter-coderay"><div class="CodeRay">
<div class="code"><pre>$ sudo dnf -y install glances python-bottle
</pre></div>
</div>
</div>
<p>On Fedora the Firewall settings are strict. Lets open port 61208 to allow other hosts to connect to that port. This is not needed if you just want to observe your local machine.</p>
<div class="highlighter-coderay"><div class="CodeRay">
<div class="code"><pre>$ sudo firewall-cmd --permanent --add-port=61208/tcp
$ sudo firewall-cmd --reload
</pre></div>
</div>
</div>
<p>Launch <code>glances</code> and keep an eye on the output.</p>
<div class="highlighter-coderay"><div class="CodeRay">
<div class="code"><pre>$ glances -w
Glances web server started on http://0.0.0.0:61208/
</pre></div>
</div>
</div>
<p>Now browse to http://IP_ADRRESS:61208/. You should see the webified view of Glances.</p>
<p class="img">
<img src="https://home-assistant.io/images/blog/2015-09-glances/web-glances.png" />
Glances web interface
</p>
<p>Another check is to access the API located at http://IP_ADRRESS:61208/api/2/mem/used and to confirm that a detail about your memory usage is provided as a JSON response. If so, you are good to proceed.</p>
<div class="highlighter-coderay"><div class="CodeRay">
<div class="code"><pre>$ curl -X GET http://IP_ADDRESS:61208/api/2/mem/used
{&quot;used&quot;: 203943936}
</pre></div>
</div>
</div>
<p>Add the <a href="https://home-assistant.io/components/sensor.glances/">glances sensor</a> entry to your <code>configuration.yaml</code> file and restart Home Assistant then.</p>
<div class="highlighter-coderay"><div class="CodeRay">
<div class="code"><pre><span class="comment"># Example configuration.yaml entry</span>
- <span class="string"><span class="content">platform: glances</span></span>
<span class="key">name</span>: <span class="string"><span class="content">NAS</span></span>
<span class="key">host</span>: <span class="string"><span class="content">IP_ADDRESS</span></span>
<span class="key">resources</span>:
- <span class="string"><span class="content">'disk_use_percent'</span></span>
- <span class="string"><span class="content">'disk_use'</span></span>
- <span class="string"><span class="content">'disk_free'</span></span>
</pre></div>
</div>
</div>
<p>If there are no error in the log file then you should see your new sensors.</p>
<p class="img">
<img src="https://home-assistant.io/images/blog/2015-09-glances/sensors.png" />
The Glances sensors
</p>
<p><a href="https://github.com/nicolargo/glances">Glances</a> has a couple of optional dependencies which are extenting the range of provided information. This means that it would be possible to get details about the RAID system, HDD temperature, IP addresses, sensors, etc., please create a <a href="https://github.com/balloob/home-assistant/pulls">Pull request</a> with your additions or a <a href="https://github.com/balloob/home-assistant/issues/new">Feature request</a> if you want see more details in your Home Assistant frontend.</p>
]]></content>
</entry>
<entry>
<title type="html"><![CDATA[Home Assistant meets IFTTT]]></title>
<link href="https://home-assistant.io/blog/2015/09/13/home-assistant-meets-ifttt/"/>
<updated>2015-09-13T16:28:00+00:00</updated>
<id>https://home-assistant.io/blog/2015/09/13/home-assistant-meets-ifttt</id>
<content type="html"><![CDATA[<p>Today we announce the release of Home Assistant v0.7.2 which includes brand new support by <a href="https://github.com/sfam">@sfam</a> to integrate with <a href="https://ifttt.com">IFTTT</a>. IFTTT stands for If This, Then That and is a webservice that integrates with almost every possible webservice out there. Adding Home Assistant to this mix means Home Assistant can connect with all via IFTTT.</p>
<p>It is now possible to disable your irregation system if it is going to be cloudy tomorrow or tweet if your smoke alarm goes off.</p>
<p class="img">
<img src="https://home-assistant.io/images/blog/2015-09-ifttt/splash.png" />
</p>
<p>Head over to the <a href="https://home-assistant.io/components/ifttt/">setup instructions</a> to get started with IFTTT. Click the read more button for some example recipes.</p>
<!--more-->
<p>In each of the following examples, make sure to replace the XXX in the url with your correct host address and api password.</p>
<h2><a class="title-link" name="turn-off-irregation-system-when-not-needed" href="#turn-off-irregation-system-when-not-needed"></a> Turn off irregation system when not needed</h2>
<p class="img">
<img src="https://home-assistant.io/images/blog/2015-09-ifttt/recipe-weather.png" />
</p>
<p>Maker channel setup:</p>
<table>
<thead>
<tr>
<th>Field</th>
<th>Value</th>
</tr>
</thead>
<tbody>
<tr>
<td>URL</td>
<td>http://xxx.xxx.xxx.xxx:8123/api/services/switch/turn_off?api_password=xxxxxxxx</td>
</tr>
<tr>
<td>METHOD</td>
<td>POST</td>
</tr>
<tr>
<td>CONTENT TYPE</td>
<td>application/json</td>
</tr>
<tr>
<td>BODY</td>
<td>{ “entity_id”: “switch.irrigation” }</td>
</tr>
</tbody>
</table>
<h2><a class="title-link" name="tweet-when-important-events-happen" href="#tweet-when-important-events-happen"></a> Tweet when important events happen</h2>
<p class="img">
<img src="https://home-assistant.io/images/blog/2015-09-ifttt/recipe-twitter.png" />
</p>
<p>This will tweet a message when an MQTT message is received that the smoke alarm has been triggered. Setup Maker channel with event name <code>HA_FIRE_ALARM</code> and Twitter channel to tweet the message in <code>value1</code>.</p>
<div class="highlighter-coderay"><div class="CodeRay">
<div class="code"><pre><span class="comment"># Configuration.yaml entry</span>
<span class="key">automation</span>:
- <span class="string"><span class="content">alias: Post a tweet when fire alarm is triggered</span></span>
<span class="key">trigger</span>:
<span class="key">platform</span>: <span class="string"><span class="content">mqtt</span></span>
<span class="key">mqtt_topic</span>: <span class="string"><span class="content">home/alarm/fire</span></span>
<span class="key">mqtt_payload</span>: <span class="string"><span class="content">'on'</span></span>
<span class="key">action</span>:
<span class="key">service</span>: <span class="string"><span class="content">ifttt.trigger</span></span>
<span class="key">data</span>: <span class="string"><span class="content">{&quot;event&quot;:&quot;HA_FIRE_ALARM&quot;, &quot;value1&quot;:&quot;The fire alarm just triggered!&quot;}</span></span>
</pre></div>
</div>
</div>
<h2><a class="title-link" name="turn-on-lights-when-i-get-home" href="#turn-on-lights-when-i-get-home"></a> Turn on lights when I get home</h2>
<p class="img">
<img src="https://home-assistant.io/images/blog/2015-09-ifttt/recipe-geo.png" />
</p>
<p>Maker channel setup:</p>
<table>
<thead>
<tr>
<th>Field</th>
<th>Value</th>
</tr>
</thead>
<tbody>
<tr>
<td>URL</td>
<td>http://xxx.xxx.xxx.xxx:8123/api/services/light/turn_on?api_password=xxxxxxxx</td>
</tr>
<tr>
<td>METHOD</td>
<td>POST</td>
</tr>
<tr>
<td>CONTENT TYPE</td>
<td>application/json</td>
</tr>
<tr>
<td>BODY</td>
<td>{ “entity_id”: “light.kitchen” }</td>
</tr>
</tbody>
</table>
<h2><a class="title-link" name="flash-lights-when-a-new-pr-comes-in-for-home-assistant" href="#flash-lights-when-a-new-pr-comes-in-for-home-assistant"></a> Flash lights when a new PR comes in for Home Assistant</h2>
<p class="img">
<img src="https://home-assistant.io/images/blog/2015-09-ifttt/recipe-github.png" />
</p>
<p>Maker channel setup:</p>
<table>
<thead>
<tr>
<th>Field</th>
<th>Value</th>
</tr>
</thead>
<tbody>
<tr>
<td>URL</td>
<td>http://xxx.xxx.xxx.xxx:8123/api/services/light/turn_on?api_password=xxxxxxxx</td>
</tr>
<tr>
<td>METHOD</td>
<td>POST</td>
</tr>
<tr>
<td>CONTENT TYPE</td>
<td>application/json</td>
</tr>
<tr>
<td>BODY</td>
<td>{ “entity_id”: “group.all_lights”, “flash”:”yes” }</td>
</tr>
</tbody>
</table>
<h2><a class="title-link" name="fire-events-when-pressing-the-do-button" href="#fire-events-when-pressing-the-do-button"></a> Fire events when pressing the DO button</h2>
<p class="img">
<img src="https://home-assistant.io/images/blog/2015-09-ifttt/recipe-do.png" />
</p>
<p>Maker channel setup:</p>
<table>
<thead>
<tr>
<th>Field</th>
<th>Value</th>
</tr>
</thead>
<tbody>
<tr>
<td>URL</td>
<td>http://xxx.xxx.xxx.xxx:8123/api/events/do_button_pressed?api_password=xxxxxxxx</td>
</tr>
<tr>
<td>METHOD</td>
<td>POST</td>
</tr>
<tr>
<td>CONTENT TYPE</td>
<td>application/json</td>
</tr>
</tbody>
</table>
]]></content>
</entry>
<entry>
<title type="html"><![CDATA[Using MQTT with Home Assistant]]></title>
<link href="https://home-assistant.io/blog/2015/09/11/different-ways-to-use-mqtt-with-home-assistant/"/>
<updated>2015-09-11T09:19:38+00:00</updated>
<id>https://home-assistant.io/blog/2015/09/11/different-ways-to-use-mqtt-with-home-assistant</id>
<content type="html"><![CDATA[
<p><img src="https://home-assistant.io/images/supported_brands/mqtt.png" style="border:none; box-shadow: none; float: right;" height="80" /> <a href="https://en.wikipedia.org/wiki/MQTT">MQTT</a> support was added to Home Assistant recently. The <a href="https://home-assistant.io/components/mqtt/">MQTT component</a> will enable you to do all sort of things. Most likely you will use it to communicate with your devices. But Home Assistant doesnt care where the data is coming from or is limited to real hardware as long as there is MQTT support. This means that it doesnt matter if the data is coming from a human, a web service, or a device.</p>
<p>A great example is shown in a <a href="https://home-assistant.io/blog/2015/08/26/laundry-automation-with-moteino-mqtt-and-home-assistant/">Laundry Automation</a> post in this blog.</p>
<p>This post will give you a small overview of some other possibilities on how to use MQTT with Home Assistant.</p>
<!--more-->
<h3><a class="title-link" name="manual-usage" href="#manual-usage"></a> Manual usage</h3>
<p>The simplest but not the coolest way as a human to interact with a Home Assistant sensor is launching a command manually. Lets create a “Mood” sensor. For simplicity Home Assistant and the MQTT broker are both running on the same host. The needed configuration snipplets to add to the <code>configuration.yaml</code> file consists of two parts: one for the broker and one for the sensor.</p>
<div class="highlighter-coderay"><table class="CodeRay"><tr>
<td class="line-numbers"><pre><a href="#n1" name="n1">1</a>
<a href="#n2" name="n2">2</a>
<a href="#n3" name="n3">3</a>
<a href="#n4" name="n4">4</a>
<a href="#n5" name="n5">5</a>
<a href="#n6" name="n6">6</a>
<a href="#n7" name="n7">7</a>
</pre></td>
<td class="code"><pre><span class="key">mqtt</span>:
<span class="key">broker</span>: <span class="string"><span class="content">127.0.0.1</span></span>
<span class="key">sensor</span>:
- <span class="string"><span class="content">platform: mqtt</span></span>
<span class="key">name</span>: <span class="string"><span class="delimiter">&quot;</span><span class="content">Fabian's Mood</span><span class="delimiter">&quot;</span></span>
<span class="key">state_topic</span>: <span class="string"><span class="delimiter">&quot;</span><span class="content">home-assistant/fabian/mood</span><span class="delimiter">&quot;</span></span>
</pre></td>
</tr></table>
</div>
<p>After a restart of Home Assistant the “Mood” sensor will show up in the frontend. For more details about the configuration of MQTT itself and the sensor, please refer to the <a href="https://home-assistant.io/components/mqtt/">MQTT component</a> or the <a href="https://home-assistant.io/components/sensor.mqtt/">MQTT sensor</a> documentation.</p>
<p>Now we can set the mood. The commandline tool (<code>mosquitto_pub</code>) which is shipped with <code>mosquitto</code> is used to send an MQTT message.</p>
<div class="highlighter-coderay"><table class="CodeRay"><tr>
<td class="line-numbers"><pre><a href="#n1" name="n1">1</a>
</pre></td>
<td class="code"><pre>$ mosquitto_pub -h 127.0.0.1 -t &quot;home-assistant/fabian/mood&quot; -m &quot;bad&quot;
</pre></td>
</tr></table>
</div>
<p class="img">
<img src="https://home-assistant.io/images/blog/2015-09-mqtt/mood.png" />
The Mood sensor
</p>
<p>This is a really bad example. Dont do this in the real world because you wont be able to create diagrams of historical data. Better use a numerical value.</p>
<h3><a class="title-link" name="python-mqtt-bindings" href="#python-mqtt-bindings"></a> Python MQTT bindings</h3>
<p>The last section was pretty boring, I know. Nobody wants to send MQTT messages by hand if there is a computer on the desk. If you are playing the lottery this section is for you. If not, read it anyway because the lottery is just an example :-).</p>
<p>This example is using the <a href="https://eclipse.org/paho/clients/python/">Paho MQTT Python binding</a> because those binding should be available on the host where Home Assistant is running. If you want to use this example on another machine, please make sure that the bindings are installed (<code>pip3 install paho-mqtt</code>).</p>
<p>The first step is to add an additional MQTT sensor to the <code>configuration.yaml</code> file. The sensor will be called “Lottery” and the unit of measurement will be “No.”.</p>
<div class="highlighter-coderay"><table class="CodeRay"><tr>
<td class="line-numbers"><pre><a href="#n1" name="n1">1</a>
<a href="#n2" name="n2">2</a>
<a href="#n3" name="n3">3</a>
<a href="#n4" name="n4">4</a>
</pre></td>
<td class="code"><pre> - <span class="string"><span class="content">platform: mqtt</span></span>
<span class="key">name</span>: <span class="string"><span class="delimiter">&quot;</span><span class="content">Lottery</span><span class="delimiter">&quot;</span></span>
<span class="key">state_topic</span>: <span class="string"><span class="delimiter">&quot;</span><span class="content">home-assistant/lottery/number</span><span class="delimiter">&quot;</span></span>
<span class="key">unit_of_measurement</span>: <span class="string"><span class="delimiter">&quot;</span><span class="content">No.</span><span class="delimiter">&quot;</span></span>
</pre></td>
</tr></table>
</div>
<p>Dont forget to restart Home Assistant to make the configuration active.</p>
<p>To play, we need numbers from 1 to 49 which can be marked on the ticket. Those numbers should be random and displayed in the Home Assistant frontend. The Python script below is another simple example on how to send MQTT messages from the commandline; this time in a loop. For further information and examples please check the <a href="https://eclipse.org/paho/clients/python/docs/">Paho MQTT</a> documentation.</p>
<div class="highlighter-coderay"><table class="CodeRay"><tr>
<td class="line-numbers"><pre><a href="#n1" name="n1">1</a>
<a href="#n2" name="n2">2</a>
<a href="#n3" name="n3">3</a>
<a href="#n4" name="n4">4</a>
<a href="#n5" name="n5">5</a>
<a href="#n6" name="n6">6</a>
<a href="#n7" name="n7">7</a>
<a href="#n8" name="n8">8</a>
<a href="#n9" name="n9">9</a>
<strong><a href="#n10" name="n10">10</a></strong>
<a href="#n11" name="n11">11</a>
<a href="#n12" name="n12">12</a>
<a href="#n13" name="n13">13</a>
<a href="#n14" name="n14">14</a>
<a href="#n15" name="n15">15</a>
<a href="#n16" name="n16">16</a>
<a href="#n17" name="n17">17</a>
<a href="#n18" name="n18">18</a>
<a href="#n19" name="n19">19</a>
<strong><a href="#n20" name="n20">20</a></strong>
<a href="#n21" name="n21">21</a>
<a href="#n22" name="n22">22</a>
</pre></td>
<td class="code"><pre><span class="comment">#!/usr/bin/python3</span>
<span class="comment">#</span>
<span class="keyword">import</span> <span class="include">time</span>
<span class="keyword">import</span> <span class="include">random</span>
<span class="keyword">import</span> <span class="include">paho.mqtt.client</span> <span class="keyword">as</span> mqtt
<span class="keyword">import</span> <span class="include">paho.mqtt.publish</span> <span class="keyword">as</span> publish
broker = <span class="string"><span class="delimiter">'</span><span class="content">127.0.0.1</span><span class="delimiter">'</span></span>
state_topic = <span class="string"><span class="delimiter">'</span><span class="content">home-assistant/lottery/number</span><span class="delimiter">'</span></span>
delay = <span class="integer">5</span>
<span class="comment"># Send a single message to set the mood</span>
publish.single(<span class="string"><span class="delimiter">'</span><span class="content">home-assistant/fabian/mood</span><span class="delimiter">'</span></span>, <span class="string"><span class="delimiter">'</span><span class="content">good</span><span class="delimiter">'</span></span>, hostname=broker)
<span class="comment"># Send messages in a loop</span>
client = mqtt.Client(<span class="string"><span class="delimiter">&quot;</span><span class="content">ha-client</span><span class="delimiter">&quot;</span></span>)
client.connect(broker)
client.loop_start()
<span class="keyword">while</span> <span class="predefined-constant">True</span>:
client.publish(state_topic, random.randrange(<span class="integer">0</span>, <span class="integer">50</span>, <span class="integer">1</span>))
time.sleep(delay)
</pre></td>
</tr></table>
</div>
<p>Every 5 seconds a message with a new number is sent to the broker and picked up by Home Assistant. By the way, my mood is much better now.</p>
<p class="img">
<img src="https://home-assistant.io/images/blog/2015-09-mqtt/lottery.png" />
The Lottery sensor
</p>
<p>With only a few lines of Python and an MQTT broker you can create your own “smartdevice” or send information to Home Assistant which you havent think of. Of course this is not limited to Python. If there is an MQTT library available, the device can be used with Home Assistant now.</p>
<h3><a class="title-link" name="arduino" href="#arduino"></a> Arduino</h3>
<p>To get started with real hardware that is capable to send MQTT messages, the Arduino platform is an inexpensive way to do it. In this section an Arduino UNO with an Ethernet shield and a photo resistor is used. The photo resistor is connected to analog pin 0 (A0) and has an output from 0 to 1024.</p>
<p class="img">
<img src="https://home-assistant.io/images/blog/2015-09-mqtt/arduino-shield.png" />
The Arduino UNO with Ethernet shield and photo resistor
</p>
<p>The <a href="http://knolleary.github.io/pubsubclient/">MQTT client</a> for the Arduino needs to be available in your Arduino IDE. Below you will find a sketch which could act as a starting point. Please modify the IP addresses, the MAC address, and the pin as needed and upload the sketch to your Arduino.</p>
<div class="highlighter-coderay"><table class="CodeRay"><tr>
<td class="line-numbers"><pre><a href="#n1" name="n1">1</a>
<a href="#n2" name="n2">2</a>
<a href="#n3" name="n3">3</a>
<a href="#n4" name="n4">4</a>
<a href="#n5" name="n5">5</a>
<a href="#n6" name="n6">6</a>
<a href="#n7" name="n7">7</a>
<a href="#n8" name="n8">8</a>
<a href="#n9" name="n9">9</a>
<strong><a href="#n10" name="n10">10</a></strong>
<a href="#n11" name="n11">11</a>
<a href="#n12" name="n12">12</a>
<a href="#n13" name="n13">13</a>
<a href="#n14" name="n14">14</a>
<a href="#n15" name="n15">15</a>
<a href="#n16" name="n16">16</a>
<a href="#n17" name="n17">17</a>
<a href="#n18" name="n18">18</a>
<a href="#n19" name="n19">19</a>
<strong><a href="#n20" name="n20">20</a></strong>
<a href="#n21" name="n21">21</a>
<a href="#n22" name="n22">22</a>
<a href="#n23" name="n23">23</a>
<a href="#n24" name="n24">24</a>
<a href="#n25" name="n25">25</a>
<a href="#n26" name="n26">26</a>
<a href="#n27" name="n27">27</a>
<a href="#n28" name="n28">28</a>
<a href="#n29" name="n29">29</a>
<strong><a href="#n30" name="n30">30</a></strong>
<a href="#n31" name="n31">31</a>
<a href="#n32" name="n32">32</a>
<a href="#n33" name="n33">33</a>
<a href="#n34" name="n34">34</a>
<a href="#n35" name="n35">35</a>
<a href="#n36" name="n36">36</a>
<a href="#n37" name="n37">37</a>
<a href="#n38" name="n38">38</a>
<a href="#n39" name="n39">39</a>
<strong><a href="#n40" name="n40">40</a></strong>
<a href="#n41" name="n41">41</a>
<a href="#n42" name="n42">42</a>
<a href="#n43" name="n43">43</a>
<a href="#n44" name="n44">44</a>
<a href="#n45" name="n45">45</a>
<a href="#n46" name="n46">46</a>
<a href="#n47" name="n47">47</a>
<a href="#n48" name="n48">48</a>
<a href="#n49" name="n49">49</a>
<strong><a href="#n50" name="n50">50</a></strong>
<a href="#n51" name="n51">51</a>
<a href="#n52" name="n52">52</a>
<a href="#n53" name="n53">53</a>
<a href="#n54" name="n54">54</a>
<a href="#n55" name="n55">55</a>
<a href="#n56" name="n56">56</a>
<a href="#n57" name="n57">57</a>
<a href="#n58" name="n58">58</a>
<a href="#n59" name="n59">59</a>
<strong><a href="#n60" name="n60">60</a></strong>
<a href="#n61" name="n61">61</a>
<a href="#n62" name="n62">62</a>
<a href="#n63" name="n63">63</a>
<a href="#n64" name="n64">64</a>
<a href="#n65" name="n65">65</a>
<a href="#n66" name="n66">66</a>
<a href="#n67" name="n67">67</a>
<a href="#n68" name="n68">68</a>
</pre></td>
<td class="code"><pre><span class="comment">/*
This sketch is based on the basic MQTT example by
http://knolleary.github.io/pubsubclient/
*/</span>
<span class="preprocessor">#include</span> <span class="include">&lt;SPI.h&gt;</span>
<span class="preprocessor">#include</span> <span class="include">&lt;Ethernet.h&gt;</span>
<span class="preprocessor">#include</span> <span class="include">&lt;PubSubClient.h&gt;</span>
<span class="preprocessor">#define</span> DEBUG <span class="integer">1</span> <span class="comment">// Debug output to serial console</span>
<span class="comment">// Device settings</span>
IPAddress deviceIp(<span class="integer">192</span>, <span class="integer">168</span>, <span class="integer">0</span>, <span class="integer">43</span>);
byte deviceMac[] = { <span class="hex">0xAB</span>, <span class="hex">0xCD</span>, <span class="hex">0xFE</span>, <span class="hex">0xFE</span>, <span class="hex">0xFE</span>, <span class="hex">0xFE</span> };
<span class="predefined-type">char</span>* deviceId = <span class="string"><span class="delimiter">&quot;</span><span class="content">sensor01</span><span class="delimiter">&quot;</span></span>; <span class="comment">// Name of the sensor</span>
<span class="predefined-type">char</span>* stateTopic = <span class="string"><span class="delimiter">&quot;</span><span class="content">home-assistant/sensor01/brightness</span><span class="delimiter">&quot;</span></span>; <span class="comment">// MQTT topic where values are published</span>
<span class="predefined-type">int</span> sensorPin = A0; <span class="comment">// Pin to which the sensor is connected to</span>
<span class="predefined-type">char</span> buf[<span class="integer">4</span>]; <span class="comment">// Buffer to store the sensor value</span>
<span class="predefined-type">int</span> updateInterval = <span class="integer">1000</span>; <span class="comment">// Interval in miliseconds</span>
<span class="comment">// MQTT server settings</span>
IPAddress mqttServer(<span class="integer">192</span>, <span class="integer">168</span>, <span class="integer">0</span>, <span class="integer">12</span>);
<span class="predefined-type">int</span> mqttPort = <span class="integer">1883</span>;
EthernetClient ethClient;
PubSubClient client(ethClient);
<span class="directive">void</span> reconnect() {
<span class="keyword">while</span> (!client.connected()) {
<span class="preprocessor">#if</span> DEBUG
Serial.print(<span class="string"><span class="delimiter">&quot;</span><span class="content">Attempting MQTT connection...</span><span class="delimiter">&quot;</span></span>);
<span class="preprocessor">#endif</span>
<span class="keyword">if</span> (client.connect(deviceId)) {
<span class="preprocessor">#if</span> DEBUG
Serial.println(<span class="string"><span class="delimiter">&quot;</span><span class="content">connected</span><span class="delimiter">&quot;</span></span>);
<span class="preprocessor">#endif</span>
} <span class="keyword">else</span> {
<span class="preprocessor">#if</span> DEBUG
Serial.print(<span class="string"><span class="delimiter">&quot;</span><span class="content">failed, rc=</span><span class="delimiter">&quot;</span></span>);
Serial.print(client.state());
Serial.println(<span class="string"><span class="delimiter">&quot;</span><span class="content"> try again in 5 seconds</span><span class="delimiter">&quot;</span></span>);
<span class="preprocessor">#endif</span>
delay(<span class="integer">5000</span>);
}
}
}
<span class="directive">void</span> setup() {
Serial.begin(<span class="integer">57600</span>);
client.setServer(mqttServer, mqttPort);
Ethernet.begin(deviceMac, deviceIp);
delay(<span class="integer">1500</span>);
}
<span class="directive">void</span> loop() {
<span class="keyword">if</span> (!client.connected()) {
reconnect();
}
client.loop();
<span class="predefined-type">int</span> sensorValue = analogRead(sensorPin);
<span class="preprocessor">#if</span> DEBUG
Serial.print(<span class="string"><span class="delimiter">&quot;</span><span class="content">Sensor value: </span><span class="delimiter">&quot;</span></span>);
Serial.println(sensorValue);
<span class="preprocessor">#endif</span>
client.publish(stateTopic, itoa(sensorValue, buf, <span class="integer">10</span>));
delay(updateInterval);
}
</pre></td>
</tr></table>
</div>
<p>The Arduino will send the value of the sensor every second. To use the data in Home Assistant, add an additional MQTT sensor to the <code>configuration.yaml</code> file.</p>
<div class="highlighter-coderay"><table class="CodeRay"><tr>
<td class="line-numbers"><pre><a href="#n1" name="n1">1</a>
<a href="#n2" name="n2">2</a>
<a href="#n3" name="n3">3</a>
<a href="#n4" name="n4">4</a>
</pre></td>
<td class="code"><pre> - <span class="string"><span class="content">platform: mqtt</span></span>
<span class="key">name</span>: <span class="string"><span class="delimiter">&quot;</span><span class="content">Brightness</span><span class="delimiter">&quot;</span></span>
<span class="key">state_topic</span>: <span class="string"><span class="delimiter">&quot;</span><span class="content">home-assistant/sensor01/brightness</span><span class="delimiter">&quot;</span></span>
<span class="key">unit_of_measurement</span>: <span class="string"><span class="delimiter">&quot;</span><span class="content">cd</span><span class="delimiter">&quot;</span></span>
</pre></td>
</tr></table>
</div>
<p>After a restart of Home Assistant the values of your Arduino will be available.</p>
<p class="img">
<img src="https://home-assistant.io/images/blog/2015-09-mqtt/arduino.png" />
The Brightness sensor
</p>
<p>I hope that this post could give you some ideas about the usage Home Assistant and MQTT. If you are working on a cool project that includes Home Assistant, please let us now.</p>
]]></content>
</entry>
</feed>