Site updated at 2018-02-13 21:23:20 UTC

This commit is contained in:
Travis CI 2018-02-13 21:23:21 +00:00
parent 923592f57d
commit d81f5bb37b
27 changed files with 76 additions and 83 deletions

View file

@ -92,9 +92,11 @@
</ul>
</li>
<li><strong>invert_logic</strong> (<em>Optional</em>): If true, inverts the output logic to ACTIVE LOW. Default is false (ACTIVE HIGH).</li>
<li><strong>shared_gpio</strong> (<em>Optional</em>): If true, forces a GPIO.setup() before each write. Default is false.</li>
</ul>
<p>For more details about the GPIO layout, visit the Wikipedia <a href="https://en.wikipedia.org/wiki/Raspberry_Pi#GPIO_connector">article</a> about the Raspberry Pi.</p>
<p class="note warning">
Note that a pin managed by HASS is expected to be exclusive to HASS.
</p>
<p>A common question is what does Port refer to, this number is the actual GPIO # not the pin #.
For example, if you have a relay connected to pin 11 its GPIO # is 17.</p>
<div class="language-yaml highlighter-rouge"><pre class="highlight"><code><span class="c1"># Example configuration.yaml entry</span>
@ -104,16 +106,6 @@ For example, if you have a relay connected to pin 11 its GPIO # is 17.</p>
<span class="s">17</span><span class="pi">:</span> <span class="s">Speaker Relay</span>
</code></pre>
</div>
<p>In case you have any other python scripts running that use RPi.GPIO no values will be written after the initial HASS-start.
Setting <strong>shared_gpio</strong> to true will reinit the pin before each write, working around this issue.</p>
<div class="language-yaml highlighter-rouge"><pre class="highlight"><code><span class="c1"># Example configuration.yaml entry</span>
<span class="s">switch</span><span class="pi">:</span>
<span class="pi">-</span> <span class="s">platform</span><span class="pi">:</span> <span class="s">rpi_gpio</span>
<span class="s">shared_gpio</span><span class="pi">:</span> <span class="s">true</span>
<span class="s">ports</span><span class="pi">:</span>
<span class="s">19</span><span class="pi">:</span> <span class="s">LED-Red</span>
</code></pre>
</div>
</article>
</div>
<aside id="sidebar" class="grid__item one-third lap-one-whole palm-one-whole">