1Wire COMMUNICATION_ERROR - can't configure OWFS

  • Platform information:
    • Hardware: Raspberry PI 3B
    • OS: openhabian
    • openHAB version: 2.4.0-1

I’m trying to use new onewire binding based on OWFS.
Unfortunately, I get errors in log and my OW Server has status: OFFLINE - COMMUNICATION_ERROR

I get this entries all the time:

2019-04-05 23:16:54.872 [hingStatusInfoChangedEvent] - ‘onewire:owserver:27dbecfc’ changed from OFFLINE (COMMUNICATION_ERROR) to ONLINE

2019-04-05 23:16:54.891 [hingStatusInfoChangedEvent] - ‘onewire:owserver:27dbecfc’ changed from ONLINE to OFFLINE (COMMUNICATION_ERROR)

What have I done so far:
using raspi-config I’ve enabled 1-Wire and I2C
using openhabian-config I’ve installed owserver.

This is content of my /etc/owfs.conf:

I have two DS18B20 connected to GND, 3.3V and GPIO4 (I’ve added 4,7k resisor between 3.3V and GPIO4)

And this is how my Thing config looks like:

I’m not sure what lines I should change in owfs.conf.
I’m not using any USB device for 1-Wire devices, but as I understand correctly I can use Raspberry PI .

Do I must change something in Rapberry PI?

Can you reach the owhttpd?

Sorry for maybe a dumb question but how to check that?

I’ve just tried sudo service owserver status and got this:

● owserver.service - LSB: 1-wire TCP server
Loaded: loaded (/etc/init.d/owserver; generated; vendor preset: enabled)
Active: active (exited) since Fri 2019-04-05 23:44:33 CEST; 6min ago
Docs: man:systemd-sysv-generator(8)
Process: 1115 ExecStop=/etc/init.d/owserver stop (code=exited, status=0/SUCCESS)
Process: 1123 ExecStart=/etc/init.d/owserver start (code=exited, status=0/SUCCESS)
CGroup: /system.slice/owserver.service

Apr 05 23:44:31 openHABianPi systemd[1]: Starting LSB: 1-wire TCP server…
Apr 05 23:44:31 openHABianPi OWFS[1129]: DEFAULT: ow_daemon.c:(144) Entered background mode, quitting.
Apr 05 23:44:31 openHABianPi OWFS[1129]: DEFAULT: owlib.c:(52) No valid 1-wire buses found
Apr 05 23:44:33 openHABianPi owserver[1123]: Starting 1-Wire TCP Server: owserver failed!
Apr 05 23:44:33 openHABianPi systemd[1]: Started LSB: 1-wire TCP server.

EDIT:
after doing ‘sudo service owhttpd status’ I get this error:

Unit owhttpd.service could not be found.

I don’t understand. Shouldn’t it get installed with sudo openhabian-config?

When I try to reinstall 1wire I get this:

ow-shell is already the newest version (3.1p5-1).
owserver is already the newest version (3.1p5-1).
usbutils is already the newest version (1:007-4).

nothing about owhttpd :confused:

I’ve verified that my PI has connected two DS18B20 sensors by going to /sys/bus/w1/devices.
When I list folders I get this:

28-01186dcdaaff 28-01186e0b6aff w1_bus_master1

Not sure. But look at the owserver log: no bus found. You have to configure a bushmaster.

@J-N-K sorry for another silly question, but how to do that?
I don’t want to use USB device ot another server. I have DS18B20 connected directly to Raspberry PI 3B.

You can’t use owfs then. OWFS needs a busmaster. You could try the onewire-gpio binding.

That’s what I thought :confused:
Openhabian-config tool is quite confusing. There should be an option to install/configure raspberry to support 1wire via gpio (without installs owfs) and another for owfs.
I’d like to ask also for clarification in docs, because now it is confusing. I thought I should use newest binding, but I lost two evenings because I picked the wrong binding :frowning:

Both bindings are at the same version. Onewire GPIO binding documentation is quite clear:

This binding reads temperature values from OneWire bus sensors connected to the GPIO bus on Raspberry PI

I’ll add a note to the Onewire binding to make it more clear.

1 Like

I’ve searched a bit more and found this question on StackOwerflow: https://raspberrypi.stackexchange.com/questions/37070/problems-with-owfs-over-the-w1-kernel-module
From this I understand that OWFS can handle w1 kernel busmaster (see https://github.com/owfs/owfs/releases/tag/v3.1p1)

Anyone else was able to use OWFS with GPIO?

From my understanding by default OWFS expose two fake devices:

server: FAKE = DS18S20,DS2405

in my case, the problem is the communication between owserver and openHAB.
As I wrote I’m using openHAB 2.4.
With fake server I don’t need real devices, so I should be able to check everything.