Site updated at 2016-02-09 07:50:16 UTC
This commit is contained in:
parent
c57d50c516
commit
3d44f30889
74 changed files with 2091 additions and 1108 deletions
|
@ -4,7 +4,7 @@
|
|||
<title><![CDATA[Category: Architecture | Home Assistant]]></title>
|
||||
<link href="https://home-assistant.io/blog/categories/architecture/atom.xml" rel="self"/>
|
||||
<link href="https://home-assistant.io/"/>
|
||||
<updated>2016-02-08T17:11:51+00:00</updated>
|
||||
<updated>2016-02-09T07:49:53+00:00</updated>
|
||||
<id>https://home-assistant.io/</id>
|
||||
<author>
|
||||
<name><![CDATA[Paulus Schoutsen]]></name>
|
||||
|
|
|
@ -254,6 +254,12 @@
|
|||
<ul class="divided">
|
||||
|
||||
|
||||
<li class="post">
|
||||
<a href="/blog/2016/02/09/smarter-smart-things-with-mqtt-and-home-assistant/">Smarter SmartThings with MQTT and Home Assistant</a>
|
||||
</li>
|
||||
|
||||
|
||||
|
||||
<li class="post">
|
||||
<a href="/blog/2016/01/30/insteon-lifx-twitter-and-zigbee/">0.12: Insteon, LIFX, Twitter and ZigBee</a>
|
||||
</li>
|
||||
|
@ -277,12 +283,6 @@
|
|||
</li>
|
||||
|
||||
|
||||
|
||||
<li class="post">
|
||||
<a href="/blog/2015/12/13/setup-encryption-using-lets-encrypt/">Set up encryption using Let's Encrypt</a>
|
||||
</li>
|
||||
|
||||
|
||||
</ul>
|
||||
</section>
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
<title><![CDATA[Category: Branding | Home Assistant]]></title>
|
||||
<link href="https://home-assistant.io/blog/categories/branding/atom.xml" rel="self"/>
|
||||
<link href="https://home-assistant.io/"/>
|
||||
<updated>2016-02-08T17:11:51+00:00</updated>
|
||||
<updated>2016-02-09T07:49:53+00:00</updated>
|
||||
<id>https://home-assistant.io/</id>
|
||||
<author>
|
||||
<name><![CDATA[Paulus Schoutsen]]></name>
|
||||
|
|
|
@ -254,6 +254,12 @@
|
|||
<ul class="divided">
|
||||
|
||||
|
||||
<li class="post">
|
||||
<a href="/blog/2016/02/09/smarter-smart-things-with-mqtt-and-home-assistant/">Smarter SmartThings with MQTT and Home Assistant</a>
|
||||
</li>
|
||||
|
||||
|
||||
|
||||
<li class="post">
|
||||
<a href="/blog/2016/01/30/insteon-lifx-twitter-and-zigbee/">0.12: Insteon, LIFX, Twitter and ZigBee</a>
|
||||
</li>
|
||||
|
@ -277,12 +283,6 @@
|
|||
</li>
|
||||
|
||||
|
||||
|
||||
<li class="post">
|
||||
<a href="/blog/2015/12/13/setup-encryption-using-lets-encrypt/">Set up encryption using Let's Encrypt</a>
|
||||
</li>
|
||||
|
||||
|
||||
</ul>
|
||||
</section>
|
||||
|
||||
|
|
|
@ -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-02-08T17:11:51+00:00</updated>
|
||||
<updated>2016-02-09T07:49:53+00:00</updated>
|
||||
<id>https://home-assistant.io/</id>
|
||||
<author>
|
||||
<name><![CDATA[Paulus Schoutsen]]></name>
|
||||
|
|
|
@ -219,6 +219,12 @@
|
|||
<ul class="divided">
|
||||
|
||||
|
||||
<li class="post">
|
||||
<a href="/blog/2016/02/09/smarter-smart-things-with-mqtt-and-home-assistant/">Smarter SmartThings with MQTT and Home Assistant</a>
|
||||
</li>
|
||||
|
||||
|
||||
|
||||
<li class="post">
|
||||
<a href="/blog/2016/01/30/insteon-lifx-twitter-and-zigbee/">0.12: Insteon, LIFX, Twitter and ZigBee</a>
|
||||
</li>
|
||||
|
@ -242,12 +248,6 @@
|
|||
</li>
|
||||
|
||||
|
||||
|
||||
<li class="post">
|
||||
<a href="/blog/2015/12/13/setup-encryption-using-lets-encrypt/">Set up encryption using Let's Encrypt</a>
|
||||
</li>
|
||||
|
||||
|
||||
</ul>
|
||||
</section>
|
||||
|
||||
|
|
|
@ -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-02-08T17:11:51+00:00</updated>
|
||||
<updated>2016-02-09T07:49:53+00:00</updated>
|
||||
<id>https://home-assistant.io/</id>
|
||||
<author>
|
||||
<name><![CDATA[Paulus Schoutsen]]></name>
|
||||
|
|
|
@ -223,6 +223,12 @@
|
|||
<ul class="divided">
|
||||
|
||||
|
||||
<li class="post">
|
||||
<a href="/blog/2016/02/09/smarter-smart-things-with-mqtt-and-home-assistant/">Smarter SmartThings with MQTT and Home Assistant</a>
|
||||
</li>
|
||||
|
||||
|
||||
|
||||
<li class="post">
|
||||
<a href="/blog/2016/01/30/insteon-lifx-twitter-and-zigbee/">0.12: Insteon, LIFX, Twitter and ZigBee</a>
|
||||
</li>
|
||||
|
@ -246,12 +252,6 @@
|
|||
</li>
|
||||
|
||||
|
||||
|
||||
<li class="post">
|
||||
<a href="/blog/2015/12/13/setup-encryption-using-lets-encrypt/">Set up encryption using Let's Encrypt</a>
|
||||
</li>
|
||||
|
||||
|
||||
</ul>
|
||||
</section>
|
||||
|
||||
|
|
|
@ -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-02-08T17:11:51+00:00</updated>
|
||||
<updated>2016-02-09T07:49:53+00:00</updated>
|
||||
<id>https://home-assistant.io/</id>
|
||||
<author>
|
||||
<name><![CDATA[Paulus Schoutsen]]></name>
|
||||
|
@ -13,6 +13,240 @@
|
|||
<generator uri="http://octopress.org/">Octopress</generator>
|
||||
|
||||
|
||||
<entry>
|
||||
<title type="html"><![CDATA[Smarter SmartThings with MQTT and Home Assistant]]></title>
|
||||
<link href="https://home-assistant.io/blog/2016/02/09/smarter-smart-things-with-mqtt-and-home-assistant/"/>
|
||||
<updated>2016-02-09T07:44:00+00:00</updated>
|
||||
<id>https://home-assistant.io/blog/2016/02/09/Smarter-Smart-Things-with-MQTT-and-Home-Assistant</id>
|
||||
<content type="html"><![CDATA[<p><em>This is a guest post by Home Assistant users <a href="https://github.com/jer">Jeremiah Wuenschel</a> and <a href="https://github.com/stjohnjohnson">St. John Johnson</a>.</em></p>
|
||||
|
||||
<p>So you own a <a href="http://smartthings.com">SmartThings</a> Hub. You probably bought it when you were looking to get into the whole Home Automation hobby because it worked with pretty much everything and offered you the ability to automate <strong>anything.</strong> After a week of ownership, you realized that building dashboards and automating required writing way more Groovy then you expected. Then one day you were browsing <a href="https://www.reddit.com/r/homeautomation">reddit</a> and discovered the amazingness that is Home Assistant! A solution that offered dashboards, graphs, working support for Nest, and REAL EASY automation!</p>
|
||||
|
||||
<p>You spent your weekend getting everything set up, showing it off to your significant other, but in the end you got stumped when it came to integrating with all your existing SmartThings toys. What do I do now? Should I buy another hub? Should I just buy a Z-Wave stick?</p>
|
||||
|
||||
<p>That’s where we came in. We wanted a solution that can bridge the awesomeness of Home Assistant with the SmartThings hub that works with almost everything.</p>
|
||||
|
||||
<p class="img">
|
||||
<img src="https://home-assistant.io/images/blog/2016-02-smartthings/splash.png" />
|
||||
</p>
|
||||
|
||||
<!--more-->
|
||||
|
||||
<h2>Glossary</h2>
|
||||
|
||||
<p>This is going to be a pretty detailed tutorial on setting up our SmartThings bridge. However, there are a couple key terms that <em>might</em> be new to you:</p>
|
||||
|
||||
<ul>
|
||||
<li><a href="https://en.wikipedia.org/wiki/MQTT">MQTT</a>: A lightweight message protocol for listening and publishing events that happen. Many home automation platforms have built in support for this <a href="/components/mqtt/">(especially Home Assistant)</a>.</li>
|
||||
<li><a href="https://www.docker.com/">Docker</a>: A tool for running applications that are self-contained. No need for installing any dependencies or worrying about conflicts. Installs easily on Linux and OSX.</li>
|
||||
</ul>
|
||||
|
||||
<h2>Setting up the Bridge</h2>
|
||||
|
||||
<h3>MQTT</h3>
|
||||
|
||||
<p>Assuming that you already have Home Assistant and Smart Things running, you will first want to get an MQTT broker running. There are a handful of <a href="http://mosquitto.org/">MQTT</a> <a href="https://github.com/emqtt/emqttd">brokers</a> available in Open Source land. We chose <a href="http://www.mosca.io/">Mosca</a> for its simplicity.</p>
|
||||
|
||||
<p>There is very little you need to do to get Mosca running. The easiest approach is to use <a href="https://www.docker.com/">Docker</a>, and run a command like the following:</p>
|
||||
|
||||
<div class="highlighter-coderay"><div class="CodeRay">
|
||||
<div class="code"><pre>$ docker run \
|
||||
-d \
|
||||
--name="mqtt" \
|
||||
-v /opt/mosca:/db \
|
||||
-p 1883:1883 \
|
||||
matteocollina/mosca
|
||||
</pre></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<p>This will start Mosca up inside of a docker container, while keeping persistent storage for Mosca in <code>/opt/mosca</code>. The default configuration is the only thing we need to get things up and running.</p>
|
||||
|
||||
<p>If you don’t want to mess with Docker and can get node.js installed without trouble, the <a href="https://github.com/mcollina/mosca#standalone">standalone</a> instructions are all you need.</p>
|
||||
|
||||
<h3>MQTT Bridge</h3>
|
||||
|
||||
<p>This is the small piece of magic that bridges the gap between MQTT and SmartThings. It is a node.js app, and like Mosca it is probably easiest to install with Docker:</p>
|
||||
|
||||
<div class="highlighter-coderay"><div class="CodeRay">
|
||||
<div class="code"><pre>$ docker run \
|
||||
-d \
|
||||
--name="mqtt-bridge" \
|
||||
-v /opt/mqtt-bridge:/config \
|
||||
-p 8080:8080 \
|
||||
stjohnjohnson/smartthings-mqtt-bridge
|
||||
</pre></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<p>The code for this bridge is <a href="https://github.com/stjohnjohnson/smartthings-mqtt-bridge">on Github</a> if you want to start it up independently.</p>
|
||||
|
||||
<p>The MQTT Bridge only needs to know where your MQTT broker lives. If you are using these docker commands as-is, edit <code>/opt/mqtt-bridge/config.yml</code> to look like this:</p>
|
||||
|
||||
<div class="highlighter-coderay"><div class="CodeRay">
|
||||
<div class="code"><pre><span class="head"><span class="head">---</span></span>
|
||||
<span class="key">mqtt</span>:
|
||||
<span class="key">host</span>: <span class="string"><span class="content"><IP of the host></span></span>
|
||||
</pre></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<p>Restart the bridge, and you are ready to go:</p>
|
||||
|
||||
<div class="highlighter-coderay"><div class="CodeRay">
|
||||
<div class="code"><pre>$ docker restart mqtt-bridge
|
||||
</pre></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<h3>SmartThings Device</h3>
|
||||
|
||||
<p>The next step (and possibly the most confusing) is the device type. Go to the <a href="https://graph.api.smartthings.com/ide/devices">Smart Things Device IDE</a> and <code>Create New Device Handler</code>. Choose <code>From Code</code> and paste in the <a href="https://github.com/stjohnjohnson/smartthings-mqtt-bridge/blob/master/devicetypes/stj/mqtt-bridge.src/mqtt-bridge.groovy">MQTT Bridge Device Code</a>. Click <code>Save</code>, <code>Publish</code>, and then <code>For Me</code>.</p>
|
||||
|
||||
<p>Now to install your new Device Handler. Go back to <code>My Devices</code> in the IDE, and click <code>New Device</code>. Enter a name, and pick any random set of characters for the Device Network Id (this will automatically update later). For Type, scroll to the bottom of the list and find your newly created <code>MQTT Bridge</code>. Fill in the other boxes however you like.</p>
|
||||
|
||||
<p>Go back to <code>My Devices</code>, and click on your new device in the list. This will bring up a page that allows you to edit your device’s Preferences. Click <code>edit</code> and fill in the 3 pieces of information it asks for.</p>
|
||||
|
||||
<ul>
|
||||
<li>MQTT Bridge IP Address: <IP address of the MQTT Bridge from the previous step></li>
|
||||
<li>MQTT Bridge Port: <8080 if you have changed nothing in the previous commands></li>
|
||||
<li>MQTT Bridge MAC Address: <Mac address of machine running the Bridge code></li>
|
||||
</ul>
|
||||
|
||||
<p>This will create the link between SmartThings and the MQTT Bridge.</p>
|
||||
|
||||
<h3>SmartThings App</h3>
|
||||
|
||||
<p>The last step is to setup the SmartApp. After this, any registered devices will start sending their events to MQTT.</p>
|
||||
|
||||
<p>Go to the <a href="https://graph.api.smartthings.com/ide/apps">Smart App IDE</a>. Click <code>New SmartApp</code>, followed by <code>From Code</code>. Paste in the <a href="https://github.com/stjohnjohnson/smartthings-mqtt-bridge/blob/master/smartapps/stj/mqtt-bridge.src/mqtt-bridge.groovy">MQTT Bridge SmartApp code</a> and click <code>Save</code>. Click <code>Publish</code> and then <code>For Me</code>. In the SmartThings mobile app, add the new SmartApp and configure it with your devices and MQTT Bridge device. Clicking <code>done</code> will subscribe SmartThings to your MQTT broker and begin 2-way propagation of events.</p>
|
||||
|
||||
<h3>Configure Home Assistant</h3>
|
||||
|
||||
<p>To add SmartThings devices to Home Assistant over MQTT, first enable MQTT in Home Assistant:</p>
|
||||
|
||||
<div class="highlighter-coderay"><div class="CodeRay">
|
||||
<div class="code"><pre><span class="key">mqtt</span>:
|
||||
<span class="key">broker</span>: <span class="string"><span class="content">localhost</span></span>
|
||||
</pre></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<p>Replace <code>localhost</code> with the location of the running MQTT Broker. Devices from the MQTT Bridge are published to the path <code>/smartthings/<Device Name>/<Atribute></code></p>
|
||||
|
||||
<p>For example, my Dimmer Z-Wave Lamp is called “Fireplace Lights” in SmartThings. The following topics are published:</p>
|
||||
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Topic</th>
|
||||
<th>Description</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>/smartthings/Fireplace Lights/level</td>
|
||||
<td>Brightness (0-99)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>/smartthings/Fireplace Lights/switch</td>
|
||||
<td>Switch State (on/off)</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<p>Here is an example Home Assistant config:</p>
|
||||
|
||||
<div class="highlighter-coderay"><div class="CodeRay">
|
||||
<div class="code"><pre><span class="key">switch</span>:
|
||||
<span class="key">platform</span>: <span class="string"><span class="content">mqtt</span></span>
|
||||
<span class="key">name</span>: <span class="string"><span class="delimiter">"</span><span class="content">Fireplace Lights</span><span class="delimiter">"</span></span>
|
||||
<span class="key">state_topic</span>: <span class="string"><span class="delimiter">"</span><span class="content">/smartthings/Fireplace Lights/switch</span><span class="delimiter">"</span></span>
|
||||
<span class="key">command_topic</span>: <span class="string"><span class="delimiter">"</span><span class="content">/smartthings/Fireplace Lights/switch</span><span class="delimiter">"</span></span>
|
||||
<span class="key">brightness_state_topic</span>: <span class="string"><span class="delimiter">"</span><span class="content">/smartthings/Fireplace Lights/level</span><span class="delimiter">"</span></span>
|
||||
<span class="key">brightness_command_topic</span>: <span class="string"><span class="delimiter">"</span><span class="content">/smartthings/Fireplace Lights/level</span><span class="delimiter">"</span></span>
|
||||
<span class="key">payload_on</span>: <span class="string"><span class="delimiter">"</span><span class="content">on</span><span class="delimiter">"</span></span>
|
||||
<span class="key">payload_off</span>: <span class="string"><span class="delimiter">"</span><span class="content">off</span><span class="delimiter">"</span></span>
|
||||
<span class="key">retain</span>: <span class="string"><span class="content">true</span></span>
|
||||
</pre></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<p>We recommend <code>retain: true</code> for every MQTT device in order to keep states in sync when things become disconnected.</p>
|
||||
|
||||
<p>Start digging through the <a href="/components/mqtt/">MQTT Components</a> in Home Assistant to find which components map to the new events being published to MQTT.</p>
|
||||
|
||||
<h3>Configuring with Docker-Compose</h3>
|
||||
|
||||
<p>Our personal preference for starting the whole suite of software is to use a single Docker-Compose file. Just create a file called <code>docker-compose.yml</code> like this:</p>
|
||||
|
||||
<div class="highlighter-coderay"><div class="CodeRay">
|
||||
<div class="code"><pre><span class="key">mqtt</span>:
|
||||
<span class="key">image</span>: <span class="string"><span class="content">matteocollina/mosca</span></span>
|
||||
<span class="key">ports</span>:
|
||||
- <span class="string"><span class="content">1883:1883</span></span>
|
||||
|
||||
<span class="key">mqttbridge</span>:
|
||||
<span class="key">image</span>: <span class="string"><span class="content">stjohnjohnson/smartthings-mqtt-bridge</span></span>
|
||||
<span class="key">volumes</span>:
|
||||
- <span class="string"><span class="content">./mqtt-bridge:/config</span></span>
|
||||
<span class="key">ports</span>:
|
||||
- <span class="string"><span class="content">8080:8080</span></span>
|
||||
<span class="key">links</span>:
|
||||
- <span class="string"><span class="content">mqtt</span></span>
|
||||
|
||||
<span class="key">homeassistant</span>:
|
||||
<span class="key">image</span>: <span class="string"><span class="content">balloob/home-assistant</span></span>
|
||||
<span class="key">ports</span>:
|
||||
- <span class="string"><span class="content">80:80</span></span>
|
||||
<span class="key">volumes</span>:
|
||||
- <span class="string"><span class="content">./home-assistant:/config</span></span>
|
||||
- <span class="string"><span class="content">/etc/localtime:/etc/localtime:ro</span></span>
|
||||
<span class="key">links</span>:
|
||||
- <span class="string"><span class="content">mqtt</span></span>
|
||||
</pre></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<p>This will start home-assistant, MQTT, and the Bridge, in dependency order. All config can reference the name of the docker container instead of using IP addresses (e.g. mqtt for the broker host in Home Assistant).</p>
|
||||
|
||||
<h3>How it works</h3>
|
||||
|
||||
<p><strong>HTTP Endpoint</strong>: There are really only 2 ways to communicate with the SmartThings hub that we could find. The easiest approach is to create a RESTful SmartApp authenticated with OAuth that provides state changes via HTTP directly. This approach is pretty straightforward to implement, but it requires communication with the SmartThings cloud service, and can’t be done entirely on your LAN. We hoped to keep all communication internal, and came up with a second approach.</p>
|
||||
|
||||
<p><strong>Custom Device Type:</strong> SmartThings custom device types allow developers to define handlers for HTTP events received directly over the local network by the SmartThings hub. Messages received are authenticated by MAC address, and can contain arbitrary strings in their payload. Since a Device Type is only ever tied to a single device, we need to add a SmartApp to the mix in order to translate events between individual devices and our special Home Assistant Bridge device. Here is what we have so far:</p>
|
||||
|
||||
<div class="highlighter-coderay"><div class="CodeRay">
|
||||
<div class="code"><pre>Z-Wave Switch |
|
||||
Zigbee motion sensor |<---> Bridge App <---> Bridge Device Type <---> <Local network>
|
||||
Z-Wave light bulb |
|
||||
</pre></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<p>On the Home Assistant side, there is a powerful platform available based on the MQTT lightweight message bus protocol. Everything from lights to switches to temperature sensors can be defined in Home Assistant as an MQTT component, so it makes for a convenient integration point. This requires an MQTT broker for handling the message bus, and one last piece to translate between the HTTP that SmartThings supports and MQTT.</p>
|
||||
|
||||
<p>Here is the final sequence of events:</p>
|
||||
|
||||
<p class="img">
|
||||
<a href="https://home-assistant.io/images/blog/2016-02-smartthings/SmartThings-HomeAssistant.png">
|
||||
<img src="https://home-assistant.io/images/blog/2016-02-smartthings/SmartThings-HomeAssistant.png" alt="SmartThings Bridge Sequence" />
|
||||
</a>
|
||||
SmartThings Bridge Sequence
|
||||
</p>
|
||||
|
||||
<p>There are a lot of stops along the way for these events, but each piece is a simple translation layer to shuttle the events between systems.</p>
|
||||
|
||||
<h3>Future Improvements</h3>
|
||||
<ul>
|
||||
<li><strong>Raspberry pi</strong>: There is a lot of interest in getting this running on the Raspberry Pi. It only requires binaries compiled for ARM, so we plan to get ARM-compatible versions of the containers going at some point.</li>
|
||||
<li><strong>Authentication for MQTT</strong>: At the moment, the MQTT bridge doesn’t understand how to authenticate to MQTT, so only unauthenticated MQTT is supported. This is mitigated to some degree if you use our Docker Compose config, because MQTT’s port is not actually shared publicly.</li>
|
||||
<li><strong>Authentication for MQTT Bridge</strong>: Right now the bridge expects that anyone subscribing is the SmartThings hub. This could use proper authentication.</li>
|
||||
</ul>
|
||||
|
||||
]]></content>
|
||||
</entry>
|
||||
|
||||
<entry>
|
||||
<title type="html"><![CDATA[Set up encryption using Let's Encrypt]]></title>
|
||||
<link href="https://home-assistant.io/blog/2015/12/13/setup-encryption-using-lets-encrypt/"/>
|
||||
|
@ -672,90 +906,6 @@ Adafruit_HDC1000 hdc = Adafruit_HDC1000();
|
|||
</pre></td>
|
||||
</tr></table>
|
||||
</div>
|
||||
]]></content>
|
||||
</entry>
|
||||
|
||||
<entry>
|
||||
<title type="html"><![CDATA[Remote Monitoring with Glances]]></title>
|
||||
<link href="https://home-assistant.io/blog/2015/09/18/monitoring-with-glances-and-home-assistant/"/>
|
||||
<updated>2015-09-18T09:00:00+00:00</updated>
|
||||
<id>https://home-assistant.io/blog/2015/09/18/monitoring-with-glances-and-home-assistant</id>
|
||||
<content type="html"><![CDATA[<p><img src="https://home-assistant.io/images/supported_brands/glances.png" style="border:none; box-shadow: none; float: right;" height="80" /><br />
|
||||
Inspried by a <a href="https://github.com/balloob/home-assistant/issues/310">feature requests</a> I started looking into the available options to do monitoring of remote hosts. The feature request is about displaying system information in a similar way than the <a href="/components/sensor.systemmonitor/">systemmonitor</a> sensor does it for the local system. After a while I started to think that it would be a nice addition for a small home network where no full-blown system monitoring setup is present.</p>
|
||||
|
||||
<!--more-->
|
||||
|
||||
<p>The basic problem is to get the data from the remote host. Starting with <a href="https://pypi.python.org/pypi/psutil">psutil</a> that is used by the systemmonitor sensor, a possible solution is only a click away and named <a href="https://github.com/nicolargo/glances">Glances</a>. Glances has a nice curses-based interface and a <a href="https://github.com/nicolargo/glances/wiki/The-Glances-RESTFULL-JSON-API">RESTful API</a>.</p>
|
||||
|
||||
<p>The <a href="/components/sensor.glances/">Glances sensor</a> sensor uses that API to get all needed data.</p>
|
||||
|
||||
<p>In this post a default Fedora 22 Workstation installation is used on the host that should be monitored. In fact, it doesn’t matter if the system is the local one or a remote one as long as Glances is available. With some adjustments it should work on your own systems too. The difference will be the package and the firewall management tools.</p>
|
||||
|
||||
<p>First some extra packages are needed beside Glances, especially the <a href="http://bottlepy.org/docs/dev/index.html">bottle</a> webserver. I guess that Glances is available for your distribution as well. Otherwise follow those <a href="https://github.com/nicolargo/glances#installation">instructions</a>.</p>
|
||||
|
||||
<div class="highlighter-coderay"><div class="CodeRay">
|
||||
<div class="code"><pre>$ sudo dnf -y install glances python-bottle
|
||||
</pre></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<p>On Fedora the Firewall settings are strict. Let’s open port 61208 to allow other hosts to connect to that port. This is not needed if you just want to observe your local machine.</p>
|
||||
|
||||
<div class="highlighter-coderay"><div class="CodeRay">
|
||||
<div class="code"><pre>$ sudo firewall-cmd --permanent --add-port=61208/tcp
|
||||
$ sudo firewall-cmd --reload
|
||||
</pre></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<p>Launch <code>glances</code> and keep an eye on the output.</p>
|
||||
|
||||
<div class="highlighter-coderay"><div class="CodeRay">
|
||||
<div class="code"><pre>$ glances -w
|
||||
Glances web server started on http://0.0.0.0:61208/
|
||||
</pre></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<p>Now browse to http://IP_ADRRESS:61208/. You should see the webified view of Glances.</p>
|
||||
|
||||
<p class="img">
|
||||
<img src="https://home-assistant.io/images/blog/2015-09-glances/web-glances.png" />
|
||||
Glances web interface
|
||||
</p>
|
||||
|
||||
<p>Another check is to access the API located at http://IP_ADRRESS:61208/api/2/mem/used and to confirm that a detail about your memory usage is provided as a JSON response. If so, you are good to proceed.</p>
|
||||
|
||||
<div class="highlighter-coderay"><div class="CodeRay">
|
||||
<div class="code"><pre>$ curl -X GET http://IP_ADDRESS:61208/api/2/mem/used
|
||||
{"used": 203943936}
|
||||
</pre></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<p>Add the <a href="/components/sensor.glances/">glances sensor</a> entry to your <code>configuration.yaml</code> file and restart Home Assistant then.</p>
|
||||
|
||||
<div class="highlighter-coderay"><div class="CodeRay">
|
||||
<div class="code"><pre><span class="comment"># Example configuration.yaml entry</span>
|
||||
- <span class="string"><span class="content">platform: glances</span></span>
|
||||
<span class="key">name</span>: <span class="string"><span class="content">NAS</span></span>
|
||||
<span class="key">host</span>: <span class="string"><span class="content">IP_ADDRESS</span></span>
|
||||
<span class="key">resources</span>:
|
||||
- <span class="string"><span class="content">'disk_use_percent'</span></span>
|
||||
- <span class="string"><span class="content">'disk_use'</span></span>
|
||||
- <span class="string"><span class="content">'disk_free'</span></span>
|
||||
</pre></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<p>If there are no error in the log file then you should see your new sensors.</p>
|
||||
|
||||
<p class="img">
|
||||
<img src="https://home-assistant.io/images/blog/2015-09-glances/sensors.png" />
|
||||
The Glances sensors
|
||||
</p>
|
||||
|
||||
<p><a href="https://github.com/nicolargo/glances">Glances</a> has a couple of optional dependencies which are extenting the range of provided information. This means that it would be possible to get details about the RAID system, HDD temperature, IP addresses, sensors, etc., please create a <a href="https://github.com/balloob/home-assistant/pulls">Pull request</a> with your additions or a <a href="https://github.com/balloob/home-assistant/issues/new">Feature request</a> if you want see more details in your Home Assistant frontend.</p>
|
||||
]]></content>
|
||||
</entry>
|
||||
|
||||
|
|
|
@ -120,6 +120,43 @@
|
|||
|
||||
|
||||
|
||||
<h2>2016</h2>
|
||||
|
||||
<article>
|
||||
<div class="grid">
|
||||
|
||||
<div class="grid__item one-fifth palm-one-whole">
|
||||
<time datetime="2016-02-09T07:44:00+00:00" pubdate>
|
||||
<span class='month'>Feb</span> <span class='day'>09</span>
|
||||
</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>
|
||||
|
||||
<footer class="meta">
|
||||
<span>
|
||||
<i class="icon-tags"></i>
|
||||
<ul class="tags unstyled">
|
||||
|
||||
|
||||
<li><a class='category' href='/blog/categories/how-to/'>How-To</a></li>
|
||||
|
||||
<li><a class='category' href='/blog/categories/mqtt/'>MQTT</a></li>
|
||||
|
||||
|
||||
</ul>
|
||||
</span>
|
||||
</footer>
|
||||
|
||||
<hr class="divider">
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</article>
|
||||
|
||||
|
||||
|
||||
|
||||
<h2>2015</h2>
|
||||
|
||||
<article>
|
||||
|
@ -419,6 +456,12 @@
|
|||
<ul class="divided">
|
||||
|
||||
|
||||
<li class="post">
|
||||
<a href="/blog/2016/02/09/smarter-smart-things-with-mqtt-and-home-assistant/">Smarter SmartThings with MQTT and Home Assistant</a>
|
||||
</li>
|
||||
|
||||
|
||||
|
||||
<li class="post">
|
||||
<a href="/blog/2016/01/30/insteon-lifx-twitter-and-zigbee/">0.12: Insteon, LIFX, Twitter and ZigBee</a>
|
||||
</li>
|
||||
|
@ -442,12 +485,6 @@
|
|||
</li>
|
||||
|
||||
|
||||
|
||||
<li class="post">
|
||||
<a href="/blog/2015/12/13/setup-encryption-using-lets-encrypt/">Set up encryption using Let's Encrypt</a>
|
||||
</li>
|
||||
|
||||
|
||||
</ul>
|
||||
</section>
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
<title><![CDATA[Category: MQTT | Home Assistant]]></title>
|
||||
<link href="https://home-assistant.io/blog/categories/mqtt/atom.xml" rel="self"/>
|
||||
<link href="https://home-assistant.io/"/>
|
||||
<updated>2016-02-08T17:11:51+00:00</updated>
|
||||
<updated>2016-02-09T07:49:53+00:00</updated>
|
||||
<id>https://home-assistant.io/</id>
|
||||
<author>
|
||||
<name><![CDATA[Paulus Schoutsen]]></name>
|
||||
|
@ -13,6 +13,240 @@
|
|||
<generator uri="http://octopress.org/">Octopress</generator>
|
||||
|
||||
|
||||
<entry>
|
||||
<title type="html"><![CDATA[Smarter SmartThings with MQTT and Home Assistant]]></title>
|
||||
<link href="https://home-assistant.io/blog/2016/02/09/smarter-smart-things-with-mqtt-and-home-assistant/"/>
|
||||
<updated>2016-02-09T07:44:00+00:00</updated>
|
||||
<id>https://home-assistant.io/blog/2016/02/09/Smarter-Smart-Things-with-MQTT-and-Home-Assistant</id>
|
||||
<content type="html"><![CDATA[<p><em>This is a guest post by Home Assistant users <a href="https://github.com/jer">Jeremiah Wuenschel</a> and <a href="https://github.com/stjohnjohnson">St. John Johnson</a>.</em></p>
|
||||
|
||||
<p>So you own a <a href="http://smartthings.com">SmartThings</a> Hub. You probably bought it when you were looking to get into the whole Home Automation hobby because it worked with pretty much everything and offered you the ability to automate <strong>anything.</strong> After a week of ownership, you realized that building dashboards and automating required writing way more Groovy then you expected. Then one day you were browsing <a href="https://www.reddit.com/r/homeautomation">reddit</a> and discovered the amazingness that is Home Assistant! A solution that offered dashboards, graphs, working support for Nest, and REAL EASY automation!</p>
|
||||
|
||||
<p>You spent your weekend getting everything set up, showing it off to your significant other, but in the end you got stumped when it came to integrating with all your existing SmartThings toys. What do I do now? Should I buy another hub? Should I just buy a Z-Wave stick?</p>
|
||||
|
||||
<p>That’s where we came in. We wanted a solution that can bridge the awesomeness of Home Assistant with the SmartThings hub that works with almost everything.</p>
|
||||
|
||||
<p class="img">
|
||||
<img src="https://home-assistant.io/images/blog/2016-02-smartthings/splash.png" />
|
||||
</p>
|
||||
|
||||
<!--more-->
|
||||
|
||||
<h2>Glossary</h2>
|
||||
|
||||
<p>This is going to be a pretty detailed tutorial on setting up our SmartThings bridge. However, there are a couple key terms that <em>might</em> be new to you:</p>
|
||||
|
||||
<ul>
|
||||
<li><a href="https://en.wikipedia.org/wiki/MQTT">MQTT</a>: A lightweight message protocol for listening and publishing events that happen. Many home automation platforms have built in support for this <a href="/components/mqtt/">(especially Home Assistant)</a>.</li>
|
||||
<li><a href="https://www.docker.com/">Docker</a>: A tool for running applications that are self-contained. No need for installing any dependencies or worrying about conflicts. Installs easily on Linux and OSX.</li>
|
||||
</ul>
|
||||
|
||||
<h2>Setting up the Bridge</h2>
|
||||
|
||||
<h3>MQTT</h3>
|
||||
|
||||
<p>Assuming that you already have Home Assistant and Smart Things running, you will first want to get an MQTT broker running. There are a handful of <a href="http://mosquitto.org/">MQTT</a> <a href="https://github.com/emqtt/emqttd">brokers</a> available in Open Source land. We chose <a href="http://www.mosca.io/">Mosca</a> for its simplicity.</p>
|
||||
|
||||
<p>There is very little you need to do to get Mosca running. The easiest approach is to use <a href="https://www.docker.com/">Docker</a>, and run a command like the following:</p>
|
||||
|
||||
<div class="highlighter-coderay"><div class="CodeRay">
|
||||
<div class="code"><pre>$ docker run \
|
||||
-d \
|
||||
--name="mqtt" \
|
||||
-v /opt/mosca:/db \
|
||||
-p 1883:1883 \
|
||||
matteocollina/mosca
|
||||
</pre></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<p>This will start Mosca up inside of a docker container, while keeping persistent storage for Mosca in <code>/opt/mosca</code>. The default configuration is the only thing we need to get things up and running.</p>
|
||||
|
||||
<p>If you don’t want to mess with Docker and can get node.js installed without trouble, the <a href="https://github.com/mcollina/mosca#standalone">standalone</a> instructions are all you need.</p>
|
||||
|
||||
<h3>MQTT Bridge</h3>
|
||||
|
||||
<p>This is the small piece of magic that bridges the gap between MQTT and SmartThings. It is a node.js app, and like Mosca it is probably easiest to install with Docker:</p>
|
||||
|
||||
<div class="highlighter-coderay"><div class="CodeRay">
|
||||
<div class="code"><pre>$ docker run \
|
||||
-d \
|
||||
--name="mqtt-bridge" \
|
||||
-v /opt/mqtt-bridge:/config \
|
||||
-p 8080:8080 \
|
||||
stjohnjohnson/smartthings-mqtt-bridge
|
||||
</pre></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<p>The code for this bridge is <a href="https://github.com/stjohnjohnson/smartthings-mqtt-bridge">on Github</a> if you want to start it up independently.</p>
|
||||
|
||||
<p>The MQTT Bridge only needs to know where your MQTT broker lives. If you are using these docker commands as-is, edit <code>/opt/mqtt-bridge/config.yml</code> to look like this:</p>
|
||||
|
||||
<div class="highlighter-coderay"><div class="CodeRay">
|
||||
<div class="code"><pre><span class="head"><span class="head">---</span></span>
|
||||
<span class="key">mqtt</span>:
|
||||
<span class="key">host</span>: <span class="string"><span class="content"><IP of the host></span></span>
|
||||
</pre></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<p>Restart the bridge, and you are ready to go:</p>
|
||||
|
||||
<div class="highlighter-coderay"><div class="CodeRay">
|
||||
<div class="code"><pre>$ docker restart mqtt-bridge
|
||||
</pre></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<h3>SmartThings Device</h3>
|
||||
|
||||
<p>The next step (and possibly the most confusing) is the device type. Go to the <a href="https://graph.api.smartthings.com/ide/devices">Smart Things Device IDE</a> and <code>Create New Device Handler</code>. Choose <code>From Code</code> and paste in the <a href="https://github.com/stjohnjohnson/smartthings-mqtt-bridge/blob/master/devicetypes/stj/mqtt-bridge.src/mqtt-bridge.groovy">MQTT Bridge Device Code</a>. Click <code>Save</code>, <code>Publish</code>, and then <code>For Me</code>.</p>
|
||||
|
||||
<p>Now to install your new Device Handler. Go back to <code>My Devices</code> in the IDE, and click <code>New Device</code>. Enter a name, and pick any random set of characters for the Device Network Id (this will automatically update later). For Type, scroll to the bottom of the list and find your newly created <code>MQTT Bridge</code>. Fill in the other boxes however you like.</p>
|
||||
|
||||
<p>Go back to <code>My Devices</code>, and click on your new device in the list. This will bring up a page that allows you to edit your device’s Preferences. Click <code>edit</code> and fill in the 3 pieces of information it asks for.</p>
|
||||
|
||||
<ul>
|
||||
<li>MQTT Bridge IP Address: <IP address of the MQTT Bridge from the previous step></li>
|
||||
<li>MQTT Bridge Port: <8080 if you have changed nothing in the previous commands></li>
|
||||
<li>MQTT Bridge MAC Address: <Mac address of machine running the Bridge code></li>
|
||||
</ul>
|
||||
|
||||
<p>This will create the link between SmartThings and the MQTT Bridge.</p>
|
||||
|
||||
<h3>SmartThings App</h3>
|
||||
|
||||
<p>The last step is to setup the SmartApp. After this, any registered devices will start sending their events to MQTT.</p>
|
||||
|
||||
<p>Go to the <a href="https://graph.api.smartthings.com/ide/apps">Smart App IDE</a>. Click <code>New SmartApp</code>, followed by <code>From Code</code>. Paste in the <a href="https://github.com/stjohnjohnson/smartthings-mqtt-bridge/blob/master/smartapps/stj/mqtt-bridge.src/mqtt-bridge.groovy">MQTT Bridge SmartApp code</a> and click <code>Save</code>. Click <code>Publish</code> and then <code>For Me</code>. In the SmartThings mobile app, add the new SmartApp and configure it with your devices and MQTT Bridge device. Clicking <code>done</code> will subscribe SmartThings to your MQTT broker and begin 2-way propagation of events.</p>
|
||||
|
||||
<h3>Configure Home Assistant</h3>
|
||||
|
||||
<p>To add SmartThings devices to Home Assistant over MQTT, first enable MQTT in Home Assistant:</p>
|
||||
|
||||
<div class="highlighter-coderay"><div class="CodeRay">
|
||||
<div class="code"><pre><span class="key">mqtt</span>:
|
||||
<span class="key">broker</span>: <span class="string"><span class="content">localhost</span></span>
|
||||
</pre></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<p>Replace <code>localhost</code> with the location of the running MQTT Broker. Devices from the MQTT Bridge are published to the path <code>/smartthings/<Device Name>/<Atribute></code></p>
|
||||
|
||||
<p>For example, my Dimmer Z-Wave Lamp is called “Fireplace Lights” in SmartThings. The following topics are published:</p>
|
||||
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Topic</th>
|
||||
<th>Description</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>/smartthings/Fireplace Lights/level</td>
|
||||
<td>Brightness (0-99)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>/smartthings/Fireplace Lights/switch</td>
|
||||
<td>Switch State (on/off)</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<p>Here is an example Home Assistant config:</p>
|
||||
|
||||
<div class="highlighter-coderay"><div class="CodeRay">
|
||||
<div class="code"><pre><span class="key">switch</span>:
|
||||
<span class="key">platform</span>: <span class="string"><span class="content">mqtt</span></span>
|
||||
<span class="key">name</span>: <span class="string"><span class="delimiter">"</span><span class="content">Fireplace Lights</span><span class="delimiter">"</span></span>
|
||||
<span class="key">state_topic</span>: <span class="string"><span class="delimiter">"</span><span class="content">/smartthings/Fireplace Lights/switch</span><span class="delimiter">"</span></span>
|
||||
<span class="key">command_topic</span>: <span class="string"><span class="delimiter">"</span><span class="content">/smartthings/Fireplace Lights/switch</span><span class="delimiter">"</span></span>
|
||||
<span class="key">brightness_state_topic</span>: <span class="string"><span class="delimiter">"</span><span class="content">/smartthings/Fireplace Lights/level</span><span class="delimiter">"</span></span>
|
||||
<span class="key">brightness_command_topic</span>: <span class="string"><span class="delimiter">"</span><span class="content">/smartthings/Fireplace Lights/level</span><span class="delimiter">"</span></span>
|
||||
<span class="key">payload_on</span>: <span class="string"><span class="delimiter">"</span><span class="content">on</span><span class="delimiter">"</span></span>
|
||||
<span class="key">payload_off</span>: <span class="string"><span class="delimiter">"</span><span class="content">off</span><span class="delimiter">"</span></span>
|
||||
<span class="key">retain</span>: <span class="string"><span class="content">true</span></span>
|
||||
</pre></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<p>We recommend <code>retain: true</code> for every MQTT device in order to keep states in sync when things become disconnected.</p>
|
||||
|
||||
<p>Start digging through the <a href="/components/mqtt/">MQTT Components</a> in Home Assistant to find which components map to the new events being published to MQTT.</p>
|
||||
|
||||
<h3>Configuring with Docker-Compose</h3>
|
||||
|
||||
<p>Our personal preference for starting the whole suite of software is to use a single Docker-Compose file. Just create a file called <code>docker-compose.yml</code> like this:</p>
|
||||
|
||||
<div class="highlighter-coderay"><div class="CodeRay">
|
||||
<div class="code"><pre><span class="key">mqtt</span>:
|
||||
<span class="key">image</span>: <span class="string"><span class="content">matteocollina/mosca</span></span>
|
||||
<span class="key">ports</span>:
|
||||
- <span class="string"><span class="content">1883:1883</span></span>
|
||||
|
||||
<span class="key">mqttbridge</span>:
|
||||
<span class="key">image</span>: <span class="string"><span class="content">stjohnjohnson/smartthings-mqtt-bridge</span></span>
|
||||
<span class="key">volumes</span>:
|
||||
- <span class="string"><span class="content">./mqtt-bridge:/config</span></span>
|
||||
<span class="key">ports</span>:
|
||||
- <span class="string"><span class="content">8080:8080</span></span>
|
||||
<span class="key">links</span>:
|
||||
- <span class="string"><span class="content">mqtt</span></span>
|
||||
|
||||
<span class="key">homeassistant</span>:
|
||||
<span class="key">image</span>: <span class="string"><span class="content">balloob/home-assistant</span></span>
|
||||
<span class="key">ports</span>:
|
||||
- <span class="string"><span class="content">80:80</span></span>
|
||||
<span class="key">volumes</span>:
|
||||
- <span class="string"><span class="content">./home-assistant:/config</span></span>
|
||||
- <span class="string"><span class="content">/etc/localtime:/etc/localtime:ro</span></span>
|
||||
<span class="key">links</span>:
|
||||
- <span class="string"><span class="content">mqtt</span></span>
|
||||
</pre></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<p>This will start home-assistant, MQTT, and the Bridge, in dependency order. All config can reference the name of the docker container instead of using IP addresses (e.g. mqtt for the broker host in Home Assistant).</p>
|
||||
|
||||
<h3>How it works</h3>
|
||||
|
||||
<p><strong>HTTP Endpoint</strong>: There are really only 2 ways to communicate with the SmartThings hub that we could find. The easiest approach is to create a RESTful SmartApp authenticated with OAuth that provides state changes via HTTP directly. This approach is pretty straightforward to implement, but it requires communication with the SmartThings cloud service, and can’t be done entirely on your LAN. We hoped to keep all communication internal, and came up with a second approach.</p>
|
||||
|
||||
<p><strong>Custom Device Type:</strong> SmartThings custom device types allow developers to define handlers for HTTP events received directly over the local network by the SmartThings hub. Messages received are authenticated by MAC address, and can contain arbitrary strings in their payload. Since a Device Type is only ever tied to a single device, we need to add a SmartApp to the mix in order to translate events between individual devices and our special Home Assistant Bridge device. Here is what we have so far:</p>
|
||||
|
||||
<div class="highlighter-coderay"><div class="CodeRay">
|
||||
<div class="code"><pre>Z-Wave Switch |
|
||||
Zigbee motion sensor |<---> Bridge App <---> Bridge Device Type <---> <Local network>
|
||||
Z-Wave light bulb |
|
||||
</pre></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<p>On the Home Assistant side, there is a powerful platform available based on the MQTT lightweight message bus protocol. Everything from lights to switches to temperature sensors can be defined in Home Assistant as an MQTT component, so it makes for a convenient integration point. This requires an MQTT broker for handling the message bus, and one last piece to translate between the HTTP that SmartThings supports and MQTT.</p>
|
||||
|
||||
<p>Here is the final sequence of events:</p>
|
||||
|
||||
<p class="img">
|
||||
<a href="https://home-assistant.io/images/blog/2016-02-smartthings/SmartThings-HomeAssistant.png">
|
||||
<img src="https://home-assistant.io/images/blog/2016-02-smartthings/SmartThings-HomeAssistant.png" alt="SmartThings Bridge Sequence" />
|
||||
</a>
|
||||
SmartThings Bridge Sequence
|
||||
</p>
|
||||
|
||||
<p>There are a lot of stops along the way for these events, but each piece is a simple translation layer to shuttle the events between systems.</p>
|
||||
|
||||
<h3>Future Improvements</h3>
|
||||
<ul>
|
||||
<li><strong>Raspberry pi</strong>: There is a lot of interest in getting this running on the Raspberry Pi. It only requires binaries compiled for ARM, so we plan to get ARM-compatible versions of the containers going at some point.</li>
|
||||
<li><strong>Authentication for MQTT</strong>: At the moment, the MQTT bridge doesn’t understand how to authenticate to MQTT, so only unauthenticated MQTT is supported. This is mitigated to some degree if you use our Docker Compose config, because MQTT’s port is not actually shared publicly.</li>
|
||||
<li><strong>Authentication for MQTT Bridge</strong>: Right now the bridge expects that anyone subscribing is the SmartThings hub. This could use proper authentication.</li>
|
||||
</ul>
|
||||
|
||||
]]></content>
|
||||
</entry>
|
||||
|
||||
<entry>
|
||||
<title type="html"><![CDATA[Report the temperature with ESP8266 to MQTT]]></title>
|
||||
<link href="https://home-assistant.io/blog/2015/10/11/measure-temperature-with-esp8266-and-report-to-mqtt/"/>
|
||||
|
|
|
@ -120,6 +120,43 @@
|
|||
|
||||
|
||||
|
||||
<h2>2016</h2>
|
||||
|
||||
<article>
|
||||
<div class="grid">
|
||||
|
||||
<div class="grid__item one-fifth palm-one-whole">
|
||||
<time datetime="2016-02-09T07:44:00+00:00" pubdate>
|
||||
<span class='month'>Feb</span> <span class='day'>09</span>
|
||||
</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>
|
||||
|
||||
<footer class="meta">
|
||||
<span>
|
||||
<i class="icon-tags"></i>
|
||||
<ul class="tags unstyled">
|
||||
|
||||
|
||||
<li><a class='category' href='/blog/categories/how-to/'>How-To</a></li>
|
||||
|
||||
<li><a class='category' href='/blog/categories/mqtt/'>MQTT</a></li>
|
||||
|
||||
|
||||
</ul>
|
||||
</span>
|
||||
</footer>
|
||||
|
||||
<hr class="divider">
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</article>
|
||||
|
||||
|
||||
|
||||
|
||||
<h2>2015</h2>
|
||||
|
||||
<article>
|
||||
|
@ -257,6 +294,12 @@
|
|||
<ul class="divided">
|
||||
|
||||
|
||||
<li class="post">
|
||||
<a href="/blog/2016/02/09/smarter-smart-things-with-mqtt-and-home-assistant/">Smarter SmartThings with MQTT and Home Assistant</a>
|
||||
</li>
|
||||
|
||||
|
||||
|
||||
<li class="post">
|
||||
<a href="/blog/2016/01/30/insteon-lifx-twitter-and-zigbee/">0.12: Insteon, LIFX, Twitter and ZigBee</a>
|
||||
</li>
|
||||
|
@ -280,12 +323,6 @@
|
|||
</li>
|
||||
|
||||
|
||||
|
||||
<li class="post">
|
||||
<a href="/blog/2015/12/13/setup-encryption-using-lets-encrypt/">Set up encryption using Let's Encrypt</a>
|
||||
</li>
|
||||
|
||||
|
||||
</ul>
|
||||
</section>
|
||||
|
||||
|
|
|
@ -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-02-08T17:11:51+00:00</updated>
|
||||
<updated>2016-02-09T07:49:53+00:00</updated>
|
||||
<id>https://home-assistant.io/</id>
|
||||
<author>
|
||||
<name><![CDATA[Paulus Schoutsen]]></name>
|
||||
|
|
|
@ -219,6 +219,12 @@
|
|||
<ul class="divided">
|
||||
|
||||
|
||||
<li class="post">
|
||||
<a href="/blog/2016/02/09/smarter-smart-things-with-mqtt-and-home-assistant/">Smarter SmartThings with MQTT and Home Assistant</a>
|
||||
</li>
|
||||
|
||||
|
||||
|
||||
<li class="post">
|
||||
<a href="/blog/2016/01/30/insteon-lifx-twitter-and-zigbee/">0.12: Insteon, LIFX, Twitter and ZigBee</a>
|
||||
</li>
|
||||
|
@ -242,12 +248,6 @@
|
|||
</li>
|
||||
|
||||
|
||||
|
||||
<li class="post">
|
||||
<a href="/blog/2015/12/13/setup-encryption-using-lets-encrypt/">Set up encryption using Let's Encrypt</a>
|
||||
</li>
|
||||
|
||||
|
||||
</ul>
|
||||
</section>
|
||||
|
||||
|
|
|
@ -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-02-08T17:11:51+00:00</updated>
|
||||
<updated>2016-02-09T07:49:53+00:00</updated>
|
||||
<id>https://home-assistant.io/</id>
|
||||
<author>
|
||||
<name><![CDATA[Paulus Schoutsen]]></name>
|
||||
|
|
|
@ -1056,6 +1056,12 @@
|
|||
<ul class="divided">
|
||||
|
||||
|
||||
<li class="post">
|
||||
<a href="/blog/2016/02/09/smarter-smart-things-with-mqtt-and-home-assistant/">Smarter SmartThings with MQTT and Home Assistant</a>
|
||||
</li>
|
||||
|
||||
|
||||
|
||||
<li class="post">
|
||||
<a href="/blog/2016/01/30/insteon-lifx-twitter-and-zigbee/">0.12: Insteon, LIFX, Twitter and ZigBee</a>
|
||||
</li>
|
||||
|
@ -1079,12 +1085,6 @@
|
|||
</li>
|
||||
|
||||
|
||||
|
||||
<li class="post">
|
||||
<a href="/blog/2015/12/13/setup-encryption-using-lets-encrypt/">Set up encryption using Let's Encrypt</a>
|
||||
</li>
|
||||
|
||||
|
||||
</ul>
|
||||
</section>
|
||||
|
||||
|
|
|
@ -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-02-08T17:11:51+00:00</updated>
|
||||
<updated>2016-02-09T07:49:53+00:00</updated>
|
||||
<id>https://home-assistant.io/</id>
|
||||
<author>
|
||||
<name><![CDATA[Paulus Schoutsen]]></name>
|
||||
|
|
|
@ -219,6 +219,12 @@
|
|||
<ul class="divided">
|
||||
|
||||
|
||||
<li class="post">
|
||||
<a href="/blog/2016/02/09/smarter-smart-things-with-mqtt-and-home-assistant/">Smarter SmartThings with MQTT and Home Assistant</a>
|
||||
</li>
|
||||
|
||||
|
||||
|
||||
<li class="post">
|
||||
<a href="/blog/2016/01/30/insteon-lifx-twitter-and-zigbee/">0.12: Insteon, LIFX, Twitter and ZigBee</a>
|
||||
</li>
|
||||
|
@ -242,12 +248,6 @@
|
|||
</li>
|
||||
|
||||
|
||||
|
||||
<li class="post">
|
||||
<a href="/blog/2015/12/13/setup-encryption-using-lets-encrypt/">Set up encryption using Let's Encrypt</a>
|
||||
</li>
|
||||
|
||||
|
||||
</ul>
|
||||
</section>
|
||||
|
||||
|
|
|
@ -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-02-08T17:11:51+00:00</updated>
|
||||
<updated>2016-02-09T07:49:53+00:00</updated>
|
||||
<id>https://home-assistant.io/</id>
|
||||
<author>
|
||||
<name><![CDATA[Paulus Schoutsen]]></name>
|
||||
|
|
|
@ -219,6 +219,12 @@
|
|||
<ul class="divided">
|
||||
|
||||
|
||||
<li class="post">
|
||||
<a href="/blog/2016/02/09/smarter-smart-things-with-mqtt-and-home-assistant/">Smarter SmartThings with MQTT and Home Assistant</a>
|
||||
</li>
|
||||
|
||||
|
||||
|
||||
<li class="post">
|
||||
<a href="/blog/2016/01/30/insteon-lifx-twitter-and-zigbee/">0.12: Insteon, LIFX, Twitter and ZigBee</a>
|
||||
</li>
|
||||
|
@ -242,12 +248,6 @@
|
|||
</li>
|
||||
|
||||
|
||||
|
||||
<li class="post">
|
||||
<a href="/blog/2015/12/13/setup-encryption-using-lets-encrypt/">Set up encryption using Let's Encrypt</a>
|
||||
</li>
|
||||
|
||||
|
||||
</ul>
|
||||
</section>
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue