Site updated at 2018-01-27 05:27:50 UTC
This commit is contained in:
parent
0e5bccf933
commit
d499361ff7
853 changed files with 12458 additions and 2552 deletions
|
@ -74,7 +74,20 @@
|
|||
</h1>
|
||||
</header>
|
||||
<hr class="divider">
|
||||
<p>The <code class="highlighter-rouge">miflora</code> sensor platform allows one to monitor to plants. The <a href="https://xiaomi-mi.com/sockets-and-sensors/xiaomi-huahuacaocao-flower-care-smart-monitor/">Mi Flora plant sensor</a> is a small Bluetooth Low Energy device that monitors not only the moisture, but also light, temperature and conductivity. As only a single BLE device can be polled at the same time, the library implements locking to make sure this is the case.</p>
|
||||
<p>The <code class="highlighter-rouge">miflora</code> sensor platform allows one to monitor plants. The <a href="https://xiaomi-mi.com/sockets-and-sensors/xiaomi-huahuacaocao-flower-care-smart-monitor/">Mi Flora plant sensor</a> is a small Bluetooth Low Energy device that monitors not only the moisture but also light, temperature, and conductivity. As only a single BLE device can be polled at the same time, the library implements locking to make sure this is the case.</p>
|
||||
<h1>Installation</h1>
|
||||
<p>Depending on the operating system you’re running, you have to configure the proper Bluetooth backend on your system:</p>
|
||||
<ul>
|
||||
<li>On <a href="https://home-assistant.io/hassio/installation/">Hass.io</a>: Miflora will work out of the box.</li>
|
||||
<li>On other Linux systems:
|
||||
<ul>
|
||||
<li>Prefered solution: Install the <code class="highlighter-rouge">bluepy</code> library (via pip). When using a virtual environment, make sure to use install the library in the right one.
|
||||
- Fallback solution: Install <code class="highlighter-rouge">gatttool</code> via your package manager. Depending on the distribution, the package name might be: <code class="highlighter-rouge">bluez</code>, <code class="highlighter-rouge">bluetooth</code>, <code class="highlighter-rouge">bluez-deprecated</code></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>Windows and MacOS are currently not supported by the <a href="https://github.com/open-homeautomation/miflora/">miflora library</a>.</li>
|
||||
</ul>
|
||||
<h1>Configuration</h1>
|
||||
<p>Start a scan to determine the MAC addresses of the sensor:</p>
|
||||
<div class="language-bash highlighter-rouge"><pre class="highlight"><code><span class="gp">$ </span>sudo hcitool lescan
|
||||
LE Scan ...
|
||||
|
@ -83,6 +96,14 @@ C4:D3:8C:12:4C:57 Flower mate
|
|||
<span class="o">[</span>...]
|
||||
</code></pre>
|
||||
</div>
|
||||
<p>Or if your distribution is using bluetoothctl:</p>
|
||||
<div class="language-bash highlighter-rouge"><pre class="highlight"><code><span class="gp">$ </span>bluetoothctl
|
||||
<span class="gp">[bluetooth]# </span>scan on
|
||||
<span class="o">[</span>NEW] Controller <your Bluetooth adapter> <span class="o">[</span>default]
|
||||
<span class="o">[</span>NEW] F8:04:33:AF:AB:A2 <span class="o">[</span>TV] UE48JU6580
|
||||
<span class="o">[</span>NEW] C4:D3:8C:12:4C:57 Flower mate
|
||||
</code></pre>
|
||||
</div>
|
||||
<p>Check for <code class="highlighter-rouge">Flower care</code> or <code class="highlighter-rouge">Flower mate</code> entries, those are your sensor.</p>
|
||||
<p>To use your Mi Flora plant sensor in your installation, add the following to your <code class="highlighter-rouge">configuration.yaml</code> file:</p>
|
||||
<div class="language-yaml highlighter-rouge"><pre class="highlight"><code><span class="c1"># Example configuration.yaml entry</span>
|
||||
|
@ -114,7 +135,7 @@ C4:D3:8C:12:4C:57 Flower mate
|
|||
</ul>
|
||||
<p>Note that by default the sensor is only polled once every 15 minutes. This means with the <code class="highlighter-rouge">median: 3</code> setting will take as least 30 minutes before the sensor will report a value after a Home Assistant restart. As the values usually change very slowly, this isn’t a big problem.
|
||||
Reducing polling intervals will have a negative effect on the battery life.</p>
|
||||
<p>A full configuration example could looks the one below:</p>
|
||||
<p>A full configuration example could look like the one below:</p>
|
||||
<div class="language-yaml highlighter-rouge"><pre class="highlight"><code><span class="c1"># Example configuration.yaml entry</span>
|
||||
<span class="s">sensor</span><span class="pi">:</span>
|
||||
<span class="pi">-</span> <span class="s">platform</span><span class="pi">:</span> <span class="s">miflora</span>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue