Site updated at 2017-10-11 11:01:38 UTC

This commit is contained in:
Travis CI 2017-10-11 11:01:38 +00:00
parent 6c5fb23ab4
commit b564690738
30 changed files with 118 additions and 87 deletions

View file

@ -129,25 +129,57 @@
</code></pre>
</div>
<h3><a class="title-link" name="run-your-own" href="#run-your-own"></a> Run your own</h3>
<p>This is the most private option but requires a bit more work. There are multiple free and open-source brokers to pick from: eg. <a href="http://mosquitto.org/">Mosquitto</a>, <a href="http://emqtt.io/">EMQ</a>, or <a href="http://www.mosca.io/">Mosca</a>.</p>
<p>Along with the embedded broker this is the most private option, but it requires a bit more work. There are multiple free and open-source brokers to pick from: eg. <a href="http://mosquitto.org/">Mosquitto</a>, <a href="http://emqtt.io/">EMQ</a>, or <a href="http://www.mosca.io/">Mosca</a>.</p>
<div class="language-yaml highlighter-rouge"><pre class="highlight"><code><span class="c1"># Example configuration.yaml entry</span>
<span class="s">mqtt</span><span class="pi">:</span>
<span class="s">broker</span><span class="pi">:</span> <span class="s">192.168.1.100</span>
</code></pre>
</div>
<p>Configuration variables:</p>
<ul>
<li><strong>broker</strong> (<em>Optional</em>): The IP address or hostname of your MQTT broker, e.g. 192.168.1.32.</li>
<li><strong>port</strong> (<em>Optional</em>): The network port to connect to. Default is 1883.</li>
<li><strong>client_id</strong> (<em>Optional</em>): The client ID that Home Assistant will use. Has to be unique on the server. Default is a randomly generated one.</li>
<li><strong>keepalive</strong> (<em>Optional</em>): The time in seconds between sending keep alive messages for this client. Default is 60.</li>
<li><strong>username</strong> (<em>Optional</em>): The username to use with your MQTT broker.</li>
<li><strong>password</strong> (<em>Optional</em>): The corresponding password for the username to use with your MQTT broker.</li>
<li><strong>protocol</strong> (<em>Optional</em>): Protocol to use: 3.1 or 3.1.1. By default it connects with 3.1.1 and falls back to 3.1 if server does not support 3.1.1.</li>
<li><strong>certificate</strong> (<em>Optional</em>): Path to the certificate file, eg. <code class="highlighter-rouge">/home/user/.homeassistant/server.crt</code>.</li>
<li><strong>tls_insecure</strong> (<em>Optional</em>): Set the verification of the server hostname in the server certificate.</li>
<li><strong>tls_version</strong> (<em>Optional</em>): TLS/SSL protocol version to use. Available options are: <code class="highlighter-rouge">auto</code>, <code class="highlighter-rouge">1.0</code>, <code class="highlighter-rouge">1.1</code>, <code class="highlighter-rouge">1.2</code>. Defaults to <code class="highlighter-rouge">auto</code>.</li>
</ul>
<div class="config-vars">
<h3><a class="title-link" name="configuration-variables" href="#configuration-variables"></a> Configuration Variables</h3>
<dl class="">
<dt><a class="title-link" name="broker" href="#broker"></a> broker</dt>
<dd>
<p class="desc"><span class="type">(<span class="string">string</span>)</span><span class="required">(Optional)</span><span class="description">The IP address or hostname of your MQTT broker, e.g. 192.168.1.32.</span></p>
</dd>
<dt><a class="title-link" name="port" href="#port"></a> port</dt>
<dd>
<p class="desc"><span class="type">(<span class="int">int</span>)</span><span class="required">(Optional)</span><span class="description">The network port to connect to. Default is 1883.</span></p>
</dd>
<dt><a class="title-link" name="client_id" href="#client_id"></a> client_id</dt>
<dd>
<p class="desc"><span class="type">(<span class="string">string</span>)</span><span class="required">(Optional)</span><span class="description">The client ID that Home Assistant will use. Has to be unique on the server. Default is a randomly generated one.</span></p>
</dd>
<dt><a class="title-link" name="keepalive" href="#keepalive"></a> keepalive</dt>
<dd>
<p class="desc"><span class="type">(<span class="int">int</span>)</span><span class="required">(Optional)</span><span class="description">The time in seconds between sending keep alive messages for this client. Default is 60.</span></p>
</dd>
<dt><a class="title-link" name="username" href="#username"></a> username</dt>
<dd>
<p class="desc"><span class="type">(<span class="string">string</span>)</span><span class="required">(Optional)</span><span class="description">The username to use with your MQTT broker.</span></p>
</dd>
<dt><a class="title-link" name="password" href="#password"></a> password</dt>
<dd>
<p class="desc"><span class="type">(<span class="string">string</span>)</span><span class="required">(Optional)</span><span class="description">The corresponding password for the username to use with your MQTT broker.</span></p>
</dd>
<dt><a class="title-link" name="protocol" href="#protocol"></a> protocol</dt>
<dd>
<p class="desc"><span class="type">(<span class="string">string</span>)</span><span class="required">(Optional)</span><span class="description">Protocol to use: 3.1 or 3.1.1. By default it connects with 3.1.1 and falls back to 3.1 if server does not support 3.1.1.</span></p>
</dd>
<dt><a class="title-link" name="certificate" href="#certificate"></a> certificate</dt>
<dd>
<p class="desc"><span class="type">(<span class="string">string</span>)</span><span class="required">(Optional)</span><span class="description">Path to the certificate file, eg. <code class="highlighter-rouge">/home/user/.homeassistant/server.crt</code>.</span></p>
</dd>
<dt><a class="title-link" name="tls_insecure" href="#tls_insecure"></a> tls_insecure</dt>
<dd>
<p class="desc"><span class="type">(<span class="boolean">boolean</span>)</span><span class="required">(Optional)</span><span class="description">Set the verification of the server hostname in the server certificate.</span></p>
</dd>
<dt><a class="title-link" name="tls_version" href="#tls_version"></a> tls_version</dt>
<dd>
<p class="desc"><span class="type">(<span class="string">string</span>)</span><span class="required">(Optional)</span><span class="description">TLS/SSL protocol version to use. Available options are: <code class="highlighter-rouge">auto</code>, <code class="highlighter-rouge">1.0</code>, <code class="highlighter-rouge">1.1</code>, <code class="highlighter-rouge">1.2</code>. Defaults to <code class="highlighter-rouge">auto</code>.</span></p>
</dd>
</dl>
</div>
<p class="note warning">
There is an issue with the Mosquitto package included in Ubuntu 14.04 LTS. Specify <code class="highlighter-rouge">protocol: 3.1</code> in your MQTT configuration to work around this issue.
If you get this error <code class="highlighter-rouge">AttributeError: module 'ssl' has no attribute 'PROTOCOL_TLS'</code> then you need to set <code class="highlighter-rouge">tls_version: 1.2</code>.