Connect more than one onewire bus

Hi,
is it possible to connect more than one onewire bus to openhab? I needed to divide my onewire because of massive instability. Now, I have two onewires, I don’t know how to configure openhab to listen also on the second bus. Please advice. I really hope there is a solution!

I use OH 1.8.3 and are speaking about this binding (https://github.com/openhab/openhab/wiki/One-Wire-Binding)

Greetings,
Michael

Owserver can handle multiple 1-wire buses. As long as you add the device to your owfs.conf. You should then see bus.0 and bus.1 in the owfs. Owserver feeds all of the 1-wire stuff to openhab, so just add the device address to your openHAB items as required.

@g_g_rich Thanks for your reply. Are you talking about OH2? I don’t find a possibility in OH 1.8.3 to define more than one 1wire bus or do you think I can confige my openhab.cfg like this:

onewire1:ip=192.168.0.1
onewire2:ip=192.168.0.2

I cant find this option in the wiki, but its easy to try.

I am using the PoKeys 57E for one-wire, it lets you have up to 55 one-wire buses and you can talk to OpenHab with Modbus or HTTP.

Doesn’t seem to work, as I get lots of

2016-06-03 18:37:35.041 [WARN ] [o.o.b.o.i.c.OneWireConnection ] - Couldn’t connect to owserver because of missing connection parameters [IP ‘null’ Port ‘4304’].
2016-06-03 18:37:35.041 [WARN ] [o.o.b.o.i.c.OneWireConnection ] - Couldn’t connect to owserver because of missing connection parameters [IP ‘null’ Port ‘4304’].
2016-06-03 18:37:38.041 [WARN ] [o.o.b.o.i.c.OneWireConnection ] - Couldn’t connect to owserver because of missing connection parameters [IP ‘null’ Port ‘4304’].
2016-06-03 18:37:38.041 [WARN ] [o.o.b.o.i.c.OneWireConnection ] - Couldn’t connect to owserver because of missing connection parameters [IP ‘null’ Port ‘4304’].
2016-06-03 18:37:41.026 [WARN ] [o.o.b.o.i.c.OneWireConnection ] - Couldn’t connect to owserver because of missing connection parameters [IP ‘null’ Port ‘4304’].
2016-06-03 18:37:41.038 [WARN ] [o.o.b.o.i.c.OneWireConnection ] - Couldn’t connect to owserver because of missing connection parameters [IP ‘null’ Port ‘4304’].
2016-06-03 18:37:41.038 [WARN ] [o.o.b.o.i.c.OneWireConnection ] - Couldn’t connect to owserver because of missing connection parameters [IP ‘null’ Port ‘4304’].
2016-06-03 18:37:41.038 [WARN ] [o.o.b.o.i.c.OneWireConnection ] - Couldn’t connect to owserver because of missing connection parameters [IP ‘null’ Port ‘4304’].
2016-06-03 18:37:41.038 [WARN ] [o.o.b.o.i.c.OneWireConnection ] - Couldn’t connect to owserver because of missing connection parameters [IP ‘null’ Port ‘4304’].
2016-06-03 18:37:41.038 [WARN ] [o.o.b.o.i.c.OneWireConnection ] - Couldn’t connect to owserver because of missing connection parameters [IP ‘null’ Port ‘4304’].

No idea, how this could work to connect more than one bus.

@sipvoip As I tried to explain, I have now two raspberries, which control my 1wires. Therefore I have two IP-ednpoints, which I want to connect to openhab.

Right, you just mentioned you were having stability issues so I was suggesting a low cost device that lets every sensor have its own pin.

I didn’t know this device before. But unfortunately it won’t work for me, as my bus is a straight line throu my house. It’s not organized like a star, where all 1wire devices terminate at one location.
I hope, I can get stability in shorten the bus length, that’s why I have now two buses.

I’m struggling with the same issue. I have two Raspberry Pi’s, each with a 1w bus.

As far as I can see the onewire binding doesn’t support it, but the owserver binding does.

I realize it’s been several months, but I wanted to post this here in case anyone else stumbles across it. You can work around this issue by setting up one OWFS bus to be a slave of another bus.

On the slave Raspberry Pi’s, edit the bottom of the file ‘/etc/owfs.conf’ so it looks like this (make sure it does not contain localhost):
server: port = 192.168.10.100:4304

And on the master Raspberry Pi, add the following line to ‘/etc/owfs.conf’:
server: server = 192.168.10.100:4304

Make sure you change the IP addresses or port numbers as appropriate.

Edit: added correct file paths

I followed the approach with editing the ‘/etc/owfs.conf’ and I’m somehow lost :weary:

My setup:

  • Odroid C2 that is running as openHAB server and that has DS9490r + OWFS installed
  • Raspberry PI Zero that has a second DS9490r + OWFS installed

Now I want that the OWFS on the PI acts as a slave of the OWFS on the Odroid.

Config Odroid:

# Sample configuration file for the OWFS suite for Debian GNU/Linux.
#
#
# This is the main OWFS configuration file. You should read the
# owfs.conf(5) manual page in order to understand the options listed
# here.

######################## SOURCES ########################
#
# With this setup, any client (but owserver) uses owserver on the
# local machine...
! server: server = localhost:4304
#
# ...and owserver uses the real hardware, by default fake devices
# This part must be changed on real installation
#server: FAKE = DS18S20,DS2405
#
# USB device: DS9490
server: usb = all
#
# Serial port: DS9097
#server: device = /dev/ttyS1
#
# owserver tcp address
#server: server = 192.168.10.1:3131
#
# random simulated device
#server: FAKE = DS18S20,DS2405
#
######################### OWFS ##########################
#
mountpoint = /mnt/1wire
allow_other
#
####################### OWHTTPD #########################
http: port = 2121
####################### OWFTPD ##########################
#ftp: port = 2120
####################### OWSERVER ########################
server:port=4304
server: server = 192.168.178.29:4304

Config Rasberry PI Zero:

# Sample configuration file for the OWFS suite for Debian GNU/Linux.
#
#
# This is the main OWFS configuration file. You should read the
# owfs.conf(5) manual page in order to understand the options listed
# here.

######################## SOURCES ########################
#
# With this setup, any client (but owserver) uses owserver on the
# local machine...
#!server: server = localhost:4304
#
# ...and owserver uses the real hardware, by default fake devices
# This part must be changed on real installation
#server: FAKE = DS18S20,DS2405
#
# USB device: DS9490
server: usb = all
#server: usb = scan
#
# Serial port: DS9097
#server: device = /dev/ttyS1
#
# owserver tcp address
#server: server = 192.168.10.1:3131
#
# random simulated device
#server: FAKE = DS18S20,DS2405
#
######################### OWFS ##########################
#
owfs:mountpoint = /mnt/1wire
owfs:allow_other
#
####################### OWHTTPD #########################
http: port = 2121
####################### OWFTPD ##########################
#ftp: port = 2120
####################### OWSERVER ########################
server: port = 192.168.178.29:4304
#server: port = 4304

If I type ‘owdir’ on my Odroid, I only get the locally connected 1-wire slaves and it only shows me ‘/bus.0’. How can I access / see the 1-wire slaves connected to my Raspi using the Odroid? What did do wrong in the config?

Cheers
Markus

Is it possible to identify devices using the corresponding port on a RPi for example?
I’d like to get informed about the physical location of an iButton, this could only be achieved using multple devices / busses.

Well, I can identify the devices I connected to the RPi - if I type “owdir” on the Pi, I see the devices connected there, if I type “owdir” on the Odroid I get the devices connected to the Odroid.

My target is to get all the devices somehow into openHAB that is running on the Odroid and my only idea to get there is Amy’s method by letting one Owfs be the slave of the other.

We both want to “scan” multiple busses for specific devices, but the difference between our applications seems to be that I don’t care about the bus itself.
For your application I could imagine multiple grouped variables in the item file that contain the bus information. In your rule you try to communicate with each of of them - if communication is succesfull, you know where your iButton is connected.

However, that’s the second step - first of all we seem to have the same problem …

1 Like