Working with 1-Wire temperature sensors in Home Assistant Core

To work with DS18B20 1-Wire temperature sensors in Home Assistant Core, there is a standard "1-Wire" add-on that can be installed through the Home Assistant web interface. When configuring the 1-Wire add-on, two options for working with the 1-Wire bus will be offered:

  • OWServer
  • SysBus

< span style="color: rgb(192, 80, 77);">The SysBus option is not recommended as SysBus support will be removed starting with Home Assistant Core 2022.6.

See more documentation: 1-Wire - Home Assistant

To use OWServer on a controller, you must install and configure the owserver service.

Installing OWServer

To install the owserver service, just run the command:

sudo apt install owserver

Configuring OWServer

By default, the owserver service starts with test "fake" 1-Wire devices that you need to disable and enable the ability to work with 1-Wire sensors connected to the processor GPIO.

Open the configuration file /etc /owfs.conf

sudo nano /etc/owfs.conf

Find and comment out the line:

...
#server: FAKE = DS18S20,DS2405
...

Add the line to the file:

server: w1

Now the lines in the configuration file should be:

... server: w1 server:port=localhost:4304 ...

Restart the owserver service:

sudo systemctl restart owserver.service

Setting up the 1-Wire add-on in Home Assistant

When setting up the 1-Wire add-on in Home Assistant, select the OWServer option and leave the default server settings:

  • Server: localhost
  • Port: 4304

After installing the 1-Wire add-on, the temperature sensors connected to the controller should appear in the list of Home Assistant devices.