Connecting to One-wire devices

I am running Home Assistant on a Raspbery Pi 4B. I have plugged into the Pi a board called “1 Wire Pi Zero” from abelectronics.co.uk. This plugs into the 40 pin header. It seems to be a One-wire to I2C interface. If this is correct, how do I get Home Assistant to connect to this and the one-wire devices (mostly DS18B20 chips) connected to it? According to a document on the ABelectronics website there is no way to install OWFS (which it seems to need) on a Pi running HAOS - you have to install HA in Docker. Is this still correct? Do I have to reinstall it in Docker? Are there any disadvantages (i.e. things I won’t be able to do) if HA is installed in Docker? Any other advice on how to get this working?

Thank you - Rowan

Unless you use the “Core” installation method, HA always runs inside a docker container.
I guess you need an addon, here. I have no clue if one exists for “OWFS”

Maybe this

I know nothing about so can’t help more than pointing to this page.

I have HA installed on a Raspberry Pi 4B. I want to connect a number of 1-wire devices (mostly DS18B20 temperature sensors). I have a 1-wire interface made by abelectronics (based on the DS2482 1-wire to I2C chip) plugged into my RPi, and my 1-wire network plugged into it. When I try to add the 1-wire integration to my system, it says “failed to connect”. How do I find out what is wrong?
Is this integration designed to work via I2C, or via a GPIO pin, or via a DS9490R?
If it’s designed to work with I2C, on which pins?
Do I have to install OWFS and/or OWSERVER first? If so, how do I do this?
Do I have to have some 1-wire devices correctly attached to the interface for the integration to proceed, or should it proceed even if I have no 1-wire devices connected?

Thank you - Rowan

1 Like

hi, also curious if I can work this out Rowan.

I only just set up HA a week ago, so early days, and not worth waitign for me to figure it out. But I have implemented on ESP8266 in “C” and also used the rasperry pi driver to read strings of these 1wd sensors and then log the values, so it “should” be a doddle if one can write a add-on, because the HA core will not have the PiOS drivers for 1WD devices, so we will need a way to install those and then, since it’s a commandline utility to read the datas, something has to call that tool via shell script to read the DS18B values. But pretty sure that someone has already written such an add-on?

Is the HA 1-wire integration meant to work with 1-wire connected via I2C, or via a DS9490R, or just to a GPIO (if so, which one?), or some other how?

Thank you - Rowan

I have just done something like this and I managed to get 3 ds18b20 to work.
I’m running a “Supervised HA” install (you have to look in the install docs how to do it) not HAOS

So, there are few things you need to do to have it running:

  1. Enable the 1-wire interface to load the overlay with the right modules (do it from raspi-config or from “menu”->“Preferences”->“Raspberry Pi configuration” in the “Interfaces” tab

  2. install “owfs” (the 1-wire integration needs this):sudo apt-get install owfs ow-shell . edit the ```/etc/owfs.conf```` to contain the following lines only:

! server: server = localhost:4304
mountpoint = /mnt/1wire
allow_other
http: port = 2121
ftp: port = 2120
server: w1

and create the /mnt/1wire directory sudo mkdir /mnt/1wire

  1. configure “fuse” to include this option: user_allow_other in /etc/fuse.conf

  2. shutdown the raspberry pi and remove power

  3. connect your sensors to the GND, 3.3V and GPIO4(for data) pins and add a 4.7k resistor between 3.3V and GPIO4

  4. start raspberry pi

  5. install the 1-wire integration

you should have all your 1-wire listed listed in the integration

1 Like