Site updated at 2017-10-17 19:34:04 UTC
This commit is contained in:
parent
15a5a011da
commit
e415d863ce
26 changed files with 82 additions and 74 deletions
|
@ -82,22 +82,30 @@
|
|||
<li><a href="https://datasheets.maximintegrated.com/en/ds/DS1822.pdf">DS1822</a></li>
|
||||
<li><a href="https://datasheets.maximintegrated.com/en/ds/DS1825.pdf">DS1825</a></li>
|
||||
<li><a href="https://datasheets.maximintegrated.com/en/ds/DS28EA00.pdf">DS28EA00</a> temperature sensors</li>
|
||||
<li>[DS2406/TAI-8570] (https://datasheets.maximintegrated.com/en/ds/DS2406.pdf) Temperature and pressure sensor made by AAG</li>
|
||||
<li>[DS2438/B1-R1-A] (https://datasheets.maximintegrated.com/en/ds/DS2438.pdf) Temperature, pressure and humidity sensor by AAG</li>
|
||||
<li><a href="https://datasheets.maximintegrated.com/en/ds/DS2406.pdf">DS2406/TAI-8570</a> Temperature and pressure sensor made by AAG</li>
|
||||
<li><a href="https://datasheets.maximintegrated.com/en/ds/DS2438.pdf">DS2438/B1-R1-A</a> Temperature, pressure and humidity sensor by AAG</li>
|
||||
</ul>
|
||||
<p>The 1-Wire bus can be connected directly to the IO pins of Raspberry Pi or using dedicated interface adapter (e.g <a href="https://datasheets.maximintegrated.com/en/ds/DS9490-DS9490R.pdf">DS9490R</a>). When an interface adapter is used, sensors can be accessed on Linux hosts via <a href="http://owfs.org/">owfs 1-Wire file system</a>. When using an interface adapter and the owfs, the ‘mount_dir’ option must be configured to correspond a directory, where owfs device tree has been mounted. If you are using Raspberry Pi and IO pin connected bus setup, don’t use the ‘mount_dir’ option.</p>
|
||||
<p>The 1-Wire bus can be connected directly to the IO pins of Raspberry Pi or using dedicated interface adapter (e.g <a href="https://datasheets.maximintegrated.com/en/ds/DS9490-DS9490R.pdf">DS9490R</a>).</p>
|
||||
<h4>Raspberry Pi setup</h4>
|
||||
<p>In order ot setup 1-Wire support on Raspberry Pi, you’ll need to edit <code class="highlighter-rouge">/boot/config.txt</code> following <a href="https://www.waveshare.com/wiki/Raspberry_Pi_Tutorial_Series:_1-Wire_DS18B20_Sensor#Enable_1-Wire">this documentation</a>. Don’t use the <code class="highlighter-rouge">mount_dir</code> option.</p>
|
||||
<h4>Interface adapter setup</h4>
|
||||
<p>When an interface adapter is used, sensors can be accessed on Linux hosts via <a href="http://owfs.org/">owfs 1-Wire file system</a>. When using an interface adapter and the owfs, the <code class="highlighter-rouge">mount_dir</code> option must be configured to correspond a directory, where owfs device tree has been mounted.</p>
|
||||
<p class="note warning">
|
||||
This component has been modified to work with devices with multiple sensors which will cause a discontinuity in recorded values. Existing devices will receive a new ID and therefore show up as new devices.
|
||||
If you wish to maintain continuity it can be resolved in the database by renaming the old devices to the new names.
|
||||
Connect to your database using the instructions from https://home-assistant.io/docs/backend/database/
|
||||
Check the names of sensors:
|
||||
Connect to your database using the instructions from <a href="https://home-assistant.io/docs/backend/database/">home-assistant.io/docs/backend/database/</a>. Check the names of sensors:
|
||||
<code class="highlighter-rouge">sql
|
||||
SELECT entity_id, COUNT(*) as count FROM states GROUP BY entity_id ORDER BY count DESC LIMIT 10;
|
||||
</code>
|
||||
Alter the names of sensors using the following examples:
|
||||
UPDATE states SET entity_id=’sensor.<sensor_name>_temperature' WHERE entity_id LIKE 'sensor.<sensor_name>%' AND attributes LIKE '%\u00b0C%';
|
||||
UPDATE states SET entity_id='sensor.<sensor_name>_pressure' WHERE entity_id LIKE 'sensor.<sensor_name>%' AND attributes LIKE '%mb%';
|
||||
UPDATE states SET entity_id='sensor.<sensor_name>_humidity' WHERE entity_id LIKE 'sensor.<sensor_name>%' AND attributes LIKE '%%%' ESCAPE '';
|
||||
Remember to replace <sensor_name> with the actual name of the sensor as seen in the SELECT query.
|
||||
</sensor_name></sensor_name></sensor_name></sensor_name></sensor_name></sensor_name></sensor_name></p>
|
||||
<code class="highlighter-rouge">sql
|
||||
UPDATE states SET entity_id='sensor.<sensor_name>_temperature' WHERE entity_id LIKE 'sensor.<sensor_name>%' AND attributes LIKE '%\u00b0C%';
|
||||
UPDATE states SET entity_id='sensor.<sensor_name>_pressure' WHERE entity_id LIKE 'sensor.<sensor_name>%' AND attributes LIKE '%mb%';
|
||||
UPDATE states SET entity_id='sensor.<sensor_name>_humidity' WHERE entity_id LIKE 'sensor.<sensor_name>%' AND attributes LIKE '%%%' ESCAPE '';
|
||||
</code>
|
||||
Remember to replace <code class="highlighter-rouge"><sensor_name></code> with the actual name of the sensor as seen in the <code class="highlighter-rouge">SELECT</code> query.
|
||||
</p>
|
||||
<h4>Home Assistant setup</h4>
|
||||
<p>To enable One wire sensors 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>
|
||||
<span class="s">sensor</span><span class="pi">:</span>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue