One wire Sensor
The onewire
platform supports sensors which are using the One wire (1-wire) bus for communication.
Supported devices:
- DS18B20
- DS18S20
- DS1822
- DS1825
- DS28EA00 temperature sensors
- [DS2406/TAI-8570] (https://datasheets.maximintegrated.com/en/ds/DS2406.pdf) Temperature and pressure sensor made by AAG
- [DS2438/B1-R1-A] (https://datasheets.maximintegrated.com/en/ds/DS2438.pdf) Temperature, pressure and humidity sensor by AAG
The 1-Wire bus can be connected directly to the IO pins of Raspberry Pi or using dedicated interface adapter (e.g DS9490R). When an interface adapter is used, sensors can be accessed on Linux hosts via owfs 1-Wire file system. 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.
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:
SELECT entity_id, COUNT(*) as count FROM states GROUP BY entity_id ORDER BY count DESC LIMIT 10;
Alter the names of sensors using the following examples:
UPDATE states SET entity_id=’sensor.
To enable One wire sensors in your installation, add the following to your configuration.yaml
file:
# Example configuration.yaml entry
sensor:
- platform: onewire
names:
some_id: your name
Configuration variables:
- names array (Optional): ID and friendly name of your sensors.
- mount_dir (Optional): Location of device tree if owfs driver used.