Config owfs Server for OneWire Binding fails

Hi.
I’m trying to capture my water temperature of the heating boiler.
So i bought some DS18B20 sensors.
These sensors ared connected to a RPi1 right at the GPIO (NOT DS9490R adapter!) port 4.
The whole Openhab system runs on a separate RPi3 and so far everything else works fine.

I installed the OneWire Binding, which expects a owfs server to get the data ready for reading.
So i also installed owfs on the RPi1.
The problem now is, that kinda all tutorials for configuring the DS18B20 expect you to use a DS9490R adapter, and for this all of them say, you have to config owfs to read USB data.
As example i tried this one: https://www.raspberrypi.org/forums/viewtopic.php?t=27379 and like 10 other tutorials, but all seem to do the same.

Still i am connected right to GPIO, so i can see the sensors in /sys/bus/w1/devices and read the data with ‘cat’. Meanwhile owfs sees no devices, as i think it’s still listening on USB port.

Maybe you can help me get the right config, to read the sensors on GPIO.

PS: i wouldn’t ask here, if i had found the answer on the first 5 Google pages :smile:

Please show us your configuration.

As i just followed the tutorial step by step, it is exactly like the one linked.
The only change i made was replacing localhost through 127.0.0.1 as i read this could help.
Spoiler: it didn’t ^^

# 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 = 127.0.0.1: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 = 127.0.0.1:4304

And as the only uncommented device is “usb = all”, i guess this is why owfs does not listen on GPIO, but i could not find out, what i have to enter there for GPIO port

Have you tried sudo openhabian-config tool and allow it to fix permissions, download needed packages, etc…?

openhab-config does not work there, as it is a separate RPi which only rund a headless raspbian and owfs and is only there to be a bridge for reading the sensor data.
openhab itself runs on another system which works so far fine and awaits owserver to get the data ready.

What is your output of

ls /mnt/1wire

/mnt/1wire/ is empty.

Still i got ls /sys/bus/w1/devices
28-0119128a01b4 28-01191ec42232 w1_bus_master1

But owfs cant capture them both

Did you change /etc/fuse.conf to allow

user_allow_other

And what is the start command for owserver ?

user_allow_other

is uncommented

I tried starting same as tutorial:
sudo owfs -C -uall -m /mnt/1wire --allow_other
After a few seconds loading i get no output, but just a regular shell and /mnt/1wire is still empty

Did you check with

http://your-owserver-ip:2121

What is output there

With fake devices active i get a basic WebUI with some data.
With modded config (like the posted above) i cant reach the WebUI at all

Unfortunately, I have an error on my owserver pi, so cannot access it to check.
Please read the following, as I rember to have had issues with the w1 config.
https://sourceforge.net/p/owfs/mailman/owfs-developers/thread/e90fdabf-7882-11f6-a7fa-b1d74829db0b@gmx.de/

1 Like

Not 100% sure but I don‘t think that owfs can deal with sensors attached to rpi gpio pins, it needs a busmaster. There is also a onewire-gpio binding. Probably that would be easier.

I don’t have any experience with OWFS (yet) but I do have a solution to offer. I’ve written a program to allow access to things over MQTT, right now it mostly supports I/O devices on Raspberry Pi including DS18B20 sensors using w1.

See the OneWire Module documentation and let me know if you have any questions.

No, it is running without busmaster here for about a year.
I will post my confing when I can resolv my login error to my heatingPi.

1 Like

Could you please try the following:
change your owfs.conf to

! server: server = localhost:4304
server: w1

Then restart owfs with

sudo owfs --w1

Didn’t now that. I’m wondering why we have a onewiregpio binding then. Would be much easier to have all in one.

@hmerk: tried it.
127.0.0.1 => localhost
server: usb = all => server: w1
then restarted whole RPi system.
/mnt/1wire keeps empty and WebUI is again unreachable.

Guess the owfs system is just not thought to run the sensors without any adapter (which is pretty strange to me, as the adapter does nothing else, than re-locating the GPIO pins).
Think i’ll keep up with reading the sensors through a own script and ssh.

@J-N-K & @CrazyIvan359
thx for your hints, but as already said twice: my sensors are NOT conected to openhab system.
My openhab runs on a separate RPi which is located in another room, and which MUST be located there, as it provides DECT and ZigBee services through hardware.
So GPIO bindings does not really help, as i try to read the sensors through the “non-openhab-installed-raspberry”

@renegade2k MQTTany communicates over MQTT which is a network communication protocol. I wrote it because I needed GPIO control of a remote Pi. I have since added the support for w1 connected devices.

No, it is possible to run the 1wire sensors without any additional busmaster. This is what I use for my heating control.
I actually cannot log into my heatingPi as it throws a bash error and terminates the ssh session.
If I get a chance to switch off my heatingPi over the weekend, I will try to read the card on a different machine and post the config here.

1 Like