Site updated at 2016-08-22 08:21:42 UTC
This commit is contained in:
parent
f9d65cbe57
commit
4acb07bf8e
559 changed files with 18878 additions and 21688 deletions
|
@ -4,7 +4,7 @@
|
|||
<title><![CDATA[Category: Community | Home Assistant]]></title>
|
||||
<link href="https://home-assistant.io/blog/categories/community/atom.xml" rel="self"/>
|
||||
<link href="https://home-assistant.io/"/>
|
||||
<updated>2016-08-22T07:26:42+00:00</updated>
|
||||
<updated>2016-08-22T08:20:27+00:00</updated>
|
||||
<id>https://home-assistant.io/</id>
|
||||
<author>
|
||||
<name><![CDATA[Home Assistant]]></name>
|
||||
|
@ -18,32 +18,38 @@
|
|||
<link href="https://home-assistant.io/blog/2016/06/01/community-highlights/"/>
|
||||
<updated>2016-06-01T18:34:00+00:00</updated>
|
||||
<id>https://home-assistant.io/blog/2016/06/01/community-highlights</id>
|
||||
<content type="html"><![CDATA[<p>Our community is amazingly helpful and creative. If you haven’t been there yet, make sure to stop by our <a href="https://gitter.im/home-assistant/home-assistant">chat room</a> and come hang out with us. In this blog post I want to highlight a few recent awesome projects and videos from the community.</p>
|
||||
<content type="html"><![CDATA[Our community is amazingly helpful and creative. If you haven't been there yet, make sure to stop by our [chat room] and come hang out with us. In this blog post I want to highlight a few recent awesome projects and videos from the community.
|
||||
|
||||
<h3><a class='title-link' name='scenegen---cli-for-making-scenes' href='#scenegen---cli-for-making-scenes'></a> SceneGen - cli for making scenes </h3>
|
||||
### <a class='title-link' name='scenegen---cli-for-making-scenes' href='#scenegen---cli-for-making-scenes'></a> SceneGen - cli for making scenes
|
||||
|
||||
<p><a href="https://github.com/acockburn/scenegen">SceneGen</a> is a new command line utility developed by <a href="https://github.com/acockburn">Andrew Cockburn</a> that helps with creating scene configurations for Home Assistant. To use it, you put your house in the preferred state, run SceneGen and it will print the scene configuration for your current states.</p>
|
||||
[SceneGen] is a new command line utility developed by [Andrew Cockburn] that helps with creating scene configurations for Home Assistant. To use it, you put your house in the preferred state, run SceneGen and it will print the scene configuration for your current states.
|
||||
|
||||
<h3><a class='title-link' name='videos' href='#videos'></a> Videos </h3>
|
||||
### <a class='title-link' name='videos' href='#videos'></a> Videos
|
||||
|
||||
<p><a href="https://partofthething.com">Nick Touran</a> has been working on integrating IR remotes with Home Assistant. He made it into a component which should be available in the next release which should arrive in a couple of days. In the meanwhile, he wrote up <a href="https://partofthething.com/thoughts/?p=1010">a blog post</a> and has put out a video showing the new integration, very cool!</p>
|
||||
[Nick Touran] has been working on integrating IR remotes with Home Assistant. He made it into a component which should be available in the next release which should arrive in a couple of days. In the meanwhile, he wrote up [a blog post] and has put out a video showing the new integration, very cool!
|
||||
|
||||
<div class="videoWrapper">
|
||||
<iframe width="560" height="315" src="https://www.youtube.com/embed/6I_Lfpda0hc" frameborder="0" allowfullscreen=""></iframe>
|
||||
<div class='videoWrapper'>
|
||||
<iframe width="560" height="315" src="https://www.youtube.com/embed/6I_Lfpda0hc" frameborder="0" allowfullscreen></iframe>
|
||||
</div>
|
||||
|
||||
<p>Ben from <a href="http://www.bruhautomation.com/">BRUH Automation</a> has put out another great video how to get started tracking your location in Home Assistant using MQTT and OwnTracks.</p>
|
||||
Ben from [BRUH Automation] has put out another great video how to get started tracking your location in Home Assistant using MQTT and OwnTracks.
|
||||
|
||||
<div class="videoWrapper">
|
||||
<iframe width="560" height="315" src="https://www.youtube.com/embed/VaWdvVVYU3A" frameborder="0" allowfullscreen=""></iframe>
|
||||
<div class='videoWrapper'>
|
||||
<iframe width="560" height="315" src="https://www.youtube.com/embed/VaWdvVVYU3A" frameborder="0" allowfullscreen></iframe>
|
||||
</div>
|
||||
|
||||
<p>Muhammed Kilic has created a video how to make your Home Assistant instance accessible from the internet using the free dynamic DNS service DuckDNS.</p>
|
||||
Muhammed Kilic has created a video how to make your Home Assistant instance accessible from the internet using the free dynamic DNS service DuckDNS.
|
||||
|
||||
<div class="videoWrapper">
|
||||
<iframe width="560" height="315" src="https://www.youtube.com/embed/UM15pRk56h8" frameborder="0" allowfullscreen=""></iframe>
|
||||
<div class='videoWrapper'>
|
||||
<iframe width="560" height="315" src="https://www.youtube.com/embed/UM15pRk56h8" frameborder="0" allowfullscreen></iframe>
|
||||
</div>
|
||||
|
||||
[chat room]: https://gitter.im/home-assistant/home-assistant
|
||||
[SceneGen]: https://github.com/acockburn/scenegen
|
||||
[Andrew Cockburn]: https://github.com/acockburn
|
||||
[BRUH Automation]: http://www.bruhautomation.com/
|
||||
[Nick Touran]: https://partofthething.com
|
||||
[a blog post]: https://partofthething.com/thoughts/?p=1010
|
||||
]]></content>
|
||||
</entry>
|
||||
|
||||
|
@ -52,55 +58,51 @@
|
|||
<link href="https://home-assistant.io/blog/2016/02/20/community-highlights/"/>
|
||||
<updated>2016-02-20T09:06:00+00:00</updated>
|
||||
<id>https://home-assistant.io/blog/2016/02/20/community-highlights</id>
|
||||
<content type="html">< to the website full of examples how you can automate different things. Make sure you take a look and share your own recipes too!
|
||||
|
||||
<h3><a class='title-link' name='home-automation-demo-by-part-of-the-thing' href='#home-automation-demo-by-part-of-the-thing'></a> Home automation demo by Part of the Thing </h3>
|
||||
### <a class='title-link' name='home-automation-demo-by-part-of-the-thing' href='#home-automation-demo-by-part-of-the-thing'></a> Home automation demo by Part of the Thing
|
||||
|
||||
<div class="videoWrapper">
|
||||
<iframe width="560" height="315" src="https://www.youtube.com/embed/Mc_29EC3aZw" frameborder="0" allowfullscreen=""></iframe>
|
||||
<div class='videoWrapper'>
|
||||
<iframe width="560" height="315" src="https://www.youtube.com/embed/Mc_29EC3aZw" frameborder="0" allowfullscreen></iframe>
|
||||
</div>
|
||||
|
||||
<h3><a class='title-link' name='haaska---alexa-skill-adapter-for-home-assistant' href='#haaska---alexa-skill-adapter-for-home-assistant'></a> Haaska - Alexa Skill Adapter for Home Assistant </h3>
|
||||
### <a class='title-link' name='haaska---alexa-skill-adapter-for-home-assistant' href='#haaska---alexa-skill-adapter-for-home-assistant'></a> Haaska - Alexa Skill Adapter for Home Assistant
|
||||
|
||||
<p>Haaska allows you to control lights, switches, and scenes exposed by your Home Assistant instance using an Amazon Echo. This is different from our own <a href="/components/alexa/">Alexa</a> component because it will teach the Amazon Echo directly about the devices instead of teaching it to talk to Home Assistant. It will not allow you to use custom sentences but it will allow you to skip the ‘Ask Home Assistant’ part when giving commands:</p>
|
||||
Haaska allows you to control lights, switches, and scenes exposed by your Home Assistant instance using an Amazon Echo. This is different from our own [Alexa](/components/alexa/) component because it will teach the Amazon Echo directly about the devices instead of teaching it to talk to Home Assistant. It will not allow you to use custom sentences but it will allow you to skip the 'Ask Home Assistant' part when giving commands:
|
||||
|
||||
<ul>
|
||||
<li>“Alexa, set kitchen to twenty percent”</li>
|
||||
<li>“Alexa, turn on evening scene”</li>
|
||||
<li>“Alexa, turn off bedroom light”</li>
|
||||
</ul>
|
||||
- "Alexa, set kitchen to twenty percent"
|
||||
- "Alexa, turn on evening scene"
|
||||
- "Alexa, turn off bedroom light"
|
||||
|
||||
<p><a href="https://github.com/auchter/haaska">Haaska on GitHub</a></p>
|
||||
[Haaska on GitHub](https://github.com/auchter/haaska)
|
||||
|
||||
<h3><a class='title-link' name='integrating-home-assistant-with-homekit' href='#integrating-home-assistant-with-homekit'></a> Integrating Home Assistant with HomeKit </h3>
|
||||
### <a class='title-link' name='integrating-home-assistant-with-homekit' href='#integrating-home-assistant-with-homekit'></a> Integrating Home Assistant with HomeKit
|
||||
|
||||
<p>Contributor Maddox has created a plugin for HomeBridge, an open-source HomeKit bridge. This will allow you to control your home using Siri on your Apple devices. HomeBridge has recently restructured so you’ll have to install the plugin separately with the homebridge-homeassistant npm package.</p>
|
||||
Contributor Maddox has created a plugin for HomeBridge, an open-source HomeKit bridge. This will allow you to control your home using Siri on your Apple devices. HomeBridge has recently restructured so you'll have to install the plugin separately with the homebridge-homeassistant npm package.
|
||||
|
||||
<p>Example config.json entry to load Home Assistant:</p>
|
||||
Example config.json entry to load Home Assistant:
|
||||
|
||||
<div class="highlighter-coderay"><div class="CodeRay">
|
||||
<div class="code"><pre><span class="key"><span class="delimiter">"</span><span class="content">platforms</span><span class="delimiter">"</span></span>: [
|
||||
```json
|
||||
"platforms": [
|
||||
{
|
||||
<span class="key"><span class="delimiter">"</span><span class="content">platform</span><span class="delimiter">"</span></span>: <span class="string"><span class="delimiter">"</span><span class="content">HomeAssistant</span><span class="delimiter">"</span></span>,
|
||||
<span class="key"><span class="delimiter">"</span><span class="content">name</span><span class="delimiter">"</span></span>: <span class="string"><span class="delimiter">"</span><span class="content">HomeAssistant</span><span class="delimiter">"</span></span>,
|
||||
<span class="key"><span class="delimiter">"</span><span class="content">host</span><span class="delimiter">"</span></span>: <span class="string"><span class="delimiter">"</span><span class="content">http://192.168.1.50:8123</span><span class="delimiter">"</span></span>,
|
||||
<span class="key"><span class="delimiter">"</span><span class="content">password</span><span class="delimiter">"</span></span>: <span class="string"><span class="delimiter">"</span><span class="content">xxx</span><span class="delimiter">"</span></span>,
|
||||
<span class="key"><span class="delimiter">"</span><span class="content">supported_types</span><span class="delimiter">"</span></span>: [<span class="string"><span class="delimiter">"</span><span class="content">light</span><span class="delimiter">"</span></span>, <span class="string"><span class="delimiter">"</span><span class="content">switch</span><span class="delimiter">"</span></span>, <span class="string"><span class="delimiter">"</span><span class="content">media_player</span><span class="delimiter">"</span></span>, <span class="string"><span class="delimiter">"</span><span class="content">scene</span><span class="delimiter">"</span></span>]
|
||||
"platform": "HomeAssistant",
|
||||
"name": "HomeAssistant",
|
||||
"host": "http://192.168.1.50:8123",
|
||||
"password": "xxx",
|
||||
"supported_types": ["light", "switch", "media_player", "scene"]
|
||||
}
|
||||
]
|
||||
</pre></div>
|
||||
</div>
|
||||
</div>
|
||||
```
|
||||
|
||||
<p><a href="https://github.com/nfarina/homebridge">HomeBridge on GitHub</a><br />
|
||||
<a href="https://github.com/maddox/homebridge-homeassistant">HomeBridge Home Assistant Plugin</a></p>
|
||||
[HomeBridge on GitHub](https://github.com/nfarina/homebridge)
|
||||
[HomeBridge Home Assistant Plugin](https://github.com/maddox/homebridge-homeassistant)
|
||||
|
||||
<h3><a class='title-link' name='custom-alarm-system-with-home-assistant' href='#custom-alarm-system-with-home-assistant'></a> Custom alarm system with Home Assistant </h3>
|
||||
### <a class='title-link' name='custom-alarm-system-with-home-assistant' href='#custom-alarm-system-with-home-assistant'></a> Custom alarm system with Home Assistant
|
||||
|
||||
<p>User thaijames <a href="https://community.home-assistant.io/t/controlling-house-alarm-from-ha/67">describes in the Home Assistant forums</a> how he has created his own NFC-based alarm system using Home Assistant, DIY components and Garfield dolls.</p>
|
||||
User thaijames [describes in the Home Assistant forums](https://community.home-assistant.io/t/controlling-house-alarm-from-ha/67) how he has created his own NFC-based alarm system using Home Assistant, DIY components and Garfield dolls.
|
||||
|
||||
<p class="img">
|
||||
<img src="https://home-assistant.io/images/blog/2016-02-community-highlights/garfield-nfc.png" />
|
||||
<p class='img'>
|
||||
<img src='https://home-assistant.io/images/blog/2016-02-community-highlights/garfield-nfc.png'>
|
||||
Hold your NFC tag against the belly of Garfield to unlock the alarm.
|
||||
</p>
|
||||
]]></content>
|
||||
|
@ -111,17 +113,17 @@ Hold your NFC tag against the belly of Garfield to unlock the alarm.
|
|||
<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"><. Let's 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 guide how to get started](https://community.home-assistant.io/t/homeassistant-nginx-ssl-proxy-setup/53).
|
||||
|
||||
<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>
|
||||
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!
|
||||
|
||||
<div class="videoWrapper">
|
||||
<iframe width="560" height="315" src="https://www.youtube.com/embed/9QQjklnSQKY" frameborder="0" allowfullscreen=""></iframe>
|
||||
<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 you’re using a Pi, make sure to check it out!</p>
|
||||
And last but not least, Midwestern Mac did a [microSD card performance comparison](http://www.midwesternmac.com/blogs/jeff-geerling/raspberry-pi-microsd-card) for the Raspberry Pi. If you're using a Pi, make sure to check it out!
|
||||
]]></content>
|
||||
</entry>
|
||||
|
||||
|
|
|
@ -271,7 +271,7 @@
|
|||
|
||||
|
||||
<li class="post">
|
||||
<a href="/blog/2016/08/13/foursquare-fast-com-ffmpeg-gpsd/">0.26: Foursquare, Fast.com, FFMPEG and GPSD</a>
|
||||
<a href="/blog/2016/08/13/foursquare-fast.com-ffmpeg-gpsd/">0.26: Foursquare, Fast.com, FFMPEG and GPSD</a>
|
||||
</li>
|
||||
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
<title><![CDATA[Category: Device-Tracking | Home Assistant]]></title>
|
||||
<link href="https://home-assistant.io/blog/categories/device-tracking/atom.xml" rel="self"/>
|
||||
<link href="https://home-assistant.io/"/>
|
||||
<updated>2016-08-22T07:26:42+00:00</updated>
|
||||
<updated>2016-08-22T08:20:27+00:00</updated>
|
||||
<id>https://home-assistant.io/</id>
|
||||
<author>
|
||||
<name><![CDATA[Home Assistant]]></name>
|
||||
|
@ -18,153 +18,152 @@
|
|||
<link href="https://home-assistant.io/blog/2016/05/26/ibeacons-how-to-track-things-that-cant-track-themselves-part-ii/"/>
|
||||
<updated>2016-05-26T11:06:12+00:00</updated>
|
||||
<id>https://home-assistant.io/blog/2016/05/26/ibeacons-how-to-track-things-that-cant-track-themselves-part-ii</id>
|
||||
<content type="html"><._
|
||||
|
||||
<p>In <a href="/blog/2016/04/30/ibeacons-part-1-making-presence-detection-work-better">Part 1</a> I talked about using iBeacons to improve presence tracking. In part 2 I’ll talk about how to track things like keys that can’t track themselves by using iBeacons.</p>
|
||||
|
||||
<h3><a class='title-link' name='tracking-things-using-ibeacons' href='#tracking-things-using-ibeacons'></a> Tracking things using iBeacons </h3>
|
||||
<p>In the first part I mentioned that iBeacons just send out <em>I’m here</em> packets, and we used this to trigger an update when your phone came close to a fixed beacon.</p>
|
||||
In [Part 1](/blog/2016/04/30/ibeacons-part-1-making-presence-detection-work-better) I talked about using iBeacons to improve presence tracking. In part 2 I’ll talk about how to track things like keys that can’t track themselves by using iBeacons.
|
||||
|
||||
<p>But beacons don’t have to be fixed.</p>
|
||||
### <a class='title-link' name='tracking-things-using-ibeacons' href='#tracking-things-using-ibeacons'></a> Tracking things using iBeacons
|
||||
In the first part I mentioned that iBeacons just send out *I’m here* packets, and we used this to trigger an update when your phone came close to a fixed beacon.
|
||||
|
||||
<p>Your phone knows roughly where it is located (based on mobile phone masts, Wi-Fi networks or GPS). If your phone sees an <em>I’m here</em> message then it knows the beacon is close.</p>
|
||||
But beacons don’t have to be fixed.
|
||||
|
||||
<p>If your phone can remember (or tell a server) where it was when it last saw the iBeacon - then it knows where the beacon was. So the result of this is that you can track where an iBeacon was - even though the iBeacon doesn’t have any tracking technology itself.</p>
|
||||
Your phone knows roughly where it is located (based on mobile phone masts, Wi-Fi networks or GPS). If your phone sees an *I’m here* message then it knows the beacon is close.
|
||||
|
||||
<p>So if you put an iBeacon on your keys or in your car - then you can track them.</p>
|
||||
If your phone can remember (or tell a server) where it was when it last saw the iBeacon - then it knows where the beacon was. So the result of this is that you can track where an iBeacon was - even though the iBeacon doesn't have any tracking technology itself.
|
||||
|
||||
<p class="img">
|
||||
<img width="200" src="https://home-assistant.io/images/blog/2016-05-ibeacons/keys_with_beacon.jpg" />
|
||||
So if you put an iBeacon on your keys or in your car - then you can track them.
|
||||
|
||||
<p class='img'>
|
||||
<img width='200' src='https://home-assistant.io/images/blog/2016-05-ibeacons/keys_with_beacon.jpg'>
|
||||
Here are my keys - with a Estimote Nearable iBeacon stuck to them. Ugly but effective!
|
||||
</p>
|
||||
|
||||
<!--more-->
|
||||
|
||||
<p>It’s easier to set up OwnTracks and HA to track a mobile beacon than the fixed beacon I discussed in Part 1, because you only need to tell OwnTracks about your iBeacon. You don’t need to configure HA at all.</p>
|
||||
It’s easier to set up OwnTracks and HA to track a mobile beacon than the fixed beacon I discussed in Part 1, because you only need to tell OwnTracks about your iBeacon. You don’t need to configure HA at all.
|
||||
|
||||
<p class="note warning">OwnTracks currently only supports mobile beacons on iOS.</p>
|
||||
<p class='note warning'>OwnTracks currently only supports mobile beacons on iOS.</p>
|
||||
|
||||
<p>You set up the beacon the same way as we discussed in part 1. The only difference is that instead of calling the region the name of a location (eg -drive) you call it the name of the device you want to track (eg -keys). Remember the leading ‘-’ that makes the connection more reliable.</p>
|
||||
You set up the beacon the same way as we discussed in part 1. The only difference is that instead of calling the region the name of a location (eg -drive) you call it the name of the device you want to track (eg -keys). Remember the leading ‘-’ that makes the connection more reliable.
|
||||
|
||||
<p class="img">
|
||||
<img width="200" src="https://home-assistant.io/images/blog/2016-04-ibeacons/owntracks_beacon_setup.png" />
|
||||
<p class='img'>
|
||||
<img width='200' src='https://home-assistant.io/images/blog/2016-04-ibeacons/owntracks_beacon_setup.png'>
|
||||
</p>
|
||||
|
||||
<p>Once you’ve added the iBeacon - you should be able to see it on the OwnTracks region screen. If your phone can see the packets from that beacon, OwnTracks will turn the relevant Region red.</p>
|
||||
Once you’ve added the iBeacon - you should be able to see it on the OwnTracks region screen. If your phone can see the packets from that beacon, OwnTracks will turn the relevant Region red.
|
||||
|
||||
<p>Because you turned <em>Share</em> on for the region, when OwnTracks sees the beacon it will send HA a message. HA will use this message to add the beacon as a tracked device if it hasn’t seen it before. So you should see a new device appear in HA called device_tracker.beacon_[name] - and its location will be where your phone thought it was when it last saw the beacon.</p>
|
||||
Because you turned *Share* on for the region, when OwnTracks sees the beacon it will send HA a message. HA will use this message to add the beacon as a tracked device if it hasn’t seen it before. So you should see a new device appear in HA called device_tracker.beacon_[name] - and its location will be where your phone thought it was when it last saw the beacon.
|
||||
|
||||
<p class="img">
|
||||
<img width="200" src="https://home-assistant.io/images/blog/2016-05-ibeacons/keys_device.png" />
|
||||
<p class='img'>
|
||||
<img width='200' src='https://home-assistant.io/images/blog/2016-05-ibeacons/keys_device.png'>
|
||||
</p>
|
||||
|
||||
<p>If your phone moves and sends HA a new location while it is still in range of the beacon - HA will update the location of the beacon. So if go for a drive in your car - you will see both your phone and the <em>device_tracker.beacon_car</em> move together.</p>
|
||||
If your phone moves and sends HA a new location while it is still in range of the beacon - HA will update the location of the beacon. So if go for a drive in your car - you will see both your phone and the *device_tracker.beacon_car* move together.
|
||||
|
||||
<p>If you park your car and go shopping - <em>device_tracker.beacon_car</em> will stop moving.</p>
|
||||
If you park your car and go shopping - *device_tracker.beacon_car* will stop moving.
|
||||
|
||||
<p>With the basic tracking working - you can use automation to do things like open your gates if your car comes home</p>
|
||||
With the basic tracking working - you can use automation to do things like open your gates if your car comes home
|
||||
|
||||
<div class="highlighter-coderay"><div class="CodeRay">
|
||||
<div class="code"><pre><span class="key">automation</span>:
|
||||
- <span class="string"><span class="content">alias: 'Open gate'</span></span>
|
||||
<span class="key">trigger</span>:
|
||||
- <span class="string"><span class="content">platform: state</span></span>
|
||||
<span class="key">entity_id</span>: <span class="string"><span class="content">device_tracker.beacon_car</span></span>
|
||||
<span class="key">from</span>: <span class="string"><span class="content">'not_home'</span></span>
|
||||
<span class="key">to</span>: <span class="string"><span class="content">'home'</span></span>
|
||||
<span class="key">condition</span>:
|
||||
- <span class="string"><span class="content">condition: state</span></span>
|
||||
<span class="key">entity_id</span>: <span class="string"><span class="content">switch.gate</span></span>
|
||||
<span class="key">state</span>: <span class="string"><span class="content">'off'</span></span>
|
||||
<span class="key">action</span>:
|
||||
<span class="key">service</span>: <span class="string"><span class="content">switch.turn_on</span></span>
|
||||
<span class="key">entity_id</span>: <span class="string"><span class="content">switch.gate</span></span>
|
||||
</pre></div>
|
||||
</div>
|
||||
</div>
|
||||
```yaml
|
||||
automation:
|
||||
- alias: 'Open gate'
|
||||
trigger:
|
||||
- platform: state
|
||||
entity_id: device_tracker.beacon_car
|
||||
from: 'not_home'
|
||||
to: 'home'
|
||||
condition:
|
||||
- condition: state
|
||||
entity_id: switch.gate
|
||||
state: 'off'
|
||||
action:
|
||||
service: switch.turn_on
|
||||
entity_id: switch.gate
|
||||
```
|
||||
|
||||
<p>Or warn you if you leave your keys behind</p>
|
||||
Or warn you if you leave your keys behind
|
||||
|
||||
<div class="highlighter-coderay"><div class="CodeRay">
|
||||
<div class="code"><pre><span class="key">automation</span>:
|
||||
- <span class="string"><span class="content">alias: 'Forgotten keys'</span></span>
|
||||
<span class="key">trigger</span>:
|
||||
<span class="key">platform</span>: <span class="string"><span class="content">template</span></span>
|
||||
<span class="key">value_template</span>: <span class="string"><span class="content">'{{states.device_tracker.greg_gregphone.state != states.device_tracker.beacon_keys.state}}'</span></span>
|
||||
<span class="key">condition</span>:
|
||||
<span class="key">condition</span>: <span class="string"><span class="content">template</span></span>
|
||||
<span class="key">value_template</span>: <span class="string"><span class="content">'{{ states.device_tracker.greg_gregphone.state != "home" }}'</span></span>
|
||||
<span class="key">action</span>:
|
||||
<span class="key">service</span>: <span class="string"><span class="content">script.turn_on</span></span>
|
||||
<span class="key">entity_id</span>: <span class="string"><span class="content">script.send_key_alert</span></span>
|
||||
```yaml
|
||||
automation:
|
||||
- alias: 'Forgotten keys'
|
||||
trigger:
|
||||
platform: template
|
||||
value_template: '{{ states.device_tracker.greg_gregphone.state != states.device_tracker.beacon_keys.state}}'
|
||||
condition:
|
||||
condition: template
|
||||
value_template: '{{ states.device_tracker.greg_gregphone.state != "home" }}'
|
||||
action:
|
||||
service: script.turn_on
|
||||
entity_id: script.send_key_alert
|
||||
|
||||
- <span class="string"><span class="content">alias: 'Forgotten keys - cancel'</span></span>
|
||||
<span class="key">trigger</span>:
|
||||
<span class="key">platform</span>: <span class="string"><span class="content">template</span></span>
|
||||
<span class="key">value_template</span>: <span class="string"><span class="content">'{{states.device_tracker.greg_gregphone.state == states.device_tracker.beacon_keys.state}}'</span></span>
|
||||
<span class="key">condition</span>:
|
||||
- <span class="string"><span class="content">condition: state</span></span>
|
||||
<span class="key">entity_id</span>: <span class="string"><span class="content">script.send_key_alert</span></span>
|
||||
<span class="key">state</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">script.turn_off</span></span>
|
||||
<span class="key">entity_id</span>: <span class="string"><span class="content">script.send_key_alert</span></span>
|
||||
</pre></div>
|
||||
</div>
|
||||
</div>
|
||||
- alias: 'Forgotten keys - cancel'
|
||||
trigger:
|
||||
platform: template
|
||||
value_template: '{{ states.device_tracker.greg_gregphone.state == states.device_tracker.beacon_keys.state }}'
|
||||
condition:
|
||||
- condition: state
|
||||
entity_id: script.send_key_alert
|
||||
state: 'on'
|
||||
action:
|
||||
service: script.turn_off
|
||||
entity_id: script.send_key_alert
|
||||
```
|
||||
|
||||
<div class="highlighter-coderay"><div class="CodeRay">
|
||||
<div class="code"><pre><span class="key">script</span>:
|
||||
<span class="key">send_key_alert</span>:
|
||||
<span class="key">sequence</span>:
|
||||
- <span class="string"><span class="content">delay:</span><span class="content">
|
||||
minutes: 2</span></span>
|
||||
- <span class="string"><span class="content">service: notify.notify</span></span>
|
||||
<span class="key">data</span>:
|
||||
<span class="key">message</span>: <span class="string"><span class="content">'You forgot your keys'</span></span>
|
||||
<span class="key">target</span>: <span class="string"><span class="content">'device/gregs_iphone'</span></span>
|
||||
</pre></div>
|
||||
</div>
|
||||
</div>
|
||||
```yaml
|
||||
script:
|
||||
send_key_alert:
|
||||
sequence:
|
||||
- delay:
|
||||
minutes: 2
|
||||
- service: notify.notify
|
||||
data:
|
||||
message: 'You forgot your keys'
|
||||
target: 'device/gregs_iphone'
|
||||
```
|
||||
|
||||
<p>(The delay is needed for two reasons: -<br />
|
||||
1. HA updates the beacon and phone locations at slightly different times - so you don’t want the automation to trigger in the gap between the updates<br />
|
||||
2. I’ve found that beacons (especially the low power Estimote Nearables) can get disconnected for a few seconds so it’s best to wait a minute or so before deciding that you’ve left your keys behind)</p>
|
||||
|
||||
<h3><a class='title-link' name='using-both-types-of-ibeacons-at-the-same-time' href='#using-both-types-of-ibeacons-at-the-same-time'></a> Using both types of iBeacons at the same time </h3>
|
||||
<p>Of course you can use both fixed and mobile beacons at the same time. I want my gates to open when I arrive home in the car - so I use an iBeacon in the car so that I can track the car, and a iBeacon on my drive so that a location update is triggered when I arrive. I’ve been experimenting with a high power beacon in a waterproof box on my drive which seems to work well to notice when I get home.</p>
|
||||
(The delay is needed for two reasons: -
|
||||
1. HA updates the beacon and phone locations at slightly different times - so you don’t want the automation to trigger in the gap between the updates
|
||||
2. I’ve found that beacons (especially the low power Estimote Nearables) can get disconnected for a few seconds so it’s best to wait a minute or so before deciding that you’ve left your keys behind)
|
||||
|
||||
<p class="img">
|
||||
<img width="300" src="http://bluesensenetworks.com/wp-content/uploads/2015/02/BlueBar-Beacon-Long-Range.jpg" />
|
||||
|
||||
### <a class='title-link' name='using-both-types-of-ibeacons-at-the-same-time' href='#using-both-types-of-ibeacons-at-the-same-time'></a> Using both types of iBeacons at the same time
|
||||
Of course you can use both fixed and mobile beacons at the same time. I want my gates to open when I arrive home in the car - so I use an iBeacon in the car so that I can track the car, and a iBeacon on my drive so that a location update is triggered when I arrive. I've been experimenting with a high power beacon in a waterproof box on my drive which seems to work well to notice when I get home.
|
||||
|
||||
<p class='img'>
|
||||
<img width='300' src='http://bluesensenetworks.com/wp-content/uploads/2015/02/BlueBar-Beacon-Long-Range.jpg'>
|
||||
</p>
|
||||
<p>Long range / High power beacon</p>
|
||||
Long range / High power beacon
|
||||
|
||||
<p class="img">
|
||||
<img width="400" src="http://bluesensenetworks.com/wp-content/uploads/2015/02/BlueBar-Beacon-Weatherproof.jpg" />
|
||||
<p class='img'>
|
||||
<img width='400' src='http://bluesensenetworks.com/wp-content/uploads/2015/02/BlueBar-Beacon-Weatherproof.jpg'>
|
||||
</p>
|
||||
<p>Waterproof beacon</p>
|
||||
Waterproof beacon
|
||||
|
||||
<h3><a class='title-link' name='buying-beacons' href='#buying-beacons'></a> Buying Beacons </h3>
|
||||
<p>This isn’t a buyer’s guide, but I just wanted to mention the iBeacons I’ve been using. I think you should be able to use any iBeacon with HA and OwnTracks. You generally can’t buy beacons in your local electronics shop - so I just wanted to briefly mention the two suppliers I’ve used so far.</p>
|
||||
|
||||
<p>I’ve bought quite a few iBeacons from a company called <a href="http://bluesensenetworks.com/">Blue Sense Networks</a>. I work in the tech startup sector in the UK so I partly chose them because they are a local start-up who seemed worth supporting. The products, support and software all seem good. I use a number of their beacons - from a simple USB dongle, to a long range beacon. All their products have batteries that can be changed (or no batteries in the case of the externally powered USB device) - and you can configure all the parameters you’d want to using their software. I had one software issue, support got back to me at a weekend(!) - and the issue was resolved with a software release two days later.</p>
|
||||
### <a class='title-link' name='buying-beacons' href='#buying-beacons'></a> Buying Beacons
|
||||
This isn’t a buyer's guide, but I just wanted to mention the iBeacons I’ve been using. I think you should be able to use any iBeacon with HA and OwnTracks. You generally can’t buy beacons in your local electronics shop - so I just wanted to briefly mention the two suppliers I’ve used so far.
|
||||
|
||||
<p>All the beacons seem fine - and the long range unit does work over a longer range than my other beacons.</p>
|
||||
I’ve bought quite a few iBeacons from a company called [Blue Sense Networks](http://bluesensenetworks.com/). I work in the tech startup sector in the UK so I partly chose them because they are a local start-up who seemed worth supporting. The products, support and software all seem good. I use a number of their beacons - from a simple USB dongle, to a long range beacon. All their products have batteries that can be changed (or no batteries in the case of the externally powered USB device) - and you can configure all the parameters you’d want to using their software. I had one software issue, support got back to me at a weekend(!) - and the issue was resolved with a software release two days later.
|
||||
|
||||
<p>I bought some other beacons from a US/Polish startup called <a href="http://estimote.com/">Estimote</a>, who I think are better known. I bought a developer pack of 10 of their <em>nearables</em> which as well as being iBeacons also send out other data (orientation and motion) using their own protocol. This is interesting if you’re developing your own application, but for OwnTracks and HA they are just regular beacons. They are small and self adhesive - so you can stick them to things (like your keys). You can’t change all the parameters on these devices (UUID/Major/Minor are fixed) - and the batteries can’t be replaced. I also killed one of the estimote beacons (I assume the battery died) after I carried it around for a few months and dropped it many times! On the other hand they are well priced, small and waterproof!</p>
|
||||
All the beacons seem fine - and the long range unit does work over a longer range than my other beacons.
|
||||
|
||||
<p>I’ve mainly used these as <em>devices to track</em> rather that <em>location</em> beacons. Estimote also sell some slightly larger iBeacons with replaceable batteries. Estimote support responded quickly and were helpful when I couldn’t work out how to edit their beacon’s parameters (although the answer was <em>you can’t yet</em>).</p>
|
||||
I bought some other beacons from a US/Polish startup called [Estimote](http://estimote.com/), who I think are better known. I bought a developer pack of 10 of their *nearables* which as well as being iBeacons also send out other data (orientation and motion) using their own protocol. This is interesting if you’re developing your own application, but for OwnTracks and HA they are just regular beacons. They are small and self adhesive - so you can stick them to things (like your keys). You can’t change all the parameters on these devices (UUID/Major/Minor are fixed) - and the batteries can’t be replaced. I also killed one of the estimote beacons (I assume the battery died) after I carried it around for a few months and dropped it many times! On the other hand they are well priced, small and waterproof!
|
||||
|
||||
<p>The larger Blue Sense Network beacons seem to be better at maintaining a connection that the Estimotes - although that might be because I’m reluctant to turn the power to maximum and reduce the gap between sending packets on the Estimotes where I can’t replace the batteries!</p>
|
||||
I’ve mainly used these as *devices to track* rather that *location* beacons. Estimote also sell some slightly larger iBeacons with replaceable batteries. Estimote support responded quickly and were helpful when I couldn’t work out how to edit their beacon’s parameters (although the answer was *you can’t yet*).
|
||||
|
||||
<h3><a class='title-link' name='conclusion' href='#conclusion'></a> Conclusion </h3>
|
||||
<p>As I said in <a href="/blog/2016/04/30/ibeacons-part-1-making-presence-detection-work-better">part 1</a>, I’ve found iBeacons to be a good way of improving presence detection. I also used them to track devices like my car and my keys that can’t track themselves.</p>
|
||||
The larger Blue Sense Network beacons seem to be better at maintaining a connection that the Estimotes - although that might be because I’m reluctant to turn the power to maximum and reduce the gap between sending packets on the Estimotes where I can’t replace the batteries!
|
||||
|
||||
<p>I’m still experimenting, so I hope I can do more with iBeacons. I hope I’ve encouraged you do so the same. If you do please share your experiences.</p>
|
||||
### <a class='title-link' name='conclusion' href='#conclusion'></a> Conclusion
|
||||
As I said in [part 1](/blog/2016/04/30/ibeacons-part-1-making-presence-detection-work-better), I’ve found iBeacons to be a good way of improving presence detection. I also used them to track devices like my car and my keys that can’t track themselves.
|
||||
|
||||
<h3><a class='title-link' name='notes' href='#notes'></a> Notes </h3>
|
||||
I'm still experimenting, so I hope I can do more with iBeacons. I hope I've encouraged you do so the same. If you do please share your experiences.
|
||||
|
||||
### <a class='title-link' name='notes' href='#notes'></a> Notes
|
||||
|
||||
Please see the [notes at the end of Part 1](/blog/2016/04/30/ibeacons-part-1-making-presence-detection-work-better/#tips) for documentation information.
|
||||
|
||||
<p>Please see the <a href="/blog/2016/04/30/ibeacons-part-1-making-presence-detection-work-better/#tips">notes at the end of Part 1</a> for documentation information.</p>
|
||||
|
||||
]]></content>
|
||||
</entry>
|
||||
|
|
|
@ -202,7 +202,7 @@
|
|||
|
||||
|
||||
<li class="post">
|
||||
<a href="/blog/2016/08/13/foursquare-fast-com-ffmpeg-gpsd/">0.26: Foursquare, Fast.com, FFMPEG and GPSD</a>
|
||||
<a href="/blog/2016/08/13/foursquare-fast.com-ffmpeg-gpsd/">0.26: Foursquare, Fast.com, FFMPEG and GPSD</a>
|
||||
</li>
|
||||
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
<title><![CDATA[Category: ESP8266 | Home Assistant]]></title>
|
||||
<link href="https://home-assistant.io/blog/categories/esp8266/atom.xml" rel="self"/>
|
||||
<link href="https://home-assistant.io/"/>
|
||||
<updated>2016-08-22T07:26:42+00:00</updated>
|
||||
<updated>2016-08-22T08:20:27+00:00</updated>
|
||||
<id>https://home-assistant.io/</id>
|
||||
<author>
|
||||
<name><![CDATA[Home Assistant]]></name>
|
||||
|
@ -18,377 +18,215 @@
|
|||
<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">< ([assembly instructions](https://learn.adafruit.com/adafruit-huzzah-esp8266-breakout/assembly))
|
||||
- [Adafruit HDC1008 Temperature & Humidity Sensor Breakout Board](http://www.adafruit.com/product/2635) ([assembly instructions](https://learn.adafruit.com/adafruit-hdc1008-temperature-and-humidity-sensor-breakout/assembly))
|
||||
- [MQTT server](/components/mqtt/#picking-a-broker)
|
||||
|
||||
<p><em>Besides this, you will need the usual hardware prototype equipment: a breadboard, some wires, soldering iron + wire, Serial USB cable.</em></p>
|
||||
_Besides this, you will need the usual hardware prototype equipment: a breadboard, some wires, soldering iron + wire, Serial USB cable._
|
||||
|
||||
<h3><a class='title-link' name='alternatives' href='#alternatives'></a> Alternatives </h3>
|
||||
### <a class='title-link' name='alternatives' href='#alternatives'></a> Alternatives
|
||||
|
||||
<p>Since this article has been published the HDC1008 has been discontinued. Updated sketches are available for the following alternatives:</p>
|
||||
Since this article has been published the HDC1008 has been discontinued. Updated sketches are available for the following alternatives:
|
||||
|
||||
<ul>
|
||||
<li><a href="https://www.adafruit.com/product/385">DHT22 sensor</a> and <a href="https://gist.github.com/balloob/1176b6d87c2816bd07919ce6e29a19e9">updated sketch</a>.</li>
|
||||
<li><a href="https://www.adafruit.com/product/2652">BME280 sensor</a> and <a href="https://gist.github.com/mtl010957/9ee85fb404f65e15c440b08c659c0419">updated sketch</a>.</li>
|
||||
</ul>
|
||||
- [DHT22 sensor](https://www.adafruit.com/product/385) and [updated sketch](https://gist.github.com/balloob/1176b6d87c2816bd07919ce6e29a19e9).
|
||||
- [BME280 sensor](https://www.adafruit.com/product/2652) and [updated sketch](https://gist.github.com/mtl010957/9ee85fb404f65e15c440b08c659c0419).
|
||||
|
||||
<h3><a class='title-link' name='connections' href='#connections'></a> Connections </h3>
|
||||
### <a class='title-link' name='connections' href='#connections'></a> Connections
|
||||
|
||||
<p>On your breadboard, make the following connections from your ESP8266 to the HDC1008:</p>
|
||||
On your breadboard, make the following connections from your ESP8266 to the HDC1008:
|
||||
|
||||
<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>
|
||||
| ESP8266 | HDC1008 |
|
||||
| ------- | ------- |
|
||||
| GND | GND
|
||||
| 3V | Vin
|
||||
| 14 | SCL
|
||||
| #2 | SDA
|
||||
|
||||
<p><em>I picked <code>#2</code> and <code>14</code> myself, you can configure them in the sketch.</em></p>
|
||||
_I picked `#2` and `14` myself, you can configure them in the sketch._
|
||||
|
||||
<h3><a class='title-link' name='preparing-your-ide' href='#preparing-your-ide'></a> Preparing your IDE </h3>
|
||||
### <a class='title-link' name='preparing-your-ide' href='#preparing-your-ide'></a> Preparing your IDE
|
||||
|
||||
<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>
|
||||
Follow [these instructions](https://github.com/esp8266/Arduino#installing-with-boards-manager) on how to install and prepare the Arduino IDE for ESP8266 development.
|
||||
|
||||
<p>After you’re done installing, open the Arduino IDE, in the menu click on <code>sketch</code> -> <code>include library</code> -> <code>manage libraries</code> and install the following libraries:</p>
|
||||
After you're done installing, open the Arduino IDE, in the menu click on `sketch` -> `include library` -> `manage libraries` and install the following libraries:
|
||||
|
||||
<ul>
|
||||
<li>PubSubClient by Nick ‘O Leary</li>
|
||||
<li>Adafruit HDC1000</li>
|
||||
</ul>
|
||||
- PubSubClient by Nick 'O Leary
|
||||
- Adafruit HDC1000
|
||||
|
||||
<h3><a class='title-link' name='sketch' href='#sketch'></a> Sketch </h3>
|
||||
### <a class='title-link' name='sketch' href='#sketch'></a> Sketch
|
||||
|
||||
<p>If you have followed the previous steps, you’re all set.</p>
|
||||
If you have followed the previous steps, you're all set.
|
||||
|
||||
<ul>
|
||||
<li>Open Arduino IDE and create a new sketch (<code>File</code> -> <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 62.</li>
|
||||
<li>To have the ESP8266 accept our new sketch, we have to put it in upload mode. On the ESP8266 device keep the GPIO0 button pressed while pressing the reset button. The red led will glow half bright to indicate it is in upload mode.</li>
|
||||
<li>Press the upload button in Arduino IDE</li>
|
||||
<li>Open the serial monitor (<code>Tools</code> -> <code>Serial Monitor</code>) to see the output from your device</li>
|
||||
</ul>
|
||||
- Open Arduino IDE and create a new sketch (`File` -> `New`)
|
||||
- Copy and paste the below sketch to the Arduino IDE
|
||||
- Adjust the values line 6 - 14 to match your setup
|
||||
- Optional: If you want to connect to an MQTT server without a username or password, adjust line 62.
|
||||
- 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.
|
||||
- Press the upload button in Arduino IDE
|
||||
- Open the serial monitor (`Tools` -> `Serial Monitor`) to see the output from your device
|
||||
|
||||
<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 > 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>
|
||||
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 > 1 since last reported value. Reports to the MQTT broker are sent with retain set to `True`. This means that anyone connecting to the MQTT topic will automatically be notified of the last reported value.
|
||||
|
||||
<div class="highlighter-coderay"><table class="CodeRay"><tr>
|
||||
<td class="line-numbers"><pre><a href="#n1" name="n1">1</a>
|
||||
<a href="#n2" name="n2">2</a>
|
||||
<a href="#n3" name="n3">3</a>
|
||||
<a href="#n4" name="n4">4</a>
|
||||
<a href="#n5" name="n5">5</a>
|
||||
<a href="#n6" name="n6">6</a>
|
||||
<a href="#n7" name="n7">7</a>
|
||||
<a href="#n8" name="n8">8</a>
|
||||
<a href="#n9" name="n9">9</a>
|
||||
<strong><a href="#n10" name="n10">10</a></strong>
|
||||
<a href="#n11" name="n11">11</a>
|
||||
<a href="#n12" name="n12">12</a>
|
||||
<a href="#n13" name="n13">13</a>
|
||||
<a href="#n14" name="n14">14</a>
|
||||
<a href="#n15" name="n15">15</a>
|
||||
<a href="#n16" name="n16">16</a>
|
||||
<a href="#n17" name="n17">17</a>
|
||||
<a href="#n18" name="n18">18</a>
|
||||
<a href="#n19" name="n19">19</a>
|
||||
<strong><a href="#n20" name="n20">20</a></strong>
|
||||
<a href="#n21" name="n21">21</a>
|
||||
<a href="#n22" name="n22">22</a>
|
||||
<a href="#n23" name="n23">23</a>
|
||||
<a href="#n24" name="n24">24</a>
|
||||
<a href="#n25" name="n25">25</a>
|
||||
<a href="#n26" name="n26">26</a>
|
||||
<a href="#n27" name="n27">27</a>
|
||||
<a href="#n28" name="n28">28</a>
|
||||
<a href="#n29" name="n29">29</a>
|
||||
<strong><a href="#n30" name="n30">30</a></strong>
|
||||
<a href="#n31" name="n31">31</a>
|
||||
<a href="#n32" name="n32">32</a>
|
||||
<a href="#n33" name="n33">33</a>
|
||||
<a href="#n34" name="n34">34</a>
|
||||
<a href="#n35" name="n35">35</a>
|
||||
<a href="#n36" name="n36">36</a>
|
||||
<a href="#n37" name="n37">37</a>
|
||||
<a href="#n38" name="n38">38</a>
|
||||
<a href="#n39" name="n39">39</a>
|
||||
<strong><a href="#n40" name="n40">40</a></strong>
|
||||
<a href="#n41" name="n41">41</a>
|
||||
<a href="#n42" name="n42">42</a>
|
||||
<a href="#n43" name="n43">43</a>
|
||||
<a href="#n44" name="n44">44</a>
|
||||
<a href="#n45" name="n45">45</a>
|
||||
<a href="#n46" name="n46">46</a>
|
||||
<a href="#n47" name="n47">47</a>
|
||||
<a href="#n48" name="n48">48</a>
|
||||
<a href="#n49" name="n49">49</a>
|
||||
<strong><a href="#n50" name="n50">50</a></strong>
|
||||
<a href="#n51" name="n51">51</a>
|
||||
<a href="#n52" name="n52">52</a>
|
||||
<a href="#n53" name="n53">53</a>
|
||||
<a href="#n54" name="n54">54</a>
|
||||
<a href="#n55" name="n55">55</a>
|
||||
<a href="#n56" name="n56">56</a>
|
||||
<a href="#n57" name="n57">57</a>
|
||||
<a href="#n58" name="n58">58</a>
|
||||
<a href="#n59" name="n59">59</a>
|
||||
<strong><a href="#n60" name="n60">60</a></strong>
|
||||
<a href="#n61" name="n61">61</a>
|
||||
<a href="#n62" name="n62">62</a>
|
||||
<a href="#n63" name="n63">63</a>
|
||||
<a href="#n64" name="n64">64</a>
|
||||
<a href="#n65" name="n65">65</a>
|
||||
<a href="#n66" name="n66">66</a>
|
||||
<a href="#n67" name="n67">67</a>
|
||||
<a href="#n68" name="n68">68</a>
|
||||
<a href="#n69" name="n69">69</a>
|
||||
<strong><a href="#n70" name="n70">70</a></strong>
|
||||
<a href="#n71" name="n71">71</a>
|
||||
<a href="#n72" name="n72">72</a>
|
||||
<a href="#n73" name="n73">73</a>
|
||||
<a href="#n74" name="n74">74</a>
|
||||
<a href="#n75" name="n75">75</a>
|
||||
<a href="#n76" name="n76">76</a>
|
||||
<a href="#n77" name="n77">77</a>
|
||||
<a href="#n78" name="n78">78</a>
|
||||
<a href="#n79" name="n79">79</a>
|
||||
<strong><a href="#n80" name="n80">80</a></strong>
|
||||
<a href="#n81" name="n81">81</a>
|
||||
<a href="#n82" name="n82">82</a>
|
||||
<a href="#n83" name="n83">83</a>
|
||||
<a href="#n84" name="n84">84</a>
|
||||
<a href="#n85" name="n85">85</a>
|
||||
<a href="#n86" name="n86">86</a>
|
||||
<a href="#n87" name="n87">87</a>
|
||||
<a href="#n88" name="n88">88</a>
|
||||
<a href="#n89" name="n89">89</a>
|
||||
<strong><a href="#n90" name="n90">90</a></strong>
|
||||
<a href="#n91" name="n91">91</a>
|
||||
<a href="#n92" name="n92">92</a>
|
||||
<a href="#n93" name="n93">93</a>
|
||||
<a href="#n94" name="n94">94</a>
|
||||
<a href="#n95" name="n95">95</a>
|
||||
<a href="#n96" name="n96">96</a>
|
||||
<a href="#n97" name="n97">97</a>
|
||||
<a href="#n98" name="n98">98</a>
|
||||
<a href="#n99" name="n99">99</a>
|
||||
<strong><a href="#n100" name="n100">100</a></strong>
|
||||
<a href="#n101" name="n101">101</a>
|
||||
<a href="#n102" name="n102">102</a>
|
||||
<a href="#n103" name="n103">103</a>
|
||||
<a href="#n104" name="n104">104</a>
|
||||
<a href="#n105" name="n105">105</a>
|
||||
<a href="#n106" name="n106">106</a>
|
||||
<a href="#n107" name="n107">107</a>
|
||||
<a href="#n108" name="n108">108</a>
|
||||
<a href="#n109" name="n109">109</a>
|
||||
<strong><a href="#n110" name="n110">110</a></strong>
|
||||
<a href="#n111" name="n111">111</a>
|
||||
</pre></td>
|
||||
<td class="code"><pre><span class="preprocessor">#include</span> <span class="include"><ESP8266WiFi.h></span>
|
||||
<span class="preprocessor">#include</span> <span class="include"><Wire.h></span>
|
||||
<span class="preprocessor">#include</span> <span class="include"><PubSubClient.h></span>
|
||||
<span class="preprocessor">#include</span> <span class="include"><Adafruit_HDC1000.h></span>
|
||||
```cpp
|
||||
#include <ESP8266WiFi.h>
|
||||
#include <Wire.h>
|
||||
#include <PubSubClient.h>
|
||||
#include <Adafruit_HDC1000.h>
|
||||
|
||||
<span class="preprocessor">#define</span> wifi_ssid <span class="string"><span class="delimiter">"</span><span class="content">YOUR WIFI SSID</span><span class="delimiter">"</span></span>
|
||||
<span class="preprocessor">#define</span> wifi_password <span class="string"><span class="delimiter">"</span><span class="content">WIFI PASSWORD</span><span class="delimiter">"</span></span>
|
||||
#define wifi_ssid "YOUR WIFI SSID"
|
||||
#define wifi_password "WIFI PASSWORD"
|
||||
|
||||
<span class="preprocessor">#define</span> mqtt_server <span class="string"><span class="delimiter">"</span><span class="content">YOUR_MQTT_SERVER_HOST</span><span class="delimiter">"</span></span>
|
||||
<span class="preprocessor">#define</span> mqtt_user <span class="string"><span class="delimiter">"</span><span class="content">your_username</span><span class="delimiter">"</span></span>
|
||||
<span class="preprocessor">#define</span> mqtt_password <span class="string"><span class="delimiter">"</span><span class="content">your_password</span><span class="delimiter">"</span></span>
|
||||
#define mqtt_server "YOUR_MQTT_SERVER_HOST"
|
||||
#define mqtt_user "your_username"
|
||||
#define mqtt_password "your_password"
|
||||
|
||||
<span class="preprocessor">#define</span> humidity_topic <span class="string"><span class="delimiter">"</span><span class="content">sensor/humidity</span><span class="delimiter">"</span></span>
|
||||
<span class="preprocessor">#define</span> temperature_topic <span class="string"><span class="delimiter">"</span><span class="content">sensor/temperature</span><span class="delimiter">"</span></span>
|
||||
#define humidity_topic "sensor/humidity"
|
||||
#define temperature_topic "sensor/temperature"
|
||||
|
||||
WiFiClient espClient;
|
||||
PubSubClient client(espClient);
|
||||
Adafruit_HDC1000 hdc = Adafruit_HDC1000();
|
||||
|
||||
<span class="directive">void</span> setup() {
|
||||
Serial.begin(<span class="integer">115200</span>);
|
||||
void setup() {
|
||||
Serial.begin(115200);
|
||||
setup_wifi();
|
||||
client.setServer(mqtt_server, <span class="integer">1883</span>);
|
||||
client.setServer(mqtt_server, 1883);
|
||||
|
||||
<span class="comment">// Set SDA and SDL ports</span>
|
||||
Wire.begin(<span class="integer">2</span>, <span class="integer">14</span>);
|
||||
// Set SDA and SDL ports
|
||||
Wire.begin(2, 14);
|
||||
|
||||
<span class="comment">// Start sensor</span>
|
||||
<span class="keyword">if</span> (!hdc.begin()) {
|
||||
Serial.println(<span class="string"><span class="delimiter">"</span><span class="content">Couldn't find sensor!</span><span class="delimiter">"</span></span>);
|
||||
<span class="keyword">while</span> (<span class="integer">1</span>);
|
||||
// Start sensor
|
||||
if (!hdc.begin()) {
|
||||
Serial.println("Couldn't find sensor!");
|
||||
while (1);
|
||||
}
|
||||
}
|
||||
|
||||
<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>
|
||||
void setup_wifi() {
|
||||
delay(10);
|
||||
// We start by connecting to a WiFi network
|
||||
Serial.println();
|
||||
Serial.print(<span class="string"><span class="delimiter">"</span><span class="content">Connecting to </span><span class="delimiter">"</span></span>);
|
||||
Serial.print("Connecting to ");
|
||||
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">"</span><span class="content">.</span><span class="delimiter">"</span></span>);
|
||||
while (WiFi.status() != WL_CONNECTED) {
|
||||
delay(500);
|
||||
Serial.print(".");
|
||||
}
|
||||
|
||||
Serial.println(<span class="string"><span class="delimiter">"</span><span class="delimiter">"</span></span>);
|
||||
Serial.println(<span class="string"><span class="delimiter">"</span><span class="content">WiFi connected</span><span class="delimiter">"</span></span>);
|
||||
Serial.println(<span class="string"><span class="delimiter">"</span><span class="content">IP address: </span><span class="delimiter">"</span></span>);
|
||||
Serial.println("");
|
||||
Serial.println("WiFi connected");
|
||||
Serial.println("IP address: ");
|
||||
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">"</span><span class="content">Attempting MQTT connection...</span><span class="delimiter">"</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("ESP8266Client")) {</span>
|
||||
<span class="keyword">if</span> (client.connect(<span class="string"><span class="delimiter">"</span><span class="content">ESP8266Client</span><span class="delimiter">"</span></span>, mqtt_user, mqtt_password)) {
|
||||
Serial.println(<span class="string"><span class="delimiter">"</span><span class="content">connected</span><span class="delimiter">"</span></span>);
|
||||
} <span class="keyword">else</span> {
|
||||
Serial.print(<span class="string"><span class="delimiter">"</span><span class="content">failed, rc=</span><span class="delimiter">"</span></span>);
|
||||
void reconnect() {
|
||||
// Loop until we're reconnected
|
||||
while (!client.connected()) {
|
||||
Serial.print("Attempting MQTT connection...");
|
||||
// Attempt to connect
|
||||
// If you do not want to use a username and password, change next line to
|
||||
// if (client.connect("ESP8266Client")) {
|
||||
if (client.connect("ESP8266Client", mqtt_user, mqtt_password)) {
|
||||
Serial.println("connected");
|
||||
} else {
|
||||
Serial.print("failed, rc=");
|
||||
Serial.print(client.state());
|
||||
Serial.println(<span class="string"><span class="delimiter">"</span><span class="content"> try again in 5 seconds</span><span class="delimiter">"</span></span>);
|
||||
<span class="comment">// Wait 5 seconds before retrying</span>
|
||||
delay(<span class="integer">5000</span>);
|
||||
Serial.println(" try again in 5 seconds");
|
||||
// Wait 5 seconds before retrying
|
||||
delay(5000);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
<span class="predefined-type">bool</span> checkBound(<span class="predefined-type">float</span> newValue, <span class="predefined-type">float</span> prevValue, <span class="predefined-type">float</span> maxDiff) {
|
||||
<span class="keyword">return</span> !isnan(newValue) &&
|
||||
(newValue < prevValue - maxDiff || newValue > prevValue + maxDiff);
|
||||
bool checkBound(float newValue, float prevValue, float maxDiff) {
|
||||
return !isnan(newValue) &&
|
||||
(newValue < prevValue - maxDiff || newValue > 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>;
|
||||
long lastMsg = 0;
|
||||
float temp = 0.0;
|
||||
float hum = 0.0;
|
||||
float diff = 1.0;
|
||||
|
||||
<span class="directive">void</span> loop() {
|
||||
<span class="keyword">if</span> (!client.connected()) {
|
||||
void loop() {
|
||||
if (!client.connected()) {
|
||||
reconnect();
|
||||
}
|
||||
client.loop();
|
||||
|
||||
<span class="predefined-type">long</span> now = millis();
|
||||
<span class="keyword">if</span> (now - lastMsg > <span class="integer">1000</span>) {
|
||||
long now = millis();
|
||||
if (now - lastMsg > 1000) {
|
||||
lastMsg = now;
|
||||
|
||||
<span class="predefined-type">float</span> newTemp = hdc.readTemperature();
|
||||
<span class="predefined-type">float</span> newHum = hdc.readHumidity();
|
||||
float newTemp = hdc.readTemperature();
|
||||
float newHum = hdc.readHumidity();
|
||||
|
||||
<span class="keyword">if</span> (checkBound(newTemp, temp, diff)) {
|
||||
if (checkBound(newTemp, temp, diff)) {
|
||||
temp = newTemp;
|
||||
Serial.print(<span class="string"><span class="delimiter">"</span><span class="content">New temperature:</span><span class="delimiter">"</span></span>);
|
||||
Serial.print("New temperature:");
|
||||
Serial.println(String(temp).c_str());
|
||||
client.publish(temperature_topic, String(temp).c_str(), <span class="predefined-constant">true</span>);
|
||||
client.publish(temperature_topic, String(temp).c_str(), true);
|
||||
}
|
||||
|
||||
<span class="keyword">if</span> (checkBound(newHum, hum, diff)) {
|
||||
if (checkBound(newHum, hum, diff)) {
|
||||
hum = newHum;
|
||||
Serial.print(<span class="string"><span class="delimiter">"</span><span class="content">New humidity:</span><span class="delimiter">"</span></span>);
|
||||
Serial.print("New humidity:");
|
||||
Serial.println(String(hum).c_str());
|
||||
client.publish(humidity_topic, String(hum).c_str(), <span class="predefined-constant">true</span>);
|
||||
client.publish(humidity_topic, String(hum).c_str(), true);
|
||||
}
|
||||
}
|
||||
}
|
||||
</pre></td>
|
||||
</tr></table>
|
||||
</div>
|
||||
```
|
||||
|
||||
<h3><a class='title-link' name='configuring-home-assistant' href='#configuring-home-assistant'></a> Configuring Home Assistant </h3>
|
||||
### <a class='title-link' name='configuring-home-assistant' href='#configuring-home-assistant'></a> Configuring Home Assistant
|
||||
|
||||
<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>
|
||||
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.
|
||||
|
||||
<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>
|
||||
```yaml
|
||||
mqtt:
|
||||
broker: YOUR_MQTT_SERVER_HOST
|
||||
username: your_username
|
||||
password: your_password
|
||||
|
||||
<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">"</span><span class="content">Temperature</span><span class="delimiter">"</span></span>
|
||||
<span class="key">state_topic</span>: <span class="string"><span class="delimiter">"</span><span class="content">sensor/temperature</span><span class="delimiter">"</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">"</span><span class="content">ºC</span><span class="delimiter">"</span></span>
|
||||
sensor:
|
||||
platform: mqtt
|
||||
name: "Temperature"
|
||||
state_topic: "sensor/temperature"
|
||||
qos: 0
|
||||
unit_of_measurement: "ºC"
|
||||
|
||||
<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">"</span><span class="content">Humidity</span><span class="delimiter">"</span></span>
|
||||
<span class="key">state_topic</span>: <span class="string"><span class="delimiter">"</span><span class="content">sensor/humidity</span><span class="delimiter">"</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">"</span><span class="content">%</span><span class="delimiter">"</span></span>
|
||||
</pre></td>
|
||||
</tr></table>
|
||||
</div>
|
||||
sensor 2:
|
||||
platform: mqtt
|
||||
name: "Humidity"
|
||||
state_topic: "sensor/humidity"
|
||||
qos: 0
|
||||
unit_of_measurement: "%"
|
||||
```
|
||||
]]></content>
|
||||
</entry>
|
||||
|
||||
|
|
|
@ -202,7 +202,7 @@
|
|||
|
||||
|
||||
<li class="post">
|
||||
<a href="/blog/2016/08/13/foursquare-fast-com-ffmpeg-gpsd/">0.26: Foursquare, Fast.com, FFMPEG and GPSD</a>
|
||||
<a href="/blog/2016/08/13/foursquare-fast.com-ffmpeg-gpsd/">0.26: Foursquare, Fast.com, FFMPEG and GPSD</a>
|
||||
</li>
|
||||
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
<title><![CDATA[Category: How-To | Home Assistant]]></title>
|
||||
<link href="https://home-assistant.io/blog/categories/how-to/atom.xml" rel="self"/>
|
||||
<link href="https://home-assistant.io/"/>
|
||||
<updated>2016-08-22T07:26:42+00:00</updated>
|
||||
<updated>2016-08-22T08:20:27+00:00</updated>
|
||||
<id>https://home-assistant.io/</id>
|
||||
<author>
|
||||
<name><![CDATA[Home Assistant]]></name>
|
||||
|
@ -18,13 +18,17 @@
|
|||
<link href="https://home-assistant.io/blog/2016/08/19/github-style-calendar-heatmap-of-device-data/"/>
|
||||
<updated>2016-08-19T06:00:00+00:00</updated>
|
||||
<id>https://home-assistant.io/blog/2016/08/19/github-style-calendar-heatmap-of-device-data</id>
|
||||
<content type="html">< we are able to present another awesome [Jupyter notebook]. I guess that you all know the graph which Github is using to visualize your commits per day over a time-line. It's a so-called [heatmap]. If there are more commits, it's getting hotter. The latest [notebook][nb-prev] is capable to do the same thing for your devices. To be more precise, for the hours your devices are home.
|
||||
|
||||
<p class="img">
|
||||
<img src="https://home-assistant.io/images/blog/2016-08-data-exploration/heatmap.png" />
|
||||
<p class='img'>
|
||||
<img src='https://home-assistant.io/images/blog/2016-08-data-exploration/heatmap.png'>
|
||||
Heatmap
|
||||
</p>
|
||||
|
||||
[heatmap]: https://en.wikipedia.org/wiki/Heat_map
|
||||
[Jupyter notebook]: https://jupyter.org/
|
||||
[nb-prev]: http://nbviewer.jupyter.org/github/home-assistant/home-assistant-notebooks/blob/master/DataExploration-2/DataExploration-2.ipynb
|
||||
|
||||
]]></content>
|
||||
</entry>
|
||||
|
||||
|
@ -33,135 +37,124 @@ Heatmap
|
|||
<link href="https://home-assistant.io/blog/2016/08/16/we-have-apps-now/"/>
|
||||
<updated>2016-08-16T10:00:00+00:00</updated>
|
||||
<id>https://home-assistant.io/blog/2016/08/16/we-have-apps-now</id>
|
||||
<content type="html">< I would encourage you to take a look. As a veteran of several Home Automation systems with varying degrees success, it was this article more than anything else that convinced me that Home Assistant had the right philosophy behind it and was on the right track. One of the most important points made is that being able to control your lights from your phone, 9 times out of 10 is harder than using a lightswitch - where Home Automation really comes into its own is when you start removing the need to use a phone or the switch - the "Automation" in Home Automation. A surprisingly large number of systems out there miss this essential point and have limited abilities to automate anything which is why a robust and open system such as Home Assistant is such an important part of the equation to bring this all together in the vast and chaotic ecosystem that is the "Internet of Things".
|
||||
|
||||
<p>So given the importance of Automation, what should Automation allow us to do? I am a pragmatist at heart so I judge individual systems by the ease of accomplishing a few basic but representative tasks:</p>
|
||||
So given the importance of Automation, what should Automation allow us to do? I am a pragmatist at heart so I judge individual systems by the ease of accomplishing a few basic but representative tasks:
|
||||
|
||||
<ul>
|
||||
<li>Can the system respond to presence or absence of people?</li>
|
||||
<li>Can I turn a light on at Sunset +/- a certain amount of time?</li>
|
||||
<li>Can I arrive home in light or dark and have the lights figure out if they should be on or off?</li>
|
||||
<li>As I build my system out, can I get the individual pieces to co-operate and use and re-use (potentially complex) logic to make sure everything works smoothly?</li>
|
||||
<li>Is it open and expandable?</li>
|
||||
<li>Does it run locally without any reliance on the cloud?</li>
|
||||
</ul>
|
||||
- Can the system respond to presence or absence of people?
|
||||
- Can I turn a light on at Sunset +/- a certain amount of time?
|
||||
- Can I arrive home in light or dark and have the lights figure out if they should be on or off?
|
||||
- As I build my system out, can I get the individual pieces to co-operate and use and re-use (potentially complex) logic to make sure everything works smoothly?
|
||||
- Is it open and expandable?
|
||||
- Does it run locally without any reliance on the cloud?
|
||||
|
||||
<p>In my opinion, Home Assistant accomplishes the majority of these very well with a combination of Automations, Scripts and Templates, and it’s Restful API.</p>
|
||||
In my opinion, Home Assistant accomplishes the majority of these very well with a combination of Automations, Scripts and Templates, and it's Restful API.
|
||||
|
||||
<p>So why <code>AppDaemon</code>? <code>AppDaemon</code> is not meant to replace Home Assistant Automations and Scripts, rather complement them. For a lot of things, automations work well and can be very succinct. However, there is a class of more complex automations for which they become harder to use, and appdeamon then comes into its own. It brings quite a few things to the table:</p>
|
||||
So why `AppDaemon`? `AppDaemon` is not meant to replace Home Assistant Automations and Scripts, rather complement them. For a lot of things, automations work well and can be very succinct. However, there is a class of more complex automations for which they become harder to use, and appdeamon then comes into its own. It brings quite a few things to the table:
|
||||
|
||||
<ul>
|
||||
<li>New paradigm - some problems require a procedural and/or iterative approach, and <code>AppDaemon</code> Apps are a much more natural fit for this. Recent enhancements to Home Assistant scripts and templates have made huge strides, but for the most complex scenarios, Apps can do things that Automations can’t</li>
|
||||
<li>Ease of use - <code>AppDaemon</code>’s API is full of helper functions that make programming as easy and natural as possible. The functions and their operation are as “Pythonic” as possible, experienced Python programmers should feel right at home.</li>
|
||||
<li>Reuse - write a piece of code once and instantiate it as an app as many times as you need with different parameters e.g. a motion light program that you can use in 5 different places around your home. The code stays the same, you just dynamically add new instances of it in the config file</li>
|
||||
<li>Dynamic - <code>AppDaemon</code> has been designed from the start to enable the user to make changes without requiring a restart of Home Assistant, thanks to it’s loose coupling. However, it is better than that - the user can make changes to code and <code>AppDaemon</code> will automatically reload the code, figure out which Apps were using it and restart them to use the new code without the need to restart <code>AppDaemon</code> itself. It is also possible to change parameters for an individual or multiple apps and have them picked up dynamically, and for a final trick, removing or adding apps is also picked up dynamically. Testing cycles become a lot more efficient as a result.</li>
|
||||
<li>Complex logic - Python’s If/Else constructs are clearer and easier to code for arbitrarily complex nested logic</li>
|
||||
<li>Durable variables and state - variables can be kept between events to keep track of things like the number of times a motion sensor has been activated, or how long it has been since a door opened</li>
|
||||
<li>All the power of Python - use any of Python’s libraries, create your own modules, share variables, refactor and re-use code, create a single app to do everything, or multiple apps for individual tasks - nothing is off limits!</li>
|
||||
</ul>
|
||||
- New paradigm - some problems require a procedural and/or iterative approach, and `AppDaemon` Apps are a much more natural fit for this. Recent enhancements to Home Assistant scripts and templates have made huge strides, but for the most complex scenarios, Apps can do things that Automations can't
|
||||
- Ease of use - `AppDaemon`'s API is full of helper functions that make programming as easy and natural as possible. The functions and their operation are as "Pythonic" as possible, experienced Python programmers should feel right at home.
|
||||
- Reuse - write a piece of code once and instantiate it as an app as many times as you need with different parameters e.g. a motion light program that you can use in 5 different places around your home. The code stays the same, you just dynamically add new instances of it in the config file
|
||||
- Dynamic - `AppDaemon` has been designed from the start to enable the user to make changes without requiring a restart of Home Assistant, thanks to it's loose coupling. However, it is better than that - the user can make changes to code and `AppDaemon` will automatically reload the code, figure out which Apps were using it and restart them to use the new code without the need to restart `AppDaemon` itself. It is also possible to change parameters for an individual or multiple apps and have them picked up dynamically, and for a final trick, removing or adding apps is also picked up dynamically. Testing cycles become a lot more efficient as a result.
|
||||
- Complex logic - Python's If/Else constructs are clearer and easier to code for arbitrarily complex nested logic
|
||||
- Durable variables and state - variables can be kept between events to keep track of things like the number of times a motion sensor has been activated, or how long it has been since a door opened
|
||||
- All the power of Python - use any of Python's libraries, create your own modules, share variables, refactor and re-use code, create a single app to do everything, or multiple apps for individual tasks - nothing is off limits!
|
||||
|
||||
<p>It is in fact a testament to Home Assistant’s open nature that a component like <code>AppDaemon</code> can be integrated so neatly and closely that it acts in all ways like an extension of the system, not a second class citizen. Part of the strength of Home Assistant’s underlying design is that it makes no assumptions whatever about what it is controlling or reacting to, or reporting state on. This is made achievable in part by the great flexibility of Python as a programming environment for Home Assistant, and carrying that forward has enabled me to use the same philosophy for <code>AppDaemon</code> - it took surprisingly little code to be able to respond to basic events and call services in a completely open ended manner - the bulk of the work after that was adding additonal functions to make things that were already possible easier.</p>
|
||||
It is in fact a testament to Home Assistant's open nature that a component like `AppDaemon` can be integrated so neatly and closely that it acts in all ways like an extension of the system, not a second class citizen. Part of the strength of Home Assistant's underlying design is that it makes no assumptions whatever about what it is controlling or reacting to, or reporting state on. This is made achievable in part by the great flexibility of Python as a programming environment for Home Assistant, and carrying that forward has enabled me to use the same philosophy for `AppDaemon` - it took surprisingly little code to be able to respond to basic events and call services in a completely open ended manner - the bulk of the work after that was adding additonal functions to make things that were already possible easier.
|
||||
|
||||
<h2><a class='title-link' name='how-it-works' href='#how-it-works'></a> How it Works </h2>
|
||||
## <a class='title-link' name='how-it-works' href='#how-it-works'></a> How it Works
|
||||
|
||||
<p>The best way to show what <code>AppDaemon</code> does is through a few simple examples.</p>
|
||||
The best way to show what `AppDaemon` does is through a few simple examples.
|
||||
|
||||
<h3><a class='title-link' name='sunrisesunset-lighting' href='#sunrisesunset-lighting'></a> Sunrise/Sunset Lighting </h3>
|
||||
### <a class='title-link' name='sunrisesunset-lighting' href='#sunrisesunset-lighting'></a> Sunrise/Sunset Lighting
|
||||
|
||||
<p>Lets start with a simple App to turn a light on every night at sunset and off every morning at sunrise. Every App when first started will have its <code>initialize()</code> function called which gives it a chance to register a callback for <code>AppDaemons</code>’s scheduler for a specific time. In this case we are using <code>run_at_sunrise()</code> and <code>run_at_sunset()</code> to register 2 separate callbacks. The argument <code>0</code> is the number of seconds offset from sunrise or sunset and can be negative or positive. For complex intervals it can be convenient to use Python’s <code>datetime.timedelta</code> class for calculations. When sunrise or sunset occurs, the appropriate callback function, <code>sunrise_cb()</code> or <code>sunset_cb()</code> is called which then makes a call to Home Assistant to turn the porch light on or off by activating a scene. The variables <code>args["on_scene"]</code> and <code>args["off_scene"]</code> are passed through from the configuration of this particular App, and the same code could be reused to activate completely different scenes in a different version of the App.</p>
|
||||
Lets start with a simple App to turn a light on every night at sunset and off every morning at sunrise. Every App when first started will have its `initialize()` function called which gives it a chance to register a callback for `AppDaemons`'s scheduler for a specific time. In this case we are using `run_at_sunrise()` and `run_at_sunset()` to register 2 separate callbacks. The argument `0` is the number of seconds offset from sunrise or sunset and can be negative or positive. For complex intervals it can be convenient to use Python's `datetime.timedelta` class for calculations. When sunrise or sunset occurs, the appropriate callback function, `sunrise_cb()` or `sunset_cb()` is called which then makes a call to Home Assistant to turn the porch light on or off by activating a scene. The variables `args["on_scene"]` and `args["off_scene"]` are passed through from the configuration of this particular App, and the same code could be reused to activate completely different scenes in a different version of the App.
|
||||
|
||||
<div class="highlighter-coderay"><div class="CodeRay">
|
||||
<div class="code"><pre><span class="keyword">import</span> <span class="include">appapi</span>
|
||||
```python
|
||||
import appapi
|
||||
|
||||
<span class="keyword">class</span> <span class="class">OutsideLights</span>(appapi.AppDaemon):
|
||||
class OutsideLights(appapi.AppDaemon):
|
||||
|
||||
<span class="keyword">def</span> <span class="function">initialize</span>(<span class="predefined-constant">self</span>):
|
||||
<span class="predefined-constant">self</span>.run_at_sunrise(<span class="predefined-constant">self</span>.sunrise_cb, <span class="integer">0</span>)
|
||||
<span class="predefined-constant">self</span>.run_at_sunset(<span class="predefined-constant">self</span>.sunset_cb, <span class="integer">0</span>)
|
||||
def initialize(self):
|
||||
self.run_at_sunrise(self.sunrise_cb, 0)
|
||||
self.run_at_sunset(self.sunset_cb, 0)
|
||||
|
||||
def sunrise_cb(self, args, kwargs):
|
||||
self.turn_on(self.args["off_scene"])
|
||||
|
||||
def sunset_cb(self, args, kwargs):
|
||||
self.turn_on(self.args["on_scene"])
|
||||
```
|
||||
|
||||
This is also fairly easy to achieve with Home Assistant automations, but we are just getting started.
|
||||
|
||||
### <a class='title-link' name='motion-light' href='#motion-light'></a> Motion Light
|
||||
|
||||
Our next example is to turn on a light when motion is detected and it is dark, and turn it off after a period of time. This time, the `initialize()` function registers a callback on a state change (of the motion sensor) rather than a specific time. We tell `AppDaemon` that we are only interested in state changes where the motion detector comes on by adding an additional parameter to the callback registration - `new = "on"`. When the motion is detected, the callack function `motion()` is called, and we check whether or not the sun has set using a built-in convenience function: `sun_down()`. Next, we turn the light on with `turn_on()`, then set a timer using `run_in()` to turn the light off after 60 seconds, which is another call to the scheduler to execute in a set time from now, which results in `AppDaemon` calling `light_off()` 60 seconds later using the `turn_off()` call to actually turn the light off. This is still pretty simple in code terms:
|
||||
|
||||
```python
|
||||
import appapi
|
||||
|
||||
class MotionLights(appapi.AppDaemon):
|
||||
|
||||
def initialize(self):
|
||||
self.listen_state(self.motion, "binary_sensor.drive", new = "on")
|
||||
|
||||
def motion(self, entity, attribute, old, new, kwargs):
|
||||
if self.sun_down():
|
||||
self.turn_on("light.drive")
|
||||
self.run_in(self.light_off, 60)
|
||||
|
||||
def light_off(self, kwargs):
|
||||
self.turn_off("light.drive")
|
||||
```
|
||||
|
||||
This is starting to get a little more complex in Home Assistant automations requiring an Automation rule and two separate scripts.
|
||||
|
||||
Now lets extend this with a somewhat artificial example to show something that is simple in `AppDaemon` but very difficult if not impossible using automations. Lets warn someone inside the house that there has been motion outside by flashing a lamp on and off 10 times. We are reacting to the motion as before by turning on the light and setting a timer to turn it off again, but in addition, we set a 1 second timer to run `flash_warning()` which when called, toggles the inside light and sets another timer to call itself a second later. To avoid re-triggering forever, it keeps a count of how many times it has been activated and bales out after 10 iterations.
|
||||
|
||||
```python
|
||||
import appapi
|
||||
|
||||
class FlashyMotionLights(appapi.AppDaemon):
|
||||
|
||||
def initialize(self):
|
||||
self.listen_state(self.motion, "binary_sensor.drive", new = "on")
|
||||
|
||||
def motion(self, entity, attribute, old, new, kwargs):
|
||||
if self.self.sun_down():
|
||||
self.turn_on("light.drive")
|
||||
self.run_in(self.light_off, 60)
|
||||
self.flashcount = 0
|
||||
self.run_in(self.flash_warning, 1)
|
||||
|
||||
def light_off(self, kwargs):
|
||||
self.turn_off("light.drive")
|
||||
|
||||
<span class="keyword">def</span> <span class="function">sunrise_cb</span>(<span class="predefined-constant">self</span>, args, kwargs):
|
||||
<span class="predefined-constant">self</span>.turn_on(<span class="predefined-constant">self</span>.args[<span class="string"><span class="delimiter">"</span><span class="content">off_scene</span><span class="delimiter">"</span></span>])
|
||||
def flash_warning(self, kwargs):
|
||||
self.toggle("light.living_room")
|
||||
self.flashcount += 1
|
||||
if self.flashcount < 10:
|
||||
self.run_in(self.flash_warning, 1)
|
||||
```
|
||||
|
||||
<span class="keyword">def</span> <span class="function">sunset_cb</span>(<span class="predefined-constant">self</span>, args, kwargs):
|
||||
<span class="predefined-constant">self</span>.turn_on(<span class="predefined-constant">self</span>.args[<span class="string"><span class="delimiter">"</span><span class="content">on_scene</span><span class="delimiter">"</span></span>])
|
||||
Of course if I wanted to make this App or its predecessor reusable I would have provided parameters for the sensor, the light to activate on motion, the warning light and even the number of flashes and delay between flashes.
|
||||
|
||||
</pre></div>
|
||||
</div>
|
||||
</div>
|
||||
In addition, Apps can write to `AppDaemon`'s logfiles, and there is a system of constraints that allows yout to control when and under what circumstances Apps and callbacks are active to keep the logic clean and simple.
|
||||
|
||||
<p>This is also fairly easy to achieve with Home Assistant automations, but we are just getting started.</p>
|
||||
I have spent the last few weeks moving all of my (fairly complex) automations over to `APPDaemon` and so far it is working very reliably.
|
||||
|
||||
<h3><a class='title-link' name='motion-light' href='#motion-light'></a> Motion Light </h3>
|
||||
Some people will maybe look at all of this and say "what use is this, I can already do all of this", and that is fine, as I said this is an alternative not a replacement, but I am hopeful that for some users this will seem a more natural, powerful and nimble way of building potentially very complex automations.
|
||||
|
||||
<p>Our next example is to turn on a light when motion is detected and it is dark, and turn it off after a period of time. This time, the <code>initialize()</code> function registers a callback on a state change (of the motion sensor) rather than a specific time. We tell <code>AppDaemon</code> that we are only interested in state changes where the motion detector comes on by adding an additional parameter to the callback registration - <code>new = "on"</code>. When the motion is detected, the callack function <code>motion()</code> is called, and we check whether or not the sun has set using a built-in convenience function: <code>sun_down()</code>. Next, we turn the light on with <code>turn_on()</code>, then set a timer using <code>run_in()</code> to turn the light off after 60 seconds, which is another call to the scheduler to execute in a set time from now, which results in <code>AppDaemon</code> calling <code>light_off()</code> 60 seconds later using the <code>turn_off()</code> call to actually turn the light off. This is still pretty simple in code terms:</p>
|
||||
If this has whet your appetite, feel free to give it a try. You can find it, [here](https://github.com/acockburn/appdaemon), including full installation instructions, an API reference, and a number of fully fleshed out examples.
|
||||
|
||||
<div class="highlighter-coderay"><div class="CodeRay">
|
||||
<div class="code"><pre><span class="keyword">import</span> <span class="include">appapi</span>
|
||||
|
||||
<span class="keyword">class</span> <span class="class">MotionLights</span>(appapi.AppDaemon):
|
||||
|
||||
<span class="keyword">def</span> <span class="function">initialize</span>(<span class="predefined-constant">self</span>):
|
||||
<span class="predefined-constant">self</span>.listen_state(<span class="predefined-constant">self</span>.motion, <span class="string"><span class="delimiter">"</span><span class="content">binary_sensor.drive</span><span class="delimiter">"</span></span>, new = <span class="string"><span class="delimiter">"</span><span class="content">on</span><span class="delimiter">"</span></span>)
|
||||
|
||||
<span class="keyword">def</span> <span class="function">motion</span>(<span class="predefined-constant">self</span>, entity, attribute, old, new, kwargs):
|
||||
<span class="keyword">if</span> <span class="predefined-constant">self</span>.sun_down():
|
||||
<span class="predefined-constant">self</span>.turn_on(<span class="string"><span class="delimiter">"</span><span class="content">light.drive</span><span class="delimiter">"</span></span>)
|
||||
<span class="predefined-constant">self</span>.run_in(<span class="predefined-constant">self</span>.light_off, <span class="integer">60</span>)
|
||||
|
||||
<span class="keyword">def</span> <span class="function">light_off</span>(<span class="predefined-constant">self</span>, kwargs):
|
||||
<span class="predefined-constant">self</span>.turn_off(<span class="string"><span class="delimiter">"</span><span class="content">light.drive</span><span class="delimiter">"</span></span>)
|
||||
</pre></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<p>This is starting to get a little more complex in Home Assistant automations requiring an Automation rule and two separate scripts.</p>
|
||||
|
||||
<p>Now lets extend this with a somewhat artificial example to show something that is simple in <code>AppDaemon</code> but very difficult if not impossible using automations. Lets warn someone inside the house that there has been motion outside by flashing a lamp on and off 10 times. We are reacting to the motion as before by turning on the light and setting a timer to turn it off again, but in addition, we set a 1 second timer to run <code>flash_warning()</code> which when called, toggles the inside light and sets another timer to call itself a second later. To avoid re-triggering forever, it keeps a count of how many times it has been activated and bales out after 10 iterations.</p>
|
||||
|
||||
<div class="highlighter-coderay"><div class="CodeRay">
|
||||
<div class="code"><pre><span class="keyword">import</span> <span class="include">appapi</span>
|
||||
|
||||
<span class="keyword">class</span> <span class="class">FlashyMotionLights</span>(appapi.AppDaemon):
|
||||
|
||||
<span class="keyword">def</span> <span class="function">initialize</span>(<span class="predefined-constant">self</span>):
|
||||
<span class="predefined-constant">self</span>.listen_state(<span class="predefined-constant">self</span>.motion, <span class="string"><span class="delimiter">"</span><span class="content">binary_sensor.drive</span><span class="delimiter">"</span></span>, new = <span class="string"><span class="delimiter">"</span><span class="content">on</span><span class="delimiter">"</span></span>)
|
||||
|
||||
<span class="keyword">def</span> <span class="function">motion</span>(<span class="predefined-constant">self</span>, entity, attribute, old, new, kwargs):
|
||||
<span class="keyword">if</span> <span class="predefined-constant">self</span>.self.sun_down():
|
||||
<span class="predefined-constant">self</span>.turn_on(<span class="string"><span class="delimiter">"</span><span class="content">light.drive</span><span class="delimiter">"</span></span>)
|
||||
<span class="predefined-constant">self</span>.run_in(<span class="predefined-constant">self</span>.light_off, <span class="integer">60</span>)
|
||||
<span class="predefined-constant">self</span>.flashcount = <span class="integer">0</span>
|
||||
<span class="predefined-constant">self</span>.run_in(<span class="predefined-constant">self</span>.flash_warning, <span class="integer">1</span>)
|
||||
|
||||
<span class="keyword">def</span> <span class="function">light_off</span>(<span class="predefined-constant">self</span>, kwargs):
|
||||
<span class="predefined-constant">self</span>.turn_off(<span class="string"><span class="delimiter">"</span><span class="content">light.drive</span><span class="delimiter">"</span></span>)
|
||||
|
||||
<span class="keyword">def</span> <span class="function">flash_warning</span>(<span class="predefined-constant">self</span>, kwargs):
|
||||
<span class="predefined-constant">self</span>.toggle(<span class="string"><span class="delimiter">"</span><span class="content">light.living_room</span><span class="delimiter">"</span></span>)
|
||||
<span class="predefined-constant">self</span>.flashcount += <span class="integer">1</span>
|
||||
<span class="keyword">if</span> <span class="predefined-constant">self</span>.flashcount < <span class="integer">10</span>:
|
||||
<span class="predefined-constant">self</span>.run_in(<span class="predefined-constant">self</span>.flash_warning, <span class="integer">1</span>)
|
||||
</pre></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<p>Of course if I wanted to make this App or its predecessor reusable I would have provided parameters for the sensor, the light to activate on motion, the warning light and even the number of flashes and delay between flashes.</p>
|
||||
|
||||
<p>In addition, Apps can write to <code>AppDaemon</code>’s logfiles, and there is a system of constraints that allows yout to control when and under what circumstances Apps and callbacks are active to keep the logic clean and simple.</p>
|
||||
|
||||
<p>I have spent the last few weeks moving all of my (fairly complex) automations over to <code>APPDaemon</code> and so far it is working very reliably.</p>
|
||||
|
||||
<p>Some people will maybe look at all of this and say “what use is this, I can already do all of this”, and that is fine, as I said this is an alternative not a replacement, but I am hopeful that for some users this will seem a more natural, powerful and nimble way of building potentially very complex automations.</p>
|
||||
|
||||
<p>If this has whet your appetite, feel free to give it a try. You can find it, <a href="https://github.com/acockburn/appdaemon">here</a>, including full installation instructions, an API reference, and a number of fully fleshed out examples.</p>
|
||||
|
||||
<p>Happy Automating!</p>
|
||||
Happy Automating!
|
||||
]]></content>
|
||||
</entry>
|
||||
|
||||
|
@ -170,28 +163,26 @@ Heatmap
|
|||
<link href="https://home-assistant.io/blog/2016/07/28/esp8266-and-micropython-part1/"/>
|
||||
<updated>2016-07-28T04:00:00+00:00</updated>
|
||||
<id>https://home-assistant.io/blog/2016/07/28/esp8266-and-micropython-part1</id>
|
||||
<content type="html">< covers a lot of ground. This post is providing only a little summary which should get you started.
|
||||
|
||||
<p>Until a couple of weeks ago, the pre-built MicroPython binary for the ESP8266 was only available to backers. This has changed now and it is available to the public for <a href="https://micropython.org/download/#esp8266">download</a>.</p>
|
||||
Until a couple of weeks ago, the pre-built MicroPython binary for the ESP8266 was only available to backers. This has changed now and it is available to the public for [download](https://micropython.org/download/#esp8266).
|
||||
|
||||
<!--more-->
|
||||
|
||||
<p>The easiest way is to use <a href="https://github.com/themadinventor/esptool">esptool.py</a> for firmware handling tasks. First erase the flash:</p>
|
||||
The easiest way is to use [esptool.py](https://github.com/themadinventor/esptool) for firmware handling tasks. First erase the flash:
|
||||
|
||||
<div class="highlighter-coderay"><div class="CodeRay">
|
||||
<div class="code"><pre>$ sudo python esptool.py --port /dev/ttyUSB0 erase_flash
|
||||
```bash
|
||||
$ sudo python esptool.py --port /dev/ttyUSB0 erase_flash
|
||||
esptool.py v1.0.2-dev
|
||||
Connecting...
|
||||
Erasing flash (this may take a while)...
|
||||
</pre></div>
|
||||
</div>
|
||||
</div>
|
||||
```
|
||||
|
||||
<p>and then load the firmware. You may adjust the file name of the firmware binary.</p>
|
||||
and then load the firmware. You may adjust the file name of the firmware binary.
|
||||
|
||||
<div class="highlighter-coderay"><div class="CodeRay">
|
||||
<div class="code"><pre>$ sudo python esptool.py --port /dev/ttyUSB0 --baud 460800 write_flash --flash_size=8m 0 esp8266-2016-07-10-v1.8.2.bin
|
||||
```bash
|
||||
$ sudo python esptool.py --port /dev/ttyUSB0 --baud 460800 write_flash --flash_size=8m 0 esp8266-2016-07-10-v1.8.2.bin
|
||||
esptool.py v1.2-dev
|
||||
Connecting...
|
||||
Running Cesanta flasher stub...
|
||||
|
@ -199,16 +190,14 @@ Flash params set to 0x0020
|
|||
Writing 540672 @ 0x0... 540672 (100 %)
|
||||
Wrote 540672 bytes at 0x0 in 13.1 seconds (330.8 kbit/s)...
|
||||
Leaving...
|
||||
</pre></div>
|
||||
</div>
|
||||
</div>
|
||||
```
|
||||
|
||||
<p>Now reset the device. You should then be able to use the <a href="http://docs.micropython.org/en/latest/esp8266/esp8266/tutorial/repl.html#getting-a-micropython-repl-prompt">REPL (Read Evaluate Print Loop)</a>. On Linux there is <code>minicom</code> or <code>picocom</code>, on a Mac you can use <code>screen</code> (eg. <code>screen /dev/tty.SLAB_USBtoUART 115200</code>), and on Windows there is Putty to open a serial connection and get the REPL prompt.</p>
|
||||
Now reset the device. You should then be able to use the [REPL (Read Evaluate Print Loop)](http://docs.micropython.org/en/latest/esp8266/esp8266/tutorial/repl.html#getting-a-micropython-repl-prompt). On Linux there is `minicom` or `picocom`, on a Mac you can use `screen` (eg. `screen /dev/tty.SLAB_USBtoUART 115200`), and on Windows there is Putty to open a serial connection and get the REPL prompt.
|
||||
|
||||
<p>The <a href="http://docs.micropython.org/en/latest/esp8266/esp8266/tutorial/repl.html#webrepl-a-prompt-over-wifi">WebREPL</a> work over a wireless connection and allows easy access to a prompt in your browser. An instance of the WebREPL client is hosted at <a href="http://micropython.org/webrepl">http://micropython.org/webrepl</a>. Alternatively, you can create a local clone of their <a href="https://github.com/micropython/webrepl">GitHub repository</a>. This is neccessary if your want to use the command-line tool <code>webrepl_cli.py</code> which is mentionend later in this post.</p>
|
||||
The [WebREPL](http://docs.micropython.org/en/latest/esp8266/esp8266/tutorial/repl.html#webrepl-a-prompt-over-wifi) work over a wireless connection and allows easy access to a prompt in your browser. An instance of the WebREPL client is hosted at [http://micropython.org/webrepl](http://micropython.org/webrepl). Alternatively, you can create a local clone of their [GitHub repository](https://github.com/micropython/webrepl). This is neccessary if your want to use the command-line tool `webrepl_cli.py` which is mentionend later in this post.
|
||||
|
||||
<div class="highlighter-coderay"><div class="CodeRay">
|
||||
<div class="code"><pre>$ sudo minicom -D /dev/ttyUSB0
|
||||
```bash
|
||||
$ sudo minicom -D /dev/ttyUSB0
|
||||
#4 ets_task(4020e374, 29, 3fff70e8, 10)
|
||||
WebREPL daemon started on ws://192.168.4.1:8266
|
||||
Started webrepl in setup mode
|
||||
|
@ -216,128 +205,114 @@ could not open file 'main.py' for reading
|
|||
|
||||
#5 ets_task(4010035c, 3, 3fff6360, 4)
|
||||
MicroPython v1.8.2-9-g805c2b9 on 2016-07-10; ESP module with ESP8266
|
||||
Type "help()" for more information.
|
||||
>>>
|
||||
</pre></div>
|
||||
</div>
|
||||
</div>
|
||||
Type "help()" for more information.
|
||||
>>>
|
||||
```
|
||||
|
||||
<p class="note">
|
||||
The public build of the firmware may be different than the firmware distributed to the backers of the campaign. Especially in regard of the <a href="http://docs.micropython.org/en/latest/esp8266/py-modindex.html">available modules</a>, turned on debug messages, and alike. Also, the WebREPL may not be started by default.
|
||||
<p class='note'>
|
||||
The public build of the firmware may be different than the firmware distributed to the backers of the campaign. Especially in regard of the [available modules](http://docs.micropython.org/en/latest/esp8266/py-modindex.html), turned on debug messages, and alike. Also, the WebREPL may not be started by default.
|
||||
</p>
|
||||
|
||||
<p>Connect a LED to pin 5 (or another pin of your choosing) to check if the ESP8266 is working as expected.</p>
|
||||
Connect a LED to pin 5 (or another pin of your choosing) to check if the ESP8266 is working as expected.
|
||||
|
||||
<div class="highlighter-coderay"><div class="CodeRay">
|
||||
<div class="code"><pre>>>> <span class="keyword">import</span> <span class="include">machine</span>
|
||||
>>> pin = machine.Pin(<span class="integer">5</span>, machine.Pin.OUT)
|
||||
>>> pin.high()
|
||||
</pre></div>
|
||||
</div>
|
||||
</div>
|
||||
```python
|
||||
>>> import machine
|
||||
>>> pin = machine.Pin(5, machine.Pin.OUT)
|
||||
>>> pin.high()
|
||||
```
|
||||
|
||||
<p>You can toogle the LED by changing its state with <code>pin.high()</code> and <code>pin.low()</code>.</p>
|
||||
You can toogle the LED by changing its state with `pin.high()` and `pin.low()`.
|
||||
|
||||
<p>Various ESP8266 development board are shipped with an onboard photocell or a light dependent resistors (LDR) connected to the analog pin of your ESP8266 check if you are able to obtain a value.</p>
|
||||
Various ESP8266 development board are shipped with an onboard photocell or a light dependent resistors (LDR) connected to the analog pin of your ESP8266 check if you are able to obtain a value.
|
||||
|
||||
<div class="highlighter-coderay"><div class="CodeRay">
|
||||
<div class="code"><pre>>>> <span class="keyword">import</span> <span class="include">machine</span>
|
||||
>>> brightness = machine.ADC(<span class="integer">0</span>)
|
||||
>>> brightness.read()
|
||||
</pre></div>
|
||||
</div>
|
||||
</div>
|
||||
```python
|
||||
>>> import machine
|
||||
>>> brightness = machine.ADC(0)
|
||||
>>> brightness.read()
|
||||
```
|
||||
|
||||
<p>Make sure that you are familiar with REPL and WebREPL because this will be needed soon. Keep in mind the password for the WebREPL access.</p>
|
||||
Make sure that you are familiar with REPL and WebREPL because this will be needed soon. Keep in mind the password for the WebREPL access.
|
||||
|
||||
<p>Read the <a href="http://docs.micropython.org/en/latest/esp8266/esp8266/tutorial/network_basics.html">instructions</a> about how to setup your wireless connection. Basically you need to upload a <code>boot.py</code> file to the microcontroller and this file is taking care of the connection setup. Below you find a sample which is more or less the same as shown in the <a href="http://docs.micropython.org/en/latest/esp8266/esp8266/tutorial/network_basics.html#configuration-of-the-wifi">documentation</a>.</p>
|
||||
Read the [instructions](http://docs.micropython.org/en/latest/esp8266/esp8266/tutorial/network_basics.html) about how to setup your wireless connection. Basically you need to upload a `boot.py` file to the microcontroller and this file is taking care of the connection setup. Below you find a sample which is more or less the same as shown in the [documentation](http://docs.micropython.org/en/latest/esp8266/esp8266/tutorial/network_basics.html#configuration-of-the-wifi).
|
||||
|
||||
<div class="highlighter-coderay"><div class="CodeRay">
|
||||
<div class="code"><pre><span class="keyword">def</span> <span class="function">do_connect</span>():
|
||||
<span class="keyword">import</span> <span class="include">network</span>
|
||||
```python
|
||||
def do_connect():
|
||||
import network
|
||||
|
||||
SSID = <span class="string"><span class="delimiter">'</span><span class="content">SSID</span><span class="delimiter">'</span></span>
|
||||
PASSWORD = <span class="string"><span class="delimiter">'</span><span class="content">PASSWORD</span><span class="delimiter">'</span></span>
|
||||
SSID = 'SSID'
|
||||
PASSWORD = 'PASSWORD'
|
||||
|
||||
sta_if = network.WLAN(network.STA_IF)
|
||||
ap_if = network.WLAN(network.AP_IF)
|
||||
<span class="keyword">if</span> ap_if.active():
|
||||
ap_if.active(<span class="predefined-constant">False</span>)
|
||||
<span class="keyword">if</span> <span class="keyword">not</span> sta_if.isconnected():
|
||||
print(<span class="string"><span class="delimiter">'</span><span class="content">connecting to network...</span><span class="delimiter">'</span></span>)
|
||||
sta_if.active(<span class="predefined-constant">True</span>)
|
||||
if ap_if.active():
|
||||
ap_if.active(False)
|
||||
if not sta_if.isconnected():
|
||||
print('connecting to network...')
|
||||
sta_if.active(True)
|
||||
sta_if.connect(SSID, PASSWORD)
|
||||
<span class="keyword">while</span> <span class="keyword">not</span> sta_if.isconnected():
|
||||
<span class="keyword">pass</span>
|
||||
print(<span class="string"><span class="delimiter">'</span><span class="content">Network configuration:</span><span class="delimiter">'</span></span>, sta_if.ifconfig())
|
||||
</pre></div>
|
||||
</div>
|
||||
</div>
|
||||
while not sta_if.isconnected():
|
||||
pass
|
||||
print('Network configuration:', sta_if.ifconfig())
|
||||
```
|
||||
|
||||
<p>Upload this file with <code>webrepl_cli.py</code> or the WebREPL:</p>
|
||||
Upload this file with `webrepl_cli.py` or the WebREPL:
|
||||
|
||||
<div class="highlighter-coderay"><div class="CodeRay">
|
||||
<div class="code"><pre>$ python webrepl_cli.py boot.py 192.168.4.1:/boot.py
|
||||
</pre></div>
|
||||
</div>
|
||||
</div>
|
||||
```bash
|
||||
$ python webrepl_cli.py boot.py 192.168.4.1:/boot.py
|
||||
```
|
||||
|
||||
<p>If you reboot, you should see your current IP address in the terminal.</p>
|
||||
If you reboot, you should see your current IP address in the terminal.
|
||||
|
||||
<div class="highlighter-coderay"><div class="CodeRay">
|
||||
<div class="code"><pre>>>> Network configuration: ('192.168.0.10', '255.255.255.0', '192.168.0.1', '192.168.0.1')
|
||||
</pre></div>
|
||||
</div>
|
||||
</div>
|
||||
```bash
|
||||
>>> Network configuration: ('192.168.0.10', '255.255.255.0', '192.168.0.1', '192.168.0.1')
|
||||
```
|
||||
|
||||
<p>First let’s create a little consumer for Home Assistant sensor’s state. The code to place in <code>main.py</code> is a mixture of code from above and the <a href="/developers/rest_api/">RESTful API</a> of Home Assistant. If the temperature in the kitchen is higher than 20 °C then the LED connected to pin 5 is switched on.</p>
|
||||
First let's create a little consumer for Home Assistant sensor's state. The code to place in `main.py` is a mixture of code from above and the [RESTful API](/developers/rest_api/) of Home Assistant. If the temperature in the kitchen is higher than 20 °C then the LED connected to pin 5 is switched on.
|
||||
|
||||
<p class="note">
|
||||
If a module is missing then you need to download is it from <a href="https://github.com/micropython/micropython-lib">MicroPython Library overview</a> and upload it to the ESP8266 with <code>webrepl_cli.py</code> manually.
|
||||
<p class='note'>
|
||||
If a module is missing then you need to download is it from [MicroPython Library overview](https://github.com/micropython/micropython-lib) and upload it to the ESP8266 with `webrepl_cli.py` manually.
|
||||
</p>
|
||||
|
||||
<div class="highlighter-coderay"><div class="CodeRay">
|
||||
<div class="code"><pre><span class="comment"># Sample code to request the state of a Home Assistant entity.</span>
|
||||
```python
|
||||
# Sample code to request the state of a Home Assistant entity.
|
||||
|
||||
API_PASSWORD = <span class="string"><span class="delimiter">'</span><span class="content">YOUR_PASSWORD</span><span class="delimiter">'</span></span>
|
||||
URL = <span class="string"><span class="delimiter">'</span><span class="content">http://192.168.0.5:8123/api/states/</span><span class="delimiter">'</span></span>
|
||||
ENTITY = <span class="string"><span class="delimiter">'</span><span class="content">sensor.kitchen_temperature</span><span class="delimiter">'</span></span>
|
||||
TIMEOUT = <span class="integer">30</span>
|
||||
PIN = <span class="integer">5</span>
|
||||
API_PASSWORD = 'YOUR_PASSWORD'
|
||||
URL = 'http://192.168.0.5:8123/api/states/'
|
||||
ENTITY = 'sensor.kitchen_temperature'
|
||||
TIMEOUT = 30
|
||||
PIN = 5
|
||||
|
||||
<span class="keyword">def</span> <span class="function">get_data</span>():
|
||||
<span class="keyword">import</span> <span class="include">urequests</span>
|
||||
url = <span class="string"><span class="delimiter">'</span><span class="content">{}{}</span><span class="delimiter">'</span></span>.format(URL, ENTITY)
|
||||
headers = {<span class="string"><span class="delimiter">'</span><span class="content">x-ha-access</span><span class="delimiter">'</span></span>: API_PASSWORD,
|
||||
<span class="string"><span class="delimiter">'</span><span class="content">content-type</span><span class="delimiter">'</span></span>: <span class="string"><span class="delimiter">'</span><span class="content">application/json</span><span class="delimiter">'</span></span>}
|
||||
def get_data():
|
||||
import urequests
|
||||
url = '{}{}'.format(URL, ENTITY)
|
||||
headers = {'x-ha-access': API_PASSWORD,
|
||||
'content-type': 'application/json'}
|
||||
resp = urequests.get(URL, headers=headers)
|
||||
<span class="keyword">return</span> resp.json()[<span class="string"><span class="delimiter">'</span><span class="content">state</span><span class="delimiter">'</span></span>]
|
||||
return resp.json()['state']
|
||||
|
||||
<span class="keyword">def</span> <span class="function">main</span>():
|
||||
<span class="keyword">import</span> <span class="include">machine</span>
|
||||
<span class="keyword">import</span> <span class="include">time</span>
|
||||
def main():
|
||||
import machine
|
||||
import time
|
||||
|
||||
pin = machine.Pin(PIN, machine.Pin.OUT)
|
||||
<span class="keyword">while</span> <span class="predefined-constant">True</span>:
|
||||
<span class="keyword">try</span>:
|
||||
<span class="keyword">if</span> <span class="predefined">int</span>(get_data()) >= <span class="integer">20</span>:
|
||||
while True:
|
||||
try:
|
||||
if int(get_data()) >= 20:
|
||||
pin.high()
|
||||
<span class="keyword">else</span>:
|
||||
else:
|
||||
pin.low()
|
||||
<span class="keyword">except</span> <span class="exception">TypeError</span>:
|
||||
<span class="keyword">pass</span>
|
||||
except TypeError:
|
||||
pass
|
||||
time.sleep(TIMEOUT)
|
||||
|
||||
<span class="keyword">if</span> __name__ == <span class="string"><span class="delimiter">'</span><span class="content">__main__</span><span class="delimiter">'</span></span>:
|
||||
print(<span class="string"><span class="delimiter">'</span><span class="content">Get the state of {}</span><span class="delimiter">'</span></span>.format(ENTITY))
|
||||
if __name__ == '__main__':
|
||||
print('Get the state of {}'.format(ENTITY))
|
||||
main()
|
||||
</pre></div>
|
||||
</div>
|
||||
</div>
|
||||
```
|
||||
|
||||
<p>Upload <code>main.py</code> the same way as <code>boot.py</code>. After a reboot (<code>>>> import machine</code> and <code>>>> machine.reboot()</code>) or power-cycling your physical notifier is ready.</p>
|
||||
Upload `main.py` the same way as `boot.py`. After a reboot (`>>> import machine` and `>>> machine.reboot()`) or power-cycling your physical notifier is ready.
|
||||
|
||||
<p>If you run into trouble, press “Ctrl+c” in the REPL to stop the execution of the code, enter <code>>>> import webrepl</code> and <code>>>> webrepl.start()</code>, and upload your fixed file.</p>
|
||||
If you run into trouble, press "Ctrl+c" in the REPL to stop the execution of the code, enter `>>> import webrepl` and `>>> webrepl.start()`, and upload your fixed file.
|
||||
|
||||
]]></content>
|
||||
</entry>
|
||||
|
@ -347,71 +322,74 @@ PIN = <span class="integer">5</span>
|
|||
<link href="https://home-assistant.io/blog/2016/07/23/internet-of-things-data-exploration-with-jupyter-notebooks/"/>
|
||||
<updated>2016-07-23T18:00:00+00:00</updated>
|
||||
<id>https://home-assistant.io/blog/2016/07/23/internet-of-things-data-exploration-with-jupyter-notebooks</id>
|
||||
<content type="html"><![CDATA[<p><em>This is the first blog post by Anton Kireyeu. A new contributor to Home Assistant who will focus on exploring and visualizing Home Assistant data.</em></p>
|
||||
<content type="html"><![CDATA[_This is the first blog post by Anton Kireyeu. A new contributor to Home Assistant who will focus on exploring and visualizing Home Assistant data._
|
||||
|
||||
<p>As we learned in the recent <a href="https://home-assistant.io/blog/2016/07/19/visualizing-your-iot-data/">blog post by Fabian</a>, all operational data of your Home Assistant application is stored locally and is available for exploration. Our first steps were querying data with the <a href="http://sqlitebrowser.org/">DB Browser for SQLite</a>, exporting the data extract as a CSV file and graphing in LibreOffice. But what else can be done with this data and what tools are there available?</p>
|
||||
As we learned in the recent [blog post by Fabian], all operational data of your Home Assistant application is stored locally and is available for exploration. Our first steps were querying data with the [DB Browser for SQLite], exporting the data extract as a CSV file and graphing in LibreOffice. But what else can be done with this data and what tools are there available?
|
||||
|
||||
<p>This post will help you get set up using a few popular data scientist tools to allow you to locally process your data:</p>
|
||||
This post will help you get set up using a few popular data scientist tools to allow you to locally process your data:
|
||||
|
||||
<ul>
|
||||
<li> <a href="http://pandas.pydata.org/">Pandas</a>: an open source tool for data analysis for Python</li>
|
||||
<li> <a href="http://matplotlib.org/">matplotlib</a>: a Python plotting library</li>
|
||||
<li> <a href="https://jupyter.org/">Jupyter notebook</a>: application for creation and sharing of documents containing live code, visualizations and explanatory text</li>
|
||||
</ul>
|
||||
- [Pandas]: an open source tool for data analysis for Python
|
||||
- [matplotlib]: a Python plotting library
|
||||
- [Jupyter notebook]: application for creation and sharing of documents containing live code, visualizations and explanatory text
|
||||
|
||||
<p class="img">
|
||||
<img src="https://home-assistant.io/images/blog/2016-07-data-exploration/graph.png" />
|
||||
<p class='img'>
|
||||
<img src='https://home-assistant.io/images/blog/2016-07-data-exploration/graph.png'>
|
||||
One of the graphs created with this tutorial.
|
||||
</p>
|
||||
|
||||
<p><em>TL; DR: Use <a href="http://nbviewer.jupyter.org/github/home-assistant/home-assistant-notebooks/blob/master/DataExploration-1/DataExploration-1.ipynb">this Jupyter Notebook</a> to visualize of your data</em></p>
|
||||
_TL; DR: Use [this Jupyter Notebook][nb-prev] to visualize of your data_
|
||||
|
||||
[blog post by Fabian]: https://home-assistant.io/blog/2016/07/19/visualizing-your-iot-data/
|
||||
[DB Browser for SQLite]: http://sqlitebrowser.org/
|
||||
[Pandas]: http://pandas.pydata.org/
|
||||
[matplotlib]: http://matplotlib.org/
|
||||
[Jupyter notebook]: https://jupyter.org/
|
||||
[nb-prev]: http://nbviewer.jupyter.org/github/home-assistant/home-assistant-notebooks/blob/master/DataExploration-1/DataExploration-1.ipynb
|
||||
|
||||
<!--more-->
|
||||
|
||||
<h3><a class='title-link' name='dependencies' href='#dependencies'></a> Dependencies </h3>
|
||||
### <a class='title-link' name='dependencies' href='#dependencies'></a> Dependencies
|
||||
|
||||
<p>In order to run the provided Jupyter notebook, please make sure you have the following applications/libraries installed on your computer:</p>
|
||||
In order to run the provided Jupyter notebook, please make sure you have the following applications/libraries installed on your computer:
|
||||
|
||||
<ul>
|
||||
<li>Pandas</li>
|
||||
<li>NumPy</li>
|
||||
<li>Matplotlib</li>
|
||||
<li>SQLAlchemy</li>
|
||||
<li>Jupyter</li>
|
||||
</ul>
|
||||
- Pandas
|
||||
- NumPy
|
||||
- Matplotlib
|
||||
- SQLAlchemy
|
||||
- Jupyter
|
||||
|
||||
<p>As a Windows user myself, I find the easiest, quickest and most hassle-free way of installing all of these dependencies is to use <a href="https://winpython.github.io/">WinPython</a>. This free open-source portable distribution includes all of the dependencies required for this notebook, as well as a few other essential Python libraries you may require for data exploration in the future.</p>
|
||||
As a Windows user myself, I find the easiest, quickest and most hassle-free way of installing all of these dependencies is to use [WinPython]. This free open-source portable distribution includes all of the dependencies required for this notebook, as well as a few other essential Python libraries you may require for data exploration in the future.
|
||||
|
||||
<h4><a class='title-link' name='why-jupyter' href='#why-jupyter'></a> Why Jupyter? </h4>
|
||||
[WinPython]: https://winpython.github.io/
|
||||
|
||||
<p>While all Home Assistant implementations can have varying setup, components and scripts, the underlying data structure is standardized and well-defined. This allows us to write Python code that is environmentally agnostic. Wrapping it in a Jupyter notebook ensures the code, visualizations and directions/explanations are kept digestible and neatly-packaged. One of the amazing features of Jupyter is the ability to change code as you go along, customizing all outputs and visualizations on the fly!</p>
|
||||
#### <a class='title-link' name='why-jupyter' href='#why-jupyter'></a> Why Jupyter?
|
||||
|
||||
<h4><a class='title-link' name='where-do-i-start' href='#where-do-i-start'></a> Where do I start? </h4>
|
||||
While all Home Assistant implementations can have varying setup, components and scripts, the underlying data structure is standardized and well-defined. This allows us to write Python code that is environmentally agnostic. Wrapping it in a Jupyter notebook ensures the code, visualizations and directions/explanations are kept digestible and neatly-packaged. One of the amazing features of Jupyter is the ability to change code as you go along, customizing all outputs and visualizations on the fly!
|
||||
|
||||
<p>This tutorial is based around a heavily commented Jupyter Notebook that we created. So to get started, you will have to open that:</p>
|
||||
#### <a class='title-link' name='where-do-i-start' href='#where-do-i-start'></a> Where do I start?
|
||||
|
||||
<ul>
|
||||
<li><a href="http://nbviewer.jupyter.org/github/home-assistant/home-assistant-notebooks/blob/master/DataExploration-1/DataExploration-1.ipynb">download the tutorial Jupyter Notebook</a> (leads to preview page, from there click download top-right)</li>
|
||||
<li>launch the Jupyter Notebook App</li>
|
||||
<li>Click the ‘upload’ button to add the downloaded notebook to Jupyter</li>
|
||||
<li>Adjust the <code>DB_URL</code> at the beginning of the notebook to point at your Home Assistant database</li>
|
||||
<li>Select in top menu: Cell -> Run All</li>
|
||||
</ul>
|
||||
This tutorial is based around a heavily commented Jupyter Notebook that we created. So to get started, you will have to open that:
|
||||
|
||||
<p>That’s it! The included code will walk you through importing the required libraries, show running raw SQL against your local database, plotting basic data from the states table, and in the end output a few plots of changes for every entity in your system as well as the mean daily value for the past 20 days.</p>
|
||||
- [download the tutorial Jupyter Notebook][nb-prev] (leads to preview page, from there click download top-right)
|
||||
- launch the Jupyter Notebook App
|
||||
- Click the 'upload' button to add the downloaded notebook to Jupyter
|
||||
- Adjust the `DB_URL` at the beginning of the notebook to point at your Home Assistant database
|
||||
- Select in top menu: Cell -> Run All
|
||||
|
||||
<p>After just those few steps, you will be greeted with beautiful formatted data like this:</p>
|
||||
That’s it! The included code will walk you through importing the required libraries, show running raw SQL against your local database, plotting basic data from the states table, and in the end output a few plots of changes for every entity in your system as well as the mean daily value for the past 20 days.
|
||||
|
||||
<p class="img">
|
||||
<img src="https://home-assistant.io/images/blog/2016-07-data-exploration/graph.png" />
|
||||
After just those few steps, you will be greeted with beautiful formatted data like this:
|
||||
|
||||
<p class='img'>
|
||||
<img src='https://home-assistant.io/images/blog/2016-07-data-exploration/graph.png'>
|
||||
One of the graphs created with this tutorial.
|
||||
</p>
|
||||
|
||||
<h4><a class='title-link' name='whats-next' href='#whats-next'></a> What’s next? </h4>
|
||||
#### <a class='title-link' name='whats-next' href='#whats-next'></a> What’s next?
|
||||
|
||||
<p>Thanks to the magic of Jupyter, all of the code is customizable: want to selectively display your data, only covering a specific entity? Sure thing! Want to change the properties of the plots? No problem!</p>
|
||||
Thanks to the magic of Jupyter, all of the code is customizable: want to selectively display your data, only covering a specific entity? Sure thing! Want to change the properties of the plots? No problem!
|
||||
|
||||
<p>While you learn and explore your IoT data, we will be working on providing more ready-to-use Jupyter Notebooks. Feel free to ask questions or provide suggestions. Would you like to see a specific visualization? Is there a particular facet of data you’re interested in? Let’s talk about it, let’s dive into the world of data together!</p>
|
||||
While you learn and explore your IoT data, we will be working on providing more ready-to-use Jupyter Notebooks. Feel free to ask questions or provide suggestions. Would you like to see a specific visualization? Is there a particular facet of data you’re interested in? Let’s talk about it, let’s dive into the world of data together!
|
||||
]]></content>
|
||||
</entry>
|
||||
|
||||
|
@ -420,114 +398,106 @@ One of the graphs created with this tutorial.
|
|||
<link href="https://home-assistant.io/blog/2016/07/19/visualizing-your-iot-data/"/>
|
||||
<updated>2016-07-19T16:00:00+00:00</updated>
|
||||
<id>https://home-assistant.io/blog/2016/07/19/visualizing-your-iot-data</id>
|
||||
<content type="html">< is tracking everything that is going on within Home Assistant. This means that you have access to all stored information about your home. Our history is not a full-fledged graphical processing and visualization component as you may know from systems and network monitoring tools. The current limitation is that you only can select a day for a visual output of your information and not a period. Also, there is no possibility to drill down on a specific entity.
|
||||
|
||||
<p>This blog post will show you ways to export data for reporting, visualization, or further analysis of automation rules.</p>
|
||||
This blog post will show you ways to export data for reporting, visualization, or further analysis of automation rules.
|
||||
|
||||
<!--more-->
|
||||
|
||||
<p>In this blog post I use the temperature of the <a href="https://en.wikipedia.org/wiki/Aare">Aare</a> river close to where I live as a show case. The temperatures were recorded with the <a href="/components/sensor.swiss_hydrological_data/">Swiss Hydrological Data sensor</a> and the name of the sensor is <code>sensor.aare</code>.</p>
|
||||
In this blog post I use the temperature of the [Aare](https://en.wikipedia.org/wiki/Aare) river close to where I live as a show case. The temperatures were recorded with the [Swiss Hydrological Data sensor](/components/sensor.swiss_hydrological_data/) and the name of the sensor is `sensor.aare`.
|
||||
|
||||
<p>The database is stored at <code><path to config dir>/.homeassistant/home-assistant_v2.db</code> as <a href="https://www.sqlite.org/">SQLite database</a>. In all examples we are going to use the path: <code>/home/ha/.homeassistant/home-assistant_v2.db</code></p>
|
||||
The database is stored at `<path to config dir>/.homeassistant/home-assistant_v2.db` as [SQLite database](https://www.sqlite.org/). In all examples we are going to use the path: `/home/ha/.homeassistant/home-assistant_v2.db`
|
||||
|
||||
<p>If you are just curious what’s stored in your database then you can use the <code>sqlite3</code> command-line tool or a graphical one like <a href="http://sqlitebrowser.org/">DB Browser for SQLite</a>.</p>
|
||||
If you are just curious what's stored in your database then you can use the `sqlite3` command-line tool or a graphical one like [DB Browser for SQLite](http://sqlitebrowser.org/).
|
||||
|
||||
<p>The table that is holding the states is called <code>states</code>. The <code>events</code> tables is responsible for storing the events which occurred. So, we will first check how many entries there are in the <code>states</code> table. <code>sqlite3</code> needs to know where the databases is located. To work with your database make sure that Home Assistant is not running or create a copy of the existing database. It’s recommended to work with a copy.</p>
|
||||
The table that is holding the states is called `states`. The `events` tables is responsible for storing the events which occurred. So, we will first check how many entries there are in the `states` table. `sqlite3` needs to know where the databases is located. To work with your database make sure that Home Assistant is not running or create a copy of the existing database. It's recommended to work with a copy.
|
||||
|
||||
<div class="highlighter-coderay"><div class="CodeRay">
|
||||
<div class="code"><pre>$ sqlite3 /home/ha/.homeassistant/home-assistant_v2.db
|
||||
```bash
|
||||
$ sqlite3 /home/ha/.homeassistant/home-assistant_v2.db
|
||||
SQLite version 3.11.0 2016-02-15 17:29:24
|
||||
sqlite> SELECT count(*) FROM states;
|
||||
sqlite> SELECT count(*) FROM states;
|
||||
24659
|
||||
</pre></div>
|
||||
</div>
|
||||
</div>
|
||||
```
|
||||
|
||||
<p>Let’s have a look at a sample <a href="https://en.wikipedia.org/wiki/SQL">SQL</a> query. This query will show all states in a period for the sensor <code>sensor.aare</code>.</p>
|
||||
Let's have a look at a sample [SQL](https://en.wikipedia.org/wiki/SQL) query. This query will show all states in a period for the sensor `sensor.aare`.
|
||||
|
||||
<div class="highlighter-coderay"><div class="CodeRay">
|
||||
<div class="code"><pre><span class="class">SELECT</span> state, last_changed <span class="keyword">FROM</span> states
|
||||
<span class="keyword">WHERE</span>
|
||||
entity_id = <span class="string"><span class="delimiter">'</span><span class="content">sensor.aare</span><span class="delimiter">'</span></span>
|
||||
<span class="keyword">AND</span>
|
||||
last_changed <span class="keyword">BETWEEN</span>
|
||||
<span class="string"><span class="delimiter">'</span><span class="content">2016-07-05 00:00:00.000000</span><span class="delimiter">'</span></span> <span class="keyword">AND</span> <span class="string"><span class="delimiter">'</span><span class="content">2016-07-07 00:00:00.000000</span><span class="delimiter">'</span></span>;
|
||||
</pre></div>
|
||||
</div>
|
||||
</div>
|
||||
```sql
|
||||
SELECT state, last_changed FROM states
|
||||
WHERE
|
||||
entity_id = 'sensor.aare'
|
||||
AND
|
||||
last_changed BETWEEN
|
||||
'2016-07-05 00:00:00.000000' AND '2016-07-07 00:00:00.000000';
|
||||
```
|
||||
|
||||
<p>The SQL statement can be formed that it fits exactly what you need. This means that you can process the data in any way you want for further use. Often it makes sense to eliminate certain entries like <code>Unknown</code> or peaks.</p>
|
||||
The SQL statement can be formed that it fits exactly what you need. This means that you can process the data in any way you want for further use. Often it makes sense to eliminate certain entries like `Unknown` or peaks.
|
||||
|
||||
<p>If the above query is executed in DB Browser for SQLite you would be able to save the sensor’s graph as png.</p>
|
||||
If the above query is executed in DB Browser for SQLite you would be able to save the sensor's graph as png.
|
||||
|
||||
<p class="img">
|
||||
<img src="https://home-assistant.io/images/blog/2016-07-reporting/db-browser.png" />
|
||||
<p class='img'>
|
||||
<img src='https://home-assistant.io/images/blog/2016-07-reporting/db-browser.png' />
|
||||
Visualization with DB Browser for SQLite
|
||||
</p>
|
||||
|
||||
<p>You may ask: Why not do this with LibreOffice Calc or another spreadsheet application? As most spreadsheet applications are not able to work directly with SQLite database we are going to export the data from the database to <a href="https://en.wikipedia.org/wiki/Comma-separated_values">CSV</a>.</p>
|
||||
You may ask: Why not do this with LibreOffice Calc or another spreadsheet application? As most spreadsheet applications are not able to work directly with SQLite database we are going to export the data from the database to [CSV](https://en.wikipedia.org/wiki/Comma-separated_values).
|
||||
|
||||
<div class="highlighter-coderay"><div class="CodeRay">
|
||||
<div class="code"><pre>$ sqlite3 -header -csv /home/ha/.homeassistant/home-assistant_v2.db "SELECT last_changed, state FROM states WHERE entity_id = 'sensor.aare' AND last_changed BETWEEN '2016-07-05 00:00:00.000000' AND '2016-07-07 00:00:00.000000';" > sensor.csv
|
||||
</pre></div>
|
||||
</div>
|
||||
</div>
|
||||
```bash
|
||||
$ sqlite3 -header -csv /home/ha/.homeassistant/home-assistant_v2.db "SELECT last_changed, state FROM states WHERE entity_id = 'sensor.aare' AND last_changed BETWEEN '2016-07-05 00:00:00.000000' AND '2016-07-07 00:00:00.000000';" > sensor.csv
|
||||
```
|
||||
|
||||
<p>The ordering for the <code>SELECT</code> was changed to get the time stamps first and then the state. Now we can import the CSV file into the application of your choice, here it’s LibreOffice Calc.</p>
|
||||
The ordering for the `SELECT` was changed to get the time stamps first and then the state. Now we can import the CSV file into the application of your choice, here it's LibreOffice Calc.
|
||||
|
||||
<p class="img">
|
||||
<img src="https://home-assistant.io/images/blog/2016-07-reporting/libreoffice-import.png" />
|
||||
<p class='img'>
|
||||
<img src='https://home-assistant.io/images/blog/2016-07-reporting/libreoffice-import.png' />
|
||||
Import of the CSV file
|
||||
</p>
|
||||
|
||||
<p>After the import a graph can be created over the existing data.</p>
|
||||
After the import a graph can be created over the existing data.
|
||||
|
||||
<p class="img">
|
||||
<img src="https://home-assistant.io/images/blog/2016-07-reporting/libreoffice-graph.png" />
|
||||
<p class='img'>
|
||||
<img src='https://home-assistant.io/images/blog/2016-07-reporting/libreoffice-graph.png' />
|
||||
Graph in LibreOffice
|
||||
</p>
|
||||
|
||||
<p>You can also use <a href="http://matplotlib.org/">matplotlib</a> to generate graphs as an alternative to a spreadsheet application. This is a powerful Python 2D plotting library. With the built-in support for SQLite in Python it will only take a couple lines of code to visualize your data.</p>
|
||||
You can also use [matplotlib](http://matplotlib.org/) to generate graphs as an alternative to a spreadsheet application. This is a powerful Python 2D plotting library. With the built-in support for SQLite in Python it will only take a couple lines of code to visualize your data.
|
||||
|
||||
<div class="highlighter-coderay"><div class="CodeRay">
|
||||
<div class="code"><pre><span class="keyword">import</span> <span class="include">sqlite3</span>
|
||||
<span class="keyword">from</span> <span class="include">matplotlib</span> <span class="keyword">import</span> <span class="include">dates</span>
|
||||
<span class="keyword">import</span> <span class="include">matplotlib.pyplot</span> <span class="keyword">as</span> plt
|
||||
```python
|
||||
import sqlite3
|
||||
from matplotlib import dates
|
||||
import matplotlib.pyplot as plt
|
||||
|
||||
<span class="keyword">import</span> <span class="include">homeassistant.util.dt</span> <span class="keyword">as</span> dt
|
||||
import homeassistant.util.dt as dt
|
||||
|
||||
values = []
|
||||
timestamps = []
|
||||
|
||||
conn = sqlite3.connect(<span class="string"><span class="delimiter">'</span><span class="content">/home/ha/.homeassistant/home-assistant_v2.db</span><span class="delimiter">'</span></span>)
|
||||
data = conn.execute(<span class="string"><span class="delimiter">"</span><span class="content">SELECT state, last_changed FROM states WHERE </span><span class="delimiter">"</span></span>
|
||||
<span class="string"><span class="delimiter">"</span><span class="content">entity_id = 'sensor.aare' AND last_changed BETWEEN </span><span class="delimiter">"</span></span>
|
||||
<span class="string"><span class="delimiter">"</span><span class="content">'2016-07-05 00:00:00.000000' AND </span><span class="delimiter">"</span></span>
|
||||
<span class="string"><span class="delimiter">"</span><span class="content">'2016-07-07 00:00:00.000000'</span><span class="delimiter">"</span></span>)
|
||||
conn = sqlite3.connect('/home/ha/.homeassistant/home-assistant_v2.db')
|
||||
data = conn.execute("SELECT state, last_changed FROM states WHERE "
|
||||
"entity_id = 'sensor.aare' AND last_changed BETWEEN "
|
||||
"'2016-07-05 00:00:00.000000' AND "
|
||||
"'2016-07-07 00:00:00.000000'")
|
||||
|
||||
<span class="keyword">for</span> x <span class="keyword">in</span> data:
|
||||
timestamps.append(dates.date2num(dt.parse_datetime(x[<span class="integer">1</span>])))
|
||||
values.append(<span class="predefined">float</span>(x[<span class="integer">0</span>]))
|
||||
for x in data:
|
||||
timestamps.append(dates.date2num(dt.parse_datetime(x[1])))
|
||||
values.append(float(x[0]))
|
||||
|
||||
plt.plot_date(x=timestamps, y=values, fmt=<span class="string"><span class="delimiter">"</span><span class="content">r-</span><span class="delimiter">"</span></span>)
|
||||
plt.ylabel(<span class="string"><span class="delimiter">'</span><span class="content">Temperature</span><span class="delimiter">'</span></span>)
|
||||
plt.xlabel(<span class="string"><span class="delimiter">'</span><span class="content">Time line</span><span class="delimiter">'</span></span>)
|
||||
plt.plot_date(x=timestamps, y=values, fmt="r-")
|
||||
plt.ylabel('Temperature')
|
||||
plt.xlabel('Time line')
|
||||
|
||||
plt.savefig(<span class="string"><span class="delimiter">'</span><span class="content">sensor.png</span><span class="delimiter">'</span></span>)
|
||||
</pre></div>
|
||||
</div>
|
||||
</div>
|
||||
plt.savefig('sensor.png')
|
||||
```
|
||||
|
||||
<p>Creating a connection to the database and executing a query is similar to the ways already seen. The return values from the query are splitted into two lists. The time stamps must be converted in an value which is accepted by matplotlib and then the graph is generated and saved as image.</p>
|
||||
Creating a connection to the database and executing a query is similar to the ways already seen. The return values from the query are splitted into two lists. The time stamps must be converted in an value which is accepted by matplotlib and then the graph is generated and saved as image.
|
||||
|
||||
<p class="img">
|
||||
<img src="https://home-assistant.io/images/blog/2016-07-reporting/mpl-sensor.png" />
|
||||
<p class='img'>
|
||||
<img src='https://home-assistant.io/images/blog/2016-07-reporting/mpl-sensor.png' />
|
||||
Sensor graph generated by matplotlib
|
||||
</p>
|
||||
|
||||
<p>Most of the graphs are pretty ugly. So, further beautification will be needed. If you have created a nice report including some amazing graphs then the Home Assistant community would be grateful for sharing them in our <a href="https://community.home-assistant.io/">forum</a>.</p>
|
||||
Most of the graphs are pretty ugly. So, further beautification will be needed. If you have created a nice report including some amazing graphs then the Home Assistant community would be grateful for sharing them in our [forum](https://community.home-assistant.io/).
|
||||
|
||||
]]></content>
|
||||
</entry>
|
||||
|
|
|
@ -401,7 +401,7 @@
|
|||
</time>
|
||||
</div>
|
||||
<div class="grid__item four-fifths palm-one-whole">
|
||||
<h1 class="gamma"><a href="/blog/2016/02/09/smarter-smart-things-with-mqtt-and-home-assistant/">Smarter SmartThings with MQTT and Home Assistant</a></h1>
|
||||
<h1 class="gamma"><a href="/blog/2016/02/09/Smarter-Smart-Things-with-MQTT-and-Home-Assistant/">Smarter SmartThings with MQTT and Home Assistant</a></h1>
|
||||
|
||||
<footer class="meta">
|
||||
<span>
|
||||
|
@ -729,7 +729,7 @@
|
|||
|
||||
|
||||
<li class="post">
|
||||
<a href="/blog/2016/08/13/foursquare-fast-com-ffmpeg-gpsd/">0.26: Foursquare, Fast.com, FFMPEG and GPSD</a>
|
||||
<a href="/blog/2016/08/13/foursquare-fast.com-ffmpeg-gpsd/">0.26: Foursquare, Fast.com, FFMPEG and GPSD</a>
|
||||
</li>
|
||||
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
<title><![CDATA[Category: iBeacons | Home Assistant]]></title>
|
||||
<link href="https://home-assistant.io/blog/categories/ibeacons/atom.xml" rel="self"/>
|
||||
<link href="https://home-assistant.io/"/>
|
||||
<updated>2016-08-22T07:26:42+00:00</updated>
|
||||
<updated>2016-08-22T08:20:27+00:00</updated>
|
||||
<id>https://home-assistant.io/</id>
|
||||
<author>
|
||||
<name><![CDATA[Home Assistant]]></name>
|
||||
|
@ -18,153 +18,152 @@
|
|||
<link href="https://home-assistant.io/blog/2016/05/26/ibeacons-how-to-track-things-that-cant-track-themselves-part-ii/"/>
|
||||
<updated>2016-05-26T11:06:12+00:00</updated>
|
||||
<id>https://home-assistant.io/blog/2016/05/26/ibeacons-how-to-track-things-that-cant-track-themselves-part-ii</id>
|
||||
<content type="html"><._
|
||||
|
||||
<p>In <a href="/blog/2016/04/30/ibeacons-part-1-making-presence-detection-work-better">Part 1</a> I talked about using iBeacons to improve presence tracking. In part 2 I’ll talk about how to track things like keys that can’t track themselves by using iBeacons.</p>
|
||||
|
||||
<h3><a class='title-link' name='tracking-things-using-ibeacons' href='#tracking-things-using-ibeacons'></a> Tracking things using iBeacons </h3>
|
||||
<p>In the first part I mentioned that iBeacons just send out <em>I’m here</em> packets, and we used this to trigger an update when your phone came close to a fixed beacon.</p>
|
||||
In [Part 1](/blog/2016/04/30/ibeacons-part-1-making-presence-detection-work-better) I talked about using iBeacons to improve presence tracking. In part 2 I’ll talk about how to track things like keys that can’t track themselves by using iBeacons.
|
||||
|
||||
<p>But beacons don’t have to be fixed.</p>
|
||||
### <a class='title-link' name='tracking-things-using-ibeacons' href='#tracking-things-using-ibeacons'></a> Tracking things using iBeacons
|
||||
In the first part I mentioned that iBeacons just send out *I’m here* packets, and we used this to trigger an update when your phone came close to a fixed beacon.
|
||||
|
||||
<p>Your phone knows roughly where it is located (based on mobile phone masts, Wi-Fi networks or GPS). If your phone sees an <em>I’m here</em> message then it knows the beacon is close.</p>
|
||||
But beacons don’t have to be fixed.
|
||||
|
||||
<p>If your phone can remember (or tell a server) where it was when it last saw the iBeacon - then it knows where the beacon was. So the result of this is that you can track where an iBeacon was - even though the iBeacon doesn’t have any tracking technology itself.</p>
|
||||
Your phone knows roughly where it is located (based on mobile phone masts, Wi-Fi networks or GPS). If your phone sees an *I’m here* message then it knows the beacon is close.
|
||||
|
||||
<p>So if you put an iBeacon on your keys or in your car - then you can track them.</p>
|
||||
If your phone can remember (or tell a server) where it was when it last saw the iBeacon - then it knows where the beacon was. So the result of this is that you can track where an iBeacon was - even though the iBeacon doesn't have any tracking technology itself.
|
||||
|
||||
<p class="img">
|
||||
<img width="200" src="https://home-assistant.io/images/blog/2016-05-ibeacons/keys_with_beacon.jpg" />
|
||||
So if you put an iBeacon on your keys or in your car - then you can track them.
|
||||
|
||||
<p class='img'>
|
||||
<img width='200' src='https://home-assistant.io/images/blog/2016-05-ibeacons/keys_with_beacon.jpg'>
|
||||
Here are my keys - with a Estimote Nearable iBeacon stuck to them. Ugly but effective!
|
||||
</p>
|
||||
|
||||
<!--more-->
|
||||
|
||||
<p>It’s easier to set up OwnTracks and HA to track a mobile beacon than the fixed beacon I discussed in Part 1, because you only need to tell OwnTracks about your iBeacon. You don’t need to configure HA at all.</p>
|
||||
It’s easier to set up OwnTracks and HA to track a mobile beacon than the fixed beacon I discussed in Part 1, because you only need to tell OwnTracks about your iBeacon. You don’t need to configure HA at all.
|
||||
|
||||
<p class="note warning">OwnTracks currently only supports mobile beacons on iOS.</p>
|
||||
<p class='note warning'>OwnTracks currently only supports mobile beacons on iOS.</p>
|
||||
|
||||
<p>You set up the beacon the same way as we discussed in part 1. The only difference is that instead of calling the region the name of a location (eg -drive) you call it the name of the device you want to track (eg -keys). Remember the leading ‘-’ that makes the connection more reliable.</p>
|
||||
You set up the beacon the same way as we discussed in part 1. The only difference is that instead of calling the region the name of a location (eg -drive) you call it the name of the device you want to track (eg -keys). Remember the leading ‘-’ that makes the connection more reliable.
|
||||
|
||||
<p class="img">
|
||||
<img width="200" src="https://home-assistant.io/images/blog/2016-04-ibeacons/owntracks_beacon_setup.png" />
|
||||
<p class='img'>
|
||||
<img width='200' src='https://home-assistant.io/images/blog/2016-04-ibeacons/owntracks_beacon_setup.png'>
|
||||
</p>
|
||||
|
||||
<p>Once you’ve added the iBeacon - you should be able to see it on the OwnTracks region screen. If your phone can see the packets from that beacon, OwnTracks will turn the relevant Region red.</p>
|
||||
Once you’ve added the iBeacon - you should be able to see it on the OwnTracks region screen. If your phone can see the packets from that beacon, OwnTracks will turn the relevant Region red.
|
||||
|
||||
<p>Because you turned <em>Share</em> on for the region, when OwnTracks sees the beacon it will send HA a message. HA will use this message to add the beacon as a tracked device if it hasn’t seen it before. So you should see a new device appear in HA called device_tracker.beacon_[name] - and its location will be where your phone thought it was when it last saw the beacon.</p>
|
||||
Because you turned *Share* on for the region, when OwnTracks sees the beacon it will send HA a message. HA will use this message to add the beacon as a tracked device if it hasn’t seen it before. So you should see a new device appear in HA called device_tracker.beacon_[name] - and its location will be where your phone thought it was when it last saw the beacon.
|
||||
|
||||
<p class="img">
|
||||
<img width="200" src="https://home-assistant.io/images/blog/2016-05-ibeacons/keys_device.png" />
|
||||
<p class='img'>
|
||||
<img width='200' src='https://home-assistant.io/images/blog/2016-05-ibeacons/keys_device.png'>
|
||||
</p>
|
||||
|
||||
<p>If your phone moves and sends HA a new location while it is still in range of the beacon - HA will update the location of the beacon. So if go for a drive in your car - you will see both your phone and the <em>device_tracker.beacon_car</em> move together.</p>
|
||||
If your phone moves and sends HA a new location while it is still in range of the beacon - HA will update the location of the beacon. So if go for a drive in your car - you will see both your phone and the *device_tracker.beacon_car* move together.
|
||||
|
||||
<p>If you park your car and go shopping - <em>device_tracker.beacon_car</em> will stop moving.</p>
|
||||
If you park your car and go shopping - *device_tracker.beacon_car* will stop moving.
|
||||
|
||||
<p>With the basic tracking working - you can use automation to do things like open your gates if your car comes home</p>
|
||||
With the basic tracking working - you can use automation to do things like open your gates if your car comes home
|
||||
|
||||
<div class="highlighter-coderay"><div class="CodeRay">
|
||||
<div class="code"><pre><span class="key">automation</span>:
|
||||
- <span class="string"><span class="content">alias: 'Open gate'</span></span>
|
||||
<span class="key">trigger</span>:
|
||||
- <span class="string"><span class="content">platform: state</span></span>
|
||||
<span class="key">entity_id</span>: <span class="string"><span class="content">device_tracker.beacon_car</span></span>
|
||||
<span class="key">from</span>: <span class="string"><span class="content">'not_home'</span></span>
|
||||
<span class="key">to</span>: <span class="string"><span class="content">'home'</span></span>
|
||||
<span class="key">condition</span>:
|
||||
- <span class="string"><span class="content">condition: state</span></span>
|
||||
<span class="key">entity_id</span>: <span class="string"><span class="content">switch.gate</span></span>
|
||||
<span class="key">state</span>: <span class="string"><span class="content">'off'</span></span>
|
||||
<span class="key">action</span>:
|
||||
<span class="key">service</span>: <span class="string"><span class="content">switch.turn_on</span></span>
|
||||
<span class="key">entity_id</span>: <span class="string"><span class="content">switch.gate</span></span>
|
||||
</pre></div>
|
||||
</div>
|
||||
</div>
|
||||
```yaml
|
||||
automation:
|
||||
- alias: 'Open gate'
|
||||
trigger:
|
||||
- platform: state
|
||||
entity_id: device_tracker.beacon_car
|
||||
from: 'not_home'
|
||||
to: 'home'
|
||||
condition:
|
||||
- condition: state
|
||||
entity_id: switch.gate
|
||||
state: 'off'
|
||||
action:
|
||||
service: switch.turn_on
|
||||
entity_id: switch.gate
|
||||
```
|
||||
|
||||
<p>Or warn you if you leave your keys behind</p>
|
||||
Or warn you if you leave your keys behind
|
||||
|
||||
<div class="highlighter-coderay"><div class="CodeRay">
|
||||
<div class="code"><pre><span class="key">automation</span>:
|
||||
- <span class="string"><span class="content">alias: 'Forgotten keys'</span></span>
|
||||
<span class="key">trigger</span>:
|
||||
<span class="key">platform</span>: <span class="string"><span class="content">template</span></span>
|
||||
<span class="key">value_template</span>: <span class="string"><span class="content">'{{states.device_tracker.greg_gregphone.state != states.device_tracker.beacon_keys.state}}'</span></span>
|
||||
<span class="key">condition</span>:
|
||||
<span class="key">condition</span>: <span class="string"><span class="content">template</span></span>
|
||||
<span class="key">value_template</span>: <span class="string"><span class="content">'{{ states.device_tracker.greg_gregphone.state != "home" }}'</span></span>
|
||||
<span class="key">action</span>:
|
||||
<span class="key">service</span>: <span class="string"><span class="content">script.turn_on</span></span>
|
||||
<span class="key">entity_id</span>: <span class="string"><span class="content">script.send_key_alert</span></span>
|
||||
```yaml
|
||||
automation:
|
||||
- alias: 'Forgotten keys'
|
||||
trigger:
|
||||
platform: template
|
||||
value_template: '{{ states.device_tracker.greg_gregphone.state != states.device_tracker.beacon_keys.state}}'
|
||||
condition:
|
||||
condition: template
|
||||
value_template: '{{ states.device_tracker.greg_gregphone.state != "home" }}'
|
||||
action:
|
||||
service: script.turn_on
|
||||
entity_id: script.send_key_alert
|
||||
|
||||
- <span class="string"><span class="content">alias: 'Forgotten keys - cancel'</span></span>
|
||||
<span class="key">trigger</span>:
|
||||
<span class="key">platform</span>: <span class="string"><span class="content">template</span></span>
|
||||
<span class="key">value_template</span>: <span class="string"><span class="content">'{{states.device_tracker.greg_gregphone.state == states.device_tracker.beacon_keys.state}}'</span></span>
|
||||
<span class="key">condition</span>:
|
||||
- <span class="string"><span class="content">condition: state</span></span>
|
||||
<span class="key">entity_id</span>: <span class="string"><span class="content">script.send_key_alert</span></span>
|
||||
<span class="key">state</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">script.turn_off</span></span>
|
||||
<span class="key">entity_id</span>: <span class="string"><span class="content">script.send_key_alert</span></span>
|
||||
</pre></div>
|
||||
</div>
|
||||
</div>
|
||||
- alias: 'Forgotten keys - cancel'
|
||||
trigger:
|
||||
platform: template
|
||||
value_template: '{{ states.device_tracker.greg_gregphone.state == states.device_tracker.beacon_keys.state }}'
|
||||
condition:
|
||||
- condition: state
|
||||
entity_id: script.send_key_alert
|
||||
state: 'on'
|
||||
action:
|
||||
service: script.turn_off
|
||||
entity_id: script.send_key_alert
|
||||
```
|
||||
|
||||
<div class="highlighter-coderay"><div class="CodeRay">
|
||||
<div class="code"><pre><span class="key">script</span>:
|
||||
<span class="key">send_key_alert</span>:
|
||||
<span class="key">sequence</span>:
|
||||
- <span class="string"><span class="content">delay:</span><span class="content">
|
||||
minutes: 2</span></span>
|
||||
- <span class="string"><span class="content">service: notify.notify</span></span>
|
||||
<span class="key">data</span>:
|
||||
<span class="key">message</span>: <span class="string"><span class="content">'You forgot your keys'</span></span>
|
||||
<span class="key">target</span>: <span class="string"><span class="content">'device/gregs_iphone'</span></span>
|
||||
</pre></div>
|
||||
</div>
|
||||
</div>
|
||||
```yaml
|
||||
script:
|
||||
send_key_alert:
|
||||
sequence:
|
||||
- delay:
|
||||
minutes: 2
|
||||
- service: notify.notify
|
||||
data:
|
||||
message: 'You forgot your keys'
|
||||
target: 'device/gregs_iphone'
|
||||
```
|
||||
|
||||
<p>(The delay is needed for two reasons: -<br />
|
||||
1. HA updates the beacon and phone locations at slightly different times - so you don’t want the automation to trigger in the gap between the updates<br />
|
||||
2. I’ve found that beacons (especially the low power Estimote Nearables) can get disconnected for a few seconds so it’s best to wait a minute or so before deciding that you’ve left your keys behind)</p>
|
||||
|
||||
<h3><a class='title-link' name='using-both-types-of-ibeacons-at-the-same-time' href='#using-both-types-of-ibeacons-at-the-same-time'></a> Using both types of iBeacons at the same time </h3>
|
||||
<p>Of course you can use both fixed and mobile beacons at the same time. I want my gates to open when I arrive home in the car - so I use an iBeacon in the car so that I can track the car, and a iBeacon on my drive so that a location update is triggered when I arrive. I’ve been experimenting with a high power beacon in a waterproof box on my drive which seems to work well to notice when I get home.</p>
|
||||
(The delay is needed for two reasons: -
|
||||
1. HA updates the beacon and phone locations at slightly different times - so you don’t want the automation to trigger in the gap between the updates
|
||||
2. I’ve found that beacons (especially the low power Estimote Nearables) can get disconnected for a few seconds so it’s best to wait a minute or so before deciding that you’ve left your keys behind)
|
||||
|
||||
<p class="img">
|
||||
<img width="300" src="http://bluesensenetworks.com/wp-content/uploads/2015/02/BlueBar-Beacon-Long-Range.jpg" />
|
||||
|
||||
### <a class='title-link' name='using-both-types-of-ibeacons-at-the-same-time' href='#using-both-types-of-ibeacons-at-the-same-time'></a> Using both types of iBeacons at the same time
|
||||
Of course you can use both fixed and mobile beacons at the same time. I want my gates to open when I arrive home in the car - so I use an iBeacon in the car so that I can track the car, and a iBeacon on my drive so that a location update is triggered when I arrive. I've been experimenting with a high power beacon in a waterproof box on my drive which seems to work well to notice when I get home.
|
||||
|
||||
<p class='img'>
|
||||
<img width='300' src='http://bluesensenetworks.com/wp-content/uploads/2015/02/BlueBar-Beacon-Long-Range.jpg'>
|
||||
</p>
|
||||
<p>Long range / High power beacon</p>
|
||||
Long range / High power beacon
|
||||
|
||||
<p class="img">
|
||||
<img width="400" src="http://bluesensenetworks.com/wp-content/uploads/2015/02/BlueBar-Beacon-Weatherproof.jpg" />
|
||||
<p class='img'>
|
||||
<img width='400' src='http://bluesensenetworks.com/wp-content/uploads/2015/02/BlueBar-Beacon-Weatherproof.jpg'>
|
||||
</p>
|
||||
<p>Waterproof beacon</p>
|
||||
Waterproof beacon
|
||||
|
||||
<h3><a class='title-link' name='buying-beacons' href='#buying-beacons'></a> Buying Beacons </h3>
|
||||
<p>This isn’t a buyer’s guide, but I just wanted to mention the iBeacons I’ve been using. I think you should be able to use any iBeacon with HA and OwnTracks. You generally can’t buy beacons in your local electronics shop - so I just wanted to briefly mention the two suppliers I’ve used so far.</p>
|
||||
|
||||
<p>I’ve bought quite a few iBeacons from a company called <a href="http://bluesensenetworks.com/">Blue Sense Networks</a>. I work in the tech startup sector in the UK so I partly chose them because they are a local start-up who seemed worth supporting. The products, support and software all seem good. I use a number of their beacons - from a simple USB dongle, to a long range beacon. All their products have batteries that can be changed (or no batteries in the case of the externally powered USB device) - and you can configure all the parameters you’d want to using their software. I had one software issue, support got back to me at a weekend(!) - and the issue was resolved with a software release two days later.</p>
|
||||
### <a class='title-link' name='buying-beacons' href='#buying-beacons'></a> Buying Beacons
|
||||
This isn’t a buyer's guide, but I just wanted to mention the iBeacons I’ve been using. I think you should be able to use any iBeacon with HA and OwnTracks. You generally can’t buy beacons in your local electronics shop - so I just wanted to briefly mention the two suppliers I’ve used so far.
|
||||
|
||||
<p>All the beacons seem fine - and the long range unit does work over a longer range than my other beacons.</p>
|
||||
I’ve bought quite a few iBeacons from a company called [Blue Sense Networks](http://bluesensenetworks.com/). I work in the tech startup sector in the UK so I partly chose them because they are a local start-up who seemed worth supporting. The products, support and software all seem good. I use a number of their beacons - from a simple USB dongle, to a long range beacon. All their products have batteries that can be changed (or no batteries in the case of the externally powered USB device) - and you can configure all the parameters you’d want to using their software. I had one software issue, support got back to me at a weekend(!) - and the issue was resolved with a software release two days later.
|
||||
|
||||
<p>I bought some other beacons from a US/Polish startup called <a href="http://estimote.com/">Estimote</a>, who I think are better known. I bought a developer pack of 10 of their <em>nearables</em> which as well as being iBeacons also send out other data (orientation and motion) using their own protocol. This is interesting if you’re developing your own application, but for OwnTracks and HA they are just regular beacons. They are small and self adhesive - so you can stick them to things (like your keys). You can’t change all the parameters on these devices (UUID/Major/Minor are fixed) - and the batteries can’t be replaced. I also killed one of the estimote beacons (I assume the battery died) after I carried it around for a few months and dropped it many times! On the other hand they are well priced, small and waterproof!</p>
|
||||
All the beacons seem fine - and the long range unit does work over a longer range than my other beacons.
|
||||
|
||||
<p>I’ve mainly used these as <em>devices to track</em> rather that <em>location</em> beacons. Estimote also sell some slightly larger iBeacons with replaceable batteries. Estimote support responded quickly and were helpful when I couldn’t work out how to edit their beacon’s parameters (although the answer was <em>you can’t yet</em>).</p>
|
||||
I bought some other beacons from a US/Polish startup called [Estimote](http://estimote.com/), who I think are better known. I bought a developer pack of 10 of their *nearables* which as well as being iBeacons also send out other data (orientation and motion) using their own protocol. This is interesting if you’re developing your own application, but for OwnTracks and HA they are just regular beacons. They are small and self adhesive - so you can stick them to things (like your keys). You can’t change all the parameters on these devices (UUID/Major/Minor are fixed) - and the batteries can’t be replaced. I also killed one of the estimote beacons (I assume the battery died) after I carried it around for a few months and dropped it many times! On the other hand they are well priced, small and waterproof!
|
||||
|
||||
<p>The larger Blue Sense Network beacons seem to be better at maintaining a connection that the Estimotes - although that might be because I’m reluctant to turn the power to maximum and reduce the gap between sending packets on the Estimotes where I can’t replace the batteries!</p>
|
||||
I’ve mainly used these as *devices to track* rather that *location* beacons. Estimote also sell some slightly larger iBeacons with replaceable batteries. Estimote support responded quickly and were helpful when I couldn’t work out how to edit their beacon’s parameters (although the answer was *you can’t yet*).
|
||||
|
||||
<h3><a class='title-link' name='conclusion' href='#conclusion'></a> Conclusion </h3>
|
||||
<p>As I said in <a href="/blog/2016/04/30/ibeacons-part-1-making-presence-detection-work-better">part 1</a>, I’ve found iBeacons to be a good way of improving presence detection. I also used them to track devices like my car and my keys that can’t track themselves.</p>
|
||||
The larger Blue Sense Network beacons seem to be better at maintaining a connection that the Estimotes - although that might be because I’m reluctant to turn the power to maximum and reduce the gap between sending packets on the Estimotes where I can’t replace the batteries!
|
||||
|
||||
<p>I’m still experimenting, so I hope I can do more with iBeacons. I hope I’ve encouraged you do so the same. If you do please share your experiences.</p>
|
||||
### <a class='title-link' name='conclusion' href='#conclusion'></a> Conclusion
|
||||
As I said in [part 1](/blog/2016/04/30/ibeacons-part-1-making-presence-detection-work-better), I’ve found iBeacons to be a good way of improving presence detection. I also used them to track devices like my car and my keys that can’t track themselves.
|
||||
|
||||
<h3><a class='title-link' name='notes' href='#notes'></a> Notes </h3>
|
||||
I'm still experimenting, so I hope I can do more with iBeacons. I hope I've encouraged you do so the same. If you do please share your experiences.
|
||||
|
||||
### <a class='title-link' name='notes' href='#notes'></a> Notes
|
||||
|
||||
Please see the [notes at the end of Part 1](/blog/2016/04/30/ibeacons-part-1-making-presence-detection-work-better/#tips) for documentation information.
|
||||
|
||||
<p>Please see the <a href="/blog/2016/04/30/ibeacons-part-1-making-presence-detection-work-better/#tips">notes at the end of Part 1</a> for documentation information.</p>
|
||||
|
||||
]]></content>
|
||||
</entry>
|
||||
|
@ -174,137 +173,134 @@
|
|||
<link href="https://home-assistant.io/blog/2016/04/30/ibeacons-part-1-making-presence-detection-work-better/"/>
|
||||
<updated>2016-04-30T06:50:09+00:00</updated>
|
||||
<id>https://home-assistant.io/blog/2016/04/30/ibeacons-part-1-making-presence-detection-work-better</id>
|
||||
<content type="html"><._
|
||||
|
||||
<p>In 2013 Apple introduced iBeacons: a class of Bluetooth low energy (LE) devices that broadcast their identifier to nearby devices, including most smartphones. At first glance it’s hard to imagine why they might be useful. In this two part blog I’ll try and explain why they are useful and how you can use them with Home Assistant.</p>
|
||||
In 2013 Apple introduced iBeacons: a class of Bluetooth low energy (LE) devices that broadcast their identifier to nearby devices, including most smartphones. At first glance it’s hard to imagine why they might be useful. In this two part blog I’ll try and explain why they are useful and how you can use them with Home Assistant.
|
||||
|
||||
<p>The reason I started using iBeacons was to improve presence detection (and I think that’s the case with most people) so that’s what I’ll discuss in <em>part 1</em>. In <em>part 2</em> I’ll talk about using iBeacons to track devices that can’t track themselves.</p>
|
||||
The reason I started using iBeacons was to improve presence detection (and I think that’s the case with most people) so that's what I’ll discuss in _part 1_. In _part 2_ I’ll talk about using iBeacons to track devices that can’t track themselves.
|
||||
|
||||
<h3><a class='title-link' name='using-beacons-to-improve-owntracks-location-data' href='#using-beacons-to-improve-owntracks-location-data'></a> Using beacons to improve OwnTracks location data </h3>
|
||||
### <a class='title-link' name='using-beacons-to-improve-owntracks-location-data' href='#using-beacons-to-improve-owntracks-location-data'></a> Using beacons to improve OwnTracks location data
|
||||
|
||||
<p>When you use OwnTracks in standard <em>major move</em> mode (which is kind to your phone battery) it sometimes fails to update when you’d like it to. In my case I found that it would often send a location update as I was on my way home, but then not update when I got home. The result would be that Home Assistant would think I was 500M away from home, and take quite a while to notice I was home. It would also mean that the automation that should turn on my lights when I got home didn’t work very well! There were a few times when my phone location updated at 2am and turned the lights on for me. Fortunately my wife is very patient!</p>
|
||||
When you use OwnTracks in standard _major move_ mode (which is kind to your phone battery) it sometimes fails to update when you’d like it to. In my case I found that it would often send a location update as I was on my way home, but then not update when I got home. The result would be that Home Assistant would think I was 500M away from home, and take quite a while to notice I was home. It would also mean that the automation that should turn on my lights when I got home didn’t work very well! There were a few times when my phone location updated at 2am and turned the lights on for me. Fortunately my wife is very patient!
|
||||
|
||||
<p>Luckily, OwnTracks supports iBeacons so I could use them to make presence detection more reliable. When OwnTracks sees a beacon it recognises, it will send an update. This means that if you put a beacon at your front door - OwnTracks will see it within a few seconds of you arriving home - and send an update saying it has seen this iBeacon.</p>
|
||||
Luckily, OwnTracks supports iBeacons so I could use them to make presence detection more reliable. When OwnTracks sees a beacon it recognises, it will send an update. This means that if you put a beacon at your front door - OwnTracks will see it within a few seconds of you arriving home - and send an update saying it has seen this iBeacon.
|
||||
|
||||
<!--more-->
|
||||
|
||||
<h3><a class='title-link' name='getting-started' href='#getting-started'></a> Getting Started </h3>
|
||||
### <a class='title-link' name='getting-started' href='#getting-started'></a> Getting Started
|
||||
|
||||
<p>To do this you first need to set up <a href="/components/mqtt/#picking-a-broker">MQTT</a> and <a href="/components/device_tracker.owntracks/">OwnTracks</a> in Home assistant - and make sure that HA can track your phone.</p>
|
||||
To do this you first need to set up [MQTT] and [OwnTracks] in Home assistant - and make sure that HA can track your phone.
|
||||
|
||||
<p>You then have to (A) tell Home Assistant where the beacon is located and (B) tell OwnTracks to recognise the beacon.</p>
|
||||
[MQTT]: /components/mqtt/#picking-a-broker
|
||||
[OwnTracks]: /components/device_tracker.owntracks/
|
||||
|
||||
<h4><a class='title-link' name='a-tell-home-assistant-where-your-beacon-is-located' href='#a-tell-home-assistant-where-your-beacon-is-located'></a> A. Tell Home Assistant where your beacon is located </h4>
|
||||
You then have to (A) tell Home Assistant where the beacon is located and (B) tell OwnTracks to recognise the beacon.
|
||||
|
||||
<p>You tell HomeAssistant about fixed locations by creating a Zone with the longitude and latitude of your beacon. You should also give the zone a name which you will also use when you set up OwnTracks. An an example this zone specifies the location of my drive way.</p>
|
||||
#### <a class='title-link' name='a-tell-home-assistant-where-your-beacon-is-located' href='#a-tell-home-assistant-where-your-beacon-is-located'></a> A. Tell Home Assistant where your beacon is located
|
||||
|
||||
<p><strong>Example <code>configuration.yaml</code> entry</strong></p>
|
||||
You tell HomeAssistant about fixed locations by creating a Zone with the longitude and latitude of your beacon. You should also give the zone a name which you will also use when you set up OwnTracks. An an example this zone specifies the location of my drive way.
|
||||
|
||||
<div class="highlighter-coderay"><div class="CodeRay">
|
||||
<div class="code"><pre>
|
||||
<span class="key">zone</span>:
|
||||
- <span class="string"><span class="content">name: 'Drive'</span></span>
|
||||
<span class="key">latitude</span>: <span class="string"><span class="content">XXX</span></span>
|
||||
<span class="key">longitude</span>: <span class="string"><span class="content">YYY</span></span>
|
||||
<span class="key">radius</span>: <span class="string"><span class="content">100</span></span>
|
||||
</pre></div>
|
||||
</div>
|
||||
</div>
|
||||
**Example `configuration.yaml` entry**
|
||||
|
||||
<p>The radius isn’t used by the beacon code, but it is used by the GPS location sensing code. I’ll come back to this a little later. For now just use 50 or 100.</p>
|
||||
````yaml
|
||||
|
||||
<p>Once you’ve created the zone - you need to restart HA. The next step is:-</p>
|
||||
zone:
|
||||
- name: 'Drive'
|
||||
latitude: XXX
|
||||
longitude: YYY
|
||||
radius: 100
|
||||
````
|
||||
|
||||
<h4><a class='title-link' name='b-tell-owntracks-to-track--your-beacon' href='#b-tell-owntracks-to-track--your-beacon'></a> B. Tell OwnTracks to track your beacon </h4>
|
||||
The radius isn’t used by the beacon code, but it is used by the GPS location sensing code. I’ll come back to this a little later. For now just use 50 or 100.
|
||||
|
||||
<ol>
|
||||
<li>Go to the OwnTracks app on your phone</li>
|
||||
<li>Touch the <code>Regions</code> menu at the bottom of the screen</li>
|
||||
<li>Touch the <code>+</code> symbol at the top right of the screen</li>
|
||||
<li>Give the beacon a name e.g. <code>-drive</code> ’(start the name with a <code>-</code> see below for the reason)</li>
|
||||
<li>Turn Share to <code>On</code></li>
|
||||
<li>Skip the <code>Circular Region</code> section</li>
|
||||
<li>Enter the <code>UUID</code> of your beacon - this may be written on your beacon - or you can copy it from the management app that came with your iBeacon device. It’s a long number – so it’s easier to copy if you can!</li>
|
||||
<li>Enter the <code>Minor</code> and <code>Major</code> numbers for your iBeacon - or leave them at 0 which will match all beacons with that <code>UUID</code></li>
|
||||
</ol>
|
||||
Once you’ve created the zone - you need to restart HA. The next step is:-
|
||||
|
||||
<p class="img">
|
||||
<img width="200" border="2" src="https://home-assistant.io/images/blog/2016-04-ibeacons/owntracks_beacon_setup.png" />
|
||||
#### <a class='title-link' name='b-tell-owntracks-to-track--your-beacon' href='#b-tell-owntracks-to-track--your-beacon'></a> B. Tell OwnTracks to track your beacon
|
||||
|
||||
1. Go to the OwnTracks app on your phone
|
||||
2. Touch the `Regions` menu at the bottom of the screen
|
||||
3. Touch the `+` symbol at the top right of the screen
|
||||
4. Give the beacon a name e.g. `-drive` ’(start the name with a `-` see below for the reason)
|
||||
5. Turn Share to `On`
|
||||
6. Skip the `Circular Region` section
|
||||
7. Enter the `UUID` of your beacon - this may be written on your beacon - or you can copy it from the management app that came with your iBeacon device. It’s a long number – so it’s easier to copy if you can!
|
||||
8. Enter the `Minor` and `Major` numbers for your iBeacon - or leave them at 0 which will match all beacons with that `UUID`
|
||||
|
||||
<p class='img'>
|
||||
<img width='200' border='2' src='https://home-assistant.io/images/blog/2016-04-ibeacons/owntracks_beacon_setup.png'>
|
||||
</p>
|
||||
|
||||
<p>Once you’ve added the iBeacon - you should be able to see it on the OwnTracks region screen. If your phone can see the packets from that beacon, OwnTracks will turn the relevant Region red.</p>
|
||||
Once you’ve added the iBeacon - you should be able to see it on the OwnTracks region screen. If your phone can see the packets from that beacon, OwnTracks will turn the relevant Region red.
|
||||
|
||||
<p class="img">
|
||||
<img width="200" src="https://home-assistant.io/images/blog/2016-04-ibeacons/owntracks_red_beacon.png" />
|
||||
<p class='img'>
|
||||
<img width='200' src='https://home-assistant.io/images/blog/2016-04-ibeacons/owntracks_red_beacon.png'>
|
||||
</p>
|
||||
|
||||
<p>When OwnTracks sees the beacon (and turns the region red), it also sends an MQTT packet to HA to say that you have entered that region.</p>
|
||||
When OwnTracks sees the beacon (and turns the region red), it also sends an MQTT packet to HA to say that you have entered that region.
|
||||
|
||||
<p>The result of the configuration above would be to set the location of device.phone to <code>Drive</code> , (and the GPS location to XXX,YYY) when your phone sees the beacon.</p>
|
||||
The result of the configuration above would be to set the location of device.phone to `Drive` , (and the GPS location to XXX,YYY) when your phone sees the beacon.
|
||||
|
||||
<p>So with the steps above you should be able to improve the reliability of tracking your phone - and send timely updates to HA. I did this for my home - and the lights now turn on before I reach the house on foot. If I arrive by car they turn on within a few seconds of arriving, before I can get to the front door.</p>
|
||||
So with the steps above you should be able to improve the reliability of tracking your phone - and send timely updates to HA. I did this for my home - and the lights now turn on before I reach the house on foot. If I arrive by car they turn on within a few seconds of arriving, before I can get to the front door.
|
||||
|
||||
<p>I’m also pleased to say I no longer get an <em>arrive home</em> event at 2am that turns the lights on. I hope I’ve convinced you that iBeacons are worth trying!</p>
|
||||
I’m also pleased to say I no longer get an _arrive home_ event at 2am that turns the lights on. I hope I’ve convinced you that iBeacons are worth trying!
|
||||
|
||||
<h3><a class='title-link' name='mixing-beacons-and-gps-locations' href='#mixing-beacons-and-gps-locations'></a> Mixing Beacons and GPS locations </h3>
|
||||
### <a class='title-link' name='mixing-beacons-and-gps-locations' href='#mixing-beacons-and-gps-locations'></a> Mixing Beacons and GPS locations
|
||||
|
||||
<p>You will probably use beacons to make entry into your existing GPS zones more reliable. By default either a beacon or a GPS location can cause you to enter a zone - and HA has some logic that should make them two work well together (it ignores GPS updates when you’re in an iBeacon Zone).</p>
|
||||
You will probably use beacons to make entry into your existing GPS zones more reliable. By default either a beacon or a GPS location can cause you to enter a zone - and HA has some logic that should make them two work well together (it ignores GPS updates when you’re in an iBeacon Zone).
|
||||
|
||||
<p>However you can also use beacons for situations where GPS doesn’t work well.</p>
|
||||
However you can also use beacons for situations where GPS doesn’t work well.
|
||||
|
||||
<p>This might be because the zones are too close together - or even on top of each other!<br />
|
||||
For example, my wife works next door - and I couldn’t detect whether she’s at home or in the office via GPS because the accuracy wasn’t high enough. However I can do this by using two beacons.</p>
|
||||
This might be because the zones are too close together - or even on top of each other!
|
||||
For example, my wife works next door - and I couldn’t detect whether she’s at home or in the office via GPS because the accuracy wasn’t high enough. However I can do this by using two beacons.
|
||||
|
||||
<p>To make this type of presence detection work you need to turn GPS off for a zone in Home Assistant by making them <code>passive</code>. This is important because otherwise HA will try to decide between two close together zones without enough data. This doesn’t work well.</p>
|
||||
To make this type of presence detection work you need to turn GPS off for a zone in Home Assistant by making them `passive`. This is important because otherwise HA will try to decide between two close together zones without enough data. This doesn’t work well.
|
||||
|
||||
<p>A passive zone can only be entered via an iBeacon, so a GPS location update will always pick the other zone.</p>
|
||||
A passive zone can only be entered via an iBeacon, so a GPS location update will always pick the other zone.
|
||||
|
||||
<p>I set up my Home zone to be a standard region, and my office zone to be passive, so the home zone can be entered in the normal way via either GPS or a Beacon.</p>
|
||||
I set up my Home zone to be a standard region, and my office zone to be passive, so the home zone can be entered in the normal way via either GPS or a Beacon.
|
||||
|
||||
<p><strong>Example <code>configuration.yaml</code> entry</strong></p>
|
||||
**Example `configuration.yaml` entry**
|
||||
|
||||
<div class="highlighter-coderay"><div class="CodeRay">
|
||||
<div class="code"><pre>
|
||||
<span class="key">zone</span>:
|
||||
- <span class="string"><span class="content">name: 'Office'</span></span>
|
||||
<span class="key">latitude</span>: <span class="string"><span class="content">XXX</span></span>
|
||||
<span class="key">longitude</span>: <span class="string"><span class="content">YYY</span></span>
|
||||
<span class="key">radius</span>: <span class="string"><span class="content">3</span></span>
|
||||
<span class="key">passive</span>: <span class="string"><span class="content">true</span></span>
|
||||
</pre></div>
|
||||
</div>
|
||||
</div>
|
||||
````yaml
|
||||
|
||||
<p>You could use this technique to try to detect which room someone is in. This might allow you to notice whether someone is in the living room or the bedroom - even though one is above the other (although beacon packets do pass through walls and floors).</p>
|
||||
zone:
|
||||
- name: 'Office'
|
||||
latitude: XXX
|
||||
longitude: YYY
|
||||
radius: 3
|
||||
passive: true
|
||||
````
|
||||
|
||||
<p>To get this to work you’ll probably need to experiment with the beacon signal strength to try to match the beacon reception area to the location you want to track. Let me know if you get this to work (it doesn’t make sense in my open plan house)</p>
|
||||
You could use this technique to try to detect which room someone is in. This might allow you to notice whether someone is in the living room or the bedroom - even though one is above the other (although beacon packets do pass through walls and floors).
|
||||
|
||||
<h3><a class='title-link' name='conclusion' href='#conclusion'></a> Conclusion </h3>
|
||||
To get this to work you’ll probably need to experiment with the beacon signal strength to try to match the beacon reception area to the location you want to track. Let me know if you get this to work (it doesn’t make sense in my open plan house)
|
||||
|
||||
<p>Presence tracking sounds easy - and it’s an important part of Home Automation. Trying it shows how difficult it is to get presence detection right. I’ve found that iBeacons have improved the reliability and timeliness of knowing where I am, and I hope I encouraged you to try them too.</p>
|
||||
### <a class='title-link' name='conclusion' href='#conclusion'></a> Conclusion
|
||||
|
||||
<h3><a class='title-link' name='tips' href='#tips'></a> Tips </h3>
|
||||
Presence tracking sounds easy - and it's an important part of Home Automation. Trying it shows how difficult it is to get presence detection right. I've found that iBeacons have improved the reliability and timeliness of knowing where I am, and I hope I encouraged you to try them too.
|
||||
|
||||
<p>You can find out more about configuring the OwnTracks application and beacons <a href="http://owntracks.org/booklet/features/beacons/">here</a></p>
|
||||
### <a class='title-link' name='tips' href='#tips'></a> Tips
|
||||
|
||||
<p>There is information about configuring Homeassistant to use beacons <a href="https://home-assistant.io/components/device_tracker.owntracks/">here</a></p>
|
||||
You can find out more about configuring the OwnTracks application and beacons [here](http://owntracks.org/booklet/features/beacons/)
|
||||
|
||||
<h4><a class='title-link' name='connections-and-disconnecting' href='#connections-and-disconnecting'></a> Connections and disconnecting </h4>
|
||||
There is information about configuring Homeassistant to use beacons [here](https://home-assistant.io/components/device_tracker.owntracks/)
|
||||
|
||||
<p>Owntracks treats a region name with a leading <code>-</code> as a hint that it shouldn’t disconnect after a single missed packet. This improves the ability to keep a connection to a beacon.</p>
|
||||
#### <a class='title-link' name='connections-and-disconnecting' href='#connections-and-disconnecting'></a> Connections and disconnecting
|
||||
|
||||
<p>However, even when using this feature I’ve noticed that you can still lose connections (although it seems to vary by beacon manufacturer and type - I’ll talk more about this in <em>part 2</em>). This means that it’s best to take into account that you may see false enter/leave events in HA. You may be able to improve this by changing how often the beacons send packets - and by increasing the signal strength (both will drain your beacon batteries more quickly). You can usually change these parameters in the app supplied by the iBeacon maker. You can also find some high power beacons (which have worked well for me).</p>
|
||||
Owntracks treats a region name with a leading `-` as a hint that it shouldn't disconnect after a single missed packet. This improves the ability to keep a connection to a beacon.
|
||||
|
||||
<p>In automations you can use a <code>for:</code> to avoid triggering during a brief disconnect, or use a script with a delay. Stay tuned for <em>part 2</em> for an example of this.</p>
|
||||
However, even when using this feature I’ve noticed that you can still lose connections (although it seems to vary by beacon manufacturer and type - I’ll talk more about this in _part 2_). This means that it's best to take into account that you may see false enter/leave events in HA. You may be able to improve this by changing how often the beacons send packets - and by increasing the signal strength (both will drain your beacon batteries more quickly). You can usually change these parameters in the app supplied by the iBeacon maker. You can also find some high power beacons (which have worked well for me).
|
||||
|
||||
<h4><a class='title-link' name='using-multiple-beacons-for-the-same-zone' href='#using-multiple-beacons-for-the-same-zone'></a> Using Multiple beacons for the same Zone </h4>
|
||||
<p>iBeacons have a <code>UUID</code> (usually set to the same value for beacons from the same manufacturer), as well as a <code>minor</code> and <code>major</code> number. If you set two beacons to have exactly same details then OwnTracks will think multiple beacons are at the same location.</p>
|
||||
In automations you can use a `for:` to avoid triggering during a brief disconnect, or use a script with a delay. Stay tuned for _part 2_ for an example of this.
|
||||
|
||||
<p>This means you can have more than one beacon around your home - and a connection to any of them will count as <code>home</code> to OwnTracks and HA. This reduces disconnections.</p>
|
||||
#### <a class='title-link' name='using-multiple-beacons-for-the-same-zone' href='#using-multiple-beacons-for-the-same-zone'></a> Using Multiple beacons for the same Zone
|
||||
iBeacons have a `UUID` (usually set to the same value for beacons from the same manufacturer), as well as a `minor` and `major` number. If you set two beacons to have exactly same details then OwnTracks will think multiple beacons are at the same location.
|
||||
|
||||
<p>You can achieve the same effect by using the same the same <code>UUID</code> but different <code>major</code> / <code>minor</code> numbers - and tell OwnTracks not to worry about the <code>minor</code> / <code>major</code> numbers for a particular region by setting them to 0).</p>
|
||||
This means you can have more than one beacon around your home - and a connection to any of them will count as `home` to OwnTracks and HA. This reduces disconnections.
|
||||
|
||||
<p><em>Make sure to also check out <a href="/blog/2016/05/26/ibeacons-how-to-track-things-that-cant-track-themselves-part-ii/">part II</a> where I talk about how to use iBeacons to track any object.</em></p>
|
||||
You can achieve the same effect by using the same the same `UUID` but different `major` / `minor` numbers - and tell OwnTracks not to worry about the `minor` / `major` numbers for a particular region by setting them to 0).
|
||||
|
||||
_Make sure to also check out [part II](/blog/2016/05/26/ibeacons-how-to-track-things-that-cant-track-themselves-part-ii/) where I talk about how to use iBeacons to track any object._
|
||||
]]></content>
|
||||
</entry>
|
||||
|
||||
|
|
|
@ -238,7 +238,7 @@
|
|||
|
||||
|
||||
<li class="post">
|
||||
<a href="/blog/2016/08/13/foursquare-fast-com-ffmpeg-gpsd/">0.26: Foursquare, Fast.com, FFMPEG and GPSD</a>
|
||||
<a href="/blog/2016/08/13/foursquare-fast.com-ffmpeg-gpsd/">0.26: Foursquare, Fast.com, FFMPEG and GPSD</a>
|
||||
</li>
|
||||
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
<title><![CDATA[Category: Internet-of-Things | Home Assistant]]></title>
|
||||
<link href="https://home-assistant.io/blog/categories/internet-of-things/atom.xml" rel="self"/>
|
||||
<link href="https://home-assistant.io/"/>
|
||||
<updated>2016-08-22T07:26:42+00:00</updated>
|
||||
<updated>2016-08-22T08:20:27+00:00</updated>
|
||||
<id>https://home-assistant.io/</id>
|
||||
<author>
|
||||
<name><![CDATA[Home Assistant]]></name>
|
||||
|
@ -18,18 +18,22 @@
|
|||
<link href="https://home-assistant.io/blog/2016/04/05/your-hub-should-be-local-and-open/"/>
|
||||
<updated>2016-04-05T04:11:00+00:00</updated>
|
||||
<id>https://home-assistant.io/blog/2016/04/05/your-hub-should-be-local-and-open</id>
|
||||
<content type="html"><![CDATA[<p>Today the news spread that Google will be <a href="https://medium.com/@arlogilbert/the-time-that-tony-fadell-sold-me-a-container-of-hummus-cb0941c762c1#.rmppks86a">shutting down the Revolv hubs</a>. And shutting down here doesn’t mean they stop selling or supporting them - no, they are sending an update to each hub to turn your perfectly fine home automation hub into a useless piece of plastic. The fact that this seemed like a good idea by Google astonishes me. If anything, they should have gone the same route as <a href="https://discuss.ninjablocks.com/t/ninja-blocks-whats-been-happening-whats-happening-next/3608">ninjasphere</a>: open it all up and let people decide on the fate of their <em>own</em> hub.</p>
|
||||
<content type="html"><![CDATA[Today the news spread that Google will be [shutting down the Revolv hubs][medium-revolv]. And shutting down here doesn't mean they stop selling or supporting them - no, they are sending an update to each hub to turn your perfectly fine home automation hub into a useless piece of plastic. The fact that this seemed like a good idea by Google astonishes me. If anything, they should have gone the same route as [ninjasphere]: open it all up and let people decide on the fate of their _own_ hub.
|
||||
|
||||
<p>I’ve said it <a href="/blog/2016/01/19/perfect-home-automation/#your-system-should-run-at-home-not-in-the-cloud">before</a> but I’ll repeat it again:</p>
|
||||
I've said it [before][perfect-cloud] but I'll repeat it again:
|
||||
|
||||
<blockquote>
|
||||
<p>The cloud should be treated as an extension to your smart home instead of running it.</p>
|
||||
The cloud should be treated as an extension to your smart home instead of running it.
|
||||
</blockquote>
|
||||
|
||||
<p>Your hub should not be affected when your internet breaks down or the company that sold you your hub goes out of business. It should work locally so that it can continue to work even long after the vendor goes out of business or decides to kill it. Preferably, your hub should also be open so that the community can take over development after the vendor stops caring.</p>
|
||||
Your hub should not be affected when your internet breaks down or the company that sold you your hub goes out of business. It should work locally so that it can continue to work even long after the vendor goes out of business or decides to kill it. Preferably, your hub should also be open so that the community can take over development after the vendor stops caring.
|
||||
|
||||
<p>Unless you can afford losing a product here and there, be cautious when buying IoT products that depend on the cloud from companies that are not well established. The chances are high that they go bankrupt or get acquired and closed. This however is easier said than done as <a href="http://www.gartner.com/newsroom/id/2869521">Gartner</a> predicts that by 2017, 50 percent of IoT solutions will originate in startups that are less than three years old.</p>
|
||||
Unless you can afford losing a product here and there, be cautious when buying IoT products that depend on the cloud from companies that are not well established. The chances are high that they go bankrupt or get acquired and closed. This however is easier said than done as [Gartner] predicts that by 2017, 50 percent of IoT solutions will originate in startups that are less than three years old.
|
||||
|
||||
[medium-revolv]: https://medium.com/@arlogilbert/the-time-that-tony-fadell-sold-me-a-container-of-hummus-cb0941c762c1#.rmppks86a
|
||||
[ninjasphere]: https://discuss.ninjablocks.com/t/ninja-blocks-whats-been-happening-whats-happening-next/3608
|
||||
[perfect-cloud]: /blog/2016/01/19/perfect-home-automation/#your-system-should-run-at-home-not-in-the-cloud
|
||||
[Gartner]: http://www.gartner.com/newsroom/id/2869521
|
||||
]]></content>
|
||||
</entry>
|
||||
|
||||
|
@ -38,27 +42,27 @@
|
|||
<link href="https://home-assistant.io/blog/2016/02/12/classifying-the-internet-of-things/"/>
|
||||
<updated>2016-02-12T06:31:00+00:00</updated>
|
||||
<id>https://home-assistant.io/blog/2016/02/12/classifying-the-internet-of-things</id>
|
||||
<content type="html"><![CDATA[<p>The core of home automation is knowing what’s going on. The faster we know about a state change, the better we can serve the user. If you want to have your lights to turn on when you arrive at home, it doesn’t help if it only knows about it after you’ve already opened the door and manually (!!) turned on the light.</p>
|
||||
<content type="html"><![CDATA[The core of home automation is knowing what’s going on. The faster we know about a state change, the better we can serve the user. If you want to have your lights to turn on when you arrive at home, it doesn’t help if it only knows about it after you’ve already opened the door and manually (!!) turned on the light.
|
||||
|
||||
<p>Each smart device consists of the ‘normal’ device and the piece that makes it ‘smart’: the connectivity. The connectivity part of a device can consists of either control, state or both.</p>
|
||||
Each smart device consists of the ‘normal’ device and the piece that makes it ‘smart’: the connectivity. The connectivity part of a device can consists of either control, state or both.
|
||||
|
||||
<p>State describes what a device is up to right now. For example, a light can be on with a red color and a medium brightness.</p>
|
||||
State describes what a device is up to right now. For example, a light can be on with a red color and a medium brightness.
|
||||
|
||||
<p>Control is about controlling the smart device by sending commands via an API. These commands can vary from configuring how a device works till mimicking how a user would interact with a device. A media player can allow skipping to the next track and a sensor could allow to configure its sensitivity or polling interval.</p>
|
||||
Control is about controlling the smart device by sending commands via an API. These commands can vary from configuring how a device works till mimicking how a user would interact with a device. A media player can allow skipping to the next track and a sensor could allow to configure its sensitivity or polling interval.
|
||||
|
||||
<p>The Home Assistant APIs are setup to be as convenient as possible. However, a network is always as weak as it’s weakest link. In our case these are the integrations. Take for example controlling a light that does not report state. The only state Home Assistant can report on after sending a command is the assumed state: what do we expect the state of the light to be if the command worked.</p>
|
||||
The Home Assistant APIs are setup to be as convenient as possible. However, a network is always as weak as it’s weakest link. In our case these are the integrations. Take for example controlling a light that does not report state. The only state Home Assistant can report on after sending a command is the assumed state: what do we expect the state of the light to be if the command worked.
|
||||
|
||||
<p>We want our users to get the best home automation experience out there and this starts with making sure they have devices that work well with Home Assistant. That’s why we will start applying the following classifiers to our integrations:</p>
|
||||
We want our users to get the best home automation experience out there and this starts with making sure they have devices that work well with Home Assistant. That’s why we will start applying the following classifiers to our integrations:
|
||||
|
||||
<p><a name="classifiers"></a></p>
|
||||
<a name='classifiers'>
|
||||
<table>
|
||||
<tr>
|
||||
<th colspan="2">Classifier</th>
|
||||
<th colspan='2'>Classifier</th>
|
||||
<th>Description</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><i class="icon-adjust"></i></td>
|
||||
<td style="white-space: nowrap;">Assumed State</td>
|
||||
<td style='white-space: nowrap;'>Assumed State</td>
|
||||
<td>
|
||||
We are unable to get the state of the device. Best we can do is to assume the state based on our last command.
|
||||
</td>
|
||||
|
@ -97,124 +101,101 @@
|
|||
</tr>
|
||||
</table>
|
||||
|
||||
<p>The background to how we got to these classifiers can be read after the break.<br />
|
||||
<!--more--></p>
|
||||
The background to how we got to these classifiers can be read after the break.
|
||||
<!--more-->
|
||||
|
||||
<h2><a class='title-link' name='state' href='#state'></a> State </h2>
|
||||
## <a class='title-link' name='state' href='#state'></a> State
|
||||
|
||||
<p>How state is communicated can be broken down into 5 categories. They are not mutually exclusive - a device state can be available both via the cloud and local connectivity.</p>
|
||||
How state is communicated can be broken down into 5 categories. They are not mutually exclusive - a device state can be available both via the cloud and local connectivity.
|
||||
|
||||
<h3><a class='title-link' name='no-state-available' href='#no-state-available'></a> No state available </h3>
|
||||
<p>These are devices that do not have the capabilities to make their state available. They only allow to be controlled. For example, devices with infrared remote controls like TVs and ACs. You can press the turn on button on the remote but can only assume that your command was received and executed successfully. The device might not be powered or something is blocking the infrared receiver.</p>
|
||||
### <a class='title-link' name='no-state-available' href='#no-state-available'></a> No state available
|
||||
These are devices that do not have the capabilities to make their state available. They only allow to be controlled. For example, devices with infrared remote controls like TVs and ACs. You can press the turn on button on the remote but can only assume that your command was received and executed successfully. The device might not be powered or something is blocking the infrared receiver.
|
||||
|
||||
<p>Home automation will have to approach such devices based on the assumption that it’s commands are received correctly: using optimistic updates. This means that after sending a command it will update the state of the device as if the command was received successfully.</p>
|
||||
Home automation will have to approach such devices based on the assumption that it’s commands are received correctly: using optimistic updates. This means that after sending a command it will update the state of the device as if the command was received successfully.
|
||||
|
||||
<p>Advantages:</p>
|
||||
Advantages:
|
||||
|
||||
<ul>
|
||||
<li>None</li>
|
||||
</ul>
|
||||
- None
|
||||
|
||||
<p>Disadvantages:</p>
|
||||
Disadvantages:
|
||||
|
||||
<ul>
|
||||
<li>Home automation will assume the wrong state if the the command is not received correctly or if the device is controlled in any other way outside of the home automation system.</li>
|
||||
</ul>
|
||||
- Home automation will assume the wrong state if the the command is not received correctly or if the device is controlled in any other way outside of the home automation system.
|
||||
|
||||
<h3><a class='title-link' name='polling-the-cloud' href='#polling-the-cloud'></a> Polling the cloud </h3>
|
||||
<p>These are devices that will only report their state to their own cloud backend. The cloud backend will allow reading the state but will not notify when a new state has arrived. This requires the home automation to check frequently if the state has been updated.</p>
|
||||
### <a class='title-link' name='polling-the-cloud' href='#polling-the-cloud'></a> Polling the cloud
|
||||
These are devices that will only report their state to their own cloud backend. The cloud backend will allow reading the state but will not notify when a new state has arrived. This requires the home automation to check frequently if the state has been updated.
|
||||
|
||||
<p>Advantages:</p>
|
||||
Advantages:
|
||||
|
||||
<ul>
|
||||
<li>Able to control devices while at home or away.</li>
|
||||
<li>Cloud has access to more computing power to mine the device data to suggest optimizations to the user.</li>
|
||||
</ul>
|
||||
- Able to control devices while at home or away.
|
||||
- Cloud has access to more computing power to mine the device data to suggest optimizations to the user.
|
||||
|
||||
<p>Disadvantages:</p>
|
||||
Disadvantages:
|
||||
|
||||
<ul>
|
||||
<li>It doesn’t work if the internet is down or the company stops support.</li>
|
||||
<li>You are no longer in control about who has access to your data.</li>
|
||||
</ul>
|
||||
- It doesn’t work if the internet is down or the company stops support.
|
||||
- You are no longer in control about who has access to your data.
|
||||
|
||||
<h3><a class='title-link' name='cloud-pushing-new-state' href='#cloud-pushing-new-state'></a> Cloud pushing new state </h3>
|
||||
<p>All off the previous section applies to this one. On top of that the cloud will now notify the home automation when a new state has arrived. This means that as soon as the cloud knows, the home automation knows.</p>
|
||||
### <a class='title-link' name='cloud-pushing-new-state' href='#cloud-pushing-new-state'></a> Cloud pushing new state
|
||||
All off the previous section applies to this one. On top of that the cloud will now notify the home automation when a new state has arrived. This means that as soon as the cloud knows, the home automation knows.
|
||||
|
||||
<p>Advantages:</p>
|
||||
Advantages:
|
||||
|
||||
<ul>
|
||||
<li>New state known as soon as available in the cloud.</li>
|
||||
</ul>
|
||||
- New state known as soon as available in the cloud.
|
||||
|
||||
<h3><a class='title-link' name='polling-the-local-device' href='#polling-the-local-device'></a> Polling the local device </h3>
|
||||
<p>These devices will offer an API that is locally accessible. The home automation will have to frequently check if the state has been updated.</p>
|
||||
### <a class='title-link' name='polling-the-local-device' href='#polling-the-local-device'></a> Polling the local device
|
||||
These devices will offer an API that is locally accessible. The home automation will have to frequently check if the state has been updated.
|
||||
|
||||
<p>Advantages:</p>
|
||||
Advantages:
|
||||
|
||||
<ul>
|
||||
<li>Does not depend on the internet</li>
|
||||
</ul>
|
||||
- Does not depend on the internet
|
||||
|
||||
<p>Disadvantages:</p>
|
||||
Disadvantages:
|
||||
|
||||
<ul>
|
||||
<li>To be pollable, a device needs to be always online which requires the device to be connected to a power source.</li>
|
||||
</ul>
|
||||
- To be pollable, a device needs to be always online which requires the device to be connected to a power source.
|
||||
|
||||
<h3><a class='title-link' name='local-device-pushing-new-state' href='#local-device-pushing-new-state'></a> Local device pushing new state </h3>
|
||||
<p>The best of the best. These devices will send out a notice when they get to a new state. These devices usually use a home automation protocol to pass it’s message to a hub that will do the heavy lifting of managing and notifying subscribers</p>
|
||||
### <a class='title-link' name='local-device-pushing-new-state' href='#local-device-pushing-new-state'></a> Local device pushing new state
|
||||
The best of the best. These devices will send out a notice when they get to a new state. These devices usually use a home automation protocol to pass it’s message to a hub that will do the heavy lifting of managing and notifying subscribers
|
||||
|
||||
<p>Advantages:</p>
|
||||
Advantages:
|
||||
|
||||
<ul>
|
||||
<li>Near instant delivery of new states.</li>
|
||||
<li>Able to get a long battery life by going into deep sleep between state updates.</li>
|
||||
</ul>
|
||||
- Near instant delivery of new states.
|
||||
- Able to get a long battery life by going into deep sleep between state updates.
|
||||
|
||||
<p>Disadvantages:</p>
|
||||
Disadvantages:
|
||||
|
||||
<ul>
|
||||
<li>If it does not also support polling, home automation will not be made aware of the state after booting up until it changes.</li>
|
||||
<li>If using deep sleep and wifi, will suffer a delay when waking up because connecting to WiFi and receiving an IP takes time.</li>
|
||||
</ul>
|
||||
- If it does not also support polling, home automation will not be made aware of the state after booting up until it changes.
|
||||
- If using deep sleep and wifi, will suffer a delay when waking up because connecting to WiFi and receiving an IP takes time.
|
||||
|
||||
<h2><a class='title-link' name='control' href='#control'></a> Control </h2>
|
||||
|
||||
<p>Controlling a device can, just like state, be done through cloud and/or local connectivity. But the more important part of control is knowing if your command was a success and the new state of the device.</p>
|
||||
## <a class='title-link' name='control' href='#control'></a> Control
|
||||
|
||||
<h3><a class='title-link' name='no-control-available' href='#no-control-available'></a> No control available </h3>
|
||||
<p>These devices are not able to be controlled. They will only offer state.</p>
|
||||
Controlling a device can, just like state, be done through cloud and/or local connectivity. But the more important part of control is knowing if your command was a success and the new state of the device.
|
||||
|
||||
<h3><a class='title-link' name='poll-state-after-sending-command' href='#poll-state-after-sending-command'></a> Poll State after sending command </h3>
|
||||
<p>These devices will require the state to be polled after sending a command to see if a command was successfull.</p>
|
||||
### <a class='title-link' name='no-control-available' href='#no-control-available'></a> No control available
|
||||
These devices are not able to be controlled. They will only offer state.
|
||||
|
||||
<p>Advantages:</p>
|
||||
### <a class='title-link' name='poll-state-after-sending-command' href='#poll-state-after-sending-command'></a> Poll State after sending command
|
||||
These devices will require the state to be polled after sending a command to see if a command was successfull.
|
||||
|
||||
<ul>
|
||||
<li>The state will be known right after the command was issued.</li>
|
||||
</ul>
|
||||
Advantages:
|
||||
|
||||
<p>Disadvantages:</p>
|
||||
- The state will be known right after the command was issued.
|
||||
|
||||
<ul>
|
||||
<li>It can take time before the state gets updated. How often do we poll and how long do we wait till we consider the command failed? Also, a state may change because of other factors. Difficult to determine if the updated state is because of our command.</li>
|
||||
</ul>
|
||||
Disadvantages:
|
||||
|
||||
<h3><a class='title-link' name='device-pushes-state-update' href='#device-pushes-state-update'></a> Device pushes state update </h3>
|
||||
<p>These devices will not return a new state as a result of the command but instead will push a new state right away. The downside of this approach is that we have to assume that a state update coming in within a certain period of time after a command is related to the command.</p>
|
||||
- It can take time before the state gets updated. How often do we poll and how long do we wait till we consider the command failed? Also, a state may change because of other factors. Difficult to determine if the updated state is because of our command.
|
||||
|
||||
<h3><a class='title-link' name='command-returns-new-state' href='#command-returns-new-state'></a> Command returns new state </h3>
|
||||
<p>The very best. These devices will answer the command with the new state after executing the command.</p>
|
||||
### <a class='title-link' name='device-pushes-state-update' href='#device-pushes-state-update'></a> Device pushes state update
|
||||
These devices will not return a new state as a result of the command but instead will push a new state right away. The downside of this approach is that we have to assume that a state update coming in within a certain period of time after a command is related to the command.
|
||||
|
||||
<h2><a class='title-link' name='classifying-home-assistant' href='#classifying-home-assistant'></a> Classifying Home Assistant </h2>
|
||||
<p>Home Assistant tries to offer the best experience possible via its APIs. There are different ways of interacting with Home Assistant but all are local.</p>
|
||||
### <a class='title-link' name='command-returns-new-state' href='#command-returns-new-state'></a> Command returns new state
|
||||
The very best. These devices will answer the command with the new state after executing the command.
|
||||
|
||||
<ul>
|
||||
<li>State polling is available via the REST API</li>
|
||||
<li>There is a stream API that will push new states as soon as they arrive to subscribers. This is how the frontend is able to always stay in sync.</li>
|
||||
<li>Calling a service on Home Assistant will return all states that changed while the service was executing. This sadly does not always include the new state of devices that push their new state, as they might arrive after the service has finished.</li>
|
||||
</ul>
|
||||
## <a class='title-link' name='classifying-home-assistant' href='#classifying-home-assistant'></a> Classifying Home Assistant
|
||||
Home Assistant tries to offer the best experience possible via its APIs. There are different ways of interacting with Home Assistant but all are local.
|
||||
|
||||
- State polling is available via the REST API
|
||||
- There is a stream API that will push new states as soon as they arrive to subscribers. This is how the frontend is able to always stay in sync.
|
||||
- Calling a service on Home Assistant will return all states that changed while the service was executing. This sadly does not always include the new state of devices that push their new state, as they might arrive after the service has finished.
|
||||
]]></content>
|
||||
</entry>
|
||||
|
||||
|
@ -223,44 +204,48 @@
|
|||
<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. I’m not going to focus on protocols, networks or specific hubs. That’s all implementation details. Instead, this post will focus on what is most important: the interaction between the users and their home.</p>
|
||||
<content type="html"><![CDATA[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. I’m not going to focus on protocols, networks or specific hubs. That's all implementation details. Instead, this post will focus on what is most important: the interaction between the users and their home.
|
||||
|
||||
<h3><a class='title-link' name='you-should-not-have-to-adapt-to-technology' href='#you-should-not-have-to-adapt-to-technology'></a> You should not have to adapt to technology. </h3>
|
||||
### <a class='title-link' name='you-should-not-have-to-adapt-to-technology' href='#you-should-not-have-to-adapt-to-technology'></a> You should not have to adapt to technology.
|
||||
|
||||
<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. You’ll arrive at home at night and have to pull out your phone, open the app, let it connect and finally you’ll be able to turn on the light. All while turning the light on could have been a switch away.</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. You'll arrive at home at night and have to pull out your phone, open the app, let it connect and finally you'll be able to turn on the light. All while turning the light on could have been a switch away.
|
||||
|
||||
<p>Yes, you can solve this with presence detection. What if your phone runs out of battery? You’ll have to resort to the switch again.</p>
|
||||
Yes, you can solve this with presence detection. What if your phone runs out of battery? You’ll have to resort to the switch again.
|
||||
|
||||
<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>
|
||||
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.
|
||||
<!--more-->
|
||||
|
||||
<h3><a class='title-link' name='you-are-not-the-only-user-of-your-home-automation' href='#you-are-not-the-only-user-of-your-home-automation'></a> You are not the only user of your home automation. </h3>
|
||||
### <a class='title-link' name='you-are-not-the-only-user-of-your-home-automation' href='#you-are-not-the-only-user-of-your-home-automation'></a> You are not the only user of your home automation.
|
||||
|
||||
<p>People tend to forget that they are not the only ones in their home. As the developer of your house you’re 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>
|
||||
People tend to forget that they are not the only ones in their home. As the developer of your house you're 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>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, you’re 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>
|
||||
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, you’re 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.
|
||||
|
||||
<h3><a class='title-link' name='limit-the-impact-of-false-positives-and-negatives' href='#limit-the-impact-of-false-positives-and-negatives'></a> Limit the impact of false positives and negatives. </h3>
|
||||
### <a class='title-link' name='limit-the-impact-of-false-positives-and-negatives' href='#limit-the-impact-of-false-positives-and-negatives'></a> Limit the impact of false positives and negatives.
|
||||
|
||||
<p>With every automation, you always have to think: what will be the impact if it doesn’t work? Home automation is composed of many different systems by many different vendors that speak many different protocols: things will go wrong. It’s 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>
|
||||
With every automation, you always have to think: what will be the impact if it doesn’t work? Home automation is composed of many different systems by many different vendors that speak many different protocols: things will go wrong. It’s 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 [had a bug in the beginning of January][nest-bug] which caused it to stop heating the house, yikes!
|
||||
|
||||
<h3><a class='title-link' name='the-perfect-app-is-no-app' href='#the-perfect-app-is-no-app'></a> The perfect app is no app. </h3>
|
||||
[nest-bug]: http://www.nytimes.com/2016/01/14/fashion/nest-thermostat-glitch-battery-dies-software-freeze.html
|
||||
|
||||
<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>
|
||||
### <a class='title-link' name='the-perfect-app-is-no-app' href='#the-perfect-app-is-no-app'></a> The perfect app is no app.
|
||||
|
||||
<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>
|
||||
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>This however doesn’t mean there isn’t a place for apps, there definitely is. They are perfectly well-suited for checking in while you’re away, browsing the state changes of your house or making the lights go all funky when there are kids visiting.</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.
|
||||
|
||||
<h3><a class='title-link' name='your-system-should-run-at-home-not-in-the-cloud' href='#your-system-should-run-at-home-not-in-the-cloud'></a> Your system should run at home, not in the cloud. </h3>
|
||||
This however doesn’t mean there isn’t a place for apps, there definitely is. They are perfectly well-suited for checking in while you’re away, browsing the state changes of your house or making the lights go all funky when there are kids visiting.
|
||||
|
||||
<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 it’s 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>
|
||||
### <a class='title-link' name='your-system-should-run-at-home-not-in-the-cloud' href='#your-system-should-run-at-home-not-in-the-cloud'></a> Your system should run at home, not in the cloud.
|
||||
|
||||
<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 you’ll 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>
|
||||
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 it’s 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><strong>Good home automation never annoys but is missed when it is not working.</strong></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 you’ll avoid awkward situations like when Amazon AWS was down and the [Amazon Echo stopped working][echo-crash].
|
||||
|
||||
<p><em>Thanks to Chris LaRose for this feedback and comments.</em></p>
|
||||
[echo-crash]: http://www.zdnet.com/article/the-night-alexa-lost-her-mind/
|
||||
|
||||
**Good home automation never annoys but is missed when it is not working.**
|
||||
|
||||
*Thanks to Chris LaRose for this feedback and comments.*
|
||||
]]></content>
|
||||
</entry>
|
||||
|
||||
|
@ -269,62 +254,64 @@
|
|||
<link href="https://home-assistant.io/blog/2014/12/26/home-control-home-automation-and-the-smart-home/"/>
|
||||
<updated>2014-12-26T18:23:13+00:00</updated>
|
||||
<id>https://home-assistant.io/blog/2014/12/26/home-control-home-automation-and-the-smart-home</id>
|
||||
<content type="html"><. A thermostat smart enough to learn your schedule and adjust its own temperature accordingly.
|
||||
|
||||
<p>All this results in the following overview of Home Automation.</p>
|
||||
All this results in the following overview of Home Automation.
|
||||
|
||||
<p class="img">
|
||||
<a href="/images/architecture/home_automation_landscape.png">
|
||||
<img alt="Home Automation landscape" src="/images/architecture/home_automation_landscape.png" />
|
||||
<p class='img'>
|
||||
<a href='/images/architecture/home_automation_landscape.png'>
|
||||
<img alt='Home Automation landscape'
|
||||
src='/images/architecture/home_automation_landscape.png' />
|
||||
</a>
|
||||
Overview of the home automation landscape.
|
||||
</p>
|
||||
|
||||
<h3>Challenges</h3>
|
||||
### Challenges
|
||||
|
||||
<p>You are probably wondering, this all seems relatively simple, why don’t I have my very own smart home yet? There are a couple of challenges today that keep us from stepping into the future.</p>
|
||||
You are probably wondering, this all seems relatively simple, why don't I have my very own smart home yet? There are a couple of challenges today that keep us from stepping into the future.
|
||||
|
||||
<h4>More Internet of Things-capable devices</h4>
|
||||
#### More Internet of Things-capable devices
|
||||
|
||||
<p>The majority of the IoT products out there are either lights, switches or presence detection. That’s not enough for your home to be very smart about. We need televisions, fridges, ovens and more to join the party to increase the number of devices that we can control.</p>
|
||||
The majority of the IoT products out there are either lights, switches or presence detection. That's not enough for your home to be very smart about. We need televisions, fridges, ovens and more to join the party to increase the number of devices that we can control.
|
||||
|
||||
<h4>More data</h4>
|
||||
#### More data
|
||||
|
||||
<p>Most first generation IoT devices are only exposing information that is needed for controlling it. We need to be able to track all interactions with each device for our smart home to learn how interaction with devices influence other things. For example, we need to be able to track how many cups of coffee were made or how often the fridge was open. This will increase the information flow and open up a whole bunch of new possibilities. For example, the smart home can order new coffee when you’re running low.</p>
|
||||
Most first generation IoT devices are only exposing information that is needed for controlling it. We need to be able to track all interactions with each device for our smart home to learn how interaction with devices influence other things. For example, we need to be able to track how many cups of coffee were made or how often the fridge was open. This will increase the information flow and open up a whole bunch of new possibilities. For example, the smart home can order new coffee when you're running low.
|
||||
|
||||
<h4>Easy to use, open software that we can trust</h4>
|
||||
#### Easy to use, open software that we can trust
|
||||
|
||||
<p>To increase adoption we will need people to trust their smart home system. It will be very tough to convince people to upgrade all their devices and upload all interactions with each of them to the cloud. This data could reveal their whole life including all bad habits. That’s why such a system should be simple and open-source so people can validate that their data generated at home stays home.</p>
|
||||
To increase adoption we will need people to trust their smart home system. It will be very tough to convince people to upgrade all their devices and upload all interactions with each of them to the cloud. This data could reveal their whole life including all bad habits. That's why such a system should be simple and open-source so people can validate that their data generated at home stays home.
|
||||
|
||||
<p>Anoter important booster for adoption is that the software should be easy to set up and use by the average user. A lot of people are not burning their hands yet on Home Automation because they are scared of configurating it.</p>
|
||||
Anoter important booster for adoption is that the software should be easy to set up and use by the average user. A lot of people are not burning their hands yet on Home Automation because they are scared of configurating it.
|
||||
|
||||
<p>Home Assistant is trying to be this software. It is not there yet but trying hard. Device discovery and a user interface for configuring home automation are problems we hope to tackle in 2015 while not sacrificing any modularity or usability.</p>
|
||||
Home Assistant is trying to be this software. It is not there yet but trying hard. Device discovery and a user interface for configuring home automation are problems we hope to tackle in 2015 while not sacrificing any modularity or usability.
|
||||
|
||||
<p>Happy new year!</p>
|
||||
Happy new year!
|
||||
]]></content>
|
||||
</entry>
|
||||
|
||||
|
|
|
@ -297,7 +297,7 @@
|
|||
|
||||
|
||||
<li class="post">
|
||||
<a href="/blog/2016/08/13/foursquare-fast-com-ffmpeg-gpsd/">0.26: Foursquare, Fast.com, FFMPEG and GPSD</a>
|
||||
<a href="/blog/2016/08/13/foursquare-fast.com-ffmpeg-gpsd/">0.26: Foursquare, Fast.com, FFMPEG and GPSD</a>
|
||||
</li>
|
||||
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
<title><![CDATA[Category: IoT-Data | Home Assistant]]></title>
|
||||
<link href="https://home-assistant.io/blog/categories/iot-data/atom.xml" rel="self"/>
|
||||
<link href="https://home-assistant.io/"/>
|
||||
<updated>2016-08-22T07:26:42+00:00</updated>
|
||||
<updated>2016-08-22T08:20:27+00:00</updated>
|
||||
<id>https://home-assistant.io/</id>
|
||||
<author>
|
||||
<name><![CDATA[Home Assistant]]></name>
|
||||
|
@ -18,13 +18,17 @@
|
|||
<link href="https://home-assistant.io/blog/2016/08/19/github-style-calendar-heatmap-of-device-data/"/>
|
||||
<updated>2016-08-19T06:00:00+00:00</updated>
|
||||
<id>https://home-assistant.io/blog/2016/08/19/github-style-calendar-heatmap-of-device-data</id>
|
||||
<content type="html">< we are able to present another awesome [Jupyter notebook]. I guess that you all know the graph which Github is using to visualize your commits per day over a time-line. It's a so-called [heatmap]. If there are more commits, it's getting hotter. The latest [notebook][nb-prev] is capable to do the same thing for your devices. To be more precise, for the hours your devices are home.
|
||||
|
||||
<p class="img">
|
||||
<img src="https://home-assistant.io/images/blog/2016-08-data-exploration/heatmap.png" />
|
||||
<p class='img'>
|
||||
<img src='https://home-assistant.io/images/blog/2016-08-data-exploration/heatmap.png'>
|
||||
Heatmap
|
||||
</p>
|
||||
|
||||
[heatmap]: https://en.wikipedia.org/wiki/Heat_map
|
||||
[Jupyter notebook]: https://jupyter.org/
|
||||
[nb-prev]: http://nbviewer.jupyter.org/github/home-assistant/home-assistant-notebooks/blob/master/DataExploration-2/DataExploration-2.ipynb
|
||||
|
||||
]]></content>
|
||||
</entry>
|
||||
|
||||
|
@ -33,71 +37,74 @@ Heatmap
|
|||
<link href="https://home-assistant.io/blog/2016/07/23/internet-of-things-data-exploration-with-jupyter-notebooks/"/>
|
||||
<updated>2016-07-23T18:00:00+00:00</updated>
|
||||
<id>https://home-assistant.io/blog/2016/07/23/internet-of-things-data-exploration-with-jupyter-notebooks</id>
|
||||
<content type="html"><![CDATA[<p><em>This is the first blog post by Anton Kireyeu. A new contributor to Home Assistant who will focus on exploring and visualizing Home Assistant data.</em></p>
|
||||
<content type="html"><![CDATA[_This is the first blog post by Anton Kireyeu. A new contributor to Home Assistant who will focus on exploring and visualizing Home Assistant data._
|
||||
|
||||
<p>As we learned in the recent <a href="https://home-assistant.io/blog/2016/07/19/visualizing-your-iot-data/">blog post by Fabian</a>, all operational data of your Home Assistant application is stored locally and is available for exploration. Our first steps were querying data with the <a href="http://sqlitebrowser.org/">DB Browser for SQLite</a>, exporting the data extract as a CSV file and graphing in LibreOffice. But what else can be done with this data and what tools are there available?</p>
|
||||
As we learned in the recent [blog post by Fabian], all operational data of your Home Assistant application is stored locally and is available for exploration. Our first steps were querying data with the [DB Browser for SQLite], exporting the data extract as a CSV file and graphing in LibreOffice. But what else can be done with this data and what tools are there available?
|
||||
|
||||
<p>This post will help you get set up using a few popular data scientist tools to allow you to locally process your data:</p>
|
||||
This post will help you get set up using a few popular data scientist tools to allow you to locally process your data:
|
||||
|
||||
<ul>
|
||||
<li> <a href="http://pandas.pydata.org/">Pandas</a>: an open source tool for data analysis for Python</li>
|
||||
<li> <a href="http://matplotlib.org/">matplotlib</a>: a Python plotting library</li>
|
||||
<li> <a href="https://jupyter.org/">Jupyter notebook</a>: application for creation and sharing of documents containing live code, visualizations and explanatory text</li>
|
||||
</ul>
|
||||
- [Pandas]: an open source tool for data analysis for Python
|
||||
- [matplotlib]: a Python plotting library
|
||||
- [Jupyter notebook]: application for creation and sharing of documents containing live code, visualizations and explanatory text
|
||||
|
||||
<p class="img">
|
||||
<img src="https://home-assistant.io/images/blog/2016-07-data-exploration/graph.png" />
|
||||
<p class='img'>
|
||||
<img src='https://home-assistant.io/images/blog/2016-07-data-exploration/graph.png'>
|
||||
One of the graphs created with this tutorial.
|
||||
</p>
|
||||
|
||||
<p><em>TL; DR: Use <a href="http://nbviewer.jupyter.org/github/home-assistant/home-assistant-notebooks/blob/master/DataExploration-1/DataExploration-1.ipynb">this Jupyter Notebook</a> to visualize of your data</em></p>
|
||||
_TL; DR: Use [this Jupyter Notebook][nb-prev] to visualize of your data_
|
||||
|
||||
[blog post by Fabian]: https://home-assistant.io/blog/2016/07/19/visualizing-your-iot-data/
|
||||
[DB Browser for SQLite]: http://sqlitebrowser.org/
|
||||
[Pandas]: http://pandas.pydata.org/
|
||||
[matplotlib]: http://matplotlib.org/
|
||||
[Jupyter notebook]: https://jupyter.org/
|
||||
[nb-prev]: http://nbviewer.jupyter.org/github/home-assistant/home-assistant-notebooks/blob/master/DataExploration-1/DataExploration-1.ipynb
|
||||
|
||||
<!--more-->
|
||||
|
||||
<h3><a class='title-link' name='dependencies' href='#dependencies'></a> Dependencies </h3>
|
||||
### <a class='title-link' name='dependencies' href='#dependencies'></a> Dependencies
|
||||
|
||||
<p>In order to run the provided Jupyter notebook, please make sure you have the following applications/libraries installed on your computer:</p>
|
||||
In order to run the provided Jupyter notebook, please make sure you have the following applications/libraries installed on your computer:
|
||||
|
||||
<ul>
|
||||
<li>Pandas</li>
|
||||
<li>NumPy</li>
|
||||
<li>Matplotlib</li>
|
||||
<li>SQLAlchemy</li>
|
||||
<li>Jupyter</li>
|
||||
</ul>
|
||||
- Pandas
|
||||
- NumPy
|
||||
- Matplotlib
|
||||
- SQLAlchemy
|
||||
- Jupyter
|
||||
|
||||
<p>As a Windows user myself, I find the easiest, quickest and most hassle-free way of installing all of these dependencies is to use <a href="https://winpython.github.io/">WinPython</a>. This free open-source portable distribution includes all of the dependencies required for this notebook, as well as a few other essential Python libraries you may require for data exploration in the future.</p>
|
||||
As a Windows user myself, I find the easiest, quickest and most hassle-free way of installing all of these dependencies is to use [WinPython]. This free open-source portable distribution includes all of the dependencies required for this notebook, as well as a few other essential Python libraries you may require for data exploration in the future.
|
||||
|
||||
<h4><a class='title-link' name='why-jupyter' href='#why-jupyter'></a> Why Jupyter? </h4>
|
||||
[WinPython]: https://winpython.github.io/
|
||||
|
||||
<p>While all Home Assistant implementations can have varying setup, components and scripts, the underlying data structure is standardized and well-defined. This allows us to write Python code that is environmentally agnostic. Wrapping it in a Jupyter notebook ensures the code, visualizations and directions/explanations are kept digestible and neatly-packaged. One of the amazing features of Jupyter is the ability to change code as you go along, customizing all outputs and visualizations on the fly!</p>
|
||||
#### <a class='title-link' name='why-jupyter' href='#why-jupyter'></a> Why Jupyter?
|
||||
|
||||
<h4><a class='title-link' name='where-do-i-start' href='#where-do-i-start'></a> Where do I start? </h4>
|
||||
While all Home Assistant implementations can have varying setup, components and scripts, the underlying data structure is standardized and well-defined. This allows us to write Python code that is environmentally agnostic. Wrapping it in a Jupyter notebook ensures the code, visualizations and directions/explanations are kept digestible and neatly-packaged. One of the amazing features of Jupyter is the ability to change code as you go along, customizing all outputs and visualizations on the fly!
|
||||
|
||||
<p>This tutorial is based around a heavily commented Jupyter Notebook that we created. So to get started, you will have to open that:</p>
|
||||
#### <a class='title-link' name='where-do-i-start' href='#where-do-i-start'></a> Where do I start?
|
||||
|
||||
<ul>
|
||||
<li><a href="http://nbviewer.jupyter.org/github/home-assistant/home-assistant-notebooks/blob/master/DataExploration-1/DataExploration-1.ipynb">download the tutorial Jupyter Notebook</a> (leads to preview page, from there click download top-right)</li>
|
||||
<li>launch the Jupyter Notebook App</li>
|
||||
<li>Click the ‘upload’ button to add the downloaded notebook to Jupyter</li>
|
||||
<li>Adjust the <code>DB_URL</code> at the beginning of the notebook to point at your Home Assistant database</li>
|
||||
<li>Select in top menu: Cell -> Run All</li>
|
||||
</ul>
|
||||
This tutorial is based around a heavily commented Jupyter Notebook that we created. So to get started, you will have to open that:
|
||||
|
||||
<p>That’s it! The included code will walk you through importing the required libraries, show running raw SQL against your local database, plotting basic data from the states table, and in the end output a few plots of changes for every entity in your system as well as the mean daily value for the past 20 days.</p>
|
||||
- [download the tutorial Jupyter Notebook][nb-prev] (leads to preview page, from there click download top-right)
|
||||
- launch the Jupyter Notebook App
|
||||
- Click the 'upload' button to add the downloaded notebook to Jupyter
|
||||
- Adjust the `DB_URL` at the beginning of the notebook to point at your Home Assistant database
|
||||
- Select in top menu: Cell -> Run All
|
||||
|
||||
<p>After just those few steps, you will be greeted with beautiful formatted data like this:</p>
|
||||
That’s it! The included code will walk you through importing the required libraries, show running raw SQL against your local database, plotting basic data from the states table, and in the end output a few plots of changes for every entity in your system as well as the mean daily value for the past 20 days.
|
||||
|
||||
<p class="img">
|
||||
<img src="https://home-assistant.io/images/blog/2016-07-data-exploration/graph.png" />
|
||||
After just those few steps, you will be greeted with beautiful formatted data like this:
|
||||
|
||||
<p class='img'>
|
||||
<img src='https://home-assistant.io/images/blog/2016-07-data-exploration/graph.png'>
|
||||
One of the graphs created with this tutorial.
|
||||
</p>
|
||||
|
||||
<h4><a class='title-link' name='whats-next' href='#whats-next'></a> What’s next? </h4>
|
||||
#### <a class='title-link' name='whats-next' href='#whats-next'></a> What’s next?
|
||||
|
||||
<p>Thanks to the magic of Jupyter, all of the code is customizable: want to selectively display your data, only covering a specific entity? Sure thing! Want to change the properties of the plots? No problem!</p>
|
||||
Thanks to the magic of Jupyter, all of the code is customizable: want to selectively display your data, only covering a specific entity? Sure thing! Want to change the properties of the plots? No problem!
|
||||
|
||||
<p>While you learn and explore your IoT data, we will be working on providing more ready-to-use Jupyter Notebooks. Feel free to ask questions or provide suggestions. Would you like to see a specific visualization? Is there a particular facet of data you’re interested in? Let’s talk about it, let’s dive into the world of data together!</p>
|
||||
While you learn and explore your IoT data, we will be working on providing more ready-to-use Jupyter Notebooks. Feel free to ask questions or provide suggestions. Would you like to see a specific visualization? Is there a particular facet of data you’re interested in? Let’s talk about it, let’s dive into the world of data together!
|
||||
]]></content>
|
||||
</entry>
|
||||
|
||||
|
@ -106,114 +113,106 @@ One of the graphs created with this tutorial.
|
|||
<link href="https://home-assistant.io/blog/2016/07/19/visualizing-your-iot-data/"/>
|
||||
<updated>2016-07-19T16:00:00+00:00</updated>
|
||||
<id>https://home-assistant.io/blog/2016/07/19/visualizing-your-iot-data</id>
|
||||
<content type="html">< is tracking everything that is going on within Home Assistant. This means that you have access to all stored information about your home. Our history is not a full-fledged graphical processing and visualization component as you may know from systems and network monitoring tools. The current limitation is that you only can select a day for a visual output of your information and not a period. Also, there is no possibility to drill down on a specific entity.
|
||||
|
||||
<p>This blog post will show you ways to export data for reporting, visualization, or further analysis of automation rules.</p>
|
||||
This blog post will show you ways to export data for reporting, visualization, or further analysis of automation rules.
|
||||
|
||||
<!--more-->
|
||||
|
||||
<p>In this blog post I use the temperature of the <a href="https://en.wikipedia.org/wiki/Aare">Aare</a> river close to where I live as a show case. The temperatures were recorded with the <a href="/components/sensor.swiss_hydrological_data/">Swiss Hydrological Data sensor</a> and the name of the sensor is <code>sensor.aare</code>.</p>
|
||||
In this blog post I use the temperature of the [Aare](https://en.wikipedia.org/wiki/Aare) river close to where I live as a show case. The temperatures were recorded with the [Swiss Hydrological Data sensor](/components/sensor.swiss_hydrological_data/) and the name of the sensor is `sensor.aare`.
|
||||
|
||||
<p>The database is stored at <code><path to config dir>/.homeassistant/home-assistant_v2.db</code> as <a href="https://www.sqlite.org/">SQLite database</a>. In all examples we are going to use the path: <code>/home/ha/.homeassistant/home-assistant_v2.db</code></p>
|
||||
The database is stored at `<path to config dir>/.homeassistant/home-assistant_v2.db` as [SQLite database](https://www.sqlite.org/). In all examples we are going to use the path: `/home/ha/.homeassistant/home-assistant_v2.db`
|
||||
|
||||
<p>If you are just curious what’s stored in your database then you can use the <code>sqlite3</code> command-line tool or a graphical one like <a href="http://sqlitebrowser.org/">DB Browser for SQLite</a>.</p>
|
||||
If you are just curious what's stored in your database then you can use the `sqlite3` command-line tool or a graphical one like [DB Browser for SQLite](http://sqlitebrowser.org/).
|
||||
|
||||
<p>The table that is holding the states is called <code>states</code>. The <code>events</code> tables is responsible for storing the events which occurred. So, we will first check how many entries there are in the <code>states</code> table. <code>sqlite3</code> needs to know where the databases is located. To work with your database make sure that Home Assistant is not running or create a copy of the existing database. It’s recommended to work with a copy.</p>
|
||||
The table that is holding the states is called `states`. The `events` tables is responsible for storing the events which occurred. So, we will first check how many entries there are in the `states` table. `sqlite3` needs to know where the databases is located. To work with your database make sure that Home Assistant is not running or create a copy of the existing database. It's recommended to work with a copy.
|
||||
|
||||
<div class="highlighter-coderay"><div class="CodeRay">
|
||||
<div class="code"><pre>$ sqlite3 /home/ha/.homeassistant/home-assistant_v2.db
|
||||
```bash
|
||||
$ sqlite3 /home/ha/.homeassistant/home-assistant_v2.db
|
||||
SQLite version 3.11.0 2016-02-15 17:29:24
|
||||
sqlite> SELECT count(*) FROM states;
|
||||
sqlite> SELECT count(*) FROM states;
|
||||
24659
|
||||
</pre></div>
|
||||
</div>
|
||||
</div>
|
||||
```
|
||||
|
||||
<p>Let’s have a look at a sample <a href="https://en.wikipedia.org/wiki/SQL">SQL</a> query. This query will show all states in a period for the sensor <code>sensor.aare</code>.</p>
|
||||
Let's have a look at a sample [SQL](https://en.wikipedia.org/wiki/SQL) query. This query will show all states in a period for the sensor `sensor.aare`.
|
||||
|
||||
<div class="highlighter-coderay"><div class="CodeRay">
|
||||
<div class="code"><pre><span class="class">SELECT</span> state, last_changed <span class="keyword">FROM</span> states
|
||||
<span class="keyword">WHERE</span>
|
||||
entity_id = <span class="string"><span class="delimiter">'</span><span class="content">sensor.aare</span><span class="delimiter">'</span></span>
|
||||
<span class="keyword">AND</span>
|
||||
last_changed <span class="keyword">BETWEEN</span>
|
||||
<span class="string"><span class="delimiter">'</span><span class="content">2016-07-05 00:00:00.000000</span><span class="delimiter">'</span></span> <span class="keyword">AND</span> <span class="string"><span class="delimiter">'</span><span class="content">2016-07-07 00:00:00.000000</span><span class="delimiter">'</span></span>;
|
||||
</pre></div>
|
||||
</div>
|
||||
</div>
|
||||
```sql
|
||||
SELECT state, last_changed FROM states
|
||||
WHERE
|
||||
entity_id = 'sensor.aare'
|
||||
AND
|
||||
last_changed BETWEEN
|
||||
'2016-07-05 00:00:00.000000' AND '2016-07-07 00:00:00.000000';
|
||||
```
|
||||
|
||||
<p>The SQL statement can be formed that it fits exactly what you need. This means that you can process the data in any way you want for further use. Often it makes sense to eliminate certain entries like <code>Unknown</code> or peaks.</p>
|
||||
The SQL statement can be formed that it fits exactly what you need. This means that you can process the data in any way you want for further use. Often it makes sense to eliminate certain entries like `Unknown` or peaks.
|
||||
|
||||
<p>If the above query is executed in DB Browser for SQLite you would be able to save the sensor’s graph as png.</p>
|
||||
If the above query is executed in DB Browser for SQLite you would be able to save the sensor's graph as png.
|
||||
|
||||
<p class="img">
|
||||
<img src="https://home-assistant.io/images/blog/2016-07-reporting/db-browser.png" />
|
||||
<p class='img'>
|
||||
<img src='https://home-assistant.io/images/blog/2016-07-reporting/db-browser.png' />
|
||||
Visualization with DB Browser for SQLite
|
||||
</p>
|
||||
|
||||
<p>You may ask: Why not do this with LibreOffice Calc or another spreadsheet application? As most spreadsheet applications are not able to work directly with SQLite database we are going to export the data from the database to <a href="https://en.wikipedia.org/wiki/Comma-separated_values">CSV</a>.</p>
|
||||
You may ask: Why not do this with LibreOffice Calc or another spreadsheet application? As most spreadsheet applications are not able to work directly with SQLite database we are going to export the data from the database to [CSV](https://en.wikipedia.org/wiki/Comma-separated_values).
|
||||
|
||||
<div class="highlighter-coderay"><div class="CodeRay">
|
||||
<div class="code"><pre>$ sqlite3 -header -csv /home/ha/.homeassistant/home-assistant_v2.db "SELECT last_changed, state FROM states WHERE entity_id = 'sensor.aare' AND last_changed BETWEEN '2016-07-05 00:00:00.000000' AND '2016-07-07 00:00:00.000000';" > sensor.csv
|
||||
</pre></div>
|
||||
</div>
|
||||
</div>
|
||||
```bash
|
||||
$ sqlite3 -header -csv /home/ha/.homeassistant/home-assistant_v2.db "SELECT last_changed, state FROM states WHERE entity_id = 'sensor.aare' AND last_changed BETWEEN '2016-07-05 00:00:00.000000' AND '2016-07-07 00:00:00.000000';" > sensor.csv
|
||||
```
|
||||
|
||||
<p>The ordering for the <code>SELECT</code> was changed to get the time stamps first and then the state. Now we can import the CSV file into the application of your choice, here it’s LibreOffice Calc.</p>
|
||||
The ordering for the `SELECT` was changed to get the time stamps first and then the state. Now we can import the CSV file into the application of your choice, here it's LibreOffice Calc.
|
||||
|
||||
<p class="img">
|
||||
<img src="https://home-assistant.io/images/blog/2016-07-reporting/libreoffice-import.png" />
|
||||
<p class='img'>
|
||||
<img src='https://home-assistant.io/images/blog/2016-07-reporting/libreoffice-import.png' />
|
||||
Import of the CSV file
|
||||
</p>
|
||||
|
||||
<p>After the import a graph can be created over the existing data.</p>
|
||||
After the import a graph can be created over the existing data.
|
||||
|
||||
<p class="img">
|
||||
<img src="https://home-assistant.io/images/blog/2016-07-reporting/libreoffice-graph.png" />
|
||||
<p class='img'>
|
||||
<img src='https://home-assistant.io/images/blog/2016-07-reporting/libreoffice-graph.png' />
|
||||
Graph in LibreOffice
|
||||
</p>
|
||||
|
||||
<p>You can also use <a href="http://matplotlib.org/">matplotlib</a> to generate graphs as an alternative to a spreadsheet application. This is a powerful Python 2D plotting library. With the built-in support for SQLite in Python it will only take a couple lines of code to visualize your data.</p>
|
||||
You can also use [matplotlib](http://matplotlib.org/) to generate graphs as an alternative to a spreadsheet application. This is a powerful Python 2D plotting library. With the built-in support for SQLite in Python it will only take a couple lines of code to visualize your data.
|
||||
|
||||
<div class="highlighter-coderay"><div class="CodeRay">
|
||||
<div class="code"><pre><span class="keyword">import</span> <span class="include">sqlite3</span>
|
||||
<span class="keyword">from</span> <span class="include">matplotlib</span> <span class="keyword">import</span> <span class="include">dates</span>
|
||||
<span class="keyword">import</span> <span class="include">matplotlib.pyplot</span> <span class="keyword">as</span> plt
|
||||
```python
|
||||
import sqlite3
|
||||
from matplotlib import dates
|
||||
import matplotlib.pyplot as plt
|
||||
|
||||
<span class="keyword">import</span> <span class="include">homeassistant.util.dt</span> <span class="keyword">as</span> dt
|
||||
import homeassistant.util.dt as dt
|
||||
|
||||
values = []
|
||||
timestamps = []
|
||||
|
||||
conn = sqlite3.connect(<span class="string"><span class="delimiter">'</span><span class="content">/home/ha/.homeassistant/home-assistant_v2.db</span><span class="delimiter">'</span></span>)
|
||||
data = conn.execute(<span class="string"><span class="delimiter">"</span><span class="content">SELECT state, last_changed FROM states WHERE </span><span class="delimiter">"</span></span>
|
||||
<span class="string"><span class="delimiter">"</span><span class="content">entity_id = 'sensor.aare' AND last_changed BETWEEN </span><span class="delimiter">"</span></span>
|
||||
<span class="string"><span class="delimiter">"</span><span class="content">'2016-07-05 00:00:00.000000' AND </span><span class="delimiter">"</span></span>
|
||||
<span class="string"><span class="delimiter">"</span><span class="content">'2016-07-07 00:00:00.000000'</span><span class="delimiter">"</span></span>)
|
||||
conn = sqlite3.connect('/home/ha/.homeassistant/home-assistant_v2.db')
|
||||
data = conn.execute("SELECT state, last_changed FROM states WHERE "
|
||||
"entity_id = 'sensor.aare' AND last_changed BETWEEN "
|
||||
"'2016-07-05 00:00:00.000000' AND "
|
||||
"'2016-07-07 00:00:00.000000'")
|
||||
|
||||
<span class="keyword">for</span> x <span class="keyword">in</span> data:
|
||||
timestamps.append(dates.date2num(dt.parse_datetime(x[<span class="integer">1</span>])))
|
||||
values.append(<span class="predefined">float</span>(x[<span class="integer">0</span>]))
|
||||
for x in data:
|
||||
timestamps.append(dates.date2num(dt.parse_datetime(x[1])))
|
||||
values.append(float(x[0]))
|
||||
|
||||
plt.plot_date(x=timestamps, y=values, fmt=<span class="string"><span class="delimiter">"</span><span class="content">r-</span><span class="delimiter">"</span></span>)
|
||||
plt.ylabel(<span class="string"><span class="delimiter">'</span><span class="content">Temperature</span><span class="delimiter">'</span></span>)
|
||||
plt.xlabel(<span class="string"><span class="delimiter">'</span><span class="content">Time line</span><span class="delimiter">'</span></span>)
|
||||
plt.plot_date(x=timestamps, y=values, fmt="r-")
|
||||
plt.ylabel('Temperature')
|
||||
plt.xlabel('Time line')
|
||||
|
||||
plt.savefig(<span class="string"><span class="delimiter">'</span><span class="content">sensor.png</span><span class="delimiter">'</span></span>)
|
||||
</pre></div>
|
||||
</div>
|
||||
</div>
|
||||
plt.savefig('sensor.png')
|
||||
```
|
||||
|
||||
<p>Creating a connection to the database and executing a query is similar to the ways already seen. The return values from the query are splitted into two lists. The time stamps must be converted in an value which is accepted by matplotlib and then the graph is generated and saved as image.</p>
|
||||
Creating a connection to the database and executing a query is similar to the ways already seen. The return values from the query are splitted into two lists. The time stamps must be converted in an value which is accepted by matplotlib and then the graph is generated and saved as image.
|
||||
|
||||
<p class="img">
|
||||
<img src="https://home-assistant.io/images/blog/2016-07-reporting/mpl-sensor.png" />
|
||||
<p class='img'>
|
||||
<img src='https://home-assistant.io/images/blog/2016-07-reporting/mpl-sensor.png' />
|
||||
Sensor graph generated by matplotlib
|
||||
</p>
|
||||
|
||||
<p>Most of the graphs are pretty ugly. So, further beautification will be needed. If you have created a nice report including some amazing graphs then the Home Assistant community would be grateful for sharing them in our <a href="https://community.home-assistant.io/">forum</a>.</p>
|
||||
Most of the graphs are pretty ugly. So, further beautification will be needed. If you have created a nice report including some amazing graphs then the Home Assistant community would be grateful for sharing them in our [forum](https://community.home-assistant.io/).
|
||||
|
||||
]]></content>
|
||||
</entry>
|
||||
|
|
|
@ -268,7 +268,7 @@
|
|||
|
||||
|
||||
<li class="post">
|
||||
<a href="/blog/2016/08/13/foursquare-fast-com-ffmpeg-gpsd/">0.26: Foursquare, Fast.com, FFMPEG and GPSD</a>
|
||||
<a href="/blog/2016/08/13/foursquare-fast.com-ffmpeg-gpsd/">0.26: Foursquare, Fast.com, FFMPEG and GPSD</a>
|
||||
</li>
|
||||
|
||||
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -107,7 +107,7 @@
|
|||
</time>
|
||||
</div>
|
||||
<div class="grid__item four-fifths palm-one-whole">
|
||||
<h1 class="gamma"><a href="/blog/2016/02/09/smarter-smart-things-with-mqtt-and-home-assistant/">Smarter SmartThings with MQTT and Home Assistant</a></h1>
|
||||
<h1 class="gamma"><a href="/blog/2016/02/09/Smarter-Smart-Things-with-MQTT-and-Home-Assistant/">Smarter SmartThings with MQTT and Home Assistant</a></h1>
|
||||
|
||||
<footer class="meta">
|
||||
<span>
|
||||
|
@ -273,7 +273,7 @@
|
|||
|
||||
|
||||
<li class="post">
|
||||
<a href="/blog/2016/08/13/foursquare-fast-com-ffmpeg-gpsd/">0.26: Foursquare, Fast.com, FFMPEG and GPSD</a>
|
||||
<a href="/blog/2016/08/13/foursquare-fast.com-ffmpeg-gpsd/">0.26: Foursquare, Fast.com, FFMPEG and GPSD</a>
|
||||
</li>
|
||||
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
<title><![CDATA[Category: Organisation | Home Assistant]]></title>
|
||||
<link href="https://home-assistant.io/blog/categories/organisation/atom.xml" rel="self"/>
|
||||
<link href="https://home-assistant.io/"/>
|
||||
<updated>2016-08-22T07:26:42+00:00</updated>
|
||||
<updated>2016-08-22T08:20:27+00:00</updated>
|
||||
<id>https://home-assistant.io/</id>
|
||||
<author>
|
||||
<name><![CDATA[Home Assistant]]></name>
|
||||
|
@ -18,33 +18,35 @@
|
|||
<link href="https://home-assistant.io/blog/2016/04/19/to-infinity-and-beyond/"/>
|
||||
<updated>2016-04-19T05:44:00+00:00</updated>
|
||||
<id>https://home-assistant.io/blog/2016/04/19/to-infinity-and-beyond</id>
|
||||
<content type="html"><![CDATA[<p>After 2.5 years I think we can proudly say: Home Assistant is a success. I write <em>we</em> because Home Assistant is no longer a one-person side project. It has become the side project of many people who spend countless hours on making Home Assistant the best home automation software out there. To acknowledge this we migrated the repositories from being under my name to be under our own <a href="https://github.com/home-assistant/">organisation on GitHub</a>.</p>
|
||||
<content type="html"><![CDATA[After 2.5 years I think we can proudly say: Home Assistant is a success. I write _we_ because Home Assistant is no longer a one-person side project. It has become the side project of many people who spend countless hours on making Home Assistant the best home automation software out there. To acknowledge this we migrated the repositories from being under my name to be under our own [organisation on GitHub][gh-ha].
|
||||
|
||||
<p>On our journey we’ve reached many noteworthy milestones:</p>
|
||||
On our journey we've reached many noteworthy milestones:
|
||||
|
||||
<ul>
|
||||
<li>#1 on HackerNews</li>
|
||||
<li>Featured on ProductHunt</li>
|
||||
<li>Trending repository on GitHub</li>
|
||||
<li>3000 stars on GitHub</li>
|
||||
<li>1.5 million page views on our website</li>
|
||||
<li>Speaker at OpenIoT Summit 2016</li>
|
||||
</ul>
|
||||
- #1 on HackerNews
|
||||
- Featured on ProductHunt
|
||||
- Trending repository on GitHub
|
||||
- 3000 stars on GitHub
|
||||
- 1.5 million page views on our website
|
||||
- Speaker at OpenIoT Summit 2016
|
||||
|
||||
<p>All these accomplishments are a nice pat on the back but our journey is far from over. There are a lot of challenges ahead if we want to become the go to solution for home automation <em>for everyone</em>.</p>
|
||||
All these accomplishments are a nice pat on the back but our journey is far from over. There are a lot of challenges ahead if we want to become the go to solution for home automation _for everyone_.
|
||||
|
||||
<p>Until now the focus has been on making a platform that developers love to use. A platform that is simple but customizable. A platform that is both powerful and reliable. But most important: a platform that is local and open. Home Assistant does a great job at all these things.</p>
|
||||
Until now the focus has been on making a platform that developers love to use. A platform that is simple but customizable. A platform that is both powerful and reliable. But most important: a platform that is local and open. Home Assistant does a great job at all these things.
|
||||
|
||||
<p>There will be some major challenges ahead of us to target groups other than developers. Easy installation and easy configuration being the #1. I’m sure that we’ll be able to eventually achieve these goals. I can’t say yet how or when. As with everything Home Assistant, we’ll take tiny steps, gathering feedback along the way to make sure we’re solving the right problems.</p>
|
||||
There will be some major challenges ahead of us to target groups other than developers. Easy installation and easy configuration being the #1. I'm sure that we'll be able to eventually achieve these goals. I can't say yet how or when. As with everything Home Assistant, we'll take tiny steps, gathering feedback along the way to make sure we're solving the right problems.
|
||||
|
||||
<p>I am confident that we will get there because we are set up for success: we have a robust architecture, high test coverage and an active community of world class developers and users. On top of that, we use Python which allows us to move fast and tackle complex problems in elegant ways. It is so easy to learn that it allows any programmer, experienced or not, to contribute support for devices and services. It’s as simple as <a href="/developers/platform_example_sensor/#code">filling in the blanks</a>.</p>
|
||||
I am confident that we will get there because we are set up for success: we have a robust architecture, high test coverage and an active community of world class developers and users. On top of that, we use Python which allows us to move fast and tackle complex problems in elegant ways. It is so easy to learn that it allows any programmer, experienced or not, to contribute support for devices and services. It's as simple as [filling in the blanks].
|
||||
|
||||
<p>I would like to put out a big thank you to all our contributors who make Home Assistant what it is today. It doesn’t matter if it is form of code, documentation or giving support in our <a href="https://gitter.im/home-assistant/home-assistant">chat room</a> or <a href="https://community.home-assistant.io/">forums</a>. You. all. rock.</p>
|
||||
I would like to put out a big thank you to all our contributors who make Home Assistant what it is today. It doesn't matter if it is form of code, documentation or giving support in our [chat room] or [forums]. You. all. rock.
|
||||
|
||||
<p>Cheers to the future!</p>
|
||||
Cheers to the future!
|
||||
|
||||
<p>Paulus</p>
|
||||
Paulus
|
||||
|
||||
[gh-ha]: https://github.com/home-assistant/
|
||||
[filling in the blanks]: /developers/platform_example_sensor/#code
|
||||
[chat room]: https://gitter.im/home-assistant/home-assistant
|
||||
[forums]: https://community.home-assistant.io/
|
||||
]]></content>
|
||||
</entry>
|
||||
|
||||
|
@ -53,12 +55,12 @@
|
|||
<link href="https://home-assistant.io/blog/2015/03/08/new-logo/"/>
|
||||
<updated>2015-03-08T22:16:10+00:00</updated>
|
||||
<id>https://home-assistant.io/blog/2015/03/08/new-logo</id>
|
||||
<content type="html">< has come to the rescue and contributed a brand new logo for Home Assistant.
|
||||
|
||||
<p>The new logo follows Googles material design spec. It uses the blue color that Home Assistant uses in the interface and it comes in two versions: a high detailed version (for homescreen icon etc) and a simple version (for favicon etc).</p>
|
||||
The new logo follows Googles material design spec. It uses the blue color that Home Assistant uses in the interface and it comes in two versions: a high detailed version (for homescreen icon etc) and a simple version (for favicon etc).
|
||||
|
||||
<p class="img">
|
||||
<img src="/images/blog/ha-logo-history.png" />
|
||||
<p class='img'>
|
||||
<img src='/images/blog/ha-logo-history.png' />
|
||||
The old logo, the new detailed logo and the new simple logo.
|
||||
</p>
|
||||
]]></content>
|
||||
|
|
|
@ -233,7 +233,7 @@
|
|||
|
||||
|
||||
<li class="post">
|
||||
<a href="/blog/2016/08/13/foursquare-fast-com-ffmpeg-gpsd/">0.26: Foursquare, Fast.com, FFMPEG and GPSD</a>
|
||||
<a href="/blog/2016/08/13/foursquare-fast.com-ffmpeg-gpsd/">0.26: Foursquare, Fast.com, FFMPEG and GPSD</a>
|
||||
</li>
|
||||
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
<title><![CDATA[Category: OwnTracks | Home Assistant]]></title>
|
||||
<link href="https://home-assistant.io/blog/categories/owntracks/atom.xml" rel="self"/>
|
||||
<link href="https://home-assistant.io/"/>
|
||||
<updated>2016-08-22T07:26:42+00:00</updated>
|
||||
<updated>2016-08-22T08:20:27+00:00</updated>
|
||||
<id>https://home-assistant.io/</id>
|
||||
<author>
|
||||
<name><![CDATA[Home Assistant]]></name>
|
||||
|
@ -18,153 +18,152 @@
|
|||
<link href="https://home-assistant.io/blog/2016/05/26/ibeacons-how-to-track-things-that-cant-track-themselves-part-ii/"/>
|
||||
<updated>2016-05-26T11:06:12+00:00</updated>
|
||||
<id>https://home-assistant.io/blog/2016/05/26/ibeacons-how-to-track-things-that-cant-track-themselves-part-ii</id>
|
||||
<content type="html"><._
|
||||
|
||||
<p>In <a href="/blog/2016/04/30/ibeacons-part-1-making-presence-detection-work-better">Part 1</a> I talked about using iBeacons to improve presence tracking. In part 2 I’ll talk about how to track things like keys that can’t track themselves by using iBeacons.</p>
|
||||
|
||||
<h3><a class='title-link' name='tracking-things-using-ibeacons' href='#tracking-things-using-ibeacons'></a> Tracking things using iBeacons </h3>
|
||||
<p>In the first part I mentioned that iBeacons just send out <em>I’m here</em> packets, and we used this to trigger an update when your phone came close to a fixed beacon.</p>
|
||||
In [Part 1](/blog/2016/04/30/ibeacons-part-1-making-presence-detection-work-better) I talked about using iBeacons to improve presence tracking. In part 2 I’ll talk about how to track things like keys that can’t track themselves by using iBeacons.
|
||||
|
||||
<p>But beacons don’t have to be fixed.</p>
|
||||
### <a class='title-link' name='tracking-things-using-ibeacons' href='#tracking-things-using-ibeacons'></a> Tracking things using iBeacons
|
||||
In the first part I mentioned that iBeacons just send out *I’m here* packets, and we used this to trigger an update when your phone came close to a fixed beacon.
|
||||
|
||||
<p>Your phone knows roughly where it is located (based on mobile phone masts, Wi-Fi networks or GPS). If your phone sees an <em>I’m here</em> message then it knows the beacon is close.</p>
|
||||
But beacons don’t have to be fixed.
|
||||
|
||||
<p>If your phone can remember (or tell a server) where it was when it last saw the iBeacon - then it knows where the beacon was. So the result of this is that you can track where an iBeacon was - even though the iBeacon doesn’t have any tracking technology itself.</p>
|
||||
Your phone knows roughly where it is located (based on mobile phone masts, Wi-Fi networks or GPS). If your phone sees an *I’m here* message then it knows the beacon is close.
|
||||
|
||||
<p>So if you put an iBeacon on your keys or in your car - then you can track them.</p>
|
||||
If your phone can remember (or tell a server) where it was when it last saw the iBeacon - then it knows where the beacon was. So the result of this is that you can track where an iBeacon was - even though the iBeacon doesn't have any tracking technology itself.
|
||||
|
||||
<p class="img">
|
||||
<img width="200" src="https://home-assistant.io/images/blog/2016-05-ibeacons/keys_with_beacon.jpg" />
|
||||
So if you put an iBeacon on your keys or in your car - then you can track them.
|
||||
|
||||
<p class='img'>
|
||||
<img width='200' src='https://home-assistant.io/images/blog/2016-05-ibeacons/keys_with_beacon.jpg'>
|
||||
Here are my keys - with a Estimote Nearable iBeacon stuck to them. Ugly but effective!
|
||||
</p>
|
||||
|
||||
<!--more-->
|
||||
|
||||
<p>It’s easier to set up OwnTracks and HA to track a mobile beacon than the fixed beacon I discussed in Part 1, because you only need to tell OwnTracks about your iBeacon. You don’t need to configure HA at all.</p>
|
||||
It’s easier to set up OwnTracks and HA to track a mobile beacon than the fixed beacon I discussed in Part 1, because you only need to tell OwnTracks about your iBeacon. You don’t need to configure HA at all.
|
||||
|
||||
<p class="note warning">OwnTracks currently only supports mobile beacons on iOS.</p>
|
||||
<p class='note warning'>OwnTracks currently only supports mobile beacons on iOS.</p>
|
||||
|
||||
<p>You set up the beacon the same way as we discussed in part 1. The only difference is that instead of calling the region the name of a location (eg -drive) you call it the name of the device you want to track (eg -keys). Remember the leading ‘-’ that makes the connection more reliable.</p>
|
||||
You set up the beacon the same way as we discussed in part 1. The only difference is that instead of calling the region the name of a location (eg -drive) you call it the name of the device you want to track (eg -keys). Remember the leading ‘-’ that makes the connection more reliable.
|
||||
|
||||
<p class="img">
|
||||
<img width="200" src="https://home-assistant.io/images/blog/2016-04-ibeacons/owntracks_beacon_setup.png" />
|
||||
<p class='img'>
|
||||
<img width='200' src='https://home-assistant.io/images/blog/2016-04-ibeacons/owntracks_beacon_setup.png'>
|
||||
</p>
|
||||
|
||||
<p>Once you’ve added the iBeacon - you should be able to see it on the OwnTracks region screen. If your phone can see the packets from that beacon, OwnTracks will turn the relevant Region red.</p>
|
||||
Once you’ve added the iBeacon - you should be able to see it on the OwnTracks region screen. If your phone can see the packets from that beacon, OwnTracks will turn the relevant Region red.
|
||||
|
||||
<p>Because you turned <em>Share</em> on for the region, when OwnTracks sees the beacon it will send HA a message. HA will use this message to add the beacon as a tracked device if it hasn’t seen it before. So you should see a new device appear in HA called device_tracker.beacon_[name] - and its location will be where your phone thought it was when it last saw the beacon.</p>
|
||||
Because you turned *Share* on for the region, when OwnTracks sees the beacon it will send HA a message. HA will use this message to add the beacon as a tracked device if it hasn’t seen it before. So you should see a new device appear in HA called device_tracker.beacon_[name] - and its location will be where your phone thought it was when it last saw the beacon.
|
||||
|
||||
<p class="img">
|
||||
<img width="200" src="https://home-assistant.io/images/blog/2016-05-ibeacons/keys_device.png" />
|
||||
<p class='img'>
|
||||
<img width='200' src='https://home-assistant.io/images/blog/2016-05-ibeacons/keys_device.png'>
|
||||
</p>
|
||||
|
||||
<p>If your phone moves and sends HA a new location while it is still in range of the beacon - HA will update the location of the beacon. So if go for a drive in your car - you will see both your phone and the <em>device_tracker.beacon_car</em> move together.</p>
|
||||
If your phone moves and sends HA a new location while it is still in range of the beacon - HA will update the location of the beacon. So if go for a drive in your car - you will see both your phone and the *device_tracker.beacon_car* move together.
|
||||
|
||||
<p>If you park your car and go shopping - <em>device_tracker.beacon_car</em> will stop moving.</p>
|
||||
If you park your car and go shopping - *device_tracker.beacon_car* will stop moving.
|
||||
|
||||
<p>With the basic tracking working - you can use automation to do things like open your gates if your car comes home</p>
|
||||
With the basic tracking working - you can use automation to do things like open your gates if your car comes home
|
||||
|
||||
<div class="highlighter-coderay"><div class="CodeRay">
|
||||
<div class="code"><pre><span class="key">automation</span>:
|
||||
- <span class="string"><span class="content">alias: 'Open gate'</span></span>
|
||||
<span class="key">trigger</span>:
|
||||
- <span class="string"><span class="content">platform: state</span></span>
|
||||
<span class="key">entity_id</span>: <span class="string"><span class="content">device_tracker.beacon_car</span></span>
|
||||
<span class="key">from</span>: <span class="string"><span class="content">'not_home'</span></span>
|
||||
<span class="key">to</span>: <span class="string"><span class="content">'home'</span></span>
|
||||
<span class="key">condition</span>:
|
||||
- <span class="string"><span class="content">condition: state</span></span>
|
||||
<span class="key">entity_id</span>: <span class="string"><span class="content">switch.gate</span></span>
|
||||
<span class="key">state</span>: <span class="string"><span class="content">'off'</span></span>
|
||||
<span class="key">action</span>:
|
||||
<span class="key">service</span>: <span class="string"><span class="content">switch.turn_on</span></span>
|
||||
<span class="key">entity_id</span>: <span class="string"><span class="content">switch.gate</span></span>
|
||||
</pre></div>
|
||||
</div>
|
||||
</div>
|
||||
```yaml
|
||||
automation:
|
||||
- alias: 'Open gate'
|
||||
trigger:
|
||||
- platform: state
|
||||
entity_id: device_tracker.beacon_car
|
||||
from: 'not_home'
|
||||
to: 'home'
|
||||
condition:
|
||||
- condition: state
|
||||
entity_id: switch.gate
|
||||
state: 'off'
|
||||
action:
|
||||
service: switch.turn_on
|
||||
entity_id: switch.gate
|
||||
```
|
||||
|
||||
<p>Or warn you if you leave your keys behind</p>
|
||||
Or warn you if you leave your keys behind
|
||||
|
||||
<div class="highlighter-coderay"><div class="CodeRay">
|
||||
<div class="code"><pre><span class="key">automation</span>:
|
||||
- <span class="string"><span class="content">alias: 'Forgotten keys'</span></span>
|
||||
<span class="key">trigger</span>:
|
||||
<span class="key">platform</span>: <span class="string"><span class="content">template</span></span>
|
||||
<span class="key">value_template</span>: <span class="string"><span class="content">'{{states.device_tracker.greg_gregphone.state != states.device_tracker.beacon_keys.state}}'</span></span>
|
||||
<span class="key">condition</span>:
|
||||
<span class="key">condition</span>: <span class="string"><span class="content">template</span></span>
|
||||
<span class="key">value_template</span>: <span class="string"><span class="content">'{{ states.device_tracker.greg_gregphone.state != "home" }}'</span></span>
|
||||
<span class="key">action</span>:
|
||||
<span class="key">service</span>: <span class="string"><span class="content">script.turn_on</span></span>
|
||||
<span class="key">entity_id</span>: <span class="string"><span class="content">script.send_key_alert</span></span>
|
||||
```yaml
|
||||
automation:
|
||||
- alias: 'Forgotten keys'
|
||||
trigger:
|
||||
platform: template
|
||||
value_template: '{{ states.device_tracker.greg_gregphone.state != states.device_tracker.beacon_keys.state}}'
|
||||
condition:
|
||||
condition: template
|
||||
value_template: '{{ states.device_tracker.greg_gregphone.state != "home" }}'
|
||||
action:
|
||||
service: script.turn_on
|
||||
entity_id: script.send_key_alert
|
||||
|
||||
- <span class="string"><span class="content">alias: 'Forgotten keys - cancel'</span></span>
|
||||
<span class="key">trigger</span>:
|
||||
<span class="key">platform</span>: <span class="string"><span class="content">template</span></span>
|
||||
<span class="key">value_template</span>: <span class="string"><span class="content">'{{states.device_tracker.greg_gregphone.state == states.device_tracker.beacon_keys.state}}'</span></span>
|
||||
<span class="key">condition</span>:
|
||||
- <span class="string"><span class="content">condition: state</span></span>
|
||||
<span class="key">entity_id</span>: <span class="string"><span class="content">script.send_key_alert</span></span>
|
||||
<span class="key">state</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">script.turn_off</span></span>
|
||||
<span class="key">entity_id</span>: <span class="string"><span class="content">script.send_key_alert</span></span>
|
||||
</pre></div>
|
||||
</div>
|
||||
</div>
|
||||
- alias: 'Forgotten keys - cancel'
|
||||
trigger:
|
||||
platform: template
|
||||
value_template: '{{ states.device_tracker.greg_gregphone.state == states.device_tracker.beacon_keys.state }}'
|
||||
condition:
|
||||
- condition: state
|
||||
entity_id: script.send_key_alert
|
||||
state: 'on'
|
||||
action:
|
||||
service: script.turn_off
|
||||
entity_id: script.send_key_alert
|
||||
```
|
||||
|
||||
<div class="highlighter-coderay"><div class="CodeRay">
|
||||
<div class="code"><pre><span class="key">script</span>:
|
||||
<span class="key">send_key_alert</span>:
|
||||
<span class="key">sequence</span>:
|
||||
- <span class="string"><span class="content">delay:</span><span class="content">
|
||||
minutes: 2</span></span>
|
||||
- <span class="string"><span class="content">service: notify.notify</span></span>
|
||||
<span class="key">data</span>:
|
||||
<span class="key">message</span>: <span class="string"><span class="content">'You forgot your keys'</span></span>
|
||||
<span class="key">target</span>: <span class="string"><span class="content">'device/gregs_iphone'</span></span>
|
||||
</pre></div>
|
||||
</div>
|
||||
</div>
|
||||
```yaml
|
||||
script:
|
||||
send_key_alert:
|
||||
sequence:
|
||||
- delay:
|
||||
minutes: 2
|
||||
- service: notify.notify
|
||||
data:
|
||||
message: 'You forgot your keys'
|
||||
target: 'device/gregs_iphone'
|
||||
```
|
||||
|
||||
<p>(The delay is needed for two reasons: -<br />
|
||||
1. HA updates the beacon and phone locations at slightly different times - so you don’t want the automation to trigger in the gap between the updates<br />
|
||||
2. I’ve found that beacons (especially the low power Estimote Nearables) can get disconnected for a few seconds so it’s best to wait a minute or so before deciding that you’ve left your keys behind)</p>
|
||||
|
||||
<h3><a class='title-link' name='using-both-types-of-ibeacons-at-the-same-time' href='#using-both-types-of-ibeacons-at-the-same-time'></a> Using both types of iBeacons at the same time </h3>
|
||||
<p>Of course you can use both fixed and mobile beacons at the same time. I want my gates to open when I arrive home in the car - so I use an iBeacon in the car so that I can track the car, and a iBeacon on my drive so that a location update is triggered when I arrive. I’ve been experimenting with a high power beacon in a waterproof box on my drive which seems to work well to notice when I get home.</p>
|
||||
(The delay is needed for two reasons: -
|
||||
1. HA updates the beacon and phone locations at slightly different times - so you don’t want the automation to trigger in the gap between the updates
|
||||
2. I’ve found that beacons (especially the low power Estimote Nearables) can get disconnected for a few seconds so it’s best to wait a minute or so before deciding that you’ve left your keys behind)
|
||||
|
||||
<p class="img">
|
||||
<img width="300" src="http://bluesensenetworks.com/wp-content/uploads/2015/02/BlueBar-Beacon-Long-Range.jpg" />
|
||||
|
||||
### <a class='title-link' name='using-both-types-of-ibeacons-at-the-same-time' href='#using-both-types-of-ibeacons-at-the-same-time'></a> Using both types of iBeacons at the same time
|
||||
Of course you can use both fixed and mobile beacons at the same time. I want my gates to open when I arrive home in the car - so I use an iBeacon in the car so that I can track the car, and a iBeacon on my drive so that a location update is triggered when I arrive. I've been experimenting with a high power beacon in a waterproof box on my drive which seems to work well to notice when I get home.
|
||||
|
||||
<p class='img'>
|
||||
<img width='300' src='http://bluesensenetworks.com/wp-content/uploads/2015/02/BlueBar-Beacon-Long-Range.jpg'>
|
||||
</p>
|
||||
<p>Long range / High power beacon</p>
|
||||
Long range / High power beacon
|
||||
|
||||
<p class="img">
|
||||
<img width="400" src="http://bluesensenetworks.com/wp-content/uploads/2015/02/BlueBar-Beacon-Weatherproof.jpg" />
|
||||
<p class='img'>
|
||||
<img width='400' src='http://bluesensenetworks.com/wp-content/uploads/2015/02/BlueBar-Beacon-Weatherproof.jpg'>
|
||||
</p>
|
||||
<p>Waterproof beacon</p>
|
||||
Waterproof beacon
|
||||
|
||||
<h3><a class='title-link' name='buying-beacons' href='#buying-beacons'></a> Buying Beacons </h3>
|
||||
<p>This isn’t a buyer’s guide, but I just wanted to mention the iBeacons I’ve been using. I think you should be able to use any iBeacon with HA and OwnTracks. You generally can’t buy beacons in your local electronics shop - so I just wanted to briefly mention the two suppliers I’ve used so far.</p>
|
||||
|
||||
<p>I’ve bought quite a few iBeacons from a company called <a href="http://bluesensenetworks.com/">Blue Sense Networks</a>. I work in the tech startup sector in the UK so I partly chose them because they are a local start-up who seemed worth supporting. The products, support and software all seem good. I use a number of their beacons - from a simple USB dongle, to a long range beacon. All their products have batteries that can be changed (or no batteries in the case of the externally powered USB device) - and you can configure all the parameters you’d want to using their software. I had one software issue, support got back to me at a weekend(!) - and the issue was resolved with a software release two days later.</p>
|
||||
### <a class='title-link' name='buying-beacons' href='#buying-beacons'></a> Buying Beacons
|
||||
This isn’t a buyer's guide, but I just wanted to mention the iBeacons I’ve been using. I think you should be able to use any iBeacon with HA and OwnTracks. You generally can’t buy beacons in your local electronics shop - so I just wanted to briefly mention the two suppliers I’ve used so far.
|
||||
|
||||
<p>All the beacons seem fine - and the long range unit does work over a longer range than my other beacons.</p>
|
||||
I’ve bought quite a few iBeacons from a company called [Blue Sense Networks](http://bluesensenetworks.com/). I work in the tech startup sector in the UK so I partly chose them because they are a local start-up who seemed worth supporting. The products, support and software all seem good. I use a number of their beacons - from a simple USB dongle, to a long range beacon. All their products have batteries that can be changed (or no batteries in the case of the externally powered USB device) - and you can configure all the parameters you’d want to using their software. I had one software issue, support got back to me at a weekend(!) - and the issue was resolved with a software release two days later.
|
||||
|
||||
<p>I bought some other beacons from a US/Polish startup called <a href="http://estimote.com/">Estimote</a>, who I think are better known. I bought a developer pack of 10 of their <em>nearables</em> which as well as being iBeacons also send out other data (orientation and motion) using their own protocol. This is interesting if you’re developing your own application, but for OwnTracks and HA they are just regular beacons. They are small and self adhesive - so you can stick them to things (like your keys). You can’t change all the parameters on these devices (UUID/Major/Minor are fixed) - and the batteries can’t be replaced. I also killed one of the estimote beacons (I assume the battery died) after I carried it around for a few months and dropped it many times! On the other hand they are well priced, small and waterproof!</p>
|
||||
All the beacons seem fine - and the long range unit does work over a longer range than my other beacons.
|
||||
|
||||
<p>I’ve mainly used these as <em>devices to track</em> rather that <em>location</em> beacons. Estimote also sell some slightly larger iBeacons with replaceable batteries. Estimote support responded quickly and were helpful when I couldn’t work out how to edit their beacon’s parameters (although the answer was <em>you can’t yet</em>).</p>
|
||||
I bought some other beacons from a US/Polish startup called [Estimote](http://estimote.com/), who I think are better known. I bought a developer pack of 10 of their *nearables* which as well as being iBeacons also send out other data (orientation and motion) using their own protocol. This is interesting if you’re developing your own application, but for OwnTracks and HA they are just regular beacons. They are small and self adhesive - so you can stick them to things (like your keys). You can’t change all the parameters on these devices (UUID/Major/Minor are fixed) - and the batteries can’t be replaced. I also killed one of the estimote beacons (I assume the battery died) after I carried it around for a few months and dropped it many times! On the other hand they are well priced, small and waterproof!
|
||||
|
||||
<p>The larger Blue Sense Network beacons seem to be better at maintaining a connection that the Estimotes - although that might be because I’m reluctant to turn the power to maximum and reduce the gap between sending packets on the Estimotes where I can’t replace the batteries!</p>
|
||||
I’ve mainly used these as *devices to track* rather that *location* beacons. Estimote also sell some slightly larger iBeacons with replaceable batteries. Estimote support responded quickly and were helpful when I couldn’t work out how to edit their beacon’s parameters (although the answer was *you can’t yet*).
|
||||
|
||||
<h3><a class='title-link' name='conclusion' href='#conclusion'></a> Conclusion </h3>
|
||||
<p>As I said in <a href="/blog/2016/04/30/ibeacons-part-1-making-presence-detection-work-better">part 1</a>, I’ve found iBeacons to be a good way of improving presence detection. I also used them to track devices like my car and my keys that can’t track themselves.</p>
|
||||
The larger Blue Sense Network beacons seem to be better at maintaining a connection that the Estimotes - although that might be because I’m reluctant to turn the power to maximum and reduce the gap between sending packets on the Estimotes where I can’t replace the batteries!
|
||||
|
||||
<p>I’m still experimenting, so I hope I can do more with iBeacons. I hope I’ve encouraged you do so the same. If you do please share your experiences.</p>
|
||||
### <a class='title-link' name='conclusion' href='#conclusion'></a> Conclusion
|
||||
As I said in [part 1](/blog/2016/04/30/ibeacons-part-1-making-presence-detection-work-better), I’ve found iBeacons to be a good way of improving presence detection. I also used them to track devices like my car and my keys that can’t track themselves.
|
||||
|
||||
<h3><a class='title-link' name='notes' href='#notes'></a> Notes </h3>
|
||||
I'm still experimenting, so I hope I can do more with iBeacons. I hope I've encouraged you do so the same. If you do please share your experiences.
|
||||
|
||||
### <a class='title-link' name='notes' href='#notes'></a> Notes
|
||||
|
||||
Please see the [notes at the end of Part 1](/blog/2016/04/30/ibeacons-part-1-making-presence-detection-work-better/#tips) for documentation information.
|
||||
|
||||
<p>Please see the <a href="/blog/2016/04/30/ibeacons-part-1-making-presence-detection-work-better/#tips">notes at the end of Part 1</a> for documentation information.</p>
|
||||
|
||||
]]></content>
|
||||
</entry>
|
||||
|
@ -174,137 +173,134 @@
|
|||
<link href="https://home-assistant.io/blog/2016/04/30/ibeacons-part-1-making-presence-detection-work-better/"/>
|
||||
<updated>2016-04-30T06:50:09+00:00</updated>
|
||||
<id>https://home-assistant.io/blog/2016/04/30/ibeacons-part-1-making-presence-detection-work-better</id>
|
||||
<content type="html"><._
|
||||
|
||||
<p>In 2013 Apple introduced iBeacons: a class of Bluetooth low energy (LE) devices that broadcast their identifier to nearby devices, including most smartphones. At first glance it’s hard to imagine why they might be useful. In this two part blog I’ll try and explain why they are useful and how you can use them with Home Assistant.</p>
|
||||
In 2013 Apple introduced iBeacons: a class of Bluetooth low energy (LE) devices that broadcast their identifier to nearby devices, including most smartphones. At first glance it’s hard to imagine why they might be useful. In this two part blog I’ll try and explain why they are useful and how you can use them with Home Assistant.
|
||||
|
||||
<p>The reason I started using iBeacons was to improve presence detection (and I think that’s the case with most people) so that’s what I’ll discuss in <em>part 1</em>. In <em>part 2</em> I’ll talk about using iBeacons to track devices that can’t track themselves.</p>
|
||||
The reason I started using iBeacons was to improve presence detection (and I think that’s the case with most people) so that's what I’ll discuss in _part 1_. In _part 2_ I’ll talk about using iBeacons to track devices that can’t track themselves.
|
||||
|
||||
<h3><a class='title-link' name='using-beacons-to-improve-owntracks-location-data' href='#using-beacons-to-improve-owntracks-location-data'></a> Using beacons to improve OwnTracks location data </h3>
|
||||
### <a class='title-link' name='using-beacons-to-improve-owntracks-location-data' href='#using-beacons-to-improve-owntracks-location-data'></a> Using beacons to improve OwnTracks location data
|
||||
|
||||
<p>When you use OwnTracks in standard <em>major move</em> mode (which is kind to your phone battery) it sometimes fails to update when you’d like it to. In my case I found that it would often send a location update as I was on my way home, but then not update when I got home. The result would be that Home Assistant would think I was 500M away from home, and take quite a while to notice I was home. It would also mean that the automation that should turn on my lights when I got home didn’t work very well! There were a few times when my phone location updated at 2am and turned the lights on for me. Fortunately my wife is very patient!</p>
|
||||
When you use OwnTracks in standard _major move_ mode (which is kind to your phone battery) it sometimes fails to update when you’d like it to. In my case I found that it would often send a location update as I was on my way home, but then not update when I got home. The result would be that Home Assistant would think I was 500M away from home, and take quite a while to notice I was home. It would also mean that the automation that should turn on my lights when I got home didn’t work very well! There were a few times when my phone location updated at 2am and turned the lights on for me. Fortunately my wife is very patient!
|
||||
|
||||
<p>Luckily, OwnTracks supports iBeacons so I could use them to make presence detection more reliable. When OwnTracks sees a beacon it recognises, it will send an update. This means that if you put a beacon at your front door - OwnTracks will see it within a few seconds of you arriving home - and send an update saying it has seen this iBeacon.</p>
|
||||
Luckily, OwnTracks supports iBeacons so I could use them to make presence detection more reliable. When OwnTracks sees a beacon it recognises, it will send an update. This means that if you put a beacon at your front door - OwnTracks will see it within a few seconds of you arriving home - and send an update saying it has seen this iBeacon.
|
||||
|
||||
<!--more-->
|
||||
|
||||
<h3><a class='title-link' name='getting-started' href='#getting-started'></a> Getting Started </h3>
|
||||
### <a class='title-link' name='getting-started' href='#getting-started'></a> Getting Started
|
||||
|
||||
<p>To do this you first need to set up <a href="/components/mqtt/#picking-a-broker">MQTT</a> and <a href="/components/device_tracker.owntracks/">OwnTracks</a> in Home assistant - and make sure that HA can track your phone.</p>
|
||||
To do this you first need to set up [MQTT] and [OwnTracks] in Home assistant - and make sure that HA can track your phone.
|
||||
|
||||
<p>You then have to (A) tell Home Assistant where the beacon is located and (B) tell OwnTracks to recognise the beacon.</p>
|
||||
[MQTT]: /components/mqtt/#picking-a-broker
|
||||
[OwnTracks]: /components/device_tracker.owntracks/
|
||||
|
||||
<h4><a class='title-link' name='a-tell-home-assistant-where-your-beacon-is-located' href='#a-tell-home-assistant-where-your-beacon-is-located'></a> A. Tell Home Assistant where your beacon is located </h4>
|
||||
You then have to (A) tell Home Assistant where the beacon is located and (B) tell OwnTracks to recognise the beacon.
|
||||
|
||||
<p>You tell HomeAssistant about fixed locations by creating a Zone with the longitude and latitude of your beacon. You should also give the zone a name which you will also use when you set up OwnTracks. An an example this zone specifies the location of my drive way.</p>
|
||||
#### <a class='title-link' name='a-tell-home-assistant-where-your-beacon-is-located' href='#a-tell-home-assistant-where-your-beacon-is-located'></a> A. Tell Home Assistant where your beacon is located
|
||||
|
||||
<p><strong>Example <code>configuration.yaml</code> entry</strong></p>
|
||||
You tell HomeAssistant about fixed locations by creating a Zone with the longitude and latitude of your beacon. You should also give the zone a name which you will also use when you set up OwnTracks. An an example this zone specifies the location of my drive way.
|
||||
|
||||
<div class="highlighter-coderay"><div class="CodeRay">
|
||||
<div class="code"><pre>
|
||||
<span class="key">zone</span>:
|
||||
- <span class="string"><span class="content">name: 'Drive'</span></span>
|
||||
<span class="key">latitude</span>: <span class="string"><span class="content">XXX</span></span>
|
||||
<span class="key">longitude</span>: <span class="string"><span class="content">YYY</span></span>
|
||||
<span class="key">radius</span>: <span class="string"><span class="content">100</span></span>
|
||||
</pre></div>
|
||||
</div>
|
||||
</div>
|
||||
**Example `configuration.yaml` entry**
|
||||
|
||||
<p>The radius isn’t used by the beacon code, but it is used by the GPS location sensing code. I’ll come back to this a little later. For now just use 50 or 100.</p>
|
||||
````yaml
|
||||
|
||||
<p>Once you’ve created the zone - you need to restart HA. The next step is:-</p>
|
||||
zone:
|
||||
- name: 'Drive'
|
||||
latitude: XXX
|
||||
longitude: YYY
|
||||
radius: 100
|
||||
````
|
||||
|
||||
<h4><a class='title-link' name='b-tell-owntracks-to-track--your-beacon' href='#b-tell-owntracks-to-track--your-beacon'></a> B. Tell OwnTracks to track your beacon </h4>
|
||||
The radius isn’t used by the beacon code, but it is used by the GPS location sensing code. I’ll come back to this a little later. For now just use 50 or 100.
|
||||
|
||||
<ol>
|
||||
<li>Go to the OwnTracks app on your phone</li>
|
||||
<li>Touch the <code>Regions</code> menu at the bottom of the screen</li>
|
||||
<li>Touch the <code>+</code> symbol at the top right of the screen</li>
|
||||
<li>Give the beacon a name e.g. <code>-drive</code> ’(start the name with a <code>-</code> see below for the reason)</li>
|
||||
<li>Turn Share to <code>On</code></li>
|
||||
<li>Skip the <code>Circular Region</code> section</li>
|
||||
<li>Enter the <code>UUID</code> of your beacon - this may be written on your beacon - or you can copy it from the management app that came with your iBeacon device. It’s a long number – so it’s easier to copy if you can!</li>
|
||||
<li>Enter the <code>Minor</code> and <code>Major</code> numbers for your iBeacon - or leave them at 0 which will match all beacons with that <code>UUID</code></li>
|
||||
</ol>
|
||||
Once you’ve created the zone - you need to restart HA. The next step is:-
|
||||
|
||||
<p class="img">
|
||||
<img width="200" border="2" src="https://home-assistant.io/images/blog/2016-04-ibeacons/owntracks_beacon_setup.png" />
|
||||
#### <a class='title-link' name='b-tell-owntracks-to-track--your-beacon' href='#b-tell-owntracks-to-track--your-beacon'></a> B. Tell OwnTracks to track your beacon
|
||||
|
||||
1. Go to the OwnTracks app on your phone
|
||||
2. Touch the `Regions` menu at the bottom of the screen
|
||||
3. Touch the `+` symbol at the top right of the screen
|
||||
4. Give the beacon a name e.g. `-drive` ’(start the name with a `-` see below for the reason)
|
||||
5. Turn Share to `On`
|
||||
6. Skip the `Circular Region` section
|
||||
7. Enter the `UUID` of your beacon - this may be written on your beacon - or you can copy it from the management app that came with your iBeacon device. It’s a long number – so it’s easier to copy if you can!
|
||||
8. Enter the `Minor` and `Major` numbers for your iBeacon - or leave them at 0 which will match all beacons with that `UUID`
|
||||
|
||||
<p class='img'>
|
||||
<img width='200' border='2' src='https://home-assistant.io/images/blog/2016-04-ibeacons/owntracks_beacon_setup.png'>
|
||||
</p>
|
||||
|
||||
<p>Once you’ve added the iBeacon - you should be able to see it on the OwnTracks region screen. If your phone can see the packets from that beacon, OwnTracks will turn the relevant Region red.</p>
|
||||
Once you’ve added the iBeacon - you should be able to see it on the OwnTracks region screen. If your phone can see the packets from that beacon, OwnTracks will turn the relevant Region red.
|
||||
|
||||
<p class="img">
|
||||
<img width="200" src="https://home-assistant.io/images/blog/2016-04-ibeacons/owntracks_red_beacon.png" />
|
||||
<p class='img'>
|
||||
<img width='200' src='https://home-assistant.io/images/blog/2016-04-ibeacons/owntracks_red_beacon.png'>
|
||||
</p>
|
||||
|
||||
<p>When OwnTracks sees the beacon (and turns the region red), it also sends an MQTT packet to HA to say that you have entered that region.</p>
|
||||
When OwnTracks sees the beacon (and turns the region red), it also sends an MQTT packet to HA to say that you have entered that region.
|
||||
|
||||
<p>The result of the configuration above would be to set the location of device.phone to <code>Drive</code> , (and the GPS location to XXX,YYY) when your phone sees the beacon.</p>
|
||||
The result of the configuration above would be to set the location of device.phone to `Drive` , (and the GPS location to XXX,YYY) when your phone sees the beacon.
|
||||
|
||||
<p>So with the steps above you should be able to improve the reliability of tracking your phone - and send timely updates to HA. I did this for my home - and the lights now turn on before I reach the house on foot. If I arrive by car they turn on within a few seconds of arriving, before I can get to the front door.</p>
|
||||
So with the steps above you should be able to improve the reliability of tracking your phone - and send timely updates to HA. I did this for my home - and the lights now turn on before I reach the house on foot. If I arrive by car they turn on within a few seconds of arriving, before I can get to the front door.
|
||||
|
||||
<p>I’m also pleased to say I no longer get an <em>arrive home</em> event at 2am that turns the lights on. I hope I’ve convinced you that iBeacons are worth trying!</p>
|
||||
I’m also pleased to say I no longer get an _arrive home_ event at 2am that turns the lights on. I hope I’ve convinced you that iBeacons are worth trying!
|
||||
|
||||
<h3><a class='title-link' name='mixing-beacons-and-gps-locations' href='#mixing-beacons-and-gps-locations'></a> Mixing Beacons and GPS locations </h3>
|
||||
### <a class='title-link' name='mixing-beacons-and-gps-locations' href='#mixing-beacons-and-gps-locations'></a> Mixing Beacons and GPS locations
|
||||
|
||||
<p>You will probably use beacons to make entry into your existing GPS zones more reliable. By default either a beacon or a GPS location can cause you to enter a zone - and HA has some logic that should make them two work well together (it ignores GPS updates when you’re in an iBeacon Zone).</p>
|
||||
You will probably use beacons to make entry into your existing GPS zones more reliable. By default either a beacon or a GPS location can cause you to enter a zone - and HA has some logic that should make them two work well together (it ignores GPS updates when you’re in an iBeacon Zone).
|
||||
|
||||
<p>However you can also use beacons for situations where GPS doesn’t work well.</p>
|
||||
However you can also use beacons for situations where GPS doesn’t work well.
|
||||
|
||||
<p>This might be because the zones are too close together - or even on top of each other!<br />
|
||||
For example, my wife works next door - and I couldn’t detect whether she’s at home or in the office via GPS because the accuracy wasn’t high enough. However I can do this by using two beacons.</p>
|
||||
This might be because the zones are too close together - or even on top of each other!
|
||||
For example, my wife works next door - and I couldn’t detect whether she’s at home or in the office via GPS because the accuracy wasn’t high enough. However I can do this by using two beacons.
|
||||
|
||||
<p>To make this type of presence detection work you need to turn GPS off for a zone in Home Assistant by making them <code>passive</code>. This is important because otherwise HA will try to decide between two close together zones without enough data. This doesn’t work well.</p>
|
||||
To make this type of presence detection work you need to turn GPS off for a zone in Home Assistant by making them `passive`. This is important because otherwise HA will try to decide between two close together zones without enough data. This doesn’t work well.
|
||||
|
||||
<p>A passive zone can only be entered via an iBeacon, so a GPS location update will always pick the other zone.</p>
|
||||
A passive zone can only be entered via an iBeacon, so a GPS location update will always pick the other zone.
|
||||
|
||||
<p>I set up my Home zone to be a standard region, and my office zone to be passive, so the home zone can be entered in the normal way via either GPS or a Beacon.</p>
|
||||
I set up my Home zone to be a standard region, and my office zone to be passive, so the home zone can be entered in the normal way via either GPS or a Beacon.
|
||||
|
||||
<p><strong>Example <code>configuration.yaml</code> entry</strong></p>
|
||||
**Example `configuration.yaml` entry**
|
||||
|
||||
<div class="highlighter-coderay"><div class="CodeRay">
|
||||
<div class="code"><pre>
|
||||
<span class="key">zone</span>:
|
||||
- <span class="string"><span class="content">name: 'Office'</span></span>
|
||||
<span class="key">latitude</span>: <span class="string"><span class="content">XXX</span></span>
|
||||
<span class="key">longitude</span>: <span class="string"><span class="content">YYY</span></span>
|
||||
<span class="key">radius</span>: <span class="string"><span class="content">3</span></span>
|
||||
<span class="key">passive</span>: <span class="string"><span class="content">true</span></span>
|
||||
</pre></div>
|
||||
</div>
|
||||
</div>
|
||||
````yaml
|
||||
|
||||
<p>You could use this technique to try to detect which room someone is in. This might allow you to notice whether someone is in the living room or the bedroom - even though one is above the other (although beacon packets do pass through walls and floors).</p>
|
||||
zone:
|
||||
- name: 'Office'
|
||||
latitude: XXX
|
||||
longitude: YYY
|
||||
radius: 3
|
||||
passive: true
|
||||
````
|
||||
|
||||
<p>To get this to work you’ll probably need to experiment with the beacon signal strength to try to match the beacon reception area to the location you want to track. Let me know if you get this to work (it doesn’t make sense in my open plan house)</p>
|
||||
You could use this technique to try to detect which room someone is in. This might allow you to notice whether someone is in the living room or the bedroom - even though one is above the other (although beacon packets do pass through walls and floors).
|
||||
|
||||
<h3><a class='title-link' name='conclusion' href='#conclusion'></a> Conclusion </h3>
|
||||
To get this to work you’ll probably need to experiment with the beacon signal strength to try to match the beacon reception area to the location you want to track. Let me know if you get this to work (it doesn’t make sense in my open plan house)
|
||||
|
||||
<p>Presence tracking sounds easy - and it’s an important part of Home Automation. Trying it shows how difficult it is to get presence detection right. I’ve found that iBeacons have improved the reliability and timeliness of knowing where I am, and I hope I encouraged you to try them too.</p>
|
||||
### <a class='title-link' name='conclusion' href='#conclusion'></a> Conclusion
|
||||
|
||||
<h3><a class='title-link' name='tips' href='#tips'></a> Tips </h3>
|
||||
Presence tracking sounds easy - and it's an important part of Home Automation. Trying it shows how difficult it is to get presence detection right. I've found that iBeacons have improved the reliability and timeliness of knowing where I am, and I hope I encouraged you to try them too.
|
||||
|
||||
<p>You can find out more about configuring the OwnTracks application and beacons <a href="http://owntracks.org/booklet/features/beacons/">here</a></p>
|
||||
### <a class='title-link' name='tips' href='#tips'></a> Tips
|
||||
|
||||
<p>There is information about configuring Homeassistant to use beacons <a href="https://home-assistant.io/components/device_tracker.owntracks/">here</a></p>
|
||||
You can find out more about configuring the OwnTracks application and beacons [here](http://owntracks.org/booklet/features/beacons/)
|
||||
|
||||
<h4><a class='title-link' name='connections-and-disconnecting' href='#connections-and-disconnecting'></a> Connections and disconnecting </h4>
|
||||
There is information about configuring Homeassistant to use beacons [here](https://home-assistant.io/components/device_tracker.owntracks/)
|
||||
|
||||
<p>Owntracks treats a region name with a leading <code>-</code> as a hint that it shouldn’t disconnect after a single missed packet. This improves the ability to keep a connection to a beacon.</p>
|
||||
#### <a class='title-link' name='connections-and-disconnecting' href='#connections-and-disconnecting'></a> Connections and disconnecting
|
||||
|
||||
<p>However, even when using this feature I’ve noticed that you can still lose connections (although it seems to vary by beacon manufacturer and type - I’ll talk more about this in <em>part 2</em>). This means that it’s best to take into account that you may see false enter/leave events in HA. You may be able to improve this by changing how often the beacons send packets - and by increasing the signal strength (both will drain your beacon batteries more quickly). You can usually change these parameters in the app supplied by the iBeacon maker. You can also find some high power beacons (which have worked well for me).</p>
|
||||
Owntracks treats a region name with a leading `-` as a hint that it shouldn't disconnect after a single missed packet. This improves the ability to keep a connection to a beacon.
|
||||
|
||||
<p>In automations you can use a <code>for:</code> to avoid triggering during a brief disconnect, or use a script with a delay. Stay tuned for <em>part 2</em> for an example of this.</p>
|
||||
However, even when using this feature I’ve noticed that you can still lose connections (although it seems to vary by beacon manufacturer and type - I’ll talk more about this in _part 2_). This means that it's best to take into account that you may see false enter/leave events in HA. You may be able to improve this by changing how often the beacons send packets - and by increasing the signal strength (both will drain your beacon batteries more quickly). You can usually change these parameters in the app supplied by the iBeacon maker. You can also find some high power beacons (which have worked well for me).
|
||||
|
||||
<h4><a class='title-link' name='using-multiple-beacons-for-the-same-zone' href='#using-multiple-beacons-for-the-same-zone'></a> Using Multiple beacons for the same Zone </h4>
|
||||
<p>iBeacons have a <code>UUID</code> (usually set to the same value for beacons from the same manufacturer), as well as a <code>minor</code> and <code>major</code> number. If you set two beacons to have exactly same details then OwnTracks will think multiple beacons are at the same location.</p>
|
||||
In automations you can use a `for:` to avoid triggering during a brief disconnect, or use a script with a delay. Stay tuned for _part 2_ for an example of this.
|
||||
|
||||
<p>This means you can have more than one beacon around your home - and a connection to any of them will count as <code>home</code> to OwnTracks and HA. This reduces disconnections.</p>
|
||||
#### <a class='title-link' name='using-multiple-beacons-for-the-same-zone' href='#using-multiple-beacons-for-the-same-zone'></a> Using Multiple beacons for the same Zone
|
||||
iBeacons have a `UUID` (usually set to the same value for beacons from the same manufacturer), as well as a `minor` and `major` number. If you set two beacons to have exactly same details then OwnTracks will think multiple beacons are at the same location.
|
||||
|
||||
<p>You can achieve the same effect by using the same the same <code>UUID</code> but different <code>major</code> / <code>minor</code> numbers - and tell OwnTracks not to worry about the <code>minor</code> / <code>major</code> numbers for a particular region by setting them to 0).</p>
|
||||
This means you can have more than one beacon around your home - and a connection to any of them will count as `home` to OwnTracks and HA. This reduces disconnections.
|
||||
|
||||
<p><em>Make sure to also check out <a href="/blog/2016/05/26/ibeacons-how-to-track-things-that-cant-track-themselves-part-ii/">part II</a> where I talk about how to use iBeacons to track any object.</em></p>
|
||||
You can achieve the same effect by using the same the same `UUID` but different `major` / `minor` numbers - and tell OwnTracks not to worry about the `minor` / `major` numbers for a particular region by setting them to 0).
|
||||
|
||||
_Make sure to also check out [part II](/blog/2016/05/26/ibeacons-how-to-track-things-that-cant-track-themselves-part-ii/) where I talk about how to use iBeacons to track any object._
|
||||
]]></content>
|
||||
</entry>
|
||||
|
||||
|
|
|
@ -238,7 +238,7 @@
|
|||
|
||||
|
||||
<li class="post">
|
||||
<a href="/blog/2016/08/13/foursquare-fast-com-ffmpeg-gpsd/">0.26: Foursquare, Fast.com, FFMPEG and GPSD</a>
|
||||
<a href="/blog/2016/08/13/foursquare-fast.com-ffmpeg-gpsd/">0.26: Foursquare, Fast.com, FFMPEG and GPSD</a>
|
||||
</li>
|
||||
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
<title><![CDATA[Category: Presence-Detection | Home Assistant]]></title>
|
||||
<link href="https://home-assistant.io/blog/categories/presence-detection/atom.xml" rel="self"/>
|
||||
<link href="https://home-assistant.io/"/>
|
||||
<updated>2016-08-22T07:26:42+00:00</updated>
|
||||
<updated>2016-08-22T08:20:27+00:00</updated>
|
||||
<id>https://home-assistant.io/</id>
|
||||
<author>
|
||||
<name><![CDATA[Home Assistant]]></name>
|
||||
|
@ -18,137 +18,134 @@
|
|||
<link href="https://home-assistant.io/blog/2016/04/30/ibeacons-part-1-making-presence-detection-work-better/"/>
|
||||
<updated>2016-04-30T06:50:09+00:00</updated>
|
||||
<id>https://home-assistant.io/blog/2016/04/30/ibeacons-part-1-making-presence-detection-work-better</id>
|
||||
<content type="html"><._
|
||||
|
||||
<p>In 2013 Apple introduced iBeacons: a class of Bluetooth low energy (LE) devices that broadcast their identifier to nearby devices, including most smartphones. At first glance it’s hard to imagine why they might be useful. In this two part blog I’ll try and explain why they are useful and how you can use them with Home Assistant.</p>
|
||||
In 2013 Apple introduced iBeacons: a class of Bluetooth low energy (LE) devices that broadcast their identifier to nearby devices, including most smartphones. At first glance it’s hard to imagine why they might be useful. In this two part blog I’ll try and explain why they are useful and how you can use them with Home Assistant.
|
||||
|
||||
<p>The reason I started using iBeacons was to improve presence detection (and I think that’s the case with most people) so that’s what I’ll discuss in <em>part 1</em>. In <em>part 2</em> I’ll talk about using iBeacons to track devices that can’t track themselves.</p>
|
||||
The reason I started using iBeacons was to improve presence detection (and I think that’s the case with most people) so that's what I’ll discuss in _part 1_. In _part 2_ I’ll talk about using iBeacons to track devices that can’t track themselves.
|
||||
|
||||
<h3><a class='title-link' name='using-beacons-to-improve-owntracks-location-data' href='#using-beacons-to-improve-owntracks-location-data'></a> Using beacons to improve OwnTracks location data </h3>
|
||||
### <a class='title-link' name='using-beacons-to-improve-owntracks-location-data' href='#using-beacons-to-improve-owntracks-location-data'></a> Using beacons to improve OwnTracks location data
|
||||
|
||||
<p>When you use OwnTracks in standard <em>major move</em> mode (which is kind to your phone battery) it sometimes fails to update when you’d like it to. In my case I found that it would often send a location update as I was on my way home, but then not update when I got home. The result would be that Home Assistant would think I was 500M away from home, and take quite a while to notice I was home. It would also mean that the automation that should turn on my lights when I got home didn’t work very well! There were a few times when my phone location updated at 2am and turned the lights on for me. Fortunately my wife is very patient!</p>
|
||||
When you use OwnTracks in standard _major move_ mode (which is kind to your phone battery) it sometimes fails to update when you’d like it to. In my case I found that it would often send a location update as I was on my way home, but then not update when I got home. The result would be that Home Assistant would think I was 500M away from home, and take quite a while to notice I was home. It would also mean that the automation that should turn on my lights when I got home didn’t work very well! There were a few times when my phone location updated at 2am and turned the lights on for me. Fortunately my wife is very patient!
|
||||
|
||||
<p>Luckily, OwnTracks supports iBeacons so I could use them to make presence detection more reliable. When OwnTracks sees a beacon it recognises, it will send an update. This means that if you put a beacon at your front door - OwnTracks will see it within a few seconds of you arriving home - and send an update saying it has seen this iBeacon.</p>
|
||||
Luckily, OwnTracks supports iBeacons so I could use them to make presence detection more reliable. When OwnTracks sees a beacon it recognises, it will send an update. This means that if you put a beacon at your front door - OwnTracks will see it within a few seconds of you arriving home - and send an update saying it has seen this iBeacon.
|
||||
|
||||
<!--more-->
|
||||
|
||||
<h3><a class='title-link' name='getting-started' href='#getting-started'></a> Getting Started </h3>
|
||||
### <a class='title-link' name='getting-started' href='#getting-started'></a> Getting Started
|
||||
|
||||
<p>To do this you first need to set up <a href="/components/mqtt/#picking-a-broker">MQTT</a> and <a href="/components/device_tracker.owntracks/">OwnTracks</a> in Home assistant - and make sure that HA can track your phone.</p>
|
||||
To do this you first need to set up [MQTT] and [OwnTracks] in Home assistant - and make sure that HA can track your phone.
|
||||
|
||||
<p>You then have to (A) tell Home Assistant where the beacon is located and (B) tell OwnTracks to recognise the beacon.</p>
|
||||
[MQTT]: /components/mqtt/#picking-a-broker
|
||||
[OwnTracks]: /components/device_tracker.owntracks/
|
||||
|
||||
<h4><a class='title-link' name='a-tell-home-assistant-where-your-beacon-is-located' href='#a-tell-home-assistant-where-your-beacon-is-located'></a> A. Tell Home Assistant where your beacon is located </h4>
|
||||
You then have to (A) tell Home Assistant where the beacon is located and (B) tell OwnTracks to recognise the beacon.
|
||||
|
||||
<p>You tell HomeAssistant about fixed locations by creating a Zone with the longitude and latitude of your beacon. You should also give the zone a name which you will also use when you set up OwnTracks. An an example this zone specifies the location of my drive way.</p>
|
||||
#### <a class='title-link' name='a-tell-home-assistant-where-your-beacon-is-located' href='#a-tell-home-assistant-where-your-beacon-is-located'></a> A. Tell Home Assistant where your beacon is located
|
||||
|
||||
<p><strong>Example <code>configuration.yaml</code> entry</strong></p>
|
||||
You tell HomeAssistant about fixed locations by creating a Zone with the longitude and latitude of your beacon. You should also give the zone a name which you will also use when you set up OwnTracks. An an example this zone specifies the location of my drive way.
|
||||
|
||||
<div class="highlighter-coderay"><div class="CodeRay">
|
||||
<div class="code"><pre>
|
||||
<span class="key">zone</span>:
|
||||
- <span class="string"><span class="content">name: 'Drive'</span></span>
|
||||
<span class="key">latitude</span>: <span class="string"><span class="content">XXX</span></span>
|
||||
<span class="key">longitude</span>: <span class="string"><span class="content">YYY</span></span>
|
||||
<span class="key">radius</span>: <span class="string"><span class="content">100</span></span>
|
||||
</pre></div>
|
||||
</div>
|
||||
</div>
|
||||
**Example `configuration.yaml` entry**
|
||||
|
||||
<p>The radius isn’t used by the beacon code, but it is used by the GPS location sensing code. I’ll come back to this a little later. For now just use 50 or 100.</p>
|
||||
````yaml
|
||||
|
||||
<p>Once you’ve created the zone - you need to restart HA. The next step is:-</p>
|
||||
zone:
|
||||
- name: 'Drive'
|
||||
latitude: XXX
|
||||
longitude: YYY
|
||||
radius: 100
|
||||
````
|
||||
|
||||
<h4><a class='title-link' name='b-tell-owntracks-to-track--your-beacon' href='#b-tell-owntracks-to-track--your-beacon'></a> B. Tell OwnTracks to track your beacon </h4>
|
||||
The radius isn’t used by the beacon code, but it is used by the GPS location sensing code. I’ll come back to this a little later. For now just use 50 or 100.
|
||||
|
||||
<ol>
|
||||
<li>Go to the OwnTracks app on your phone</li>
|
||||
<li>Touch the <code>Regions</code> menu at the bottom of the screen</li>
|
||||
<li>Touch the <code>+</code> symbol at the top right of the screen</li>
|
||||
<li>Give the beacon a name e.g. <code>-drive</code> ’(start the name with a <code>-</code> see below for the reason)</li>
|
||||
<li>Turn Share to <code>On</code></li>
|
||||
<li>Skip the <code>Circular Region</code> section</li>
|
||||
<li>Enter the <code>UUID</code> of your beacon - this may be written on your beacon - or you can copy it from the management app that came with your iBeacon device. It’s a long number – so it’s easier to copy if you can!</li>
|
||||
<li>Enter the <code>Minor</code> and <code>Major</code> numbers for your iBeacon - or leave them at 0 which will match all beacons with that <code>UUID</code></li>
|
||||
</ol>
|
||||
Once you’ve created the zone - you need to restart HA. The next step is:-
|
||||
|
||||
<p class="img">
|
||||
<img width="200" border="2" src="https://home-assistant.io/images/blog/2016-04-ibeacons/owntracks_beacon_setup.png" />
|
||||
#### <a class='title-link' name='b-tell-owntracks-to-track--your-beacon' href='#b-tell-owntracks-to-track--your-beacon'></a> B. Tell OwnTracks to track your beacon
|
||||
|
||||
1. Go to the OwnTracks app on your phone
|
||||
2. Touch the `Regions` menu at the bottom of the screen
|
||||
3. Touch the `+` symbol at the top right of the screen
|
||||
4. Give the beacon a name e.g. `-drive` ’(start the name with a `-` see below for the reason)
|
||||
5. Turn Share to `On`
|
||||
6. Skip the `Circular Region` section
|
||||
7. Enter the `UUID` of your beacon - this may be written on your beacon - or you can copy it from the management app that came with your iBeacon device. It’s a long number – so it’s easier to copy if you can!
|
||||
8. Enter the `Minor` and `Major` numbers for your iBeacon - or leave them at 0 which will match all beacons with that `UUID`
|
||||
|
||||
<p class='img'>
|
||||
<img width='200' border='2' src='https://home-assistant.io/images/blog/2016-04-ibeacons/owntracks_beacon_setup.png'>
|
||||
</p>
|
||||
|
||||
<p>Once you’ve added the iBeacon - you should be able to see it on the OwnTracks region screen. If your phone can see the packets from that beacon, OwnTracks will turn the relevant Region red.</p>
|
||||
Once you’ve added the iBeacon - you should be able to see it on the OwnTracks region screen. If your phone can see the packets from that beacon, OwnTracks will turn the relevant Region red.
|
||||
|
||||
<p class="img">
|
||||
<img width="200" src="https://home-assistant.io/images/blog/2016-04-ibeacons/owntracks_red_beacon.png" />
|
||||
<p class='img'>
|
||||
<img width='200' src='https://home-assistant.io/images/blog/2016-04-ibeacons/owntracks_red_beacon.png'>
|
||||
</p>
|
||||
|
||||
<p>When OwnTracks sees the beacon (and turns the region red), it also sends an MQTT packet to HA to say that you have entered that region.</p>
|
||||
When OwnTracks sees the beacon (and turns the region red), it also sends an MQTT packet to HA to say that you have entered that region.
|
||||
|
||||
<p>The result of the configuration above would be to set the location of device.phone to <code>Drive</code> , (and the GPS location to XXX,YYY) when your phone sees the beacon.</p>
|
||||
The result of the configuration above would be to set the location of device.phone to `Drive` , (and the GPS location to XXX,YYY) when your phone sees the beacon.
|
||||
|
||||
<p>So with the steps above you should be able to improve the reliability of tracking your phone - and send timely updates to HA. I did this for my home - and the lights now turn on before I reach the house on foot. If I arrive by car they turn on within a few seconds of arriving, before I can get to the front door.</p>
|
||||
So with the steps above you should be able to improve the reliability of tracking your phone - and send timely updates to HA. I did this for my home - and the lights now turn on before I reach the house on foot. If I arrive by car they turn on within a few seconds of arriving, before I can get to the front door.
|
||||
|
||||
<p>I’m also pleased to say I no longer get an <em>arrive home</em> event at 2am that turns the lights on. I hope I’ve convinced you that iBeacons are worth trying!</p>
|
||||
I’m also pleased to say I no longer get an _arrive home_ event at 2am that turns the lights on. I hope I’ve convinced you that iBeacons are worth trying!
|
||||
|
||||
<h3><a class='title-link' name='mixing-beacons-and-gps-locations' href='#mixing-beacons-and-gps-locations'></a> Mixing Beacons and GPS locations </h3>
|
||||
### <a class='title-link' name='mixing-beacons-and-gps-locations' href='#mixing-beacons-and-gps-locations'></a> Mixing Beacons and GPS locations
|
||||
|
||||
<p>You will probably use beacons to make entry into your existing GPS zones more reliable. By default either a beacon or a GPS location can cause you to enter a zone - and HA has some logic that should make them two work well together (it ignores GPS updates when you’re in an iBeacon Zone).</p>
|
||||
You will probably use beacons to make entry into your existing GPS zones more reliable. By default either a beacon or a GPS location can cause you to enter a zone - and HA has some logic that should make them two work well together (it ignores GPS updates when you’re in an iBeacon Zone).
|
||||
|
||||
<p>However you can also use beacons for situations where GPS doesn’t work well.</p>
|
||||
However you can also use beacons for situations where GPS doesn’t work well.
|
||||
|
||||
<p>This might be because the zones are too close together - or even on top of each other!<br />
|
||||
For example, my wife works next door - and I couldn’t detect whether she’s at home or in the office via GPS because the accuracy wasn’t high enough. However I can do this by using two beacons.</p>
|
||||
This might be because the zones are too close together - or even on top of each other!
|
||||
For example, my wife works next door - and I couldn’t detect whether she’s at home or in the office via GPS because the accuracy wasn’t high enough. However I can do this by using two beacons.
|
||||
|
||||
<p>To make this type of presence detection work you need to turn GPS off for a zone in Home Assistant by making them <code>passive</code>. This is important because otherwise HA will try to decide between two close together zones without enough data. This doesn’t work well.</p>
|
||||
To make this type of presence detection work you need to turn GPS off for a zone in Home Assistant by making them `passive`. This is important because otherwise HA will try to decide between two close together zones without enough data. This doesn’t work well.
|
||||
|
||||
<p>A passive zone can only be entered via an iBeacon, so a GPS location update will always pick the other zone.</p>
|
||||
A passive zone can only be entered via an iBeacon, so a GPS location update will always pick the other zone.
|
||||
|
||||
<p>I set up my Home zone to be a standard region, and my office zone to be passive, so the home zone can be entered in the normal way via either GPS or a Beacon.</p>
|
||||
I set up my Home zone to be a standard region, and my office zone to be passive, so the home zone can be entered in the normal way via either GPS or a Beacon.
|
||||
|
||||
<p><strong>Example <code>configuration.yaml</code> entry</strong></p>
|
||||
**Example `configuration.yaml` entry**
|
||||
|
||||
<div class="highlighter-coderay"><div class="CodeRay">
|
||||
<div class="code"><pre>
|
||||
<span class="key">zone</span>:
|
||||
- <span class="string"><span class="content">name: 'Office'</span></span>
|
||||
<span class="key">latitude</span>: <span class="string"><span class="content">XXX</span></span>
|
||||
<span class="key">longitude</span>: <span class="string"><span class="content">YYY</span></span>
|
||||
<span class="key">radius</span>: <span class="string"><span class="content">3</span></span>
|
||||
<span class="key">passive</span>: <span class="string"><span class="content">true</span></span>
|
||||
</pre></div>
|
||||
</div>
|
||||
</div>
|
||||
````yaml
|
||||
|
||||
<p>You could use this technique to try to detect which room someone is in. This might allow you to notice whether someone is in the living room or the bedroom - even though one is above the other (although beacon packets do pass through walls and floors).</p>
|
||||
zone:
|
||||
- name: 'Office'
|
||||
latitude: XXX
|
||||
longitude: YYY
|
||||
radius: 3
|
||||
passive: true
|
||||
````
|
||||
|
||||
<p>To get this to work you’ll probably need to experiment with the beacon signal strength to try to match the beacon reception area to the location you want to track. Let me know if you get this to work (it doesn’t make sense in my open plan house)</p>
|
||||
You could use this technique to try to detect which room someone is in. This might allow you to notice whether someone is in the living room or the bedroom - even though one is above the other (although beacon packets do pass through walls and floors).
|
||||
|
||||
<h3><a class='title-link' name='conclusion' href='#conclusion'></a> Conclusion </h3>
|
||||
To get this to work you’ll probably need to experiment with the beacon signal strength to try to match the beacon reception area to the location you want to track. Let me know if you get this to work (it doesn’t make sense in my open plan house)
|
||||
|
||||
<p>Presence tracking sounds easy - and it’s an important part of Home Automation. Trying it shows how difficult it is to get presence detection right. I’ve found that iBeacons have improved the reliability and timeliness of knowing where I am, and I hope I encouraged you to try them too.</p>
|
||||
### <a class='title-link' name='conclusion' href='#conclusion'></a> Conclusion
|
||||
|
||||
<h3><a class='title-link' name='tips' href='#tips'></a> Tips </h3>
|
||||
Presence tracking sounds easy - and it's an important part of Home Automation. Trying it shows how difficult it is to get presence detection right. I've found that iBeacons have improved the reliability and timeliness of knowing where I am, and I hope I encouraged you to try them too.
|
||||
|
||||
<p>You can find out more about configuring the OwnTracks application and beacons <a href="http://owntracks.org/booklet/features/beacons/">here</a></p>
|
||||
### <a class='title-link' name='tips' href='#tips'></a> Tips
|
||||
|
||||
<p>There is information about configuring Homeassistant to use beacons <a href="https://home-assistant.io/components/device_tracker.owntracks/">here</a></p>
|
||||
You can find out more about configuring the OwnTracks application and beacons [here](http://owntracks.org/booklet/features/beacons/)
|
||||
|
||||
<h4><a class='title-link' name='connections-and-disconnecting' href='#connections-and-disconnecting'></a> Connections and disconnecting </h4>
|
||||
There is information about configuring Homeassistant to use beacons [here](https://home-assistant.io/components/device_tracker.owntracks/)
|
||||
|
||||
<p>Owntracks treats a region name with a leading <code>-</code> as a hint that it shouldn’t disconnect after a single missed packet. This improves the ability to keep a connection to a beacon.</p>
|
||||
#### <a class='title-link' name='connections-and-disconnecting' href='#connections-and-disconnecting'></a> Connections and disconnecting
|
||||
|
||||
<p>However, even when using this feature I’ve noticed that you can still lose connections (although it seems to vary by beacon manufacturer and type - I’ll talk more about this in <em>part 2</em>). This means that it’s best to take into account that you may see false enter/leave events in HA. You may be able to improve this by changing how often the beacons send packets - and by increasing the signal strength (both will drain your beacon batteries more quickly). You can usually change these parameters in the app supplied by the iBeacon maker. You can also find some high power beacons (which have worked well for me).</p>
|
||||
Owntracks treats a region name with a leading `-` as a hint that it shouldn't disconnect after a single missed packet. This improves the ability to keep a connection to a beacon.
|
||||
|
||||
<p>In automations you can use a <code>for:</code> to avoid triggering during a brief disconnect, or use a script with a delay. Stay tuned for <em>part 2</em> for an example of this.</p>
|
||||
However, even when using this feature I’ve noticed that you can still lose connections (although it seems to vary by beacon manufacturer and type - I’ll talk more about this in _part 2_). This means that it's best to take into account that you may see false enter/leave events in HA. You may be able to improve this by changing how often the beacons send packets - and by increasing the signal strength (both will drain your beacon batteries more quickly). You can usually change these parameters in the app supplied by the iBeacon maker. You can also find some high power beacons (which have worked well for me).
|
||||
|
||||
<h4><a class='title-link' name='using-multiple-beacons-for-the-same-zone' href='#using-multiple-beacons-for-the-same-zone'></a> Using Multiple beacons for the same Zone </h4>
|
||||
<p>iBeacons have a <code>UUID</code> (usually set to the same value for beacons from the same manufacturer), as well as a <code>minor</code> and <code>major</code> number. If you set two beacons to have exactly same details then OwnTracks will think multiple beacons are at the same location.</p>
|
||||
In automations you can use a `for:` to avoid triggering during a brief disconnect, or use a script with a delay. Stay tuned for _part 2_ for an example of this.
|
||||
|
||||
<p>This means you can have more than one beacon around your home - and a connection to any of them will count as <code>home</code> to OwnTracks and HA. This reduces disconnections.</p>
|
||||
#### <a class='title-link' name='using-multiple-beacons-for-the-same-zone' href='#using-multiple-beacons-for-the-same-zone'></a> Using Multiple beacons for the same Zone
|
||||
iBeacons have a `UUID` (usually set to the same value for beacons from the same manufacturer), as well as a `minor` and `major` number. If you set two beacons to have exactly same details then OwnTracks will think multiple beacons are at the same location.
|
||||
|
||||
<p>You can achieve the same effect by using the same the same <code>UUID</code> but different <code>major</code> / <code>minor</code> numbers - and tell OwnTracks not to worry about the <code>minor</code> / <code>major</code> numbers for a particular region by setting them to 0).</p>
|
||||
This means you can have more than one beacon around your home - and a connection to any of them will count as `home` to OwnTracks and HA. This reduces disconnections.
|
||||
|
||||
<p><em>Make sure to also check out <a href="/blog/2016/05/26/ibeacons-how-to-track-things-that-cant-track-themselves-part-ii/">part II</a> where I talk about how to use iBeacons to track any object.</em></p>
|
||||
You can achieve the same effect by using the same the same `UUID` but different `major` / `minor` numbers - and tell OwnTracks not to worry about the `minor` / `major` numbers for a particular region by setting them to 0).
|
||||
|
||||
_Make sure to also check out [part II](/blog/2016/05/26/ibeacons-how-to-track-things-that-cant-track-themselves-part-ii/) where I talk about how to use iBeacons to track any object._
|
||||
]]></content>
|
||||
</entry>
|
||||
|
||||
|
|
|
@ -202,7 +202,7 @@
|
|||
|
||||
|
||||
<li class="post">
|
||||
<a href="/blog/2016/08/13/foursquare-fast-com-ffmpeg-gpsd/">0.26: Foursquare, Fast.com, FFMPEG and GPSD</a>
|
||||
<a href="/blog/2016/08/13/foursquare-fast.com-ffmpeg-gpsd/">0.26: Foursquare, Fast.com, FFMPEG and GPSD</a>
|
||||
</li>
|
||||
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
<title><![CDATA[Category: Public-Service-Announcement | Home Assistant]]></title>
|
||||
<link href="https://home-assistant.io/blog/categories/public-service-announcement/atom.xml" rel="self"/>
|
||||
<link href="https://home-assistant.io/"/>
|
||||
<updated>2016-08-22T07:26:42+00:00</updated>
|
||||
<updated>2016-08-22T08:20:27+00:00</updated>
|
||||
<id>https://home-assistant.io/</id>
|
||||
<author>
|
||||
<name><![CDATA[Home Assistant]]></name>
|
||||
|
@ -18,40 +18,42 @@
|
|||
<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>
|
||||
<content type="html"><![CDATA[**Update Dec 16**: Great news! Philips has decided to [reverse their decision][philips-reverse] and is working on a software update to allow 3rd party light bulbs again.
|
||||
|
||||
<p class="img">
|
||||
<img src="https://home-assistant.io/images/blog/2015-12-philips-hue-3rd-party/philips-hue-reversed-faq.png" />
|
||||
<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>
|
||||
*Original post:*
|
||||
|
||||
<!--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>
|
||||
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>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="/images/blog/2015-12-philips-hue-3rd-party/mirror.png">mirror here</a>):</p>
|
||||
Yesterday a thread on [/r/homeautomation][reddit-hue] 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 [Philips Hue FAQ][philips-hue-faq] (Update Dec 14: they have removed the entries - [mirror here][philips-hue-faq-mirror]):
|
||||
|
||||
<p class="img">
|
||||
<img src="https://home-assistant.io/images/blog/2015-12-philips-hue-3rd-party/philips-hue-faq.png" />
|
||||
<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>
|
||||
This means that after you update your Hue bridge to the latest version:
|
||||
|
||||
<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>You’re 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>
|
||||
- As of now, you can still use your existing paired 3rd party light bulbs
|
||||
- You cannot pair new 3rd party light bulbs
|
||||
- You're out of luck if for some reason you have to pair existing 3rd party light bulbs again
|
||||
- Resetting your hub will force pairing of all your bulbs again
|
||||
|
||||
<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>
|
||||
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>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>
|
||||
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>I will no longer suggest people to buy into the Philips Hue ecosystem.</p>
|
||||
I will no longer suggest people to buy into the Philips Hue ecosystem.
|
||||
|
||||
[philips-reverse]: http://www.developers.meethue.com/documentation/friends-hue-update
|
||||
[reddit-hue]: https://www.reddit.com/r/homeautomation/comments/3wet8h/fyi_the_hue_hub_is_now_blocking_third_party/
|
||||
[philips-hue-faq]: http://www2.meethue.com/en-us/support/search/?q=Another+brand
|
||||
[philips-hue-faq-mirror]: /images/blog/2015-12-philips-hue-3rd-party/mirror.png
|
||||
]]></content>
|
||||
</entry>
|
||||
|
||||
|
|
|
@ -198,7 +198,7 @@
|
|||
|
||||
|
||||
<li class="post">
|
||||
<a href="/blog/2016/08/13/foursquare-fast-com-ffmpeg-gpsd/">0.26: Foursquare, Fast.com, FFMPEG and GPSD</a>
|
||||
<a href="/blog/2016/08/13/foursquare-fast.com-ffmpeg-gpsd/">0.26: Foursquare, Fast.com, FFMPEG and GPSD</a>
|
||||
</li>
|
||||
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
<title><![CDATA[Category: Release-Notes | Home Assistant]]></title>
|
||||
<link href="https://home-assistant.io/blog/categories/release-notes/atom.xml" rel="self"/>
|
||||
<link href="https://home-assistant.io/"/>
|
||||
<updated>2016-08-22T07:26:42+00:00</updated>
|
||||
<updated>2016-08-22T08:20:27+00:00</updated>
|
||||
<id>https://home-assistant.io/</id>
|
||||
<author>
|
||||
<name><![CDATA[Home Assistant]]></name>
|
||||
|
@ -15,80 +15,116 @@
|
|||
|
||||
<entry>
|
||||
<title type="html"><![CDATA[0.26: Foursquare, Fast.com, FFMPEG and GPSD]]></title>
|
||||
<link href="https://home-assistant.io/blog/2016/08/13/foursquare-fast-com-ffmpeg-gpsd/"/>
|
||||
<link href="https://home-assistant.io/blog/2016/08/13/foursquare-fast.com-ffmpeg-gpsd/"/>
|
||||
<updated>2016-08-13T19:00:00+00:00</updated>
|
||||
<id>https://home-assistant.io/blog/2016/08/13/foursquare--fast.com--ffmpeg--gpsd</id>
|
||||
<content type="html"><![CDATA[<p>It’s time for 0.26 and it’s again full of new features and fixes. First I want to highlight that we are now having 500 000 monthly pageviews on the website. A big milestone for us! It’s been an amazing journey. Big thanks to the Home Assistant community for being such a delightful bunch.</p>
|
||||
<content type="html"><![CDATA[It's time for 0.26 and it's again full of new features and fixes. First I want to highlight that we are now having 500 000 monthly pageviews on the website. A big milestone for us! It's been an amazing journey. Big thanks to the Home Assistant community for being such a delightful bunch.
|
||||
|
||||
<p>This release includes code contributed by 31 different people. The biggest change in this release is a new unit system. Instead of picking Celsius or Fahrenheit you’ll have to pick imperial or metric now. This influences the units for your temperature, distance, and weight. This will simplify any platform or component that needs to know this information. Big thanks to <a href="https://github.com/Teagan42">@Teagan42</a> for her hard work on this!</p>
|
||||
This release includes code contributed by 31 different people. The biggest change in this release is a new unit system. Instead of picking Celsius or Fahrenheit you'll have to pick imperial or metric now. This influences the units for your temperature, distance, and weight. This will simplify any platform or component that needs to know this information. Big thanks to [@Teagan42] for her hard work on this!
|
||||
|
||||
<p><img src="https://home-assistant.io/images/supported_brands/foursquare.png" style="clear: right; margin-left: 5px; border:none; box-shadow: none; float: right; margin-bottom: 16px;" width="100" /><img src="https://home-assistant.io/images/supported_brands/ohmconnect.png" style="clear: right; margin-left: 5px; border:none; box-shadow: none; float: right; margin-bottom: 16px;" width="100" /><img src="https://home-assistant.io/images/supported_brands/fastdotcom.png" style="clear: right; margin-left: 5px; border:none; box-shadow: none; float: right; margin-bottom: 16px;" width="100" /><img src="https://home-assistant.io/images/supported_brands/gpsd.png" style="clear: right; margin-left: 5px; border:none; box-shadow: none; float: right; margin-bottom: 16px;" width="100" /><img src="https://home-assistant.io/images/supported_brands/ffmpeg.png" style="clear: right; margin-left: 5px; border:none; box-shadow: none; float: right; margin-bottom: 16px;" width="100" /></p>
|
||||
<img src='https://home-assistant.io/images/supported_brands/foursquare.png' style='clear: right; margin-left: 5px; border:none; box-shadow: none; float: right; margin-bottom: 16px;' width='100' /><img src='https://home-assistant.io/images/supported_brands/ohmconnect.png' style='clear: right; margin-left: 5px; border:none; box-shadow: none; float: right; margin-bottom: 16px;' width='100' /><img src='https://home-assistant.io/images/supported_brands/fastdotcom.png' style='clear: right; margin-left: 5px; border:none; box-shadow: none; float: right; margin-bottom: 16px;' width='100' /><img src='https://home-assistant.io/images/supported_brands/gpsd.png' style='clear: right; margin-left: 5px; border:none; box-shadow: none; float: right; margin-bottom: 16px;' width='100' /><img src='https://home-assistant.io/images/supported_brands/ffmpeg.png' style='clear: right; margin-left: 5px; border:none; box-shadow: none; float: right; margin-bottom: 16px;' width='100' />
|
||||
|
||||
<ul>
|
||||
<li>Core: Introduce notion of unit system (deprecates temperature unit option) (<a href="https://github.com/Teagan42">@Teagan42</a>)</li>
|
||||
<li>Front end: Speed improvements (<a href="https://github.com/balloob">@balloob</a>)</li>
|
||||
<li>Front end: Improve layout of state dev tool (<a href="https://github.com/balloob">@balloob</a>)</li>
|
||||
<li><a href="/components/proximity/">Proximity</a>: Allow definition of unit of measurement (<a href="https://github.com/Teagan42">@Teagan42</a>)</li>
|
||||
<li><a href="/components/switch.flux/">Flux</a>: Add mired and kelvin mode (<a href="https://github.com/HBDK">@HBDK</a>)</li>
|
||||
<li>Thermostat - <a href="/components/thermostat.proliphix/">Proliphix</a>: Support for cooling (<a href="https://github.com/sdague">@sdague</a>)</li>
|
||||
<li>Media Player - <a href="/components/media_player.lg_netcast/">LG Netcast TV</a>: Show screenshot of what is currently playing (<a href="https://github.com/shmuelzon">@shmuelzon</a>)</li>
|
||||
<li>Z-Wave improvements (<a href="https://github.com/jnewland">@jnewland</a>, <a href="https://github.com/turbokongen">@turbokongen</a>)</li>
|
||||
<li>Thermostat - <a href="/components/thermostat.heat_control/">heat control</a>: now also able to control an AC (<a href="https://github.com/mtreinish">@mtreinish</a>)</li>
|
||||
<li>Thermostat - <a href="/components/thermostat.heat_control/">heat control</a>: allow specifying a minimum duration before switching (<a href="https://github.com/mtreinish">@mtreinish</a>)</li>
|
||||
<li><a href="/components/influxdb/">InfluxDB</a>: Whitelist entities option added (<a href="https://github.com/tchellomello">@tchellomello</a>)</li>
|
||||
<li>Sensor: Serial <a href="/components/sensor.serial_pm/">particulate matters</a> sensors now supported (<a href="https://github.com/open-homeautomation">@open-homeautomation</a>)</li>
|
||||
<li>Sensor - <a href="/components/sensor.fitbit/">Fitbit</a>: Fix unit system (<a href="https://github.com/tchellomello">@tchellomello</a>)</li>
|
||||
<li>Light - <a href="/components/light.flux_led/">Flux LED</a>: Add support for [color and brightness][color] (<a href="https://github.com/Danielhiversen">@Danielhiversen</a>)</li>
|
||||
<li>Media Player - <a href="/components/media_player.plex/">Plex</a>: Now able to report on music (<a href="https://github.com/abcminiuser">@abcminiuser</a>)</li>
|
||||
<li>Alarm Control Panel - <a href="/components/alarm_control_panel.verisure/">Verisure</a>: Now able to see who changed the alarm (<a href="https://github.com/persandtrom">@persandtrom</a>)</li>
|
||||
<li>Thermostat - <a href="/components/thermostat.honeywell/">Honeywell</a>: Add option to read and control HVAC mode (<a href="https://github.com/Teagan42">@Teagan42</a>)</li>
|
||||
<li><a href="/components/foursquare/">Foursquare</a> component to receive instant notifications of checkins (<a href="https://github.com/robbiet480">@robbiet480</a>)</li>
|
||||
<li>Camera: New <a href="/components/camera.ffmpeg/">FFMPEG</a> platform allows to stream anything through front end (<a href="https://github.com/pvizeli">@pvizeli</a>)</li>
|
||||
<li>Manage <a href="/topics/secrets/">secrets</a> with new command line script (<a href="https://github.com/kellerza">@kellerza</a>)</li>
|
||||
<li>Notify - <a href="/components/notify.smtp/">SMTP</a>: Allow embedding of images (<a href="https://github.com/partofthething">@partofthething</a>)</li>
|
||||
<li>Sensor: <a href="/components/sensor.ohmconnect/">OhmConnect</a> is now supported (<a href="https://github.com/robbiet480">@robbiet480</a>)</li>
|
||||
<li><a href="/components/panel_custom/">panel_custom</a> component allows the registering of new panels (<a href="https://github.com/balloob">@balloob</a>)</li>
|
||||
<li>Light: New <a href="/components/light.mqtt_json/">mqtt_json</a> platform for working with JSON payload (<a href="https://github.com/corbanmailloux">@corbanmailloux</a>)</li>
|
||||
<li>Sensor: New <a href="/components/sensor.fastdotcom/">Fast.com</a> platform to measure network bandwidth performance (<a href="https://github.com/nkgilley">@nkgilley</a>)</li>
|
||||
<li>New <a href="/components/pilight/">pilight</a> component to control 433 Mz devices (<a href="https://github.com/DavidLP">@DavidLP</a>)</li>
|
||||
<li>Sensor: <a href="/components/sensor.gpsd/">GPSD</a> now supported (<a href="https://github.com/fabaff">@fabaff</a>)</li>
|
||||
</ul>
|
||||
- Core: Introduce notion of unit system (deprecates temperature unit option) ([@Teagan42])
|
||||
- Front end: Speed improvements ([@balloob])
|
||||
- Front end: Improve layout of state dev tool ([@balloob])
|
||||
- [Proximity]\: Allow definition of unit of measurement ([@Teagan42])
|
||||
- [Flux]\: Add mired and kelvin mode ([@HBDK])
|
||||
- Thermostat - [Proliphix]: Support for cooling ([@sdague])
|
||||
- Media Player - [LG Netcast TV]: Show screenshot of what is currently playing ([@shmuelzon])
|
||||
- Z-Wave improvements ([@jnewland], [@turbokongen])
|
||||
- Thermostat - [heat control]: now also able to control an AC ([@mtreinish])
|
||||
- Thermostat - [heat control]: allow specifying a minimum duration before switching ([@mtreinish])
|
||||
- [InfluxDB]\: Whitelist entities option added ([@tchellomello])
|
||||
- Sensor: Serial [particulate matters][particulate] sensors now supported ([@open-homeautomation])
|
||||
- Sensor - [Fitbit]: Fix unit system ([@tchellomello])
|
||||
- Light - [Flux LED]: Add support for [color and brightness][color] ([@Danielhiversen])
|
||||
- Media Player - [Plex]: Now able to report on music ([@abcminiuser])
|
||||
- Alarm Control Panel - [Verisure]: Now able to see who changed the alarm ([@persandtrom])
|
||||
- Thermostat - [Honeywell]: Add option to read and control HVAC mode ([@Teagan42])
|
||||
- [Foursquare] component to receive instant notifications of checkins ([@robbiet480])
|
||||
- Camera: New [FFMPEG] platform allows to stream anything through front end ([@pvizeli])
|
||||
- Manage [secrets] with new command line script ([@kellerza])
|
||||
- Notify - [SMTP]: Allow embedding of images ([@partofthething])
|
||||
- Sensor: [OhmConnect] is now supported ([@robbiet480])
|
||||
- [panel_custom] component allows the registering of new panels ([@balloob])
|
||||
- Light: New [mqtt_json] platform for working with JSON payload ([@corbanmailloux])
|
||||
- Sensor: New [Fast.com] platform to measure network bandwidth performance ([@nkgilley])
|
||||
- New [pilight] component to control 433 Mz devices ([@DavidLP])
|
||||
- Sensor: [GPSD] now supported ([@fabaff])
|
||||
|
||||
<h3><a class='title-link' name='hotfix-0261---august-14' href='#hotfix-0261---august-14'></a> Hotfix 0.26.1 - August 14 </h3>
|
||||
### <a class='title-link' name='hotfix-0261---august-14' href='#hotfix-0261---august-14'></a> Hotfix 0.26.1 - August 14
|
||||
|
||||
<ul>
|
||||
<li>Fix serial_pm config validation (<a href="https://github.com/open-homeautomation">@open-homeautomation</a>)</li>
|
||||
<li>Check for existence of system mode on Honeywell thermostats (<a href="https://github.com/mKeRix">@mKeRix</a>)</li>
|
||||
<li>Fix unknown unit of measurement for hvac and thermostat component (<a href="https://github.com/turbokongen">@turbokongen</a>)</li>
|
||||
</ul>
|
||||
- Fix serial_pm config validation ([@open-homeautomation])
|
||||
- Check for existence of system mode on Honeywell thermostats ([@mKeRix])
|
||||
- Fix unknown unit of measurement for hvac and thermostat component ([@turbokongen])
|
||||
|
||||
<h3><a class='title-link' name='hotfix-0262---august-15' href='#hotfix-0262---august-15'></a> Hotfix 0.26.2 - August 15 </h3>
|
||||
### <a class='title-link' name='hotfix-0262---august-15' href='#hotfix-0262---august-15'></a> Hotfix 0.26.2 - August 15
|
||||
|
||||
<ul>
|
||||
<li>Fix Wemo: have PyWemo play nicely with the latest Requests (<a href="https://github.com/pavoni">@pavoni</a>)</li>
|
||||
</ul>
|
||||
- Fix Wemo: have PyWemo play nicely with the latest Requests ([@pavoni])
|
||||
|
||||
<h3><a class='title-link' name='hotfix-0263---august-19' href='#hotfix-0263---august-19'></a> Hotfix 0.26.3 - August 19 </h3>
|
||||
### <a class='title-link' name='hotfix-0263---august-19' href='#hotfix-0263---august-19'></a> Hotfix 0.26.3 - August 19
|
||||
|
||||
<ul>
|
||||
<li>Media Player cover art would not work when an API password was set. Thanks to <a href="https://github.com/maddox">@maddox</a> for reporting it and <a href="https://github.com/balloob">@balloob</a> for the fix.</li>
|
||||
</ul>
|
||||
- Media Player cover art would not work when an API password was set. Thanks to [@maddox] for reporting it and [@balloob] for the fix.
|
||||
|
||||
<h3><a class='title-link' name='breaking-changes' href='#breaking-changes'></a> Breaking changes </h3>
|
||||
### <a class='title-link' name='breaking-changes' href='#breaking-changes'></a> Breaking changes
|
||||
|
||||
<ul>
|
||||
<li>A new unit system has superseded the temperature unit option in the core configuration. For now it is backwards compatible, but you should update soon:</li>
|
||||
</ul>
|
||||
- A new unit system has superseded the temperature unit option in the core configuration. For now it is backwards compatible, but you should update soon:
|
||||
|
||||
<div class="highlighter-coderay"><div class="CodeRay">
|
||||
<div class="code"><pre><span class="comment"># Configuration.yaml example</span>
|
||||
<span class="key">homeassistant</span>:
|
||||
<span class="comment"># 'metric' for the metric system, 'imperial' for the imperial system</span>
|
||||
<span class="key">unit_system</span>: <span class="string"><span class="content">metric</span></span>
|
||||
</pre></div>
|
||||
</div>
|
||||
</div>
|
||||
```yaml
|
||||
# Configuration.yaml example
|
||||
homeassistant:
|
||||
# 'metric' for the metric system, 'imperial' for the imperial system
|
||||
unit_system: metric
|
||||
```
|
||||
|
||||
[@maddox]: https://github.com/maddox
|
||||
[@pavoni]: https://github.com/pavoni
|
||||
[@mKeRix]: https://github.com/mKeRix
|
||||
[@abcminiuser]: https://github.com/abcminiuser
|
||||
[@balloob]: https://github.com/balloob
|
||||
[@corbanmailloux]: https://github.com/corbanmailloux
|
||||
[@Danielhiversen]: https://github.com/Danielhiversen
|
||||
[@DavidLP]: https://github.com/DavidLP
|
||||
[@fabaff]: https://github.com/fabaff
|
||||
[@HBDK]: https://github.com/HBDK
|
||||
[@jnewland]: https://github.com/jnewland
|
||||
[@kellerza]: https://github.com/kellerza
|
||||
[@mtreinish]: https://github.com/mtreinish
|
||||
[@nkgilley]: https://github.com/nkgilley
|
||||
[@open-homeautomation]: https://github.com/open-homeautomation
|
||||
[@partofthething]: https://github.com/partofthething
|
||||
[@persandtrom]: https://github.com/persandtrom
|
||||
[@pvizeli]: https://github.com/pvizeli
|
||||
[@robbiet480]: https://github.com/robbiet480
|
||||
[@sdague]: https://github.com/sdague
|
||||
[@shmuelzon]: https://github.com/shmuelzon
|
||||
[@tchellomello]: https://github.com/tchellomello
|
||||
[@Teagan42]: https://github.com/Teagan42
|
||||
[@turbokongen]: https://github.com/turbokongen
|
||||
[@fabaff]: https://github.com/fabaff
|
||||
|
||||
[Foursquare]: /components/foursquare/
|
||||
[OhmConnect]: /components/sensor.ohmconnect/
|
||||
[FFMPEG]: /components/camera.ffmpeg/
|
||||
[SMTP]: /components/notify.smtp/
|
||||
[panel_custom]: /components/panel_custom/
|
||||
[Verisure]: /components/alarm_control_panel.verisure/
|
||||
[Flux LED]: /components/light.flux_led/
|
||||
[InfluxDB]: /components/influxdb/
|
||||
[particulate]: /components/sensor.serial_pm/
|
||||
[LG Netcast TV]: /components/media_player.lg_netcast/
|
||||
[mqtt_json]: /components/light.mqtt_json/
|
||||
[Fast.com]: /components/sensor.fastdotcom/
|
||||
[pilight]: /components/pilight/
|
||||
[GPSD]: /components/sensor.gpsd/
|
||||
[heat control]: /components/thermostat.heat_control/
|
||||
[Proximity]: /components/proximity/
|
||||
[Flux]: /components/switch.flux/
|
||||
[Proliphix]: /components/thermostat.proliphix/
|
||||
[Fitbit]: /components/sensor.fitbit/
|
||||
[Plex]: /components/media_player.plex/
|
||||
[Honeywell]: /components/thermostat.honeywell/
|
||||
[Secrets]: /topics/secrets/
|
||||
]]></content>
|
||||
</entry>
|
||||
|
||||
|
@ -97,76 +133,124 @@
|
|||
<link href="https://home-assistant.io/blog/2016/07/30/custom-frontend-panels-jupyter-notebooks-directv/"/>
|
||||
<updated>2016-07-30T12:00:00+00:00</updated>
|
||||
<id>https://home-assistant.io/blog/2016/07/30/custom-frontend-panels--jupyter-notebooks--directv</id>
|
||||
<content type="html"><![CDATA[<p>When Home Assistant started the focus has always been on making a great developer experience. Allowing anyone to add support for their favorite devices to Home Assistant easily. This focus has been a great success since we now have 339 components and platforms!</p>
|
||||
<content type="html"><![CDATA[When Home Assistant started the focus has always been on making a great developer experience. Allowing anyone to add support for their favorite devices to Home Assistant easily. This focus has been a great success since we now have 339 components and platforms!
|
||||
|
||||
<p>Starting with this release, we are extending our extensability to the frontend. Starting this release, any component can <a href="/developers/frontend_creating_custom_panels/">add it’s own page to the frontend</a>. Examples of this today are the map, logbook and history. We are looking forward to all the crazy panels you’ll come up with!</p>
|
||||
Starting with this release, we are extending our extensability to the frontend. Starting this release, any component can [add it's own page to the frontend][custom-panels]. Examples of this today are the map, logbook and history. We are looking forward to all the crazy panels you'll come up with!
|
||||
|
||||
<p>We have also seen an exciting trend of people starting to visualize their Internet of Things data using <a href="http://jupyter.org/">Jupyter</a> Notebooks, which are a great way to create and share documents that contain code, visualizations, and explanatory text. In case you missed it, the <a href="/blog/2016/07/23/internet-of-things-data-exploration-with-jupyter-notebooks/">blog</a> post by <a href="https://github.com/kireyeu">@kireyeu</a> shows an advanced usecase while our <a href="/cookbook/#jupyter-notebooks">Notebooks</a> in the <a href="https://github.com/home-assistant/home-assistant-notebooks">Home Assistant Notebooks repository</a> cover the basics.</p>
|
||||
We have also seen an exciting trend of people starting to visualize their Internet of Things data using [Jupyter] Notebooks, which are a great way to create and share documents that contain code, visualizations, and explanatory text. In case you missed it, the [blog] post by [@kireyeu] shows an advanced usecase while our [Notebooks][jupyter-notebooks] in the [Home Assistant Notebooks repository][jupyter-repo] cover the basics.
|
||||
|
||||
<p>This release also includes a bunch of new integrations, among others three new media player platforms. This means that today Home Assistant can talk to 26 different media players!</p>
|
||||
This release also includes a bunch of new integrations, among others three new media player platforms. This means that today Home Assistant can talk to 26 different media players!
|
||||
|
||||
<p>The brand-new <a href="/components/panel_iframe/">iFrame panel component</a> allows you to add other websites as pages in the Home Assistant frontend. They will show up in the sidebar and can be used the same way as you open the frontend in your browser but all within one view.</p>
|
||||
The brand-new [iFrame panel component][iframe_panel] allows you to add other websites as pages in the Home Assistant frontend. They will show up in the sidebar and can be used the same way as you open the frontend in your browser but all within one view.
|
||||
|
||||
<p>I would like to do a shoutout to <a href="https://github.com/fabianhjr">@fabianhjr</a>. He has started adding <a href="https://docs.python.org/3/library/typing.html">typing</a> data (<a href="https://www.python.org/dev/peps/pep-0484/">PEP484</a>) to the Home Assistant core. This will help us identify issues before they are released.</p>
|
||||
I would like to do a shoutout to [@fabianhjr]. He has started adding [typing] data ([PEP484]) to the Home Assistant core. This will help us identify issues before they are released.
|
||||
|
||||
<p><img src="https://home-assistant.io/images/supported_brands/russound.png" style="clear: right; margin-left: 5px; border:none; box-shadow: none; float: right; margin-bottom: 16px;" width="150" /><img src="https://home-assistant.io/images/supported_brands/jupyter.png" style="clear: right; margin-left: 5px; border:none; box-shadow: none; float: right; margin-bottom: 16px;" width="150" /><img src="https://home-assistant.io/images/supported_brands/directv.png" style="clear: right; margin-left: 5px; border:none; box-shadow: none; float: right; margin-bottom: 16px;" width="150" /></p>
|
||||
<img src='https://home-assistant.io/images/supported_brands/russound.png' style='clear: right; margin-left: 5px; border:none; box-shadow: none; float: right; margin-bottom: 16px;' width='150' /><img src='https://home-assistant.io/images/supported_brands/jupyter.png' style='clear: right; margin-left: 5px; border:none; box-shadow: none; float: right; margin-bottom: 16px;' width='150' /><img src='https://home-assistant.io/images/supported_brands/directv.png' style='clear: right; margin-left: 5px; border:none; box-shadow: none; float: right; margin-bottom: 16px;' width='150' />
|
||||
|
||||
<ul>
|
||||
<li>Frontend: Support for <a href="/components/panel_iframe/">iFrame panels</a> to adding other sites to sidebar (<a href="https://github.com/balloob">@balloob</a>)</li>
|
||||
<li>Allow components to register <a href="/developers/frontend_creating_custom_panels/">custom frontend panels</a> (<a href="https://github.com/balloob">@balloob</a>)</li>
|
||||
<li>Add example custom_component <a href="/cookbook/custom_panel_using_react/">react_panel</a> showing custom panels (<a href="https://github.com/balloob">@balloob</a>)</li>
|
||||
<li>Light: <a href="/components/light.flux_led/">MagicLight/Flux WiFi Color LED Light</a> support (<a href="https://github.com/Danielhiversen">@Danielhiversen</a>)</li>
|
||||
<li>Script: Specify a delay <a href="/getting-started/scripts/#delay">using templates</a> (<a href="https://github.com/Teagan42">@Teagan42</a>)</li>
|
||||
<li>Media player: <a href="/components/media_player.russound_rnet/">Russound RNET</a> integration (<a href="https://github.com/laf">@laf</a>)</li>
|
||||
<li>Remote: Option specifying custom timeout when calling Home Assistant API (<a href="https://github.com/n8henrie">@n8henrie</a>)</li>
|
||||
<li>Thermostat: Integration of <a href="/components/thermostat.knx/">KNX</a> thermostats (<a href="https://github.com/open-homeautomation">@open-homeautomation</a>)</li>
|
||||
<li>Thermostat: Support for HVAC mode of <a href="/components/thermostat.nest/">Nest</a> devices (<a href="https://github.com/vladonemo">@vladonemo</a>)</li>
|
||||
<li>InfluxDB: Option to specify additional <a href="/components/influxdb/">tags</a> (<a href="https://github.com/open-homeautomation">@open-homeautomation</a>)</li>
|
||||
<li>Input slider: Support for float value (<a href="https://github.com/ngraziano">@ngraziano</a>)</li>
|
||||
<li>Template: New <a href="/topics/templating/#home-assistant-template-extensions">filters</a> (<code>timestamp_local</code> and <code>timestamp_utc</code>) (<a href="https://github.com/fabaff">@fabaff</a>)</li>
|
||||
<li>Binary sensor - Wink: Water leak sensor support added (<a href="https://github.com/w1ll1am23">@w1ll1am23</a>)</li>
|
||||
<li>Sensor - Tellduslive: Support for luminance of Fibaro Motion Sensor (<a href="https://github.com/PetitCircuitLab">@PetitCircuitLab</a>)</li>
|
||||
<li>Switch - RPi GPIO: Fix when inverted logic (<a href="https://github.com/zeroDenial">@zeroDenial</a>)</li>
|
||||
<li>Z-Wave: Rollershutter update (<a href="https://github.com/turbokongen">@turbokongen</a>)</li>
|
||||
<li>RFXtrx: Fire events when receiving signals from sensors and tests added (<a href="https://github.com/Danielhiversen">@Danielhiversen</a>)</li>
|
||||
<li>Core: Add <a href="https://docs.python.org/3/library/typing.html">type</a> checking using mypy to the core (<a href="https://github.com/fabianhjr">@fabianhjr</a>)</li>
|
||||
<li>Remote: Support for getting the <a href="/developers/python_api/#get-configuration">Configuration</a> through the Python API (<a href="https://github.com/fabaff">@fabaff</a>)</li>
|
||||
<li>Media player: Support for <a href="/components/media_player.directv/">DirecTV</a> (<a href="https://github.com/cbulock">@cbulock</a>)</li>
|
||||
<li>Use browser timezone for frontend logbook and history dates (<a href="https://github.com/armills">@armills</a>)</li>
|
||||
<li>Light: New support for <a href="/components/light.x10/">X10</a> lights (<a href="https://github.com/fotoetienne">@fotoetienne</a>)</li>
|
||||
<li>Sensor: Support for observing <a href="/components/sensor.imap/">IMAP</a> accounts (<a href="https://github.com/danieljkemp">@danieljkemp</a>)</li>
|
||||
<li>Media Player: Integration for <a href="/components/media_player.mpchc/">MPC-HC</a> (Media Player Classic - Home Cinema) mediaplayer (<a href="https://github.com/abcminiuser">@abcminiuser</a>)</li>
|
||||
<li>Notify: <code>location</code> extension for <a href="/components/notify.telegram/">Telegram</a> and photo bug fixed (<a href="https://github.com/keatontaylor">@keatontaylor</a> and <a href="https://github.com/pvizeli">@pvizeli</a>)</li>
|
||||
<li>Groups: Lock states will now be properly grouped (<a href="https://github.com/jwl17330536">@jwl17330536</a>)</li>
|
||||
<li>Media Player: Added tests for Sonos to improve code quality (<a href="https://github.com/americanwookie">@americanwookie</a>)</li>
|
||||
<li>Device Tracker: iCloud stability fixes (<a href="https://github.com/kellerza">@kellerza</a>)</li>
|
||||
<li>Sensor: Speedtest with improved error handling and state restoring (<a href="https://github.com/nkgilley">@nkgilley</a>)</li>
|
||||
<li>Recorder: Stability fixes (<a href="https://github.com/kellerza">@kellerza</a>)</li>
|
||||
<li>Qwikswitch: Stability fixes (<a href="https://github.com/kellerza">@kellerza</a>)</li>
|
||||
<li>Light: <a href="/components/light.hyperion/">Hyperion</a> keeps now track of active color (<a href="https://github.com/schneefux">@schneefux</a>)</li>
|
||||
</ul>
|
||||
- Frontend: Support for [iFrame panels][iframe_panel] to adding other sites to sidebar ([@balloob])
|
||||
- Allow components to register [custom frontend panels][custom-panels] ([@balloob])
|
||||
- Add example custom_component [react_panel][react-panel] showing custom panels ([@balloob])
|
||||
- Light: [MagicLight/Flux WiFi Color LED Light][flux] support ([@Danielhiversen])
|
||||
- Script: Specify a delay [using templates][script] ([@Teagan42])
|
||||
- Media player: [Russound RNET][Russound] integration ([@laf])
|
||||
- Remote: Option specifying custom timeout when calling Home Assistant API ([@n8henrie])
|
||||
- Thermostat: Integration of [KNX] thermostats ([@open-homeautomation])
|
||||
- Thermostat: Support for HVAC mode of [Nest] devices ([@vladonemo])
|
||||
- InfluxDB: Option to specify additional [tags] ([@open-homeautomation])
|
||||
- Input slider: Support for float value ([@ngraziano])
|
||||
- Template: New [filters] (`timestamp_local` and `timestamp_utc`) ([@fabaff])
|
||||
- Binary sensor - Wink: Water leak sensor support added ([@w1ll1am23])
|
||||
- Sensor - Tellduslive: Support for luminance of Fibaro Motion Sensor ([@PetitCircuitLab])
|
||||
- Switch - RPi GPIO: Fix when inverted logic ([@zeroDenial])
|
||||
- Z-Wave: Rollershutter update ([@turbokongen])
|
||||
- RFXtrx: Fire events when receiving signals from sensors and tests added ([@Danielhiversen])
|
||||
- Core: Add [type][typing] checking using mypy to the core ([@fabianhjr])
|
||||
- Remote: Support for getting the [Configuration] through the Python API ([@fabaff])
|
||||
- Media player: Support for [DirecTV] ([@cbulock])
|
||||
- Use browser timezone for frontend logbook and history dates ([@armills])
|
||||
- Light: New support for [X10] lights ([@fotoetienne])
|
||||
- Sensor: Support for observing [IMAP] accounts ([@danieljkemp])
|
||||
- Media Player: Integration for [MPC-HC] (Media Player Classic - Home Cinema) mediaplayer ([@abcminiuser])
|
||||
- Notify: `location` extension for [Telegram] and photo bug fixed ([@keatontaylor] and [@pvizeli])
|
||||
- Groups: Lock states will now be properly grouped ([@jwl17330536])
|
||||
- Media Player: Added tests for Sonos to improve code quality ([@americanwookie])
|
||||
- Device Tracker: iCloud stability fixes ([@kellerza])
|
||||
- Sensor: Speedtest with improved error handling and state restoring ([@nkgilley])
|
||||
- Recorder: Stability fixes ([@kellerza])
|
||||
- Qwikswitch: Stability fixes ([@kellerza])
|
||||
- Light: [Hyperion] keeps now track of active color ([@schneefux])
|
||||
|
||||
<h3><a class='title-link' name='hotfix-0251---august-1' href='#hotfix-0251---august-1'></a> Hotfix 0.25.1 - August 1 </h3>
|
||||
### <a class='title-link' name='hotfix-0251---august-1' href='#hotfix-0251---august-1'></a> Hotfix 0.25.1 - August 1
|
||||
|
||||
<ul>
|
||||
<li>Light - Z-Wave: Bring back delayed value update behavior (<a href="https://github.com/jnewland">@jnewland</a>)</li>
|
||||
<li>Recorder: Properly close session after execute (<a href="https://github.com/kellerza">@kellerza</a>)</li>
|
||||
<li>Media Player - Kodi: No longer block startup if connecting to wrong port (<a href="https://github.com/shoekstra">@shoekstra</a>)</li>
|
||||
<li>Downgrade voluptuous to 0.8.9 as it blocked the upgrade for some (<a href="https://github.com/balloob">@balloob</a>)</li>
|
||||
</ul>
|
||||
- Light - Z-Wave: Bring back delayed value update behavior ([@jnewland])
|
||||
- Recorder: Properly close session after execute ([@kellerza])
|
||||
- Media Player - Kodi: No longer block startup if connecting to wrong port ([@shoekstra])
|
||||
- Downgrade voluptuous to 0.8.9 as it blocked the upgrade for some ([@balloob])
|
||||
|
||||
<h3><a class='title-link' name='hotfix-0252---august-2' href='#hotfix-0252---august-2'></a> Hotfix 0.25.2 - August 2 </h3>
|
||||
### <a class='title-link' name='hotfix-0252---august-2' href='#hotfix-0252---august-2'></a> Hotfix 0.25.2 - August 2
|
||||
|
||||
<ul>
|
||||
<li>Hotfix to make sure Z-Wave locks work again. Thanks to @tobiebooth for the quick fix.</li>
|
||||
</ul>
|
||||
- Hotfix to make sure Z-Wave locks work again. Thanks to @tobiebooth for the quick fix.
|
||||
|
||||
<h3><a class='title-link' name='breaking-changes' href='#breaking-changes'></a> Breaking changes </h3>
|
||||
### <a class='title-link' name='breaking-changes' href='#breaking-changes'></a> Breaking changes
|
||||
|
||||
<ul>
|
||||
<li>Google Voice SMS notification support was removed.</li>
|
||||
</ul>
|
||||
- Google Voice SMS notification support was removed.
|
||||
|
||||
[@nkgilley]: https://github.com/nkgilley
|
||||
[@abcminiuser]: https://github.com/abcminiuser
|
||||
[@americanwookie]: https://github.com/americanwookie
|
||||
[@armills]: https://github.com/armills
|
||||
[@balloob]: https://github.com/balloob
|
||||
[@cbulock]: https://github.com/cbulock
|
||||
[@Danielhiversen]: https://github.com/Danielhiversen
|
||||
[@danieljkemp]: https://github.com/danieljkemp
|
||||
[@fabaff]: https://github.com/fabaff
|
||||
[@fabianhjr]: https://github.com/fabianhjr
|
||||
[@fotoetienne]: https://github.com/fotoetienne
|
||||
[@jwl17330536]: https://github.com/jwl17330536
|
||||
[@keatontaylor]: https://github.com/keatontaylor
|
||||
[@kellerza]: https://github.com/kellerza
|
||||
[@kireyeu]: https://github.com/kireyeu
|
||||
[@laf]: https://github.com/laf
|
||||
[@n8henrie]: https://github.com/n8henrie
|
||||
[@ngraziano]: https://github.com/ngraziano
|
||||
[@open-homeautomation]: https://github.com/open-homeautomation
|
||||
[@PetitCircuitLab]: https://github.com/PetitCircuitLab
|
||||
[@pvizeli]: https://github.com/pvizeli
|
||||
[@schneefux]: https://github.com/schneefux
|
||||
[@Teagan42]: https://github.com/Teagan42
|
||||
[@turbokongen]: https://github.com/turbokongen
|
||||
[@usul27]: https://github.com/usul27
|
||||
[@vladonemo]: https://github.com/vladonemo
|
||||
[@w1ll1am23]: https://github.com/w1ll1am23
|
||||
[@zeroDenial]: https://github.com/zeroDenial
|
||||
[@jnewland]: https://github.com/jnewland
|
||||
[@shoekstra]: https://github.com/shoekstra
|
||||
|
||||
[custom-panels]: /developers/frontend_creating_custom_panels/
|
||||
[iframe_panel]: /components/panel_iframe/
|
||||
[custom]: /cookbook/custom_panel_using_react/
|
||||
[flux]: /components/light.flux_led/
|
||||
[script]: /getting-started/scripts/#delay
|
||||
[Russound]: /components/media_player.russound_rnet/
|
||||
[tags]: /components/influxdb/
|
||||
[filter]: /topics/templating/
|
||||
[jupyter-notebooks]: /cookbook/#jupyter-notebooks
|
||||
[jupyter-repo]: https://github.com/home-assistant/home-assistant-notebooks
|
||||
[Jupyter]: http://jupyter.org/
|
||||
[blog]: /blog/2016/07/23/internet-of-things-data-exploration-with-jupyter-notebooks/
|
||||
[DirecTV]: /components/media_player.directv/
|
||||
[Configuration]: /developers/python_api/#get-configuration
|
||||
[X10]: /components/light.x10/
|
||||
[IMAP]: /components/sensor.imap/
|
||||
[typing]: https://docs.python.org/3/library/typing.html
|
||||
[PEP484]: https://www.python.org/dev/peps/pep-0484/
|
||||
[MPC-HC]: /components/media_player.mpchc/
|
||||
[Telegram]: /components/notify.telegram/
|
||||
[react-panel]: /cookbook/custom_panel_using_react/
|
||||
[KNX]: /components/thermostat.knx/
|
||||
[Nest]: /components/thermostat.nest/
|
||||
[filters]: /topics/templating/#home-assistant-template-extensions
|
||||
[Hyperion]: /components/light.hyperion/
|
||||
]]></content>
|
||||
</entry>
|
||||
|
||||
|
@ -175,69 +259,98 @@
|
|||
<link href="https://home-assistant.io/blog/2016/07/16/sqlalchemy-knx-join-simplisafe/"/>
|
||||
<updated>2016-07-16T12:00:00+00:00</updated>
|
||||
<id>https://home-assistant.io/blog/2016/07/16/sqlalchemy-knx-join-simplisafe</id>
|
||||
<content type="html"><![CDATA[<p>It’s time for Home Assistant 0.24 and it’s full of new integration for your Home. It contains some structural changes to our history which requires action from your end, so please keep reading.</p>
|
||||
<content type="html"><![CDATA[It's time for Home Assistant 0.24 and it's full of new integration for your Home. It contains some structural changes to our history which requires action from your end, so please keep reading.
|
||||
|
||||
<p><a href="https://www.mapquest.com/">MapQuest</a> discontinued their free and direct tile access by Monday, July 11, 2016. With <a href="https://carto.com/">CARTO</a> we found a very cool and suitable solution. They allow us to use their tile for the map. Thank you, <a href="https://carto.com/">CARTO</a>.</p>
|
||||
[MapQuest] discontinued their free and direct tile access by Monday, July 11, 2016. With [CARTO] we found a very cool and suitable solution. They allow us to use their tile for the map. Thank you, [CARTO].
|
||||
|
||||
<p><a href="https://github.com/rhooper/">Roy Hooper</a> did an amazing job migrating the history support from being tied to SQLite to use the ORM SQLAlchemy instead. This means that you can now use <strong>any</strong> SQL backend for the history. So besides SQLite you can now databases like MySQL or PostgreSQL. However, this does require that you install <a href="http://www.sqlalchemy.org/">SQLAlchemy</a> and run a command to migrate your existing history over. We tried to make the process as seamless as possible by introducing a new command line script:</p>
|
||||
[Roy Hooper][@rhooper] did an amazing job migrating the history support from being tied to SQLite to use the ORM SQLAlchemy instead. This means that you can now use **any** SQL backend for the history. So besides SQLite you can now databases like MySQL or PostgreSQL. However, this does require that you install [SQLAlchemy] and run a command to migrate your existing history over. We tried to make the process as seamless as possible by introducing a new command line script:
|
||||
|
||||
<div class="highlighter-coderay"><div class="CodeRay">
|
||||
<div class="code"><pre>$ pip3 install SQLAlchemy
|
||||
```bash
|
||||
$ pip3 install SQLAlchemy
|
||||
$ hass --script db_migrator --config /path/to/config
|
||||
</pre></div>
|
||||
</div>
|
||||
</div>
|
||||
```
|
||||
|
||||
<p>You can omit the <code>--config</code> option if you use the default configuration directory. Run the script with <code>--help</code> to get more options.</p>
|
||||
You can omit the `--config` option if you use the default configuration directory. Run the script with `--help` to get more options.
|
||||
|
||||
<p><img src="https://home-assistant.io/images/supported_brands/yahooweather.png" style="clear: right; margin-left: 5px; border:none; box-shadow: none; float: right; margin-bottom: 16px;" width="150" /><img src="https://home-assistant.io/images/supported_brands/joaoapps_join.png" style="clear: right; margin-left: 5px; border:none; box-shadow: none; float: right; margin-bottom: 16px;" width="150" /><img src="https://home-assistant.io/images/supported_brands/knx.png" style="clear: right; margin-left: 5px; border:none; box-shadow: none; float: right; margin-bottom: 16px;" width="150" /><img src="https://home-assistant.io/images/supported_brands/tp-link.png" style="clear: right; margin-left: 5px; border:none; box-shadow: none; float: right; margin-bottom: 16px;" width="150" /></p>
|
||||
<img src='https://home-assistant.io/images/supported_brands/yahooweather.png' style='clear: right; margin-left: 5px; border:none; box-shadow: none; float: right; margin-bottom: 16px;' width='150' /><img src='https://home-assistant.io/images/supported_brands/joaoapps_join.png' style='clear: right; margin-left: 5px; border:none; box-shadow: none; float: right; margin-bottom: 16px;' width='150' /><img src='https://home-assistant.io/images/supported_brands/knx.png' style='clear: right; margin-left: 5px; border:none; box-shadow: none; float: right; margin-bottom: 16px;' width='150' /><img src='https://home-assistant.io/images/supported_brands/tp-link.png' style='clear: right; margin-left: 5px; border:none; box-shadow: none; float: right; margin-bottom: 16px;' width='150' />
|
||||
|
||||
<ul>
|
||||
<li>Config: Improved support for storing <a href="/topics/secrets/">secrets</a> (<a href="https://github.com/kellerza/">@kellerza</a>)</li>
|
||||
<li>Sensor: Support for <a href="/components/sensor.yweather/">Yahoo! Weather</a> (<a href="https://github.com/pvizeli/">@pvizeli</a>)</li>
|
||||
<li>Add scripts to command line to expose advanced options (<a href="https://github.com/balloob/">@balloob</a>)</li>
|
||||
<li>Alarm: <a href="/components/alarm_control_panel.simplisafe/">SimpliSafe</a> is now supported (<a href="https://github.com/w1ll1am23/">@w1ll1am23</a>)</li>
|
||||
<li>Core: Switch to SQLAlchemy for the Recorder component (<a href="https://github.com/rhooper/">@rhooper</a>)</li>
|
||||
<li>Support for <a href="/components/joaoapps_join/">Join by Joaoapps</a> added incl. <a href="/components/notify.joaoapps_join/">Join Notify</a> (<a href="https://github.com/nkgilley">@nkgilley</a>)</li>
|
||||
<li>Media Player: <a href="/components/media_player.plex/">Plex</a> will no longer spam the logs if server goes offline (<a href="https://github.com/dale3h/">@dale3h</a>)</li>
|
||||
<li>Sensor: <a href="/components/sensor.apcupsd/">APCUPSd Sensor</a> now supports names, icons and units (<a href="https://github.com/dale3h/">@dale3h</a>)</li>
|
||||
<li>Lock: <a href="/components/lock.verisure/">Verisure</a> entities will now use name instead of serial number for entity id (<a href="https://github.com/turbokongen/">@turbokongen</a>)</li>
|
||||
<li><a href="/components/statsd/">StatsD</a> can now also export attributes (<a href="https://github.com/bah2830/">@bah2830</a>)</li>
|
||||
<li>Support for <a href="/components/knx/">KNX</a> added (<a href="https://github.com/usul27">@usul27</a>)</li>
|
||||
<li>Switch: <a href="/components/switch.tplink/">TPLink</a> HS100/HS110 now supported (<a href="https://github.com/GadgetReactor">@GadgetReactor</a>)</li>
|
||||
<li>Stability fixes for <a href="//components/rfxtrx/">RFXtrx</a> ([@Danielhiversen])</li>
|
||||
<li>Tweaks to <a href="/components/zwave/">Z-Wave</a> (<a href="https://github.com/turbokongen/">@turbokongen</a>)</li>
|
||||
<li>Light: <a href="/components/light/">Brightness</a> now clamped to 0-255 (<a href="https://github.com/keatontaylor">@keatontaylor</a>)</li>
|
||||
<li>Thermostat: <a href="/components/thermostat.radiotherm/">Radiotherm</a> HVAC mode now supported (<a href="https://github.com/danieljkemp">@danieljkemp</a>)</li>
|
||||
<li>Sensor: <a href="/components/sensor.google_travel_time/">Google Travel</a> times can now use dynamic locations for start/end (<a href="https://github.com/bah2830/">@bah2830</a>)</li>
|
||||
<li>Notify: Allow sending photos to <a href="/components/notify.telegram/">Telegram</a> (<a href="https://github.com/pvizeli/">@pvizeli</a>)</li>
|
||||
<li>Frontend: Improve loading times (<a href="https://github.com/balloob/">@balloob</a>)</li>
|
||||
<li>Frontend: Fix stream not reconnecting after standby (<a href="https://github.com/balloob/">@balloob</a>)</li>
|
||||
<li>Frontend: Wait up to two seconds for new state before resetting toggle after toggling state (<a href="https://github.com/balloob/">@balloob</a>)</li>
|
||||
</ul>
|
||||
- Config: Improved support for storing [secrets][secrets] ([@kellerza])
|
||||
- Sensor: Support for [Yahoo! Weather][yahoo-weather] ([@pvizeli])
|
||||
- Add scripts to command line to expose advanced options ([@balloob])
|
||||
- Alarm: [SimpliSafe][simplisafe] is now supported ([@w1ll1am23])
|
||||
- Core: Switch to SQLAlchemy for the Recorder component ([@rhooper])
|
||||
- Support for [Join by Joaoapps][join-joaoapps] added incl. [Join Notify][join-notify] ([@nkgilley])
|
||||
- Media Player: [Plex] will no longer spam the logs if server goes offline ([@dale3h])
|
||||
- Sensor: [APCUPSd Sensor][apcupsd-sensor] now supports names, icons and units ([@dale3h])
|
||||
- Lock: [Verisure] entities will now use name instead of serial number for entity id ([@turbokongen])
|
||||
- [StatsD] can now also export attributes ([@bah2830])
|
||||
- Support for [KNX] added ([@usul27])
|
||||
- Switch: [TPLink] HS100/HS110 now supported ([@GadgetReactor])
|
||||
- Stability fixes for [RFXtrx] ([@Danielhiversen])
|
||||
- Tweaks to [Z-Wave] ([@turbokongen])
|
||||
- Light: [Brightness] now clamped to 0-255 ([@keatontaylor])
|
||||
- Thermostat: [Radiotherm] HVAC mode now supported ([@danieljkemp])
|
||||
- Sensor: [Google Travel] times can now use dynamic locations for start/end ([@bah2830])
|
||||
- Notify: Allow sending photos to [Telegram] ([@pvizeli])
|
||||
- Frontend: Improve loading times ([@balloob])
|
||||
- Frontend: Fix stream not reconnecting after standby ([@balloob])
|
||||
- Frontend: Wait up to two seconds for new state before resetting toggle after toggling state ([@balloob])
|
||||
|
||||
<h3><a class='title-link' name='hotfix-0241---july-21' href='#hotfix-0241---july-21'></a> Hotfix 0.24.1 - July 21 </h3>
|
||||
### <a class='title-link' name='hotfix-0241---july-21' href='#hotfix-0241---july-21'></a> Hotfix 0.24.1 - July 21
|
||||
|
||||
<p>Quick hot fix after we found a bug in the migrator where it wouldn’t work with a database in a non-standard location. Thanks to [@n8henrie] and [@AlucardZero].</p>
|
||||
Quick hot fix after we found a bug in the migrator where it wouldn't work with a database in a non-standard location. Thanks to [@n8henrie] and [@AlucardZero].
|
||||
|
||||
<h3><a class='title-link' name='breaking-changes' href='#breaking-changes'></a> Breaking changes </h3>
|
||||
### <a class='title-link' name='breaking-changes' href='#breaking-changes'></a> Breaking changes
|
||||
|
||||
<ul>
|
||||
<li>Migrating existing databases (see above).</li>
|
||||
<li>The <a href="/components/sensor.apcupsd/">APCUPSd Sensor</a> was updated. This will need that you modify your <code>configuration.yaml</code> file.</li>
|
||||
<li>Entity IDs of Verisure locks will change. This is a one time change but should improve readability.</li>
|
||||
</ul>
|
||||
- Migrating existing databases (see above).
|
||||
- The [APCUPSd Sensor][apcupsd-sensor] was updated. This will need that you modify your `configuration.yaml` file.
|
||||
- Entity IDs of Verisure locks will change. This is a one time change but should improve readability.
|
||||
|
||||
<p>«««< HEAD<br />
|
||||
=======<br />
|
||||
[@n8henrie]: https://github.com/n8henrie/<br />
|
||||
[@AlucardZero]: https://github.com/AlucardZero/<br />
|
||||
«««< HEAD<br />
|
||||
»»»> master<br />
|
||||
=======<br />
|
||||
[@Danielhiversen]: https://github.com/danielhiversen<br />
|
||||
»»»> origin/master</p>
|
||||
[@bah2830]: https://github.com/bah2830/
|
||||
[@balloob]: https://github.com/balloob/
|
||||
[@dale3h]: https://github.com/dale3h/
|
||||
[@danieljkemp]: https://github.com/danieljkemp
|
||||
[@GadgetReactor]: https://github.com/GadgetReactor
|
||||
[@keatontaylor]: https://github.com/keatontaylor
|
||||
[@kellerza]: https://github.com/kellerza/
|
||||
[@nkgilley]: https://github.com/nkgilley
|
||||
[@pvizeli]: https://github.com/pvizeli/
|
||||
[@rhooper]: https://github.com/rhooper/
|
||||
[@turbokongen]: https://github.com/turbokongen/
|
||||
[@usul27]: https://github.com/usul27
|
||||
[@w1ll1am23]: https://github.com/w1ll1am23/
|
||||
<<<<<<< HEAD
|
||||
=======
|
||||
[@n8henrie]: https://github.com/n8henrie/
|
||||
[@AlucardZero]: https://github.com/AlucardZero/
|
||||
<<<<<<< HEAD
|
||||
>>>>>>> master
|
||||
=======
|
||||
[@Danielhiversen]: https://github.com/danielhiversen
|
||||
>>>>>>> origin/master
|
||||
|
||||
[apcupsd-sensor]: /components/sensor.apcupsd/
|
||||
[Brightness]: /components/light/
|
||||
[CARTO]: https://carto.com/
|
||||
[Google Travel]: /components/sensor.google_travel_time/
|
||||
[imap-sensor]: /component/sensor.imap/
|
||||
[join-joaoapps]: /components/joaoapps_join/
|
||||
[join-notify]: /components/notify.joaoapps_join/
|
||||
[KNX]: /components/knx/
|
||||
[MapQuest]: https://www.mapquest.com/
|
||||
[Plex]: /components/media_player.plex/
|
||||
[Radiotherm]: /components/thermostat.radiotherm/
|
||||
[recorder]: /components/recorder/
|
||||
[secrets]: /topics/secrets/
|
||||
[simplisafe]: /components/alarm_control_panel.simplisafe/
|
||||
[SQLAlchemy]: http://www.sqlalchemy.org/
|
||||
[StatsD]: /components/statsd/
|
||||
[Telegram]: /components/notify.telegram/
|
||||
[TPLink]: /components/switch.tplink/
|
||||
[Verisure]: /components/lock.verisure/
|
||||
[yahoo-weather]: /components/sensor.yweather/
|
||||
[Z-Wave]: /components/zwave/
|
||||
[RFXtrx]: //components/rfxtrx/
|
||||
]]></content>
|
||||
</entry>
|
||||
|
||||
|
@ -246,62 +359,101 @@ $ hass --script db_migrator --config /path/to/config
|
|||
<link href="https://home-assistant.io/blog/2016/07/01/envisalink-homematic-hdmi-cec-and-sony-bravia-tv/"/>
|
||||
<updated>2016-07-01T00:31:00+00:00</updated>
|
||||
<id>https://home-assistant.io/blog/2016/07/01/envisalink-homematic-hdmi-cec-and-sony-bravia-tv</id>
|
||||
<content type="html"><![CDATA[<p>It’s time for Home Assistant 0.23 and it’s full of goodies. It’s also the release that bumps us over a 1000 tests and to 94% test coverage! Also our install issues on the Raspberry Pi and Synology have been resolved.</p>
|
||||
<content type="html"><![CDATA[It's time for Home Assistant 0.23 and it's full of goodies. It's also the release that bumps us over a 1000 tests and to 94% test coverage! Also our install issues on the Raspberry Pi and Synology have been resolved.
|
||||
|
||||
<p>This release brings support for two new ecosystems: <a href="/components/envisalink/">Envisalink</a> and <a href="/components/homematic/">Homematic</a>. We can now also control your TV via HDMI using <a href="/components/hdmi_cec/">HDMI-CEC</a> (which works on the Pi!) and another cool feature is the <a href="/components/persistent_notification/">persistent notifications</a> which allow you to add a notification to the frontend till dismissed.</p>
|
||||
This release brings support for two new ecosystems: [Envisalink] and [Homematic]. We can now also control your TV via HDMI using [HDMI-CEC] (which works on the Pi!) and another cool feature is the [persistent notifications] which allow you to add a notification to the frontend till dismissed.
|
||||
|
||||
<p><a href="/components/wink/">Wink</a> support has been dramatically improved by migrating to the PubNub API. This allows Wink to push changes from their system to Home Assistant. This change came just in time as somehow our Wink integration was causing a lot of requests to their servers. Thanks to Wink for letting us know so we could solve it instead of blocking us.</p>
|
||||
[Wink] support has been dramatically improved by migrating to the PubNub API. This allows Wink to push changes from their system to Home Assistant. This change came just in time as somehow our Wink integration was causing a lot of requests to their servers. Thanks to Wink for letting us know so we could solve it instead of blocking us.
|
||||
|
||||
<p>On the config side, you can now <a href="/topics/secrets/">store your passwords</a> in your OS keyring or just in a standalone file. We also got a new service to reload the core config so no reboots needed anymore after changing customize settings!</p>
|
||||
On the config side, you can now [store your passwords][secrets] in your OS keyring or just in a standalone file. We also got a new service to reload the core config so no reboots needed anymore after changing customize settings!
|
||||
|
||||
<p><img src="https://home-assistant.io/images/supported_brands/bravia.png" style="clear: right; margin-left: 5px; border:none; box-shadow: none; float: right; margin-bottom: 16px;" width="150" /><img src="https://home-assistant.io/images/supported_brands/eyezon.png" style="clear: right; margin-left: 5px; border:none; box-shadow: none; float: right; margin-bottom: 16px;" width="150" /><img src="https://home-assistant.io/images/supported_brands/homematic.png" style="clear: right; margin-left: 5px; border:none; box-shadow: none; float: right; margin-bottom: 16px;" width="150" /><img src="https://home-assistant.io/images/supported_brands/openexchangerates.png" style="clear: right; margin-left: 5px; border:none; box-shadow: none; float: right; margin-bottom: 16px;" width="150" /></p>
|
||||
<img src='https://home-assistant.io/images/supported_brands/bravia.png' style='clear: right; margin-left: 5px; border:none; box-shadow: none; float: right; margin-bottom: 16px;' width='150' /><img src='https://home-assistant.io/images/supported_brands/eyezon.png' style='clear: right; margin-left: 5px; border:none; box-shadow: none; float: right; margin-bottom: 16px;' width='150' /><img src='https://home-assistant.io/images/supported_brands/homematic.png' style='clear: right; margin-left: 5px; border:none; box-shadow: none; float: right; margin-bottom: 16px;' width='150' /><img src='https://home-assistant.io/images/supported_brands/openexchangerates.png' style='clear: right; margin-left: 5px; border:none; box-shadow: none; float: right; margin-bottom: 16px;' width='150' />
|
||||
|
||||
<ul>
|
||||
<li>Support for <a href="/components/envisalink/">Envisalink</a> added (<a href="/components/alarm_control_panel.envisalink/">alarm control panel</a>, <a href="/components/binary_sensor.envisalink/">binary sensor</a>, <a href="/components/sensor.envisalink/">sensor</a>) (<a href="https://github.com/cinntax/">@cinntax</a>)</li>
|
||||
<li>Support for <a href="/components/homematic/">Homematic</a> added (<a href="/components/binary_sensor.homematic/">binary sensor</a>, <a href="/components/light.homematic/">light</a>, <a href="/components/rollershutter.homematic/">rollershutter</a>, <a href="/components/sensor.homematic/">sensor</a>, <a href="/components/switch.homematic/">switch</a>) (<a href="https://github.com/pvizeli/">@pvizeli</a>, <a href="https://github.com/danielperna84/">@danielperna84</a>)</li>
|
||||
<li>New <a href="/components/hdmi_cec/">HDMI-CEC</a> component (<a href="https://github.com/happyleavesaoc/">@happyleavesaoc</a>, <a href="https://github.com/lukas-hetzenecker/">@lukas-hetzenecker</a>)</li>
|
||||
<li>Major rewrite of <a href="/components/wink/">Wink</a> which now pushes changes to Home Assistant (<a href="https://github.com/w1ll1am23/">@w1ll1am23</a>)</li>
|
||||
<li>Core: new add <a href="/getting-started/customizing-devices/#reloading-customize">reload core config service</a> (<a href="https://github.com/balloob/">@balloob</a>)</li>
|
||||
<li>Support for <a href="/components/persistent_notification/">persistent notifications</a> added (<a href="https://github.com/fabaff/">@fabaff</a>, <a href="https://github.com/balloob/">@balloob</a>)</li>
|
||||
<li>Garage door: <a href="/components/garage_door.zwave/">Z-Wave</a> support added (<a href="https://github.com/turbokongen/">@turbokongen</a>)</li>
|
||||
<li>Rollershutter: <a href="/components/rollershutter.zwave/">Z-Wave</a> support added (<a href="https://github.com/turbokongen/">@turbokongen</a>)</li>
|
||||
<li>Media Player: <a href="/components/media_player.braviatv/">Sony Bravia TV</a> now supported (<a href="https://github.com/aparraga/">@aparraga</a>)</li>
|
||||
<li>Sensor: <a href="/components/sensor.fixer/">Fixer.io</a> now supported (<a href="https://github.com/fabaff/">@fabaff</a>)</li>
|
||||
<li>Garage door: Control any garage door using <a href="/components/garage_door.rpi_gpio/">Raspberry Pi GPIO pins</a> (<a href="https://github.com/kellerza/">@kellerza</a>)</li>
|
||||
<li>Sensor: <a href="/components/sensor.openexchangerates/">OpenExchangeRates</a> support added (<a href="https://github.com/arsaboo/">@arsaboo</a>)</li>
|
||||
<li>Notify: <a href="/components/notify.pushover/">Pushover</a> now supports target device, sound, url and priority (<a href="https://github.com/dale3h/">@dale3h</a>)</li>
|
||||
<li>Sensor: <a href="/components/sensor.netatmo/">Netatmo</a> now supports wind, battery and radio signals (<a href="https://github.com/Jypy/">@Jypy</a>)</li>
|
||||
<li>Log successful and failed login attemps (<a href="https://github.com/fabaff/">@fabaff</a>)</li>
|
||||
<li>Config: allow <a href="/topics/secrets/">extracting account info</a> into OS keyring or separate YAML file (<a href="https://github.com/kellerza/">@kellerza</a>)</li>
|
||||
<li>Core: add option to not filter out duplicate states per entity (<a href="https://github.com/philipbl/">@philipbl</a>)</li>
|
||||
<li>HTTP: Follow Mozilla SSL recommendations (<a href="https://github.com/danieljkemp/">@danieljkemp</a>, <a href="https://github.com/AlucardZero/">@AlucardZero</a>)</li>
|
||||
<li>Light: <a href="/components/light.zwave/">Z-Wave colorbulb</a> support added (<a href="https://github.com/armills/">@armills</a>)</li>
|
||||
<li>Core: new elevation config option added (<a href="https://github.com/balloob/">@balloob</a>)</li>
|
||||
<li>Sensor: <a href="/components/sensor.onewire/">OneWire</a> support extended with support for DS18S20, DS1822, DS1825 and DS28EA00 temperature sensors + support for bus masters which use fuse to mount device tree. (<a href="https://github.com/Ardetus/">@Ardetus</a>)</li>
|
||||
<li>Lock: <a href="/components/lock.vera/">Vera</a> now supported (<a href="https://github.com/rhooper/">@rhooper</a>)</li>
|
||||
<li>HTTP: Migrate to CherryPy WSGI server to fix install and runtime problems (<a href="https://github.com/balloob/">@balloob</a>)</li>
|
||||
</ul>
|
||||
- Support for [Envisalink] added ([alarm control panel][envi-alarm], [binary sensor][envi-binary-sensor], [sensor][envi-sensor]) ([@cinntax])
|
||||
- Support for [Homematic] added ([binary sensor][hm-binary-sensor], [light][hm-light], [rollershutter][hm-rollershutter], [sensor][hm-sensor], [switch][hm-switch]) ([@pvizeli], [@danielperna84])
|
||||
- New [HDMI-CEC] component ([@happyleavesaoc], [@lukas-hetzenecker])
|
||||
- Major rewrite of [Wink] which now pushes changes to Home Assistant ([@w1ll1am23])
|
||||
- Core: new add [reload core config service] ([@balloob])
|
||||
- Support for [persistent notifications] added ([@fabaff], [@balloob])
|
||||
- Garage door: [Z-Wave][zwave-garage-door] support added ([@turbokongen])
|
||||
- Rollershutter: [Z-Wave][zwave-rollershutter] support added ([@turbokongen])
|
||||
- Media Player: [Sony Bravia TV] now supported ([@aparraga])
|
||||
- Sensor: [Fixer.io] now supported ([@fabaff])
|
||||
- Garage door: Control any garage door using [Raspberry Pi GPIO pins] ([@kellerza])
|
||||
- Sensor: [OpenExchangeRates] support added ([@arsaboo])
|
||||
- Notify: [Pushover] now supports target device, sound, url and priority ([@dale3h])
|
||||
- Sensor: [Netatmo] now supports wind, battery and radio signals ([@Jypy])
|
||||
- Log successful and failed login attemps ([@fabaff])
|
||||
- Config: allow [extracting account info][secrets] into OS keyring or separate YAML file ([@kellerza])
|
||||
- Core: add option to not filter out duplicate states per entity ([@philipbl])
|
||||
- HTTP: Follow Mozilla SSL recommendations ([@danieljkemp], [@AlucardZero])
|
||||
- Light: [Z-Wave colorbulb][zwave-light] support added ([@armills])
|
||||
- Core: new elevation config option added ([@balloob])
|
||||
- Sensor: [OneWire] support extended with support for DS18S20, DS1822, DS1825 and DS28EA00 temperature sensors + support for bus masters which use fuse to mount device tree. ([@Ardetus])
|
||||
- Lock: [Vera] now supported ([@rhooper])
|
||||
- HTTP: Migrate to CherryPy WSGI server to fix install and runtime problems ([@balloob])
|
||||
|
||||
<h3><a class='title-link' name='breaking-changes' href='#breaking-changes'></a> Breaking changes </h3>
|
||||
### <a class='title-link' name='breaking-changes' href='#breaking-changes'></a> Breaking changes
|
||||
|
||||
<ul>
|
||||
<li>Homematic thermostat configuration has changed and now depends on the new <a href="/components/homematic/">Homematic</a> component.</li>
|
||||
</ul>
|
||||
- Homematic thermostat configuration has changed and now depends on the new [Homematic] component.
|
||||
|
||||
<h3><a class='title-link' name='hotfix-0231---july-2' href='#hotfix-0231---july-2'></a> Hotfix 0.23.1 - July 2 </h3>
|
||||
### <a class='title-link' name='hotfix-0231---july-2' href='#hotfix-0231---july-2'></a> Hotfix 0.23.1 - July 2
|
||||
|
||||
<ul>
|
||||
<li>Bump PyVera to 0.2.13 to fix traceback and pyvera thread dying related to bug (<a href="https://github.com/rhooper/">@rhooper</a>)</li>
|
||||
<li>HTTP - SSL: Check for OP_NO_COMPRESSION support before trying to use it (<a href="https://github.com/AlucardZero/">@AlucardZero</a>)</li>
|
||||
<li>Wink: Downgraded pubnub to work around pycryptodome conflicts (<a href="https://github.com/w1ll1am23/">@w1ll1am23</a>)</li>
|
||||
</ul>
|
||||
- Bump PyVera to 0.2.13 to fix traceback and pyvera thread dying related to bug ([@rhooper])
|
||||
- HTTP - SSL: Check for OP_NO_COMPRESSION support before trying to use it ([@AlucardZero])
|
||||
- Wink: Downgraded pubnub to work around pycryptodome conflicts ([@w1ll1am23])
|
||||
|
||||
<h3><a class='title-link' name='faq' href='#faq'></a> FAQ </h3>
|
||||
### <a class='title-link' name='faq' href='#faq'></a> FAQ
|
||||
|
||||
<ul>
|
||||
<li><code>elevation: </code> was introduced to the configuration for weather/sunrise data. For existing <a href="https://home-assistant.io/getting-started/basic/">configurations</a> add the value shown in the warning <code>[homeassistant.config] Incomplete core config. Auto detected elevation: 665</code> to your <code>configuration.yaml</code> file.</li>
|
||||
</ul>
|
||||
- `elevation: ` was introduced to the configuration for weather/sunrise data. For existing [configurations][elevation] add the value shown in the warning `[homeassistant.config] Incomplete core config. Auto detected elevation: 665` to your `configuration.yaml` file.
|
||||
|
||||
[@AlucardZero]: https://github.com/AlucardZero/
|
||||
[@aparraga]: https://github.com/aparraga/
|
||||
[@Ardetus]: https://github.com/Ardetus/
|
||||
[@armills]: https://github.com/armills/
|
||||
[@arsaboo]: https://github.com/arsaboo/
|
||||
[@balloob]: https://github.com/balloob/
|
||||
[@cinntax]: https://github.com/cinntax/
|
||||
[@dale3h]: https://github.com/dale3h/
|
||||
[@danieljkemp]: https://github.com/danieljkemp/
|
||||
[@danielperna84]: https://github.com/danielperna84/
|
||||
[@fabaff]: https://github.com/fabaff/
|
||||
[@happyleavesaoc]: https://github.com/happyleavesaoc/
|
||||
[@Jypy]: https://github.com/Jypy/
|
||||
[@kellerza]: https://github.com/kellerza/
|
||||
[@lukas-hetzenecker]: https://github.com/lukas-hetzenecker/
|
||||
[@philipbl]: https://github.com/philipbl/
|
||||
[@pvizeli]: https://github.com/pvizeli/
|
||||
[@rhooper]: https://github.com/rhooper/
|
||||
[@turbokongen]: https://github.com/turbokongen/
|
||||
[@w1ll1am23]: https://github.com/w1ll1am23/
|
||||
[envi-alarm]: /components/alarm_control_panel.envisalink/
|
||||
[envi-binary-sensor]: /components/binary_sensor.envisalink/
|
||||
[envi-sensor]: /components/sensor.envisalink/
|
||||
[Envisalink]: /components/envisalink/
|
||||
[HDMI-CEC]: /components/hdmi_cec/
|
||||
[hm-binary-sensor]: /components/binary_sensor.homematic/
|
||||
[hm-light]: /components/light.homematic/
|
||||
[hm-rollershutter]: /components/rollershutter.homematic/
|
||||
[hm-sensor]: /components/sensor.homematic/
|
||||
[hm-switch]: /components/switch.homematic/
|
||||
[Homematic]: /components/homematic/
|
||||
[Netatmo]: /components/sensor.netatmo/
|
||||
[OneWire]: /components/sensor.onewire/
|
||||
[OpenExchangeRates]: /components/sensor.openexchangerates/
|
||||
[Pushover]: /components/notify.pushover/
|
||||
[secrets]: /topics/secrets/
|
||||
[Vera]: /components/lock.vera/
|
||||
[Wink]: /components/wink/
|
||||
[zwave-garage-door]: /components/garage_door.zwave/
|
||||
[zwave-light]: /components/light.zwave/
|
||||
[zwave-rollershutter]: /components/rollershutter.zwave/
|
||||
[Fixer.io]: /components/sensor.fixer/
|
||||
[persistent notifications]: /components/persistent_notification/
|
||||
[reload core config service]: /getting-started/customizing-devices/#reloading-customize
|
||||
[Sony Bravia TV]: /components/media_player.braviatv/
|
||||
[Raspberry Pi GPIO pins]: /components/garage_door.rpi_gpio/
|
||||
[elevation]: https://home-assistant.io/getting-started/basic/
|
||||
]]></content>
|
||||
</entry>
|
||||
|
||||
|
@ -310,63 +462,88 @@ $ hass --script db_migrator --config /path/to/config
|
|||
<link href="https://home-assistant.io/blog/2016/06/18/pandora-bt-home-hub-5-and-local-file-camera/"/>
|
||||
<updated>2016-06-18T18:06:00+00:00</updated>
|
||||
<id>https://home-assistant.io/blog/2016/06/18/pandora-bt-home-hub-5-and-local-file-camera</id>
|
||||
<content type="html"><![CDATA[<p>It’s time for the 0.22 release. This was a pretty rough release cycle and we had to issue two hot fixes for our core improvements. But it seems now that all is good and a lot of people have reported that their installs are faster than ever and the occasional quirks no longer occur.</p>
|
||||
<content type="html"><![CDATA[It's time for the 0.22 release. This was a pretty rough release cycle and we had to issue two hot fixes for our core improvements. But it seems now that all is good and a lot of people have reported that their installs are faster than ever and the occasional quirks no longer occur.
|
||||
|
||||
<p>We are aware that our new web stack has caused issues installing Home Assistant on ARM-based platforms. This sadly includes the Raspberry Pi and Synology NAS systems. We’re working on getting to a better solution. For Raspberry Pi, the <a href="/getting-started/installation-raspberry-pi-all-in-one/">All-in-One installer</a> will take care of everything for you. We’re working on updating our <a href="/getting-started/installation-raspberry-pi/">standalone Raspberry Pi installation guide</a>.</p>
|
||||
We are aware that our new web stack has caused issues installing Home Assistant on ARM-based platforms. This sadly includes the Raspberry Pi and Synology NAS systems. We're working on getting to a better solution. For Raspberry Pi, the [All-in-One installer] will take care of everything for you. We're working on updating our [standalone Raspberry Pi installation guide].
|
||||
|
||||
<p>There are two cool things that I want to highlight in this release. The first is Pandora support. This is based on the CLI player called pianobar. This means that your machine running Home Assistant can be connected to the speakers and provide your house with tunes.</p>
|
||||
There are two cool things that I want to highlight in this release. The first is Pandora support. This is based on the CLI player called pianobar. This means that your machine running Home Assistant can be connected to the speakers and provide your house with tunes.
|
||||
|
||||
<p class="img">
|
||||
<img src="https://home-assistant.io/images/screenshots/pandora_player.png" />
|
||||
<p class='img'>
|
||||
<img src='https://home-assistant.io/images/screenshots/pandora_player.png' />
|
||||
</p>
|
||||
|
||||
<p>Another cool addition is the local file camera. This seems very basic at first but will allow you to generate a graph with your favorite 3rd party graphing tool and display it on your Home Assistant dashboard. We’re looking forward to see what you can do with this!</p>
|
||||
Another cool addition is the local file camera. This seems very basic at first but will allow you to generate a graph with your favorite 3rd party graphing tool and display it on your Home Assistant dashboard. We're looking forward to see what you can do with this!
|
||||
|
||||
<p><img src="https://home-assistant.io/images/supported_brands/pandora.png" style="clear: right; margin-left: 5px; border:none; box-shadow: none; float: right; margin-bottom: 16px;" width="150" /><img src="https://home-assistant.io/images/supported_brands/bt.png" style="clear: right; margin-left: 5px; border:none; box-shadow: none; float: right; margin-bottom: 16px;" width="150" /></p>
|
||||
<img src='https://home-assistant.io/images/supported_brands/pandora.png' style='clear: right; margin-left: 5px; border:none; box-shadow: none; float: right; margin-bottom: 16px;' width='150' /><img src='https://home-assistant.io/images/supported_brands/bt.png' style='clear: right; margin-left: 5px; border:none; box-shadow: none; float: right; margin-bottom: 16px;' width='150' />
|
||||
|
||||
<ul>
|
||||
<li>Media Player: <a href="/components/media_player.pandora/">Pandora</a> media player now supported (<a href="https://github.com/partofthething/">@partofthething</a>)</li>
|
||||
<li>Device Tracker: <a href="/components/device_tracker.bt_home_hub_5/">BT Home Hub 5</a> now supported (<a href="https://github.com/lwis/">@lwis</a>)</li>
|
||||
<li>Camera: New <a href="/components/camera.local_file/">local file</a> platform shows any image as camera (<a href="https://github.com/Landrash/">@Landrash</a>)</li>
|
||||
<li>Add <a href="/components/media_player.sonos/">Sonos</a> snapshot and restore services (<a href="https://github.com/dansullivan86/">@dansullivan86</a>)</li>
|
||||
<li>Device Tracker: <a href="/components/device_tracker.asuswrt/">AsusWRT</a> in Access Point mode now supported (<a href="https://github.com/linjef/">@linjef</a>)</li>
|
||||
<li>Device Tracker: <a href="/components/device_tracker.asuswrt/">AsusWRT</a> login using public key now supported (<a href="https://github.com/mtreinish/">@mtreinish</a>)</li>
|
||||
<li>Device Tracker: <a href="/components/device_tracker.asuswrt/">AsusWRT</a> protocol to use is now auto detected (<a href="https://github.com/persandstrom/">@persandstrom</a>)</li>
|
||||
<li>Camera: <a href="/components/netatmo/">Netatmo</a> now supported (<a href="https://github.com/jabesq/">@jabesq</a>)</li>
|
||||
<li>API documentation added in <a href="https://github.com/home-assistant/home-assistant/blob/dev/docs/swagger.yaml">Swagger.yaml format</a> (<a href="https://github.com/wind/">@wind-rider</a>)</li>
|
||||
<li>Media Player: <a href="/components/media_player.cast/">Cast</a> devices can now be stopped (<a href="https://github.com/michaelarnauts/">@michaelarnauts</a>)</li>
|
||||
<li>MySensors: <a href="/components/mysensors/">IR switch device</a> and service now supported (<a href="https://github.com/MartinHjelmare/">@MartinHjelmare</a>)</li>
|
||||
<li>Bloomsky: <a href="/components/sensor.bloomsky/">Voltage sensor</a> now supported (<a href="https://github.com/arsaboo/">@arsaboo</a>)</li>
|
||||
<li>Sensor: New <a href="/components/sensor.plex/">Plex sensor</a> monitors friends streaming from your Plex server (<a href="https://github.com/nkgilley/">@nkgilley</a>)</li>
|
||||
<li>Component <a href="/components/shell_command/">shell command</a> can now use templates to render arguments (<a href="https://github.com/partofthething/">@partofthething</a>)</li>
|
||||
<li>Rollershutter: <a href="/components/rollershutter.wink/">Wink</a> is now supported (<a href="https://github.com/philk/">@philk</a>)</li>
|
||||
<li>Alexa: Updated <a href="/components/alexa/#working-with-scenes">documentation</a> to show how to call scripts and scenes (@acockburn)</li>
|
||||
<li>Sensor: <a href="/components/sensor.snmp/">SNMP</a> is now supported (<a href="https://github.com/fabaff/">@fabaff</a>)</li>
|
||||
<li>Sensor: Support for Swiss hydrological data (<a href="https://github.com/fabaff/">@fabaff</a>)</li>
|
||||
</ul>
|
||||
- Media Player: [Pandora] media player now supported ([@partofthething])
|
||||
- Device Tracker: [BT Home Hub 5] now supported ([@lwis])
|
||||
- Camera: New [local file] platform shows any image as camera ([@Landrash])
|
||||
- Add [Sonos] snapshot and restore services ([@dansullivan86])
|
||||
- Device Tracker: [AsusWRT] in Access Point mode now supported ([@linjef])
|
||||
- Device Tracker: [AsusWRT] login using public key now supported ([@mtreinish])
|
||||
- Device Tracker: [AsusWRT] protocol to use is now auto detected ([@persandstrom])
|
||||
- Camera: [Netatmo] now supported ([@jabesq])
|
||||
- API documentation added in [Swagger.yaml format] ([@wind-rider])
|
||||
- Media Player: [Cast] devices can now be stopped ([@michaelarnauts])
|
||||
- MySensors: [IR switch device] and service now supported ([@MartinHjelmare])
|
||||
- Bloomsky: [Voltage sensor] now supported ([@arsaboo])
|
||||
- Sensor: New [Plex sensor] monitors friends streaming from your Plex server ([@nkgilley])
|
||||
- Component [shell command] can now use templates to render arguments ([@partofthething])
|
||||
- Rollershutter: [Wink] is now supported ([@philk])
|
||||
- Alexa: Updated [documentation][alexa] to show how to call scripts and scenes (@acockburn)
|
||||
- Sensor: [SNMP] is now supported ([@fabaff])
|
||||
- Sensor: Support for Swiss hydrological data ([@fabaff])
|
||||
|
||||
<h3><a class='title-link' name='breaking-change' href='#breaking-change'></a> Breaking change </h3>
|
||||
### <a class='title-link' name='breaking-change' href='#breaking-change'></a> Breaking change
|
||||
|
||||
<ul>
|
||||
<li>The new Netatmo support caused us to change how Netatmo are configured. It’s now done via it’s own component.</li>
|
||||
</ul>
|
||||
- The new Netatmo support caused us to change how Netatmo are configured. It's now done via it's own component.
|
||||
|
||||
<div class="highlighter-coderay"><div class="CodeRay">
|
||||
<div class="code"><pre><span class="key">netatmo</span>:
|
||||
<span class="key">api_key</span>: <span class="string"><span class="content">API_KEY</span></span>
|
||||
<span class="key">secret_key</span>: <span class="string"><span class="content">SECRET_KEY</span></span>
|
||||
<span class="key">username</span>: <span class="string"><span class="content">username</span></span>
|
||||
<span class="key">password</span>: <span class="string"><span class="content">password</span></span>
|
||||
</pre></div>
|
||||
</div>
|
||||
</div>
|
||||
```yaml
|
||||
netatmo:
|
||||
api_key: API_KEY
|
||||
secret_key: SECRET_KEY
|
||||
username: username
|
||||
password: password
|
||||
```
|
||||
|
||||
<h3><a class='title-link' name='hotfix-0221---june-20' href='#hotfix-0221---june-20'></a> Hotfix 0.22.1 - June 20 </h3>
|
||||
### <a class='title-link' name='hotfix-0221---june-20' href='#hotfix-0221---june-20'></a> Hotfix 0.22.1 - June 20
|
||||
|
||||
<ul>
|
||||
<li>Insteon Hub lights will load again</li>
|
||||
</ul>
|
||||
- Insteon Hub lights will load again
|
||||
|
||||
[@acockburn]: https://github.com/acockburn/
|
||||
[@arsaboo]: https://github.com/arsaboo/
|
||||
[@dansullivan86]: https://github.com/dansullivan86/
|
||||
[@jabesq]: https://github.com/jabesq/
|
||||
[@Landrash]: https://github.com/Landrash/
|
||||
[@linjef]: https://github.com/linjef/
|
||||
[@lwis]: https://github.com/lwis/
|
||||
[@MartinHjelmare]: https://github.com/MartinHjelmare/
|
||||
[@michaelarnauts]: https://github.com/michaelarnauts/
|
||||
[@mtreinish]: https://github.com/mtreinish/
|
||||
[@nkgilley]: https://github.com/nkgilley/
|
||||
[@partofthething]: https://github.com/partofthething/
|
||||
[@persandstrom]: https://github.com/persandstrom/
|
||||
[@philk]: https://github.com/philk/
|
||||
[@wind-rider]: https://github.com/wind/
|
||||
[@fabaff]: https://github.com/fabaff/
|
||||
[AsusWRT]: /components/device_tracker.asuswrt/
|
||||
[BT Home Hub 5]: /components/device_tracker.bt_home_hub_5/
|
||||
[Cast]: /components/media_player.cast/
|
||||
[IR switch device]: /components/mysensors/
|
||||
[local file]: /components/camera.local_file/
|
||||
[Netatmo]: /components/netatmo/
|
||||
[Pandora]: /components/media_player.pandora/
|
||||
[shell command]: /components/shell_command/
|
||||
[Sonos]: /components/media_player.sonos/
|
||||
[Wink]: /components/rollershutter.wink/
|
||||
[alexa]: /components/alexa/#working-with-scenes
|
||||
[Plex sensor]: /components/sensor.plex/
|
||||
[Swagger.yaml format]: https://github.com/home-assistant/home-assistant/blob/dev/docs/swagger.yaml
|
||||
[All-in-One installer]: /getting-started/installation-raspberry-pi-all-in-one/
|
||||
[standalone Raspberry Pi installation guide]: /getting-started/installation-raspberry-pi/
|
||||
[Voltage sensor]: /components/sensor.bloomsky/
|
||||
[SNMP]: /components/sensor.snmp/
|
||||
]]></content>
|
||||
</entry>
|
||||
|
||||
|
|
|
@ -107,7 +107,7 @@
|
|||
</time>
|
||||
</div>
|
||||
<div class="grid__item four-fifths palm-one-whole">
|
||||
<h1 class="gamma"><a href="/blog/2016/08/13/foursquare-fast-com-ffmpeg-gpsd/">0.26: Foursquare, Fast.com, FFMPEG and GPSD</a></h1>
|
||||
<h1 class="gamma"><a href="/blog/2016/08/13/foursquare-fast.com-ffmpeg-gpsd/">0.26: Foursquare, Fast.com, FFMPEG and GPSD</a></h1>
|
||||
|
||||
<footer class="meta">
|
||||
<span>
|
||||
|
@ -1483,7 +1483,7 @@
|
|||
|
||||
|
||||
<li class="post">
|
||||
<a href="/blog/2016/08/13/foursquare-fast-com-ffmpeg-gpsd/">0.26: Foursquare, Fast.com, FFMPEG and GPSD</a>
|
||||
<a href="/blog/2016/08/13/foursquare-fast.com-ffmpeg-gpsd/">0.26: Foursquare, Fast.com, FFMPEG and GPSD</a>
|
||||
</li>
|
||||
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
<title><![CDATA[Category: Survey | Home Assistant]]></title>
|
||||
<link href="https://home-assistant.io/blog/categories/survey/atom.xml" rel="self"/>
|
||||
<link href="https://home-assistant.io/"/>
|
||||
<updated>2016-08-22T07:26:42+00:00</updated>
|
||||
<updated>2016-08-22T08:20:27+00:00</updated>
|
||||
<id>https://home-assistant.io/</id>
|
||||
<author>
|
||||
<name><![CDATA[Home Assistant]]></name>
|
||||
|
@ -18,84 +18,85 @@
|
|||
<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">< and last week [PyPI](https://pypi.python.org/pypi/homeassistant/) counted 5063 downloads.
|
||||
|
||||
<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>
|
||||
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.
|
||||
|
||||
<!--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>
|
||||
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>Of course most users are running with the <a href="/getting-started/automation/">automation</a> component otherwise it would make much sense to use Home Assistant. The <a href="/components/sun/">sun</a> component is used a lot too. We hope that this is not because this component is enabled by default.</p>
|
||||
Of course most users are running with the [automation](/getting-started/automation/) component otherwise it would make much sense to use Home Assistant. The [sun](/components/sun/) component is used a lot too. We hope that this is not because this component is enabled by default.
|
||||
|
||||
<p>The <a href="/components/alarm_control_panel/">Alarm control panels</a> and the <a href="/components/camera/">camera component</a> are both used by around one third of the participants of the survey. It’s 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>
|
||||
The [Alarm control panels](/components/alarm_control_panel/) and the [camera component](/components/camera/) are both used by around one third of the participants of the survey. It's 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><a href="/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="/components/media_player.cast/">Google Cast</a> and <a href="/components/media_player.plex/"> Plex</a> are the top media player platforms. <a href="/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 it’s comprehensible.</p>
|
||||
[Philips Hue](/components/light.hue/) is the "winner" in the light category closely followed by [MQTT lights](components/light.mqtt/). [Google Cast](/components/media_player.cast/) and [ Plex](/components/media_player.plex/) are the top media player platforms. [Pushbullet](/components/notify.pushbullet/) is by far the most-used [notification platform](https://home-assistant.io/components/notify/). If you followed the recent efforts to improve this platform it's comprehensible.
|
||||
|
||||
<p>It’s 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="/components/sensor.forecast/">Forecast sensor</a>. The MQTT sensors and switches are deployed in almost 50% of all Home Assistant setups.</p>
|
||||
It's 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 [Forecast sensor](/components/sensor.forecast/). The MQTT sensors and switches are deployed in almost 50% of all Home Assistant setups.
|
||||
|
||||
<p class="img">
|
||||
<img src="https://home-assistant.io/images/blog/2015-11-survey/releases.png" />
|
||||
|
||||
<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" />
|
||||
<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" />
|
||||
<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" />
|
||||
<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" />
|
||||
<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" />
|
||||
<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" />
|
||||
<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" />
|
||||
<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" />
|
||||
<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" />
|
||||
<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" />
|
||||
<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" />
|
||||
<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>
|
||||
The conclusion is that [MQTT](http://mqtt.org/) is popular in almost every section from Alarm Control Panel, presence detection with [owntracks](http://owntracks.org/), sensors and switches, and now even for lights.
|
||||
|
||||
<p>The interpretation of the data is up to you. Again, thanks for participating in this survey.</p>
|
||||
The interpretation of the data is up to you. Again, thanks for participating in this survey.
|
||||
]]></content>
|
||||
</entry>
|
||||
|
||||
|
|
|
@ -198,7 +198,7 @@
|
|||
|
||||
|
||||
<li class="post">
|
||||
<a href="/blog/2016/08/13/foursquare-fast-com-ffmpeg-gpsd/">0.26: Foursquare, Fast.com, FFMPEG and GPSD</a>
|
||||
<a href="/blog/2016/08/13/foursquare-fast.com-ffmpeg-gpsd/">0.26: Foursquare, Fast.com, FFMPEG and GPSD</a>
|
||||
</li>
|
||||
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
<title><![CDATA[Category: Talks | Home Assistant]]></title>
|
||||
<link href="https://home-assistant.io/blog/categories/talks/atom.xml" rel="self"/>
|
||||
<link href="https://home-assistant.io/"/>
|
||||
<updated>2016-08-22T07:26:42+00:00</updated>
|
||||
<updated>2016-08-22T08:20:27+00:00</updated>
|
||||
<id>https://home-assistant.io/</id>
|
||||
<author>
|
||||
<name><![CDATA[Home Assistant]]></name>
|
||||
|
@ -18,12 +18,15 @@
|
|||
<link href="https://home-assistant.io/blog/2016/05/06/open-iot-summit-talk/"/>
|
||||
<updated>2016-05-06T14:09:00+00:00</updated>
|
||||
<id>https://home-assistant.io/blog/2016/05/06/open-iot-summit-talk</id>
|
||||
<content type="html"><![CDATA[<p>At the beginning of April I gave a talk about Home Assistant at the OpenIoT summit in San Diego. I talk about the Home Assistant architecture and explain how to get started integrating your devices. Big thanks to my employer AppFolio (<a href="http://www.appfolioinc.com/jobs-openings">we’re hiring!</a>) for letting me attend. <a href="https://docs.google.com/presentation/d/1P2WsmwGSSni4gAriY5IA0-m-FUGO1kno3gIkRYz20Kw/edit#slide=id.p">Slides.</a></p>
|
||||
<content type="html"><![CDATA[At the beginning of April I gave a talk about Home Assistant at the OpenIoT summit in San Diego. I talk about the Home Assistant architecture and explain how to get started integrating your devices. Big thanks to my employer AppFolio ([we're hiring!]) for letting me attend. [Slides.]
|
||||
|
||||
<div class="videoWrapper">
|
||||
<iframe width="560" height="315" src="https://www.youtube.com/embed/4-6rTwKl6ww" frameborder="0" allowfullscreen=""></iframe>
|
||||
<div class='videoWrapper'>
|
||||
<iframe width="560" height="315" src="https://www.youtube.com/embed/4-6rTwKl6ww" frameborder="0" allowfullscreen></iframe>
|
||||
</div>
|
||||
|
||||
|
||||
[Slides.]: https://docs.google.com/presentation/d/1P2WsmwGSSni4gAriY5IA0-m-FUGO1kno3gIkRYz20Kw/edit#slide=id.p
|
||||
[we're hiring!]: http://www.appfolioinc.com/jobs-openings
|
||||
]]></content>
|
||||
</entry>
|
||||
|
||||
|
|
|
@ -200,7 +200,7 @@
|
|||
|
||||
|
||||
<li class="post">
|
||||
<a href="/blog/2016/08/13/foursquare-fast-com-ffmpeg-gpsd/">0.26: Foursquare, Fast.com, FFMPEG and GPSD</a>
|
||||
<a href="/blog/2016/08/13/foursquare-fast.com-ffmpeg-gpsd/">0.26: Foursquare, Fast.com, FFMPEG and GPSD</a>
|
||||
</li>
|
||||
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
<title><![CDATA[Category: Technology | Home Assistant]]></title>
|
||||
<link href="https://home-assistant.io/blog/categories/technology/atom.xml" rel="self"/>
|
||||
<link href="https://home-assistant.io/"/>
|
||||
<updated>2016-08-22T07:26:42+00:00</updated>
|
||||
<updated>2016-08-22T08:20:27+00:00</updated>
|
||||
<id>https://home-assistant.io/</id>
|
||||
<author>
|
||||
<name><![CDATA[Home Assistant]]></name>
|
||||
|
@ -18,152 +18,174 @@
|
|||
<link href="https://home-assistant.io/blog/2016/08/07/optimizing-the-home-assistant-mobile-web-app/"/>
|
||||
<updated>2016-08-07T19:36:00+00:00</updated>
|
||||
<id>https://home-assistant.io/blog/2016/08/07/optimizing-the-home-assistant-mobile-web-app</id>
|
||||
<content type="html"><![CDATA[<p><em>This blog post will go into detail about the recent performance optimizations that went into the Home Assistant front end. For people not familiar with the app, check out <a href="https://home-assistant.io/demo">the demo</a> and <a href="https://github.com/home-assistant/home-assistant-polymer">the source</a>.</em></p>
|
||||
<content type="html"><![CDATA[_This blog post will go into detail about the recent performance optimizations that went into the Home Assistant front end. For people not familiar with the app, check out [the demo][demo] and [the source][hap]._
|
||||
|
||||
<p>TL; DR: Don’t hack the framework, separate responsibilities, ship less, use service workers, use (future) web standards.</p>
|
||||
TL; DR: Don’t hack the framework, separate responsibilities, ship less, use service workers, use (future) web standards.
|
||||
|
||||
<p>This year at Google I/O I saw Monica from the Polymer team talk about web components and performance. In her talk <a href="https://www.youtube.com/watch?v=zfQoleQEa4w&feature=youtu.be&t=1380">she mentions a mantra</a> that they use in the Polymer team to make things fast: <strong>Do less and be lazy</strong>.</p>
|
||||
This year at Google I/O I saw Monica from the Polymer team talk about web components and performance. In her talk [she mentions a mantra][mantra] that they use in the Polymer team to make things fast: **Do less and be lazy**.
|
||||
|
||||
<p>Do less and be lazy. It sounds so obvious and it took a while before it started to dawn on me. I think most of the code I write is pretty fast, but I don’t often stop to take a harder look at how and when it runs in practice. When do we need the result, can it be postponed?</p>
|
||||
Do less and be lazy. It sounds so obvious and it took a while before it started to dawn on me. I think most of the code I write is pretty fast, but I don't often stop to take a harder look at how and when it runs in practice. When do we need the result, can it be postponed?
|
||||
|
||||
<p>And thus started my journey to take a critical look at how the Home Assistant app was working and how to make things faster. Below is the list of the different things that I did to make it fast.</p>
|
||||
And thus started my journey to take a critical look at how the Home Assistant app was working and how to make things faster. Below is the list of the different things that I did to make it fast.
|
||||
|
||||
<p>I hope this list can be useful to other people, as a guide for optimizing their own apps or for avoiding pitfalls when building a new one.</p>
|
||||
I hope this list can be useful to other people, as a guide for optimizing their own apps or for avoiding pitfalls when building a new one.
|
||||
|
||||
<p>The first thing to do is to measure. The Home Assistant front end is a mobile web app, so we shouldn’t measure this on a machine with 8 cores and gigabytes of ram but instead measure on devices you expect a mobile web app to run: phones. Below are two timelines recorded with Home Assistant 0.18.2 (pre-optimizations) and Google Chrome 53. <strong>On my Mac the app starts in 1400 miliseconds and on my Nexus 5x in ~6500 miliseconds (~4.5 times slower!).</strong></p>
|
||||
The first thing to do is to measure. The Home Assistant front end is a mobile web app, so we shouldn’t measure this on a machine with 8 cores and gigabytes of ram but instead measure on devices you expect a mobile web app to run: phones. Below are two timelines recorded with Home Assistant 0.18.2 (pre-optimizations) and Google Chrome 53. **On my Mac the app starts in 1400 miliseconds and on my Nexus 5x in ~6500 miliseconds (~4.5 times slower!).**
|
||||
|
||||
<p class="img">
|
||||
<img src="https://home-assistant.io/images/blog/2016-08-optimizing-web-app/performance-timeline-0.18.2.png" alt="Timeline of loading the front end in Home Assistant 0.18.2" />
|
||||
<p class='img'>
|
||||
<img
|
||||
src='https://home-assistant.io/images/blog/2016-08-optimizing-web-app/performance-timeline-0.18.2.png'
|
||||
alt='Timeline of loading the front end in Home Assistant 0.18.2' />
|
||||
</p>
|
||||
|
||||
<p>Although the app takes 6500 milliseconds to load on my phone, it would perform well afterwards. Still, that initial load is unacceptable. You expect to open an app on your phone and be able to use it, quickly. After I applied all the changes described below, I managed to reduce startup time to 900 miliseconds (-35%) on my Mac and 2400 miliseconds (-63%) on my Nexus 5x. <a href="https://home-assistant.io/demo">Check out the demo here.</a></p>
|
||||
Although the app takes 6500 milliseconds to load on my phone, it would perform well afterwards. Still, that initial load is unacceptable. You expect to open an app on your phone and be able to use it, quickly. After I applied all the changes described below, I managed to reduce startup time to 900 miliseconds (-35%) on my Mac and 2400 miliseconds (-63%) on my Nexus 5x. [Check out the demo here.][demo]
|
||||
|
||||
<p class="img">
|
||||
<img src="https://home-assistant.io/images/blog/2016-08-optimizing-web-app/performance-diagram.png" alt="diagram showing old and new loading times next to one another" />
|
||||
<img src="https://home-assistant.io/images/blog/2016-08-optimizing-web-app/performance-timeline-0.26.png" alt="Timeline of loading the front end in Home Assistant 0.26" />
|
||||
<p class='img'>
|
||||
<img
|
||||
src='https://home-assistant.io/images/blog/2016-08-optimizing-web-app/performance-diagram.png'
|
||||
alt='diagram showing old and new loading times next to one another' />
|
||||
<img
|
||||
src='https://home-assistant.io/images/blog/2016-08-optimizing-web-app/performance-timeline-0.26.png'
|
||||
alt='Timeline of loading the front end in Home Assistant 0.26' />
|
||||
</p>
|
||||
|
||||
<!--more-->
|
||||
|
||||
<h2><a class='title-link' name='technology' href='#technology'></a> Technology </h2>
|
||||
## <a class='title-link' name='technology' href='#technology'></a> Technology
|
||||
|
||||
<p>The Home Assistant front end consists of two parts. There is <a href="https://github.com/home-assistant/home-assistant-js">Home Assistant JS</a>, which controls all data and interaction between JavaScript and the server. It is a Flux architecture using <a href="https://optimizely.github.io/nuclear-js/">NuclearJS</a> and <a href="https://facebook.github.io/immutable-js/">ImmutableJS</a>. The UI is implemented by <a href="https://github.com/home-assistant/home-assistant-polymer">Home Assistant Polymer</a> using <a href="https://www.polymer-project.org/">Polymer</a> and web components.</p>
|
||||
The Home Assistant front end consists of two parts. There is [Home Assistant JS][hajs], which controls all data and interaction between JavaScript and the server. It is a Flux architecture using [NuclearJS] and [ImmutableJS]. The UI is implemented by [Home Assistant Polymer][hap] using [Polymer] and web components.
|
||||
|
||||
<h1><a class='title-link' name='dont-hack-the-framework' href='#dont-hack-the-framework'></a> Don’t hack the framework </h1>
|
||||
# <a class='title-link' name='dont-hack-the-framework' href='#dont-hack-the-framework'></a> Don’t hack the framework
|
||||
|
||||
<p>I thought to be smart. I split out the JavaScript part of all web components and bundled them separately using Webpack so that I could use ES2015 via BabelJS (<a href="https://github.com/home-assistant/home-assistant-polymer/wiki/Using-Polymer-with-ES2015,-Babel-and-NPM">architecture</a>). This is not how Polymer components are written and it meant that I was unable to use any of the tooling that is available in the community or easily split up the bundle (more on this later).</p>
|
||||
I thought to be smart. I split out the JavaScript part of all web components and bundled them separately using Webpack so that I could use ES2015 via BabelJS ([architecture][es2015-arch]). This is not how Polymer components are written and it meant that I was unable to use any of the tooling that is available in the community or easily split up the bundle (more on this later).
|
||||
|
||||
<p>So I went ahead and backported all my web components back from shiny beautiful ES6 to ES5. And you know what? It’s not that bad. Yes, not being able to use the concise object notation and arrow functions make your code more verbose. But in the end it is the same code that is running in browsers.</p>
|
||||
So I went ahead and backported all my web components back from shiny beautiful ES6 to ES5. And you know what? It’s not that bad. Yes, not being able to use the concise object notation and arrow functions make your code more verbose. But in the end it is the same code that is running in browsers.
|
||||
|
||||
<p>Another benefit of having each web component contain their own script tag is that the browser will process them one by one, allowing the browser to render our loading spinner animation in between.</p>
|
||||
Another benefit of having each web component contain their own script tag is that the browser will process them one by one, allowing the browser to render our loading spinner animation in between.
|
||||
|
||||
<p>As you can see in the timelines, we were able to get rid of most of the blocking component loading.</p>
|
||||
As you can see in the timelines, we were able to get rid of most of the blocking component loading.
|
||||
|
||||
<p class="img">
|
||||
<img src="https://home-assistant.io/images/blog/2016-08-optimizing-web-app/timeline-no-more-es2015.png" alt="Timeline of loading the front end before and after the optimization" />
|
||||
<p class='img'>
|
||||
<img
|
||||
src='https://home-assistant.io/images/blog/2016-08-optimizing-web-app/timeline-no-more-es2015.png'
|
||||
alt='Timeline of loading the front end before and after the optimization' />
|
||||
</p>
|
||||
|
||||
<h1><a class='title-link' name='separate-responsibilities' href='#separate-responsibilities'></a> Separate responsibilities </h1>
|
||||
# <a class='title-link' name='separate-responsibilities' href='#separate-responsibilities'></a> Separate responsibilities
|
||||
|
||||
<p>Whenever you learn a new technology, you feel like you’ve learned a new superpower. Wow, I can do all this with only 2 lines?! I had the same with bundling.</p>
|
||||
Whenever you learn a new technology, you feel like you’ve learned a new superpower. Wow, I can do all this with only 2 lines?! I had the same with bundling.
|
||||
|
||||
<p>I was initially very focused on shipping just a single file with everything that my app needed. The entry point would be my main component which would require all of its Flux and UI dependencies. Then, just before it all would be rendered, it would check if there is authentication and start the data fetching.</p>
|
||||
I was initially very focused on shipping just a single file with everything that my app needed. The entry point would be my main component which would require all of its Flux and UI dependencies. Then, just before it all would be rendered, it would check if there is authentication and start the data fetching.
|
||||
|
||||
<p>This is a very bad pattern. This means that you will not start any data fetching until your UI is ready to render. Instead, you want your data to be fetched as soon as possible, and while the request is out to the server you want the page to load all your UI components.</p>
|
||||
This is a very bad pattern. This means that you will not start any data fetching until your UI is ready to render. Instead, you want your data to be fetched as soon as possible, and while the request is out to the server you want the page to load all your UI components.
|
||||
|
||||
<p>To accomplish this I extracted the application core out of the main bundle. In the current optimized version it’s 31.1kb gzip’d. It is loaded before any other scripts so that it can start fetching data as soon as possible.</p>
|
||||
To accomplish this I extracted the application core out of the main bundle. In the current optimized version it’s 31.1kb gzip’d. It is loaded before any other scripts so that it can start fetching data as soon as possible.
|
||||
|
||||
<p class="img">
|
||||
<img src="https://home-assistant.io/images/blog/2016-08-optimizing-web-app/timeline-corejs.png" alt="Timeline of loading the front end before and after the optimization" />
|
||||
<p class='img'>
|
||||
<img
|
||||
src='https://home-assistant.io/images/blog/2016-08-optimizing-web-app/timeline-corejs.png'
|
||||
alt='Timeline of loading the front end before and after the optimization' />
|
||||
</p>
|
||||
|
||||
<p>When the data does come back before the UI is done loading, we can process it before we start rendering the UI because of all the web components being processed individually. This means that we don’t have to show a loading screen the first time our components render – we can just render the components with the data they require.</p>
|
||||
When the data does come back before the UI is done loading, we can process it before we start rendering the UI because of all the web components being processed individually. This means that we don't have to show a loading screen the first time our components render – we can just render the components with the data they require.
|
||||
|
||||
<h1><a class='title-link' name='ship-less' href='#ship-less'></a> Ship less </h1>
|
||||
# <a class='title-link' name='ship-less' href='#ship-less'></a> Ship less
|
||||
|
||||
<p>The theory behind this one is simple: if we manage to ship less code, the browser has to process less code and it will start faster.</p>
|
||||
The theory behind this one is simple: if we manage to ship less code, the browser has to process less code and it will start faster.
|
||||
|
||||
<h2><a class='title-link' name='only-include-the-components-for-the-page-that-you-will-show' href='#only-include-the-components-for-the-page-that-you-will-show'></a> Only include the components for the page that you will show </h2>
|
||||
## <a class='title-link' name='only-include-the-components-for-the-page-that-you-will-show' href='#only-include-the-components-for-the-page-that-you-will-show'></a> Only include the components for the page that you will show
|
||||
|
||||
<p>The Home Assistant mobile web application has 10 different panels (pages). Besides that, it also has a dialog for each type of device to show more info. That’s a lot of components and screens of which only a very small set is needed at the start. That means that we are shipping a lot of unnecessary data that the browser has to process before our initial render!</p>
|
||||
The Home Assistant mobile web application has 10 different panels (pages). Besides that, it also has a dialog for each type of device to show more info. That’s a lot of components and screens of which only a very small set is needed at the start. That means that we are shipping a lot of unnecessary data that the browser has to process before our initial render!
|
||||
|
||||
<p>I broke up each panel of the app into a separate bundle that will be loaded on demand. This saved 250 kilobytes (pre-gzip) on just the embedded map alone! This change, however, required some significant changes to our build process.</p>
|
||||
I broke up each panel of the app into a separate bundle that will be loaded on demand. This saved 250 kilobytes (pre-gzip) on just the embedded map alone! This change, however, required some significant changes to our build process.
|
||||
|
||||
<p>Breaking up an app in JavaScript is complex because each module explicitly imports their dependencies. This has to continue to work in your browser after breaking it up in multiple files. Web components do not have this problem as it’s part of the platform and thus your browser is the registry! An unregistered web component will be rendered as an empty span element until the element gets registered. Loading order is not important.</p>
|
||||
Breaking up an app in JavaScript is complex because each module explicitly imports their dependencies. This has to continue to work in your browser after breaking it up in multiple files. Web components do not have this problem as it’s part of the platform and thus your browser is the registry! An unregistered web component will be rendered as an empty span element until the element gets registered. Loading order is not important.
|
||||
|
||||
<div class="highlighter-coderay"><div class="CodeRay">
|
||||
<div class="code"><pre><span class="comment">// Example of the flexibility of web components.</span>
|
||||
<span class="keyword">var</span> spinner = document.createElement(<span class="string"><span class="delimiter">'</span><span class="content">paper-spinner</span><span class="delimiter">'</span></span>);
|
||||
spinner.active = <span class="predefined-constant">true</span>;
|
||||
```javascript
|
||||
// Example of the flexibility of web components.
|
||||
var spinner = document.createElement('paper-spinner');
|
||||
spinner.active = true;
|
||||
document.body.appendChild(spinner);
|
||||
</pre></div>
|
||||
</div>
|
||||
</div>
|
||||
```
|
||||
|
||||
<p>Because the browser tracks your web components, creating standalone bundles for parts of the app is easy:</p>
|
||||
Because the browser tracks your web components, creating standalone bundles for parts of the app is easy:
|
||||
|
||||
<ul>
|
||||
<li>Find all dependencies included in the main bundle (using <a href="https://github.com/Polymer/hydrolysis">hydrolysis</a>)</li>
|
||||
<li>Create individual bundles of each panel (page) but filter out the dependencies included in main bundle.</li>
|
||||
</ul>
|
||||
- Find all dependencies included in the main bundle (using [hydrolysis])
|
||||
- Create individual bundles of each panel (page) but filter out the dependencies included in main bundle.
|
||||
|
||||
<p>The <a href="https://github.com/home-assistant/home-assistant-polymer/blob/master/script/vulcanize.js">build script</a> that bundles and minifies the main bundle and panel bundles is <100 lines.</p>
|
||||
The [build script][build-html] that bundles and minifies the main bundle and panel bundles is <100 lines.
|
||||
|
||||
<h2><a class='title-link' name='change-the-javascript-bundler-to-rollup' href='#change-the-javascript-bundler-to-rollup'></a> Change the JavaScript bundler to Rollup </h2>
|
||||
## <a class='title-link' name='change-the-javascript-bundler-to-rollup' href='#change-the-javascript-bundler-to-rollup'></a> Change the JavaScript bundler to Rollup
|
||||
|
||||
<p>Core.js is still pure JavaScript and requires bundling. In my journey to get a smaller bundle, I went from <a href="https://webpack.github.io/">Webpack</a> to Webpack 2 to <a href="http://rollupjs.org/">Rollup</a>. At each step the bundle got smaller. Rollup is the big winner here because it doesn’t wrap all your modules in function calls but instead concatenates all files with minimal changes to make it work. This not only reduces the file size but also the loading speed. This is because the JavaScript engine will no longer have to invoke a function to resolve each import, it’s doing less work. This might not mean much for a computer but on a phone, everything counts.</p>
|
||||
Core.js is still pure JavaScript and requires bundling. In my journey to get a smaller bundle, I went from [Webpack] to Webpack 2 to [Rollup]. At each step the bundle got smaller. Rollup is the big winner here because it doesn’t wrap all your modules in function calls but instead concatenates all files with minimal changes to make it work. This not only reduces the file size but also the loading speed. This is because the JavaScript engine will no longer have to invoke a function to resolve each import, it’s doing less work. This might not mean much for a computer but on a phone, everything counts.
|
||||
|
||||
<h2><a class='title-link' name='scrutinize-dependencies' href='#scrutinize-dependencies'></a> Scrutinize dependencies </h2>
|
||||
## <a class='title-link' name='scrutinize-dependencies' href='#scrutinize-dependencies'></a> Scrutinize dependencies
|
||||
|
||||
<p>If the goal is to ship less, it’s time to take a good look at dependencies. It’s so often that we decide to fall back to yet another NPM package that makes our life a little easier but comes at the cost of size – size usually taken up by functionality that you might never need.</p>
|
||||
If the goal is to ship less, it’s time to take a good look at dependencies. It’s so often that we decide to fall back to yet another NPM package that makes our life a little easier but comes at the cost of size – size usually taken up by functionality that you might never need.
|
||||
|
||||
<h3><a class='title-link' name='remove-lodash' href='#remove-lodash'></a> Remove Lodash </h3>
|
||||
<p>I realized that I only used a few methods of lodash. Lodash (and previously underscore) used to be one of the dependencies that would always be one of the first things that I would add to any project I start. But I could no longer justify it in the case of Home Assistant. Even with dead tree shaking it was not worth including it. Yes, they support a lot of edge cases but those were not relevant to my use case. And standalone lodash packages are <a href="https://github.com/lodash/lodash/blob/3.1.7-npm-packages/lodash.range/index.js">still huge</a>. The only thing that I couldn’t replace with a few lines of my own code was debounce. However I found <a href="https://github.com/component/debounce">a 40 line replacement</a>.</p>
|
||||
### <a class='title-link' name='remove-lodash' href='#remove-lodash'></a> Remove Lodash
|
||||
I realized that I only used a few methods of lodash. Lodash (and previously underscore) used to be one of the dependencies that would always be one of the first things that I would add to any project I start. But I could no longer justify it in the case of Home Assistant. Even with dead tree shaking it was not worth including it. Yes, they support a lot of edge cases but those were not relevant to my use case. And standalone lodash packages are [still huge][lodash.range]. The only thing that I couldn’t replace with a few lines of my own code was debounce. However I found [a 40 line replacement][debounce].
|
||||
|
||||
<h3><a class='title-link' name='replace-momentjs-with-fecha' href='#replace-momentjs-with-fecha'></a> Replace moment.js with Fecha </h3>
|
||||
### <a class='title-link' name='replace-momentjs-with-fecha' href='#replace-momentjs-with-fecha'></a> Replace moment.js with Fecha
|
||||
|
||||
<p>Moment.js is one of those power libraries. It is able to handle any date problem that you can throw at it. But this obviously comes at the cost of size. <a href="https://github.com/taylorhakes/fecha">Fecha</a> is a date formatting library at ~8% the size of moment.js (only 4.7kb pre-gzip). The only thing that it does not contain is date manipulation, which was something that was not being used.</p>
|
||||
Moment.js is one of those power libraries. It is able to handle any date problem that you can throw at it. But this obviously comes at the cost of size. [Fecha] is a date formatting library at ~8% the size of moment.js (only 4.7kb pre-gzip). The only thing that it does not contain is date manipulation, which was something that was not being used.
|
||||
|
||||
<h1><a class='title-link' name='use-service-worker-to-instantly-load-the-app' href='#use-service-worker-to-instantly-load-the-app'></a> Use Service worker to instantly load the app </h1>
|
||||
# <a class='title-link' name='use-service-worker-to-instantly-load-the-app' href='#use-service-worker-to-instantly-load-the-app'></a> Use Service worker to instantly load the app
|
||||
|
||||
<p>Using a service worker we’re able to store all app components and core javascript in the browser. This means that after their first visit, the browser will only have to go to the network to fetch the latest data from the server.</p>
|
||||
Using a service worker we’re able to store all app components and core javascript in the browser. This means that after their first visit, the browser will only have to go to the network to fetch the latest data from the server.
|
||||
|
||||
<p>Creating a service worker is easy using <a href="https://github.com/GoogleChrome/sw-precache">sw-precache</a>, a service worker generation tool.</p>
|
||||
Creating a service worker is easy using [sw-precache], a service worker generation tool.
|
||||
|
||||
<p>When a browser does not support service workers, Home Assistant will serve fingerprinted assets that are aggressively cached. Only when the content changes will the client redownload the asset.</p>
|
||||
When a browser does not support service workers, Home Assistant will serve fingerprinted assets that are aggressively cached. Only when the content changes will the client redownload the asset.
|
||||
|
||||
<p>Using fingerprinting with sw-precache required jumping through a few hoops. <a href="https://github.com/home-assistant/home-assistant-polymer/blob/master/script/sw-precache.js">The final build script can be found here.</a></p>
|
||||
Using fingerprinting with sw-precache required jumping through a few hoops. [The final build script can be found here.][build-sw]
|
||||
|
||||
<h1><a class='title-link' name='make-it-feel-fast' href='#make-it-feel-fast'></a> Make it feel fast </h1>
|
||||
# <a class='title-link' name='make-it-feel-fast' href='#make-it-feel-fast'></a> Make it feel fast
|
||||
|
||||
<p>This one is more psychological: no one likes staring at a white screen because white screens are ambiguous: are we loading something, is there a crappy connection or maybe even a script error? That’s why it is very important to render something on the screen to show that the rest is being loaded, and as quickly as possible.</p>
|
||||
This one is more psychological: no one likes staring at a white screen because white screens are ambiguous: are we loading something, is there a crappy connection or maybe even a script error? That’s why it is very important to render something on the screen to show that the rest is being loaded, and as quickly as possible.
|
||||
|
||||
<p>The Home Assistant landing page contains just enough CSS and HTML to render the loading screen minus the animations.</p>
|
||||
The Home Assistant landing page contains just enough CSS and HTML to render the loading screen minus the animations.
|
||||
|
||||
<p>Now that the app is fast enough, I might swap out moving from a lite loading screen to drawing an empty toolbar. This makes it look like the UI is almost there.</p>
|
||||
Now that the app is fast enough, I might swap out moving from a lite loading screen to drawing an empty toolbar. This makes it look like the UI is almost there.
|
||||
|
||||
<h1><a class='title-link' name='using-a-framework-build-on-web-standards' href='#using-a-framework-build-on-web-standards'></a> Using a framework build on web standards </h1>
|
||||
# <a class='title-link' name='using-a-framework-build-on-web-standards' href='#using-a-framework-build-on-web-standards'></a> Using a framework build on web standards
|
||||
|
||||
<p><em>I left this to the end of the list, mainly because I had no influence on this. Polymer just happened to ship an update while I was optimizing the application which gave a big boost to the loading time.</em></p>
|
||||
_I left this to the end of the list, mainly because I had no influence on this. Polymer just happened to ship an update while I was optimizing the application which gave a big boost to the loading time._
|
||||
|
||||
<p>By using Polymer we have the ability to use tomorrow’s web standards today. This is powered by polyfills. A polyfill will use JavaScript to simulate the behavior that the web standard would have taken care of. As browsers progress, more work can move from the polyfills back to the browsers. This is great because browsers will be able to optimize the work better and thus be faster.</p>
|
||||
By using Polymer we have the ability to use tomorrow’s web standards today. This is powered by polyfills. A polyfill will use JavaScript to simulate the behavior that the web standard would have taken care of. As browsers progress, more work can move from the polyfills back to the browsers. This is great because browsers will be able to optimize the work better and thus be faster.
|
||||
|
||||
<p>Polymer 1.6 was introduced at the end of June and allowed the app to take advantage of native <a href="https://developer.mozilla.org/en-US/docs/Web/CSS/Using_CSS_variables">CSS variables</a> in Chrome and Firefox. It also introduced lazy registration. Both greatly sped up our loading times.</p>
|
||||
Polymer 1.6 was introduced at the end of June and allowed the app to take advantage of native [CSS variables][css-vars] in Chrome and Firefox. It also introduced lazy registration. Both greatly sped up our loading times.
|
||||
|
||||
<h1><a class='title-link' name='future-optimizations' href='#future-optimizations'></a> Future optimizations </h1>
|
||||
# <a class='title-link' name='future-optimizations' href='#future-optimizations'></a> Future optimizations
|
||||
|
||||
<p>A lot of optimizations have been applied but this journey will never be over. There are still a lot of opportunities to make things even faster. Some ideas that are on my list to explore:</p>
|
||||
A lot of optimizations have been applied but this journey will never be over. There are still a lot of opportunities to make things even faster. Some ideas that are on my list to explore:
|
||||
|
||||
<ul>
|
||||
<li>Use shadow DOM instead of shady DOM polyfill.</li>
|
||||
<li>Use <a href="https://developers.google.com/closure/compiler/">closure compiler</a> to optimize the JavaScript.</li>
|
||||
<li>Reduce the number of icons that are loaded.</li>
|
||||
<li>Embed initial API response in served page if not using a service worker.</li>
|
||||
<li>Reduce size of initial bundle by moving out all things that are not visible for initial paint. For example the dialogs that show more info about entities.</li>
|
||||
<li>Prefetch the other pages using <code><link rel="preload" …></code></li>
|
||||
</ul>
|
||||
- Use shadow DOM instead of shady DOM polyfill.
|
||||
- Use [closure compiler][closure] to optimize the JavaScript.
|
||||
- Reduce the number of icons that are loaded.
|
||||
- Embed initial API response in served page if not using a service worker.
|
||||
- Reduce size of initial bundle by moving out all things that are not visible for initial paint. For example the dialogs that show more info about entities.
|
||||
- Prefetch the other pages using `<link rel="preload" …>`
|
||||
|
||||
]]></content>
|
||||
[demo]: https://home-assistant.io/demo
|
||||
[hap]: https://github.com/home-assistant/home-assistant-polymer
|
||||
[mantra]: https://www.youtube.com/watch?v=zfQoleQEa4w&feature=youtu.be&t=1380
|
||||
[sw-precache]: https://github.com/GoogleChrome/sw-precache
|
||||
[hydrolysis]: https://github.com/Polymer/hydrolysis
|
||||
[hajs]: https://github.com/home-assistant/home-assistant-js
|
||||
[es2015-arch]: https://github.com/home-assistant/home-assistant-polymer/wiki/Using-Polymer-with-ES2015,-Babel-and-NPM
|
||||
[NuclearJS]: https://optimizely.github.io/nuclear-js/
|
||||
[ImmutableJS]: https://facebook.github.io/immutable-js/
|
||||
[Polymer]: https://www.polymer-project.org/
|
||||
[build-html]: https://github.com/home-assistant/home-assistant-polymer/blob/master/script/vulcanize.js
|
||||
[Webpack]: https://webpack.github.io/
|
||||
[Rollup]: http://rollupjs.org/
|
||||
[lodash.range]: https://github.com/lodash/lodash/blob/3.1.7-npm-packages/lodash.range/index.js
|
||||
[debounce]: https://github.com/component/debounce
|
||||
[Fecha]: https://github.com/taylorhakes/fecha
|
||||
[build-sw]: https://github.com/home-assistant/home-assistant-polymer/blob/master/script/sw-precache.js
|
||||
[css-vars]: https://developer.mozilla.org/en-US/docs/Web/CSS/Using_CSS_variables
|
||||
[closure]: https://developers.google.com/closure/compiler/]]></content>
|
||||
</entry>
|
||||
|
||||
<entry>
|
||||
|
@ -171,27 +193,37 @@ document.body.appendChild(spinner);
|
|||
<link href="https://home-assistant.io/blog/2016/05/18/why-we-use-polymer/"/>
|
||||
<updated>2016-05-18T00:09:00+00:00</updated>
|
||||
<id>https://home-assistant.io/blog/2016/05/18/why-we-use-polymer</id>
|
||||
<content type="html"><![CDATA[<p>I’ve been planning to write this post for a while now as we get questions like this a lot: <em>“Why does Home Assistant use Polymer? Why not React, Redux and what not?”</em></p>
|
||||
<content type="html"><![CDATA[I've been planning to write this post for a while now as we get questions like this a lot: _"Why does Home Assistant use Polymer? Why not React, Redux and what not?"_
|
||||
|
||||
<p>It’s understandable, Polymer is quite the underdog in the world of web frameworks. A corporate backer does not guarantee popularity or an active community and this shows in the number of projects using Polymer.</p>
|
||||
It's understandable, Polymer is quite the underdog in the world of web frameworks. A corporate backer does not guarantee popularity or an active community and this shows in the number of projects using Polymer.
|
||||
|
||||
<p>Still, <a href="https://home-assistant.io/demo">we use Polymer and it’s awesome</a>. To explain why, I’ll be referencing the React workflow quite a bit, as they do a lot of things right, and show how it is done in Polymer.</p>
|
||||
Still, [we use Polymer and it's awesome][demo]. To explain why, I'll be referencing the React workflow quite a bit, as they do a lot of things right, and show how it is done in Polymer.
|
||||
|
||||
<p>Polymer gives us components for the web, just like React, but based on web standards: <a href="https://www.w3.org/standards/techs/components#w3c_all">web components</a>, <a href="https://www.w3.org/TR/css-variables/">CSS variables</a>. These standards don’t have wide browser support yet but it’s being implemented by every major browser: It’s the future. For now they are being polyfilled and that works just fine but in the future the Home Assistant web app will be able to run native in the browsers == fast.</p>
|
||||
Polymer gives us components for the web, just like React, but based on web standards: [web components], [CSS variables]. These standards don't have wide browser support yet but it's being implemented by every major browser: It's the future. For now they are being polyfilled and that works just fine but in the future the Home Assistant web app will be able to run native in the browsers == fast.
|
||||
|
||||
<!--more-->
|
||||
|
||||
<p>Polymer does not have the nice developer experience that one can have with React and the <a href="https://chrome.google.com/webstore/detail/react-developer-tools/fmkadmapgofadopljbjfkapdkoienihi?hl=en">React Dev Tools</a> but that’s a matter of time. The developer tools in every browser have seen a lot of improvements recently and each improvement helps support for web components.</p>
|
||||
Polymer does not have the nice developer experience that one can have with React and the [React Dev Tools] but that's a matter of time. The developer tools in every browser have seen a lot of improvements recently and each improvement helps support for web components.
|
||||
|
||||
<p>Another major benefit of Polymer for Home Assistant is that we get <a href="https://elements.polymer-project.org/browse?package=paper-elements">material design for free</a>. The material design components that come with Polymer have a very high quality. Google is using these components themselves and make sure that performance and accessibility using screen readers/keyboards are great. As an open source project, the more we can outsource, the better - so our contributors can focus on the core product: home automation.</p>
|
||||
Another major benefit of Polymer for Home Assistant is that we get [material design for free]. The material design components that come with Polymer have a very high quality. Google is using these components themselves and make sure that performance and accessibility using screen readers/keyboards are great. As an open source project, the more we can outsource, the better - so our contributors can focus on the core product: home automation.
|
||||
|
||||
<p>What about Flux, data management and interaction between components? It’s actually pretty similar to React or any other component based framework. Flux-like architectures work with Polymer just like with React: whenever data changes it will update the attributes of a component which will propagate to the children. For Home Assistant we use <a href="https://optimizely.github.io/nuclear-js/">NuclearJS</a> with our <a href="http://paulusschoutsen.nl/blog/2015/07/using-polymer-with-flux-and-a-global-app-state/">own Polymer bindings</a>. For data moving from child to parent the Polymer pattern is using DOM events instead of callbacks but the end result is the same. It is so similar in fact, that it took me only two hours to make a <a href="https://github.com/balloob/home-assistant-react-native-ios">React Native frontend for on top of our core</a>.</p>
|
||||
What about Flux, data management and interaction between components? It's actually pretty similar to React or any other component based framework. Flux-like architectures work with Polymer just like with React: whenever data changes it will update the attributes of a component which will propagate to the children. For Home Assistant we use [NuclearJS] with our [own Polymer bindings]. For data moving from child to parent the Polymer pattern is using DOM events instead of callbacks but the end result is the same. It is so similar in fact, that it took me only two hours to make a [React Native frontend for on top of our core][ha-rn].
|
||||
|
||||
<p>So what about Babel and ES2015? Also this is covered. Each web component exists of a HTML template and a JavaScript class to back it. Think of the HTML template as the render method in React. In Home Assistant we have the HTML templates import one another and have a separate chain for the JavaScript classes backing each component. This allows us to use Babel and NPM modules for the JavaScript part (<a href="https://github.com/home-assistant/home-assistant-polymer#building-the-app">more info here</a>). This does however come with the downside of other JS based frameworks: the browser blocks any painting while the JavaScript is being parsed instead of upgrading the website incrementally. This, however, is something we take for granted right now and hope that module bundlers will be able to solve this for us eventually. Tree shaking is a very promising improvement in this space.</p>
|
||||
So what about Babel and ES2015? Also this is covered. Each web component exists of a HTML template and a JavaScript class to back it. Think of the HTML template as the render method in React. In Home Assistant we have the HTML templates import one another and have a separate chain for the JavaScript classes backing each component. This allows us to use Babel and NPM modules for the JavaScript part ([more info here][tools-js]). This does however come with the downside of other JS based frameworks: the browser blocks any painting while the JavaScript is being parsed instead of upgrading the website incrementally. This, however, is something we take for granted right now and hope that module bundlers will be able to solve this for us eventually. Tree shaking is a very promising improvement in this space.
|
||||
|
||||
<p>Most of this blog post has been comparing Polymer to React. In many ways Polymer is similar to React but it is not as far evolved yet. I like React but I do not see it as a technology that will be around forever. Given the trend of previous popular JS frameworks, React will probably get replaced by another framework that works even better. Web components however will be here forever as they are part of the HTML standard. And this gives us peace of mind at the virtual Home Assistant headquarters: we do not have to be afraid of having to rewrite our frontend just to stay relevant or because people don’t want to include another dependency just to run this legacy piece.</p>
|
||||
Most of this blog post has been comparing Polymer to React. In many ways Polymer is similar to React but it is not as far evolved yet. I like React but I do not see it as a technology that will be around forever. Given the trend of previous popular JS frameworks, React will probably get replaced by another framework that works even better. Web components however will be here forever as they are part of the HTML standard. And this gives us peace of mind at the virtual Home Assistant headquarters: we do not have to be afraid of having to rewrite our frontend just to stay relevant or because people don't want to include another dependency just to run this legacy piece.
|
||||
|
||||
<p>So there it is, the reason why we use Polymer.</p>
|
||||
So there it is, the reason why we use Polymer.
|
||||
|
||||
[web components]: https://www.w3.org/standards/techs/components#w3c_all
|
||||
[CSS variables]: https://www.w3.org/TR/css-variables/
|
||||
[React Dev Tools]: https://chrome.google.com/webstore/detail/react-developer-tools/fmkadmapgofadopljbjfkapdkoienihi?hl=en
|
||||
[NuclearJS]: https://optimizely.github.io/nuclear-js/
|
||||
[own Polymer bindings]: http://paulusschoutsen.nl/blog/2015/07/using-polymer-with-flux-and-a-global-app-state/
|
||||
[ha-rn]: https://github.com/balloob/home-assistant-react-native-ios
|
||||
[tools-js]: https://github.com/home-assistant/home-assistant-polymer#building-the-app
|
||||
[material design for free]: https://elements.polymer-project.org/browse?package=paper-elements
|
||||
[demo]: https://home-assistant.io/demo
|
||||
|
||||
]]></content>
|
||||
</entry>
|
||||
|
|
|
@ -230,7 +230,7 @@
|
|||
|
||||
|
||||
<li class="post">
|
||||
<a href="/blog/2016/08/13/foursquare-fast-com-ffmpeg-gpsd/">0.26: Foursquare, Fast.com, FFMPEG and GPSD</a>
|
||||
<a href="/blog/2016/08/13/foursquare-fast.com-ffmpeg-gpsd/">0.26: Foursquare, Fast.com, FFMPEG and GPSD</a>
|
||||
</li>
|
||||
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
<title><![CDATA[Category: User-Stories | Home Assistant]]></title>
|
||||
<link href="https://home-assistant.io/blog/categories/user-stories/atom.xml" rel="self"/>
|
||||
<link href="https://home-assistant.io/"/>
|
||||
<updated>2016-08-22T07:26:42+00:00</updated>
|
||||
<updated>2016-08-22T08:20:27+00:00</updated>
|
||||
<id>https://home-assistant.io/</id>
|
||||
<author>
|
||||
<name><![CDATA[Home Assistant]]></name>
|
||||
|
@ -18,114 +18,108 @@
|
|||
<link href="https://home-assistant.io/blog/2016/08/03/laundry-automation-update/"/>
|
||||
<updated>2016-08-03T17:22:00+00:00</updated>
|
||||
<id>https://home-assistant.io/blog/2016/08/03/laundry-automation-update</id>
|
||||
<content type="html"><._
|
||||
|
||||
<p>Today I’ll show you how I used Home Assistant, a NodeMCU (ESP8266), and a couple of accelerometers to automate our laundry room. This is a rewrite of an <a href="https://home-assistant.io/blog/2015/08/26/laundry-automation-with-moteino-mqtt-and-home-assistant/">old post</a> where I did the same thing using a Moteino & Raspberry Pi. This version only requires a NodeMCU.</p>
|
||||
Today I'll show you how I used Home Assistant, a NodeMCU (ESP8266), and a couple of accelerometers to automate our laundry room. This is a rewrite of an [old post](https://home-assistant.io/blog/2015/08/26/laundry-automation-with-moteino-mqtt-and-home-assistant/) where I did the same thing using a Moteino & Raspberry Pi. This version only requires a NodeMCU.
|
||||
|
||||
<p>We have an older washer and dryer which doesn’t have any form of notification when cycles complete. Home Assistant was the obvious solution, I just needed to create sensors for the washer and dryer. I tried using sound sensors but found them unreliable. I ended up using an accelerometer attached to the back of each appliance. I also added magnetic reed switches on the doors of the washer and dryer to detect whether they’re open or closed. I connected the accelerometers and reed switches to an NodeMCU which will relay the data to my MQTT broker.</p>
|
||||
We have an older washer and dryer which doesn't have any form of notification when cycles complete. Home Assistant was the obvious solution, I just needed to create sensors for the washer and dryer. I tried using sound sensors but found them unreliable. I ended up using an accelerometer attached to the back of each appliance. I also added magnetic reed switches on the doors of the washer and dryer to detect whether they're open or closed. I connected the accelerometers and reed switches to an NodeMCU which will relay the data to my MQTT broker.
|
||||
|
||||
<p class="img">
|
||||
<img src="https://home-assistant.io/images/blog/2016-07-laundry-automation/block-diagram.png" />
|
||||
<p class='img'>
|
||||
<img src='https://home-assistant.io/images/blog/2016-07-laundry-automation/block-diagram.png' />
|
||||
Block diagram of schematic
|
||||
</p>
|
||||
|
||||
<!--more-->
|
||||
|
||||
<p>After taking some sample data from the accelerometers while each appliance was in operation, I decided to plot the data to help determine the proper thresholds of when the devices were running or off. I had to do this in order to get precise ranges so the dryer sensor wouldn’t get tripped by the washer or vice versa. In the plot below you can see the acceleration in each direction for the accelerometer connected to the dryer. It’s easy to see when the dryer is in operation here. I used the same technique for the washer’s accelerometer.</p>
|
||||
After taking some sample data from the accelerometers while each appliance was in operation, I decided to plot the data to help determine the proper thresholds of when the devices were running or off. I had to do this in order to get precise ranges so the dryer sensor wouldn't get tripped by the washer or vice versa. In the plot below you can see the acceleration in each direction for the accelerometer connected to the dryer. It's easy to see when the dryer is in operation here. I used the same technique for the washer's accelerometer.
|
||||
|
||||
<p class="img">
|
||||
<img src="https://home-assistant.io/images/blog/2016-07-laundry-automation/data-graph.png" />
|
||||
<p class='img'>
|
||||
<img src='https://home-assistant.io/images/blog/2016-07-laundry-automation/data-graph.png' />
|
||||
Graph showing the accelerometer data
|
||||
</p>
|
||||
|
||||
<p>Next it was just a matter of integrating everything with Home Assistant. I was able to use the <a href="/components/mqtt/">MQTT component</a> to read the washer and dryer states from the Moteino and display it in Home Assistant.</p>
|
||||
Next it was just a matter of integrating everything with Home Assistant. I was able to use the [MQTT component](/components/mqtt/) to read the washer and dryer states from the Moteino and display it in Home Assistant.
|
||||
|
||||
<p class="img">
|
||||
<img src="https://home-assistant.io/images/blog/2016-07-laundry-automation/screenshot-ha.png" />
|
||||
<p class='img'>
|
||||
<img src='https://home-assistant.io/images/blog/2016-07-laundry-automation/screenshot-ha.png' />
|
||||
Status of the dryer and washer in Home Assistant
|
||||
</p>
|
||||
|
||||
<p>Next I wrote <a href="/components/script/">scripts</a> that are run whenever the washer or dryer completes a load. This is triggered by the <a href="/getting-started/automation/">automation component</a>. When the laundry is complete I have the lights in the house turn red and <a href="/components/notify.joaoapps_join/">notify me via Join</a>. Once the door is opened and laundry emptied another script runs that sets the lights back to normal. So far it has been very helpful and very reliable.</p>
|
||||
Next I wrote [scripts](/components/script/) that are run whenever the washer or dryer completes a load. This is triggered by the [automation component](/getting-started/automation/). When the laundry is complete I have the lights in the house turn red and [notify me via Join](/components/notify.joaoapps_join/). Once the door is opened and laundry emptied another script runs that sets the lights back to normal. So far it has been very helpful and very reliable.
|
||||
|
||||
<p class="img">
|
||||
<a href="https://home-assistant.io/images/blog/2016-07-laundry-automation/protoboard.jpg">
|
||||
<img src="https://home-assistant.io/images/blog/2016-07-laundry-automation/protoboard.jpg" />
|
||||
<p class='img'>
|
||||
<a href='https://home-assistant.io/images/blog/2016-07-laundry-automation/protoboard.jpg'>
|
||||
<img src='https://home-assistant.io/images/blog/2016-07-laundry-automation/protoboard.jpg' />
|
||||
</a>
|
||||
NodeMCU connected to MPU-6050 accelerometer.
|
||||
</p>
|
||||
|
||||
<p>Materials used:</p>
|
||||
Materials used:
|
||||
|
||||
<ul>
|
||||
<li><a href="https://www.amazon.com/gp/product/B010O1G1ES">NodeMCU</a></li>
|
||||
<li><a href="http://www.amazon.com/gp/product/B008BOPN40">2 x Accelerometers</a></li>
|
||||
<li><a href="http://www.amazon.com/gp/product/B004PARDRO">2 x Reed switch</a></li>
|
||||
</ul>
|
||||
- [NodeMCU](https://www.amazon.com/gp/product/B010O1G1ES)
|
||||
- [2 x Accelerometers](http://www.amazon.com/gp/product/B008BOPN40)
|
||||
- [2 x Reed switch](http://www.amazon.com/gp/product/B004PARDRO)
|
||||
|
||||
<p><a href="https://github.com/nkgilley/nodemcu-laundry/blob/master/nodemcu-laundry.ino">Sketch for the NodeMCU is available here.</a></p>
|
||||
[Sketch for the NodeMCU is available here.](https://github.com/nkgilley/nodemcu-laundry/blob/master/nodemcu-laundry.ino)
|
||||
|
||||
<p>Home Assistant Configuration:</p>
|
||||
Home Assistant Configuration:
|
||||
|
||||
<div class="highlighter-coderay"><div class="CodeRay">
|
||||
<div class="code"><pre><span class="key">mqtt</span>:
|
||||
<span class="key">broker</span>: <span class="string"><span class="content">192.168.1.100</span></span>
|
||||
<span class="key">port</span>: <span class="string"><span class="content">1883</span></span>
|
||||
<span class="key">keepalive</span>: <span class="string"><span class="content">60</span></span>
|
||||
<span class="key">qos</span>: <span class="string"><span class="content">0</span></span>
|
||||
```yaml
|
||||
mqtt:
|
||||
broker: 192.168.1.100
|
||||
port: 1883
|
||||
keepalive: 60
|
||||
qos: 0
|
||||
|
||||
<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">"</span><span class="content">Dryer Status</span><span class="delimiter">"</span></span>
|
||||
<span class="key">state_topic</span>: <span class="string"><span class="delimiter">"</span><span class="content">sensor/dryer</span><span class="delimiter">"</span></span>
|
||||
<span class="key">unit_of_measurement</span>: <span class="string"><span class="delimiter">"</span><span class="delimiter">"</span></span>
|
||||
sensor:
|
||||
- platform: mqtt
|
||||
name: "Dryer Status"
|
||||
state_topic: "sensor/dryer"
|
||||
unit_of_measurement: ""
|
||||
|
||||
- <span class="string"><span class="content">platform: mqtt</span></span>
|
||||
<span class="key">name</span>: <span class="string"><span class="delimiter">"</span><span class="content">Washer Status</span><span class="delimiter">"</span></span>
|
||||
<span class="key">state_topic</span>: <span class="string"><span class="delimiter">"</span><span class="content">sensor/washer</span><span class="delimiter">"</span></span>
|
||||
<span class="key">unit_of_measurement</span>: <span class="string"><span class="delimiter">"</span><span class="delimiter">"</span></span>
|
||||
- platform: mqtt
|
||||
name: "Washer Status"
|
||||
state_topic: "sensor/washer"
|
||||
unit_of_measurement: ""
|
||||
|
||||
<span class="key">automation</span>:
|
||||
- <span class="string"><span class="content">alias: Washer complete</span></span>
|
||||
<span class="key">trigger</span>:
|
||||
<span class="key">platform</span>: <span class="string"><span class="content">state</span></span>
|
||||
<span class="key">entity_id</span>: <span class="string"><span class="content">sensor.washer_status</span></span>
|
||||
<span class="key">from</span>: <span class="string"><span class="content">'Running'</span></span>
|
||||
<span class="key">to</span>: <span class="string"><span class="content">'Complete'</span></span>
|
||||
<span class="key">action</span>:
|
||||
<span class="key">service</span>: <span class="string"><span class="content">script.turn_on</span></span>
|
||||
<span class="key">entity_id</span>: <span class="string"><span class="content">script.washer_complete</span></span>
|
||||
automation:
|
||||
- alias: Washer complete
|
||||
trigger:
|
||||
platform: state
|
||||
entity_id: sensor.washer_status
|
||||
from: 'Running'
|
||||
to: 'Complete'
|
||||
action:
|
||||
service: script.turn_on
|
||||
entity_id: script.washer_complete
|
||||
|
||||
- <span class="string"><span class="content">alias: Washer emptied</span></span>
|
||||
<span class="key">trigger</span>:
|
||||
<span class="key">platform</span>: <span class="string"><span class="content">state</span></span>
|
||||
<span class="key">entity_id</span>: <span class="string"><span class="content">sensor.washer_status</span></span>
|
||||
<span class="key">from</span>: <span class="string"><span class="content">'Complete'</span></span>
|
||||
<span class="key">to</span>: <span class="string"><span class="content">'Empty'</span></span>
|
||||
<span class="key">action</span>:
|
||||
<span class="key">service</span>: <span class="string"><span class="content">scene.turn_on</span></span>
|
||||
<span class="key">entity_id</span>: <span class="string"><span class="content">scene.normal</span></span>
|
||||
- alias: Washer emptied
|
||||
trigger:
|
||||
platform: state
|
||||
entity_id: sensor.washer_status
|
||||
from: 'Complete'
|
||||
to: 'Empty'
|
||||
action:
|
||||
service: scene.turn_on
|
||||
entity_id: scene.normal
|
||||
|
||||
<span class="key">script</span>:
|
||||
<span class="key">washer_complete</span>:
|
||||
<span class="key">alias</span>: <span class="string"><span class="content">Washer Complete</span></span>
|
||||
<span class="key">sequence</span>:
|
||||
- <span class="string"><span class="content">alias: Join Notification</span></span>
|
||||
<span class="key">service</span>: <span class="string"><span class="content">notify.join</span></span>
|
||||
<span class="key">data</span>:
|
||||
<span class="key">message</span>: <span class="string"><span class="delimiter">"</span><span class="content">The washing machine has finished its cycle, please empty it!</span><span class="delimiter">"</span></span>
|
||||
- <span class="string"><span class="content">alias: Living Room Lights Blue</span></span>
|
||||
<span class="key">service</span>: <span class="string"><span class="content">scene.turn_on</span></span>
|
||||
<span class="key">data</span>:
|
||||
<span class="key">entity_id</span>: <span class="string"><span class="content">scene.blue</span></span>
|
||||
</pre></div>
|
||||
</div>
|
||||
</div>
|
||||
script:
|
||||
washer_complete:
|
||||
alias: Washer Complete
|
||||
sequence:
|
||||
- alias: Join Notification
|
||||
service: notify.join
|
||||
data:
|
||||
message: "The washing machine has finished its cycle, please empty it!"
|
||||
- alias: Living Room Lights Blue
|
||||
service: scene.turn_on
|
||||
data:
|
||||
entity_id: scene.blue
|
||||
```
|
||||
|
||||
<p>Resources used:</p>
|
||||
Resources used:
|
||||
|
||||
<ul>
|
||||
<li><a href="http://www.instructables.com/id/Uber-Home-Automation-w-Arduino-Pi/step13/Washer-Dryer-Smartifier-Water-Leak-Sensor/">Inspiration and Help with Arduino code</a></li>
|
||||
</ul>
|
||||
- [Inspiration and Help with Arduino code](http://www.instructables.com/id/Uber-Home-Automation-w-Arduino-Pi/step13/Washer-Dryer-Smartifier-Water-Leak-Sensor/)
|
||||
|
||||
]]></content>
|
||||
</entry>
|
||||
|
@ -135,145 +129,139 @@
|
|||
<link href="https://home-assistant.io/blog/2015/08/26/laundry-automation-with-moteino-mqtt-and-home-assistant/"/>
|
||||
<updated>2015-08-26T15:12:00+00:00</updated>
|
||||
<id>https://home-assistant.io/blog/2015/08/26/laundry-automation-with-moteino-mqtt-and-home-assistant</id>
|
||||
<content type="html"><._
|
||||
|
||||
<p>In our house, laundry has been a struggle for quite some time. Our washer and dryer both lack a buzzer which leads to forgotten laundry, and stinky mess that needs to be rewashed. I decided to create a solution by monitoring the washer and dryer myself with some cheap electronics.</p>
|
||||
In our house, laundry has been a struggle for quite some time. Our washer and dryer both lack a buzzer which leads to forgotten laundry, and stinky mess that needs to be rewashed. I decided to create a solution by monitoring the washer and dryer myself with some cheap electronics.
|
||||
|
||||
<p>As an avid user of Home Assistant, I decided it would be the perfect application to manage the UI and notification system. Now all I needed was a way to monitor the washer and dryer. I tried using sound sensors but found them unreliable. I ended up opting for an accelerometer attached to the back of each appliance. I also added magnetic reed switches on the doors of the washer and dryer to detect if the doors are open or closed. I connected the accelerometers and reed switches to a <a href="https://lowpowerlab.com/moteino/">Moteino</a>, an arduino clone with an RF transceiver. The Moteino can perform the logic to figure out which state the appliances are in and wirelessly communicate that data with another Moteino that is connected via serial to my Raspberry Pi. The Raspberry Pi reads the serial data and repeats it over MQTT for Home Assistant to use. This is great because I don’t have to run Home Assistant on the Raspberry Pi. I can run it on a faster machine and point the <a href="/components/mqtt/">MQTT component</a> to my Raspberry Pi.</p>
|
||||
As an avid user of Home Assistant, I decided it would be the perfect application to manage the UI and notification system. Now all I needed was a way to monitor the washer and dryer. I tried using sound sensors but found them unreliable. I ended up opting for an accelerometer attached to the back of each appliance. I also added magnetic reed switches on the doors of the washer and dryer to detect if the doors are open or closed. I connected the accelerometers and reed switches to a [Moteino](https://lowpowerlab.com/moteino/), an arduino clone with an RF transceiver. The Moteino can perform the logic to figure out which state the appliances are in and wirelessly communicate that data with another Moteino that is connected via serial to my Raspberry Pi. The Raspberry Pi reads the serial data and repeats it over MQTT for Home Assistant to use. This is great because I don't have to run Home Assistant on the Raspberry Pi. I can run it on a faster machine and point the [MQTT component](/components/mqtt/) to my Raspberry Pi.
|
||||
|
||||
<p>After taking some sample data from the accelerometers while each appliance was in operation, I decided to plot the data to help determine the proper thresholds of when the devices were running or off. I had to do this in order to get precise ranges so the dryer sensor wouldn’t get tripped by the washer or vice versa. In the plot below you can see the acceleration in the x direction for the accelerometer connected to the washing machine. It’s easy to see when the washing machine is in operation here. I used the same technique for the dryer’s accelerometer.</p>
|
||||
After taking some sample data from the accelerometers while each appliance was in operation, I decided to plot the data to help determine the proper thresholds of when the devices were running or off. I had to do this in order to get precise ranges so the dryer sensor wouldn't get tripped by the washer or vice versa. In the plot below you can see the acceleration in the x direction for the accelerometer connected to the washing machine. It's easy to see when the washing machine is in operation here. I used the same technique for the dryer's accelerometer.
|
||||
|
||||
<p class="img">
|
||||
<a href="https://home-assistant.io/images/blog/2015-08-laundry-automation/data-graph.png">
|
||||
<img src="https://home-assistant.io/images/blog/2015-08-laundry-automation/data-graph.png" />
|
||||
<p class='img'>
|
||||
<a href='https://home-assistant.io/images/blog/2015-08-laundry-automation/data-graph.png'>
|
||||
<img src='https://home-assistant.io/images/blog/2015-08-laundry-automation/data-graph.png' />
|
||||
</a>
|
||||
Graph showing the accelerometer data
|
||||
</p>
|
||||
|
||||
<!--more-->
|
||||
|
||||
<p>Next it was just a matter of integrating everything with Home Assistant. I was able to use the <a href="/components/mqtt/">MQTT component</a> to read the washer and dryer states from the Moteino and display it in Home Assistant.</p>
|
||||
Next it was just a matter of integrating everything with Home Assistant. I was able to use the [MQTT component](/components/mqtt/) to read the washer and dryer states from the Moteino and display it in Home Assistant.
|
||||
|
||||
<p class="img">
|
||||
<img src="https://home-assistant.io/images/blog/2015-08-laundry-automation/screenshot-ha.png" />
|
||||
<p class='img'>
|
||||
<img src='https://home-assistant.io/images/blog/2015-08-laundry-automation/screenshot-ha.png' />
|
||||
Status of the dryer and washer in Home Assistant
|
||||
</p>
|
||||
|
||||
<p>Next I wrote <a href="/components/script/">scripts</a> that are run whenever the washer or dryer completes a load. This is triggered by the <a href="/getting-started/automation/">automation component</a>. When the laundry is complete I have the lights in the house turn red and <a href="/components/notify.pushbullet/">notify me via PushBullet</a>. Once the laundry is taken care of another script runs that sets the lights back to normal. So far it has been very helpful and very reliable.</p>
|
||||
Next I wrote [scripts](/components/script/) that are run whenever the washer or dryer completes a load. This is triggered by the [automation component](/getting-started/automation/). When the laundry is complete I have the lights in the house turn red and [notify me via PushBullet](/components/notify.pushbullet/). Once the laundry is taken care of another script runs that sets the lights back to normal. So far it has been very helpful and very reliable.
|
||||
|
||||
<p class="img">
|
||||
<a href="https://home-assistant.io/images/blog/2015-08-laundry-automation/moteino-and-sensors.jpg">
|
||||
<img src="https://home-assistant.io/images/blog/2015-08-laundry-automation/moteino-and-sensors.jpg" />
|
||||
<p class='img'>
|
||||
<a href='https://home-assistant.io/images/blog/2015-08-laundry-automation/moteino-and-sensors.jpg'>
|
||||
<img src='https://home-assistant.io/images/blog/2015-08-laundry-automation/moteino-and-sensors.jpg' />
|
||||
</a>
|
||||
Top left: reed switch. Bottom left: moteino. Right: Accelerometer.
|
||||
</p>
|
||||
|
||||
<p>Materials used:</p>
|
||||
Materials used:
|
||||
|
||||
<ul>
|
||||
<li><a href="https://lowpowerlab.com/moteino/">Moteino</a></li>
|
||||
<li><a href="http://www.amazon.com/gp/product/B008BOPN40">2 x Accelerometers</a></li>
|
||||
<li><a href="http://www.amazon.com/gp/product/B004PARDRO">2 x Reed switch</a></li>
|
||||
<li><a href="https://home-assistant.io/">Home Assistant</a></li>
|
||||
</ul>
|
||||
- [Moteino](https://lowpowerlab.com/moteino/)
|
||||
- [2 x Accelerometers](http://www.amazon.com/gp/product/B008BOPN40)
|
||||
- [2 x Reed switch](http://www.amazon.com/gp/product/B004PARDRO)
|
||||
- [Home Assistant](https://home-assistant.io/)
|
||||
|
||||
<p><a href="https://codebender.cc/sketch:144743">Sketch for the Moteino is available here.</a></p>
|
||||
[Sketch for the Moteino is available here.](https://codebender.cc/sketch:144743)
|
||||
|
||||
<p>Home Assistant Configuration:</p>
|
||||
Home Assistant Configuration:
|
||||
|
||||
<p class="note">
|
||||
<p class='note'>
|
||||
The automation and script syntax here is using a deprecated and no longer supported format.
|
||||
</p>
|
||||
|
||||
<div class="highlighter-coderay"><div class="CodeRay">
|
||||
<div class="code"><pre><span class="key">mqtt</span>:
|
||||
<span class="key">broker</span>: <span class="string"><span class="content">192.168.1.100</span></span>
|
||||
<span class="key">port</span>: <span class="string"><span class="content">1883</span></span>
|
||||
<span class="key">keepalive</span>: <span class="string"><span class="content">60</span></span>
|
||||
<span class="key">qos</span>: <span class="string"><span class="content">0</span></span>
|
||||
```yaml
|
||||
mqtt:
|
||||
broker: 192.168.1.100
|
||||
port: 1883
|
||||
keepalive: 60
|
||||
qos: 0
|
||||
|
||||
<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">"</span><span class="content">Dryer Status</span><span class="delimiter">"</span></span>
|
||||
<span class="key">state_topic</span>: <span class="string"><span class="delimiter">"</span><span class="content">sensor/dryer</span><span class="delimiter">"</span></span>
|
||||
<span class="key">unit_of_measurement</span>: <span class="string"><span class="delimiter">"</span><span class="delimiter">"</span></span>
|
||||
sensor:
|
||||
platform: mqtt
|
||||
name: "Dryer Status"
|
||||
state_topic: "sensor/dryer"
|
||||
unit_of_measurement: ""
|
||||
|
||||
<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">"</span><span class="content">Washer Status</span><span class="delimiter">"</span></span>
|
||||
<span class="key">state_topic</span>: <span class="string"><span class="delimiter">"</span><span class="content">sensor/washer</span><span class="delimiter">"</span></span>
|
||||
<span class="key">unit_of_measurement</span>: <span class="string"><span class="delimiter">"</span><span class="delimiter">"</span></span>
|
||||
sensor 2:
|
||||
platform: mqtt
|
||||
name: "Washer Status"
|
||||
state_topic: "sensor/washer"
|
||||
unit_of_measurement: ""
|
||||
|
||||
<span class="key">automation</span>:
|
||||
<span class="key">alias</span>: <span class="string"><span class="content">Dryer complete</span></span>
|
||||
automation:
|
||||
alias: Dryer complete
|
||||
|
||||
<span class="key">platform</span>: <span class="string"><span class="content">state</span></span>
|
||||
<span class="key">state_entity_id</span>: <span class="string"><span class="content">sensor.dryer_status</span></span>
|
||||
<span class="key">state_from</span>: <span class="string"><span class="content">'Running'</span></span>
|
||||
<span class="key">state_to</span>: <span class="string"><span class="content">'Complete'</span></span>
|
||||
platform: state
|
||||
state_entity_id: sensor.dryer_status
|
||||
state_from: 'Running'
|
||||
state_to: 'Complete'
|
||||
|
||||
<span class="key">execute_service</span>: <span class="string"><span class="content">script.turn_on</span></span>
|
||||
<span class="key">service_entity_id</span>: <span class="string"><span class="content">script.dryer_complete</span></span>
|
||||
execute_service: script.turn_on
|
||||
service_entity_id: script.dryer_complete
|
||||
|
||||
<span class="key">automation 2</span>:
|
||||
<span class="key">alias</span>: <span class="string"><span class="content">Dryer emptied</span></span>
|
||||
automation 2:
|
||||
alias: Dryer emptied
|
||||
|
||||
<span class="key">platform</span>: <span class="string"><span class="content">state</span></span>
|
||||
<span class="key">state_entity_id</span>: <span class="string"><span class="content">sensor.dryer_status</span></span>
|
||||
<span class="key">state_from</span>: <span class="string"><span class="content">'Complete'</span></span>
|
||||
<span class="key">state_to</span>: <span class="string"><span class="content">'Empty'</span></span>
|
||||
platform: state
|
||||
state_entity_id: sensor.dryer_status
|
||||
state_from: 'Complete'
|
||||
state_to: 'Empty'
|
||||
|
||||
<span class="key">execute_service</span>: <span class="string"><span class="content">script.turn_on</span></span>
|
||||
<span class="key">service_entity_id</span>: <span class="string"><span class="content">script.dryer_cleared</span></span>
|
||||
execute_service: script.turn_on
|
||||
service_entity_id: script.dryer_cleared
|
||||
|
||||
<span class="key">script</span>:
|
||||
<span class="key">dryer_complete</span>:
|
||||
<span class="key">alias</span>: <span class="string"><span class="content">Dryer Complete Script</span></span>
|
||||
<span class="key">sequence</span>:
|
||||
- <span class="string"><span class="content">alias: Pushbullet Notification</span></span>
|
||||
<span class="key">execute_service</span>: <span class="string"><span class="content">notify.notify</span></span>
|
||||
<span class="key">service_data</span>:
|
||||
<span class="key">message</span>: <span class="string"><span class="delimiter">"</span><span class="content">The dryer has finished its cycle, please empty it!</span><span class="delimiter">"</span></span>
|
||||
- <span class="string"><span class="content">alias: Living Room Lights Red</span></span>
|
||||
<span class="key">execute_service</span>: <span class="string"><span class="content">scene.turn_on</span></span>
|
||||
<span class="key">service_data</span>:
|
||||
<span class="key">entity_id</span>: <span class="string"><span class="content">scene.red</span></span>
|
||||
- <span class="string"><span class="content">delay:</span><span class="content">
|
||||
seconds: 1</span></span>
|
||||
- <span class="string"><span class="content">alias: Living Room Lights Off</span></span>
|
||||
<span class="key">execute_service</span>: <span class="string"><span class="content">light.turn_off</span></span>
|
||||
<span class="key">service_data</span>:
|
||||
<span class="key">entity_id</span>: <span class="string"><span class="content">group.living_room</span></span>
|
||||
- <span class="string"><span class="content">delay:</span><span class="content">
|
||||
seconds: 1</span></span>
|
||||
- <span class="string"><span class="content">alias: Living Room Lights Red</span></span>
|
||||
<span class="key">execute_service</span>: <span class="string"><span class="content">scene.turn_on</span></span>
|
||||
<span class="key">service_data</span>:
|
||||
<span class="key">entity_id</span>: <span class="string"><span class="content">scene.red</span></span>
|
||||
script:
|
||||
dryer_complete:
|
||||
alias: Dryer Complete Script
|
||||
sequence:
|
||||
- alias: Pushbullet Notification
|
||||
execute_service: notify.notify
|
||||
service_data:
|
||||
message: "The dryer has finished its cycle, please empty it!"
|
||||
- alias: Living Room Lights Red
|
||||
execute_service: scene.turn_on
|
||||
service_data:
|
||||
entity_id: scene.red
|
||||
- delay:
|
||||
seconds: 1
|
||||
- alias: Living Room Lights Off
|
||||
execute_service: light.turn_off
|
||||
service_data:
|
||||
entity_id: group.living_room
|
||||
- delay:
|
||||
seconds: 1
|
||||
- alias: Living Room Lights Red
|
||||
execute_service: scene.turn_on
|
||||
service_data:
|
||||
entity_id: scene.red
|
||||
|
||||
<span class="key">dryer_cleared</span>:
|
||||
<span class="key">alias</span>: <span class="string"><span class="content">Dryer Cleared Script</span></span>
|
||||
<span class="key">sequence</span>:
|
||||
- <span class="string"><span class="content">alias: Living Room Lights Off</span></span>
|
||||
<span class="key">execute_service</span>: <span class="string"><span class="content">light.turn_off</span></span>
|
||||
<span class="key">service_data</span>:
|
||||
<span class="key">entity_id</span>: <span class="string"><span class="content">group.living_room</span></span>
|
||||
- <span class="string"><span class="content">delay:</span><span class="content">
|
||||
seconds: 1</span></span>
|
||||
- <span class="string"><span class="content">alias: Living Room Lights Normal</span></span>
|
||||
<span class="key">execute_service</span>: <span class="string"><span class="content">scene.turn_on</span></span>
|
||||
<span class="key">service_data</span>:
|
||||
<span class="key">entity_id</span>: <span class="string"><span class="content">scene.normal</span></span>
|
||||
</pre></div>
|
||||
</div>
|
||||
</div>
|
||||
dryer_cleared:
|
||||
alias: Dryer Cleared Script
|
||||
sequence:
|
||||
- alias: Living Room Lights Off
|
||||
execute_service: light.turn_off
|
||||
service_data:
|
||||
entity_id: group.living_room
|
||||
- delay:
|
||||
seconds: 1
|
||||
- alias: Living Room Lights Normal
|
||||
execute_service: scene.turn_on
|
||||
service_data:
|
||||
entity_id: scene.normal
|
||||
```
|
||||
|
||||
<p>Resources used:</p>
|
||||
Resources used:
|
||||
|
||||
<ul>
|
||||
<li><a href="http://www.instructables.com/id/Uber-Home-Automation-w-Arduino-Pi/step13/Washer-Dryer-Smartifier-Water-Leak-Sensor/">Inspiration and Help with Arduino code</a></li>
|
||||
<li><a href="https://github.com/LowPowerLab/RFM69/">Moteino Code</a></li>
|
||||
</ul>
|
||||
- [Inspiration and Help with Arduino code](http://www.instructables.com/id/Uber-Home-Automation-w-Arduino-Pi/step13/Washer-Dryer-Smartifier-Water-Leak-Sensor/)
|
||||
- [Moteino Code](https://github.com/LowPowerLab/RFM69/)
|
||||
|
||||
]]></content>
|
||||
</entry>
|
||||
|
|
|
@ -233,7 +233,7 @@
|
|||
|
||||
|
||||
<li class="post">
|
||||
<a href="/blog/2016/08/13/foursquare-fast-com-ffmpeg-gpsd/">0.26: Foursquare, Fast.com, FFMPEG and GPSD</a>
|
||||
<a href="/blog/2016/08/13/foursquare-fast.com-ffmpeg-gpsd/">0.26: Foursquare, Fast.com, FFMPEG and GPSD</a>
|
||||
</li>
|
||||
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
<title><![CDATA[Category: Video | Home Assistant]]></title>
|
||||
<link href="https://home-assistant.io/blog/categories/video/atom.xml" rel="self"/>
|
||||
<link href="https://home-assistant.io/"/>
|
||||
<updated>2016-08-22T07:26:42+00:00</updated>
|
||||
<updated>2016-08-22T08:20:27+00:00</updated>
|
||||
<id>https://home-assistant.io/</id>
|
||||
<author>
|
||||
<name><![CDATA[Home Assistant]]></name>
|
||||
|
@ -18,39 +18,46 @@
|
|||
<link href="https://home-assistant.io/blog/2016/06/13/home-assistant-at-pycon-2016/"/>
|
||||
<updated>2016-06-13T01:06:00+00:00</updated>
|
||||
<id>https://home-assistant.io/blog/2016/06/13/home-assistant-at-pycon-2016</id>
|
||||
<content type="html"><![CDATA[<p>It’s been already almost two weeks ago that a few of the Home Assistant developers headed towards Portland for <a href="https://us.pycon.org/2016/">PyCon 2016</a> - the conference about everything Python. We were there to learn all the nifty tricks to make our code better but most of all, to talk Home Automation.</p>
|
||||
<content type="html"><![CDATA[It's been already almost two weeks ago that a few of the Home Assistant developers headed towards Portland for [PyCon 2016] - the conference about everything Python. We were there to learn all the nifty tricks to make our code better but most of all, to talk Home Automation.
|
||||
|
||||
<p class="img">
|
||||
<img src="https://home-assistant.io/images/blog/2016-06-pycon/crew.jpg" alt="Home Assistant developers" />
|
||||
Couple of Home Assistant devs. Left to right: <a href="https://github.com/balloob/">Paulus (@balloob)</a>, <a href="https://github.com/infamy/">Alex (@infamy)</a>, <a href="https://github.com/rmkraus/">Ryan (@rmkraus)</a>.
|
||||
<p class='img'>
|
||||
<img src='https://home-assistant.io/images/blog/2016-06-pycon/crew.jpg' alt='Home Assistant developers' />
|
||||
Couple of Home Assistant devs. Left to right: [Paulus (@balloob)], [Alex (@infamy)], [Ryan (@rmkraus)].
|
||||
</p>
|
||||
|
||||
<p>On Monday I (Paulus) gave a presentation about Home Assistant to an audience of over 400 people! It was a bit scary at first but after a couple of minutes it went all great including some great questions afterwards. Slides can be found <a href="https://docs.google.com/presentation/d/1F1pGOoSf0dD79Dl5dgys0ll7xiuIA4XiQeNeJ-xlqMg/edit">here</a> and the talk is embedded right below:</p>
|
||||
On Monday I (Paulus) gave a presentation about Home Assistant to an audience of over 400 people! It was a bit scary at first but after a couple of minutes it went all great including some great questions afterwards. Slides can be found [here][slides] and the talk is embedded right below:
|
||||
|
||||
<div class="videoWrapper">
|
||||
<iframe width="560" height="315" src="https://www.youtube.com/embed/UhccJacWhdM" frameborder="0" allowfullscreen=""></iframe>
|
||||
<div class='videoWrapper'>
|
||||
<iframe width="560" height="315" src="https://www.youtube.com/embed/UhccJacWhdM" frameborder="0" allowfullscreen></iframe>
|
||||
</div>
|
||||
|
||||
<p>One of the things that really impressed me was the amount of people that approached us to tell how they love Home Assistant, how it has replaced their previous solution, how they enjoyed contributing to Home Assistant and how helpful our community is. It makes me proud of Home Assistant and especially our community.</p>
|
||||
One of the things that really impressed me was the amount of people that approached us to tell how they love Home Assistant, how it has replaced their previous solution, how they enjoyed contributing to Home Assistant and how helpful our community is. It makes me proud of Home Assistant and especially our community.
|
||||
|
||||
<!--more-->
|
||||
<p>PyCon has a few great concepts that I haven’t seen at other conferences: open spaces and sprints. Open spaces give anyone the opportunity to get a room and host a session for an hour to talk about any topic. Sprints happen after the conference part of PyCon is over. For four days there are rooms available for participants to get together and hack on their favorite open source projects.</p>
|
||||
PyCon has a few great concepts that I haven't seen at other conferences: open spaces and sprints. Open spaces give anyone the opportunity to get a room and host a session for an hour to talk about any topic. Sprints happen after the conference part of PyCon is over. For four days there are rooms available for participants to get together and hack on their favorite open source projects.
|
||||
|
||||
<p>My talk had limited time for Q&A so open spaces offered a great opportunity to get all pending questions answered and connect with the commmunity. There was more interest after the first day so we ended up hosting another open space on the second day.</p>
|
||||
My talk had limited time for Q&A so open spaces offered a great opportunity to get all pending questions answered and connect with the commmunity. There was more interest after the first day so we ended up hosting another open space on the second day.
|
||||
|
||||
<blockquote class="twitter-tweet" data-lang="en"><p lang="en" dir="ltr"><a href="https://twitter.com/anschoen">@anschoen</a> <a href="https://twitter.com/home_assistant">@home_assistant</a> I'm located in Detroit. I could facilitate a workshop. What are we talking (group, potential dates, etc)?</p>— Jonathan Baginski (@jbags81) <a href="https://twitter.com/jbags81/status/739057625636167680">June 4, 2016</a></blockquote>
|
||||
<blockquote markdown="0" class="twitter-tweet" data-lang="en"><p lang="en" dir="ltr"><a href="https://twitter.com/anschoen">@anschoen</a> <a href="https://twitter.com/home_assistant">@home_assistant</a> I'm located in Detroit. I could facilitate a workshop. What are we talking (group, potential dates, etc)?</p>— Jonathan Baginski (@jbags81) <a href="https://twitter.com/jbags81/status/739057625636167680">June 4, 2016</a></blockquote>
|
||||
|
||||
<p>We’ve had such positive reception on our open spaces that <a href="https://github.com/jbags81/">Jonathan Baginski</a> decided to repeat it online. We will be hosting a free online webinar <a href="https://www.eventbrite.com/e/home-assistant-support-101-getting-around-in-home-assistant-tickets-25943868810">Home Assistant Support 101 - Getting around in Home Assistant</a> later this month. Make sure to RSVP.</p>
|
||||
We've had such positive reception on our open spaces that [Jonathan Baginski][@jbags81] decided to repeat it online. We will be hosting a free online webinar [Home Assistant Support 101 - Getting around in Home Assistant][webinar] later this month. Make sure to RSVP.
|
||||
|
||||
<p>After the conference part of PyCon was over we spent one extra day to host a Home Assistant sprint. This allowed us to help people get started with hacking on Home Assistant which lead to some great contributions.</p>
|
||||
After the conference part of PyCon was over we spent one extra day to host a Home Assistant sprint. This allowed us to help people get started with hacking on Home Assistant which lead to some great contributions.
|
||||
|
||||
<p class="img">
|
||||
<img src="https://home-assistant.io/images/blog/2016-06-pycon/sprint.jpg" alt="Home Assistant sprint group photo" />
|
||||
<p class='img'>
|
||||
<img src='https://home-assistant.io/images/blog/2016-06-pycon/sprint.jpg' alt='Home Assistant sprint group photo' />
|
||||
Home Assistant sprint group photo.
|
||||
</p>
|
||||
|
||||
<p>I’ve had a really great time at PyCon. It was awesome to meet everyone in person and I hope to see many of you next year!</p>
|
||||
I've had a really great time at PyCon. It was awesome to meet everyone in person and I hope to see many of you next year!
|
||||
|
||||
[PyCon 2016]: https://us.pycon.org/2016/
|
||||
[Paulus (@balloob)]: https://github.com/balloob/
|
||||
[Alex (@infamy)]: https://github.com/infamy/
|
||||
[Ryan (@rmkraus)]: https://github.com/rmkraus/
|
||||
[@jbags81]: https://github.com/jbags81/
|
||||
[slides]: https://docs.google.com/presentation/d/1F1pGOoSf0dD79Dl5dgys0ll7xiuIA4XiQeNeJ-xlqMg/edit
|
||||
[webinar]: https://www.eventbrite.com/e/home-assistant-support-101-getting-around-in-home-assistant-tickets-25943868810
|
||||
]]></content>
|
||||
</entry>
|
||||
|
||||
|
@ -59,32 +66,38 @@
|
|||
<link href="https://home-assistant.io/blog/2016/06/01/community-highlights/"/>
|
||||
<updated>2016-06-01T18:34:00+00:00</updated>
|
||||
<id>https://home-assistant.io/blog/2016/06/01/community-highlights</id>
|
||||
<content type="html"><![CDATA[<p>Our community is amazingly helpful and creative. If you haven’t been there yet, make sure to stop by our <a href="https://gitter.im/home-assistant/home-assistant">chat room</a> and come hang out with us. In this blog post I want to highlight a few recent awesome projects and videos from the community.</p>
|
||||
<content type="html"><![CDATA[Our community is amazingly helpful and creative. If you haven't been there yet, make sure to stop by our [chat room] and come hang out with us. In this blog post I want to highlight a few recent awesome projects and videos from the community.
|
||||
|
||||
<h3><a class='title-link' name='scenegen---cli-for-making-scenes' href='#scenegen---cli-for-making-scenes'></a> SceneGen - cli for making scenes </h3>
|
||||
### <a class='title-link' name='scenegen---cli-for-making-scenes' href='#scenegen---cli-for-making-scenes'></a> SceneGen - cli for making scenes
|
||||
|
||||
<p><a href="https://github.com/acockburn/scenegen">SceneGen</a> is a new command line utility developed by <a href="https://github.com/acockburn">Andrew Cockburn</a> that helps with creating scene configurations for Home Assistant. To use it, you put your house in the preferred state, run SceneGen and it will print the scene configuration for your current states.</p>
|
||||
[SceneGen] is a new command line utility developed by [Andrew Cockburn] that helps with creating scene configurations for Home Assistant. To use it, you put your house in the preferred state, run SceneGen and it will print the scene configuration for your current states.
|
||||
|
||||
<h3><a class='title-link' name='videos' href='#videos'></a> Videos </h3>
|
||||
### <a class='title-link' name='videos' href='#videos'></a> Videos
|
||||
|
||||
<p><a href="https://partofthething.com">Nick Touran</a> has been working on integrating IR remotes with Home Assistant. He made it into a component which should be available in the next release which should arrive in a couple of days. In the meanwhile, he wrote up <a href="https://partofthething.com/thoughts/?p=1010">a blog post</a> and has put out a video showing the new integration, very cool!</p>
|
||||
[Nick Touran] has been working on integrating IR remotes with Home Assistant. He made it into a component which should be available in the next release which should arrive in a couple of days. In the meanwhile, he wrote up [a blog post] and has put out a video showing the new integration, very cool!
|
||||
|
||||
<div class="videoWrapper">
|
||||
<iframe width="560" height="315" src="https://www.youtube.com/embed/6I_Lfpda0hc" frameborder="0" allowfullscreen=""></iframe>
|
||||
<div class='videoWrapper'>
|
||||
<iframe width="560" height="315" src="https://www.youtube.com/embed/6I_Lfpda0hc" frameborder="0" allowfullscreen></iframe>
|
||||
</div>
|
||||
|
||||
<p>Ben from <a href="http://www.bruhautomation.com/">BRUH Automation</a> has put out another great video how to get started tracking your location in Home Assistant using MQTT and OwnTracks.</p>
|
||||
Ben from [BRUH Automation] has put out another great video how to get started tracking your location in Home Assistant using MQTT and OwnTracks.
|
||||
|
||||
<div class="videoWrapper">
|
||||
<iframe width="560" height="315" src="https://www.youtube.com/embed/VaWdvVVYU3A" frameborder="0" allowfullscreen=""></iframe>
|
||||
<div class='videoWrapper'>
|
||||
<iframe width="560" height="315" src="https://www.youtube.com/embed/VaWdvVVYU3A" frameborder="0" allowfullscreen></iframe>
|
||||
</div>
|
||||
|
||||
<p>Muhammed Kilic has created a video how to make your Home Assistant instance accessible from the internet using the free dynamic DNS service DuckDNS.</p>
|
||||
Muhammed Kilic has created a video how to make your Home Assistant instance accessible from the internet using the free dynamic DNS service DuckDNS.
|
||||
|
||||
<div class="videoWrapper">
|
||||
<iframe width="560" height="315" src="https://www.youtube.com/embed/UM15pRk56h8" frameborder="0" allowfullscreen=""></iframe>
|
||||
<div class='videoWrapper'>
|
||||
<iframe width="560" height="315" src="https://www.youtube.com/embed/UM15pRk56h8" frameborder="0" allowfullscreen></iframe>
|
||||
</div>
|
||||
|
||||
[chat room]: https://gitter.im/home-assistant/home-assistant
|
||||
[SceneGen]: https://github.com/acockburn/scenegen
|
||||
[Andrew Cockburn]: https://github.com/acockburn
|
||||
[BRUH Automation]: http://www.bruhautomation.com/
|
||||
[Nick Touran]: https://partofthething.com
|
||||
[a blog post]: https://partofthething.com/thoughts/?p=1010
|
||||
]]></content>
|
||||
</entry>
|
||||
|
||||
|
@ -93,20 +106,20 @@
|
|||
<link href="https://home-assistant.io/blog/2016/05/22/get-started-with-all-in-one-installer/"/>
|
||||
<updated>2016-05-22T16:06:00+00:00</updated>
|
||||
<id>https://home-assistant.io/blog/2016/05/22/get-started-with-all-in-one-installer</id>
|
||||
<content type="html"><![CDATA[<p>We are always hard at work at the virtual Home Assistant headquarters to make it easier for you to get started with Home Assistant. That’s why <a href="https://github.com/jbags81">@jbags81</a> recently introduced the <a href="/getting-started/installation-raspberry-pi-all-in-one/">all-in-one installer</a>. It allows you to get up and running with a complete Home Assistant setup by entering one line of code into your Raspberry Pi running Raspbian Jessie:</p>
|
||||
<content type="html"><![CDATA[We are always hard at work at the virtual Home Assistant headquarters to make it easier for you to get started with Home Assistant. That's why [@jbags81] recently introduced the [all-in-one installer]. It allows you to get up and running with a complete Home Assistant setup by entering one line of code into your Raspberry Pi running Raspbian Jessie:
|
||||
|
||||
<div class="highlighter-coderay"><div class="CodeRay">
|
||||
<div class="code"><pre>wget -Nnv https://raw.githubusercontent.com/home-assistant/fabric-home-assistant/master/hass_rpi_installer.sh && bash hass_rpi_installer.sh;
|
||||
</pre></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<p>This feature wouldn’t be complete if it wasn’t accompanied by a new video by Ben from <a href="http://www.bruhautomation.com">BRUH Automation</a>. The video shows how to install Raspbian Jessie on your Raspberry Pi and use the new installation script to get a full Home Assistant system up and running.</p>
|
||||
|
||||
<div class="videoWrapper">
|
||||
<iframe width="560" height="315" src="https://www.youtube.com/embed/VGl3KTrYo6s" frameborder="0" allowfullscreen=""></iframe>
|
||||
```bash
|
||||
wget -Nnv https://raw.githubusercontent.com/home-assistant/fabric-home-assistant/master/hass_rpi_installer.sh && bash hass_rpi_installer.sh;
|
||||
```
|
||||
|
||||
This feature wouldn't be complete if it wasn't accompanied by a new video by Ben from [BRUH Automation](http://www.bruhautomation.com). The video shows how to install Raspbian Jessie on your Raspberry Pi and use the new installation script to get a full Home Assistant system up and running.
|
||||
|
||||
<div class='videoWrapper'>
|
||||
<iframe width="560" height="315" src="https://www.youtube.com/embed/VGl3KTrYo6s" frameborder="0" allowfullscreen></iframe>
|
||||
</div>
|
||||
|
||||
[@jbags81]: https://github.com/jbags81
|
||||
[all-in-one installer]: /getting-started/installation-raspberry-pi-all-in-one/
|
||||
]]></content>
|
||||
</entry>
|
||||
|
||||
|
@ -115,12 +128,12 @@
|
|||
<link href="https://home-assistant.io/blog/2016/05/12/video-configuring-home-assistant/"/>
|
||||
<updated>2016-05-12T00:09:00+00:00</updated>
|
||||
<id>https://home-assistant.io/blog/2016/05/12/video-configuring-home-assistant</id>
|
||||
<content type="html">< authors a lot of great video's about how he is using Home Assistant and how you can get started with it too. The video below will walk you through how to configure Home Assistant. Enjoy!
|
||||
|
||||
<p>Make sure to subscribe to <a href="https://www.youtube.com/channel/UCLecVrux63S6aYiErxdiy4w">his YouTube channel</a> for more Home Assistant video’s.</p>
|
||||
Make sure to subscribe to [his YouTube channel](https://www.youtube.com/channel/UCLecVrux63S6aYiErxdiy4w) for more Home Assistant video's.
|
||||
|
||||
<div class="videoWrapper">
|
||||
<iframe width="560" height="315" src="https://www.youtube.com/embed/hFDVB2H6TNo" frameborder="0" allowfullscreen=""></iframe>
|
||||
<div class='videoWrapper'>
|
||||
<iframe width="560" height="315" src="https://www.youtube.com/embed/hFDVB2H6TNo" frameborder="0" allowfullscreen></iframe>
|
||||
</div>
|
||||
]]></content>
|
||||
</entry>
|
||||
|
@ -130,12 +143,15 @@
|
|||
<link href="https://home-assistant.io/blog/2016/05/06/open-iot-summit-talk/"/>
|
||||
<updated>2016-05-06T14:09:00+00:00</updated>
|
||||
<id>https://home-assistant.io/blog/2016/05/06/open-iot-summit-talk</id>
|
||||
<content type="html"><![CDATA[<p>At the beginning of April I gave a talk about Home Assistant at the OpenIoT summit in San Diego. I talk about the Home Assistant architecture and explain how to get started integrating your devices. Big thanks to my employer AppFolio (<a href="http://www.appfolioinc.com/jobs-openings">we’re hiring!</a>) for letting me attend. <a href="https://docs.google.com/presentation/d/1P2WsmwGSSni4gAriY5IA0-m-FUGO1kno3gIkRYz20Kw/edit#slide=id.p">Slides.</a></p>
|
||||
<content type="html"><![CDATA[At the beginning of April I gave a talk about Home Assistant at the OpenIoT summit in San Diego. I talk about the Home Assistant architecture and explain how to get started integrating your devices. Big thanks to my employer AppFolio ([we're hiring!]) for letting me attend. [Slides.]
|
||||
|
||||
<div class="videoWrapper">
|
||||
<iframe width="560" height="315" src="https://www.youtube.com/embed/4-6rTwKl6ww" frameborder="0" allowfullscreen=""></iframe>
|
||||
<div class='videoWrapper'>
|
||||
<iframe width="560" height="315" src="https://www.youtube.com/embed/4-6rTwKl6ww" frameborder="0" allowfullscreen></iframe>
|
||||
</div>
|
||||
|
||||
|
||||
[Slides.]: https://docs.google.com/presentation/d/1P2WsmwGSSni4gAriY5IA0-m-FUGO1kno3gIkRYz20Kw/edit#slide=id.p
|
||||
[we're hiring!]: http://www.appfolioinc.com/jobs-openings
|
||||
]]></content>
|
||||
</entry>
|
||||
|
||||
|
|
|
@ -401,7 +401,7 @@
|
|||
|
||||
|
||||
<li class="post">
|
||||
<a href="/blog/2016/08/13/foursquare-fast-com-ffmpeg-gpsd/">0.26: Foursquare, Fast.com, FFMPEG and GPSD</a>
|
||||
<a href="/blog/2016/08/13/foursquare-fast.com-ffmpeg-gpsd/">0.26: Foursquare, Fast.com, FFMPEG and GPSD</a>
|
||||
</li>
|
||||
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
<title><![CDATA[Category: Website | Home Assistant]]></title>
|
||||
<link href="https://home-assistant.io/blog/categories/website/atom.xml" rel="self"/>
|
||||
<link href="https://home-assistant.io/"/>
|
||||
<updated>2016-08-22T07:26:42+00:00</updated>
|
||||
<updated>2016-08-22T08:20:27+00:00</updated>
|
||||
<id>https://home-assistant.io/</id>
|
||||
<author>
|
||||
<name><![CDATA[Home Assistant]]></name>
|
||||
|
@ -18,15 +18,20 @@
|
|||
<link href="https://home-assistant.io/blog/2016/04/17/updated-documentation/"/>
|
||||
<updated>2016-04-17T06:09:00+00:00</updated>
|
||||
<id>https://home-assistant.io/blog/2016/04/17/updated-documentation</id>
|
||||
<content type="html"><![CDATA[<p>One of the main complaints that we receive is something along the lines “I read that X is possible yet I am unable to find it on the website.”. This post is to announce that we have taken the first steps to improve it by revamping the <a href="/getting-started/">getting started</a> and <a href="/developers/">developers</a> sections. It’s still a work in progress but we now have a solid foundation to build on for the future 👍.</p>
|
||||
<content type="html"><![CDATA[One of the main complaints that we receive is something along the lines "I read that X is possible yet I am unable to find it on the website.". This post is to announce that we have taken the first steps to improve it by revamping the [getting started] and [developers] sections. It's still a work in progress but we now have a solid foundation to build on for the future 👍.
|
||||
|
||||
<p>Our documentation has been going through various phases. Initially it was just the README in our GitHub repository. I discovered Jekyll and GitHub pages in December 2014 and created home-assistant.io. I more or less broke the README in 5 pages and <a href="/blog/2014/12/18/website-launched/">called it a website</a>. Back then we had a whopping <a href="https://github.com/home-assistant/home-assistant.io/blob/86bb2df430ce267ab2123d51592d3f068ae509b5/source/components/index.markdown">11 components</a>.</p>
|
||||
Our documentation has been going through various phases. Initially it was just the README in our GitHub repository. I discovered Jekyll and GitHub pages in December 2014 and created home-assistant.io. I more or less broke the README in 5 pages and [called it a website]. Back then we had a whopping [11 components](https://github.com/home-assistant/home-assistant.io/blob/86bb2df430ce267ab2123d51592d3f068ae509b5/source/components/index.markdown).
|
||||
|
||||
<p>As Home Assistant grew, so did our documentation. <a href="https://github.com/fabaff">Fabian Affolter</a> does an amazing job in making sure there is at least a documentation stub for each new feature that lands. And that’s quite a feat given our <a href="https://home-assistant.io/blog/categories/release-notes/">frequent releases</a>! But despite all the efforts, the documentation outgrew our existing documentation organisation.</p>
|
||||
As Home Assistant grew, so did our documentation. [Fabian Affolter](https://github.com/fabaff) does an amazing job in making sure there is at least a documentation stub for each new feature that lands. And that's quite a feat given our [frequent releases](https://home-assistant.io/blog/categories/release-notes/)! But despite all the efforts, the documentation outgrew our existing documentation organisation.
|
||||
|
||||
<p>Today it has been almost 1.5 years since we started the website. We now have <a href="/components/">264 components and platforms</a> under our belt and have been honored with 1.5 million page views ✨. And hopefully we now also have documentation that our community deserves.</p>
|
||||
Today it has been almost 1.5 years since we started the website. We now have [264 components and platforms] under our belt and have been honored with 1.5 million page views ✨. And hopefully we now also have documentation that our community deserves.
|
||||
|
||||
<p>Finally, if you see some content that could use more clarifcation or is outdated, don’t hesitate to use the ‘Edit in GitHub’ link that is present on each page.</p>
|
||||
[getting started]: /getting-started/
|
||||
[developers]: /developers/
|
||||
[called it a website]: /blog/2014/12/18/website-launched/
|
||||
[264 components and platforms]: /components/
|
||||
|
||||
Finally, if you see some content that could use more clarifcation or is outdated, don't hesitate to use the 'Edit in GitHub' link that is present on each page.
|
||||
]]></content>
|
||||
</entry>
|
||||
|
||||
|
@ -35,7 +40,7 @@
|
|||
<link href="https://home-assistant.io/blog/2014/12/18/website-launched/"/>
|
||||
<updated>2014-12-18T23:24:45+00:00</updated>
|
||||
<id>https://home-assistant.io/blog/2014/12/18/website-launched</id>
|
||||
<content type="html">< and [Octopress](http://octopress.org) and the great services [GitHub Pages](https://pages.github.com) and [CloudFlare](https://cloudflare.com).
|
||||
]]></content>
|
||||
</entry>
|
||||
|
||||
|
|
|
@ -233,7 +233,7 @@
|
|||
|
||||
|
||||
<li class="post">
|
||||
<a href="/blog/2016/08/13/foursquare-fast-com-ffmpeg-gpsd/">0.26: Foursquare, Fast.com, FFMPEG and GPSD</a>
|
||||
<a href="/blog/2016/08/13/foursquare-fast.com-ffmpeg-gpsd/">0.26: Foursquare, Fast.com, FFMPEG and GPSD</a>
|
||||
</li>
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue