12th Anniversary Sale 12% Off in July & August with the voucher code "SUMMER12" *excludes trade customers
Support Forum

Share your projects and post your questions

Register   or   Sign In
The Forum

OWFS Duplicates

The 1 Wire Pi Plus and 1 Wire Pi Zero are a 1 Wire interface for the Raspberry Pi

19/02/2020

Posted by:
hwissing

hwissing Avatar

Hello,

I was sucessful to install OWFS with I2C support according to your Knowledge base tutorial on a Raspi 3b+ equipped with 1wirePiPlus running Buster.

I wonder why there are two busses and all sensors in duplicate.

Any idea?

Do the simultaneous commands work? Is there any documentation for them? I merely found issue blogs.



Regards

hwissng




pi@Raspi3Bp01:~ $ ls /mnt/1wire -l
insgesamt 0
drwxrwxrwx 1 root root 4096 Feb 19 13:20 28.0A35192D1901
drwxrwxrwx 1 root root 4096 Feb 19 13:20 28.0A35192D1901
drwxrwxrwx 1 root root 4096 Feb 19 13:20 28.629B082D1901
drwxrwxrwx 1 root root 4096 Feb 19 13:20 28.629B082D1901
drwxrwxrwx 1 root root 4096 Feb 19 13:20 28.CF52142D1901
drwxrwxrwx 1 root root 4096 Feb 19 13:20 28.CF52142D1901
drwxr-xr-x 1 root root 4096 Feb 19 12:29 alarm
drwxr-xr-x 1 root root 4096 Feb 19 12:29 bus.0
drwxr-xr-x 1 root root 4096 Feb 19 12:29 bus.1
drwxr-xr-x 1 root root 4096 Feb 19 12:29 settings
drwxrwxrwx 1 root root 4096 Feb 19 13:20 simultaneous
drwxr-xr-x 1 root root 4096 Feb 19 12:29 statistics
drwxr-xr-x 1 root root 4096 Feb 19 12:29 structure
drwxr-xr-x 1 root root 4096 Feb 19 12:29 system
drwxr-xr-x 1 root root 4096 Feb 19 12:29 uncached
pi@Raspi3Bp01:~ $

19/02/2020

Posted by:
andrew

andrew Avatar

Location:
United Kingdom

andrew Twitter  andrew Website  

Hello hwissng

Do you have two instances of owfs running? Try rebooting and see if there are still duplicate devices in the folder.

Also, check in the /etc/owfs.conf and make sure there is only one reference to the i2c device.

With regards to simultaneous commands, I don't have any experience using them and the documentation on owfs.org is not very helpful. The only thing I did find was that some devices can support simultaneous temperature conversions, so include the simultaneous directory but nothing on how to actually use it.

25/02/2020

Posted by:
hwissing

hwissing Avatar

Hello,

thank you for the hint. I tried that and different other things, i also removed the installtion and installed it again. But there is still duplicates in the mount folder. Surprisingly not in owfs http.

Any idea?

Regards

H. Wissing

26/02/2020

Posted by:
andrew

andrew Avatar

Location:
United Kingdom

andrew Twitter  andrew Website  

Do you have the DS2482 or the W1 kernel module enabled? I found this post on the owfs SourceForge page where somebody had the same issue and the kernel module was suggested as a possible problem.

I have not encountered this problem before so you may find better help with owfs by opening an issue on their GitHub repository.

04/03/2020

Posted by:
hwissing

hwissing Avatar

Hello,

to evaluate that, I used newly flashed SD-card with Raspbian Buster with desktop Release date:2020-02-13 and installed OWFS step by step not having enabeled the 1-wire interface but the i2c- interface via raspi-config. At the end two folders bus.0 and bus.1 were fond in /mnt/1wire.


pi@raspberrypi:~ $ sudo apt-get install owfs
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following additional packages will be installed:
libow-3.2-3 owfs-common owfs-fuse owftpd owhttpd owserver
Suggested packages:
owfs-doc
The following NEW packages will be installed:
libow-3.2-3 owfs owfs-common owfs-fuse owftpd owhttpd owserver
0 upgraded, 7 newly installed, 0 to remove and 0 not upgraded.
Need to get 424 kB of archives.
After this operation, 1,391 kB of additional disk space will be used.
Do you want to continue? [Y/n] Y
Get:1 http://mirror1.hs-esslingen.de/pub/Mirrors/archive.raspbian.org/raspbian buster/main armhf owfs-common all 3.2p3+dfsg1-2 [17.6 kB]
Get:2 http://mirror1.hs-esslingen.de/pub/Mirrors/archive.raspbian.org/raspbian buster/main armhf libow-3.2-3 armhf 3.2p3+dfsg1-2 [269 kB]
Get:3 http://mirror1.hs-esslingen.de/pub/Mirrors/archive.raspbian.org/raspbian buster/main armhf owfs-fuse armhf 3.2p3+dfsg1-2 [23.4 kB]
Get:4 http://mirror1.hs-esslingen.de/pub/Mirrors/archive.raspbian.org/raspbian buster/main armhf owserver armhf 3.2p3+dfsg1-2 [30.8 kB]
Get:5 http://mirror1.hs-esslingen.de/pub/Mirrors/archive.raspbian.org/raspbian buster/main armhf owhttpd armhf 3.2p3+dfsg1-2 [30.9 kB]
Get:6 http://mirror1.hs-esslingen.de/pub/Mirrors/archive.raspbian.org/raspbian buster/main armhf owftpd armhf 3.2p3+dfsg1-2 [42.8 kB]
Get:7 http://mirror1.hs-esslingen.de/pub/Mirrors/archive.raspbian.org/raspbian buster/main armhf owfs all 3.2p3+dfsg1-2 [9,248 B]
Fetched 424 kB in 2s (230 kB/s)
Selecting previously unselected package owfs-common.
(Reading database ... 93525 files and directories currently installed.)
Preparing to unpack .../0-owfs-common_3.2p3+dfsg1-2_all.deb ...
Unpacking owfs-common (3.2p3+dfsg1-2) ...
Selecting previously unselected package libow-3.2-3:armhf.
Preparing to unpack .../1-libow-3.2-3_3.2p3+dfsg1-2_armhf.deb ...
Unpacking libow-3.2-3:armhf (3.2p3+dfsg1-2) ...
Selecting previously unselected package owfs-fuse.
Preparing to unpack .../2-owfs-fuse_3.2p3+dfsg1-2_armhf.deb ...
Unpacking owfs-fuse (3.2p3+dfsg1-2) ...
Selecting previously unselected package owserver.
Preparing to unpack .../3-owserver_3.2p3+dfsg1-2_armhf.deb ...
Unpacking owserver (3.2p3+dfsg1-2) ...
Selecting previously unselected package owhttpd.
Preparing to unpack .../4-owhttpd_3.2p3+dfsg1-2_armhf.deb ...
Unpacking owhttpd (3.2p3+dfsg1-2) ...
Selecting previously unselected package owftpd.
Preparing to unpack .../5-owftpd_3.2p3+dfsg1-2_armhf.deb ...
Unpacking owftpd (3.2p3+dfsg1-2) ...
Selecting previously unselected package owfs.
Preparing to unpack .../6-owfs_3.2p3+dfsg1-2_all.deb ...
Unpacking owfs (3.2p3+dfsg1-2) ...
Setting up owfs-common (3.2p3+dfsg1-2) ...

Creating config file /etc/owfs.conf with new version
Setting up libow-3.2-3:armhf (3.2p3+dfsg1-2) ...
Setting up owserver (3.2p3+dfsg1-2) ...
Job for owserver.service failed because the service did not take the steps required by its unit configuration.
See "systemctl status owserver.service" and "journalctl -xe" for details.
invoke-rc.d: initscript owserver, action "start" failed.
● owserver.service - Backend server for 1-wire control
Loaded: loaded (/lib/systemd/system/owserver.service; disabled; vendor preset: enabled)
Active: activating (auto-restart) (Result: protocol) since Sat 2020-02-29 18:29:10 CET; 25ms ago
Docs: man:owserver(1)
Process: 1078 ExecStart=/usr/bin/owserver -c /etc/owfs.conf (code=exited, status=0/SUCCESS)
Main PID: 1078 (code=exited, status=0/SUCCESS)
dpkg: error processing package owserver (--configure):
installed owserver package post-installation script subprocess returned error exit status 1
Setting up owftpd (3.2p3+dfsg1-2) ...
Created symlink /etc/systemd/system/multi-user.target.wants/owftpd.service → /lib/systemd/system/owftpd.service.
dpkg: dependency problems prevent configuration of owfs:
owfs depends on owserver (>= 3.2p3+dfsg1-2); however:
Package owserver is not configured yet.

dpkg: error processing package owfs (--configure):
dependency problems - leaving unconfigured
Setting up owfs-fuse (3.2p3+dfsg1-2) ...
Created symlink /etc/systemd/system/multi-user.target.wants/owfs.service → /lib/systemd/system/owfs.service.
Setting up owhttpd (3.2p3+dfsg1-2) ...
Created symlink /etc/systemd/system/multi-user.target.wants/owhttpd.service → /lib/systemd/system/owhttpd.service.
Processing triggers for systemd (241-7~deb10u3+rpi1) ...
Processing triggers for man-db (2.8.5-2) ...
Processing triggers for libc-bin (2.28-10+rpi1) ...
Errors were encountered while processing:
owserver
owfs
E: Sub-process /usr/bin/dpkg returned an error code (1)


the occuring error seems to be due to not having enabeled the 1-wire interface.


pi@raspberrypi:~ $ sudo apt-get install python-ow
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following NEW packages will be installed:
python-ow
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
2 not fully installed or removed.
Need to get 31.4 kB of archives.
After this operation, 117 kB of additional disk space will be used.
Get:1 http://mirror1.hs-esslingen.de/pub/Mirrors/archive.raspbian.org/raspbian buster/main armhf python-ow armhf 3.2p3+dfsg1-2 [31.4 kB]
Fetched 31.4 kB in 0s (70.6 kB/s)
Selecting previously unselected package python-ow.
(Reading database ... 93585 files and directories currently installed.)
Preparing to unpack .../python-ow_3.2p3+dfsg1-2_armhf.deb ...
Unpacking python-ow (3.2p3+dfsg1-2) ...
Setting up owserver (3.2p3+dfsg1-2) ...
Created symlink /etc/systemd/system/multi-user.target.wants/owserver.service → /lib/systemd/system/owserver.service.
Created symlink /etc/systemd/system/sockets.target.wants/owserver.socket → /lib/systemd/system/owserver.socket.
Setting up owfs (3.2p3+dfsg1-2) ...
Setting up python-ow (3.2p3+dfsg1-2) ...



pi@raspberrypi:~ $ sudo apt-get install ow-shell
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following NEW packages will be installed:
ow-shell
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 29.8 kB of archives.
After this operation, 177 kB of additional disk space will be used.
Get:1 http://mirror1.hs-esslingen.de/pub/Mirrors/archive.raspbian.org/raspbian buster/main armhf ow-shell armhf 3.2p3+dfsg1-2 [29.8 kB]
Fetched 29.8 kB in 0s (81.5 kB/s)
Selecting previously unselected package ow-shell.
(Reading database ... 93612 files and directories currently installed.)
Preparing to unpack .../ow-shell_3.2p3+dfsg1-2_armhf.deb ...
Unpacking ow-shell (3.2p3+dfsg1-2) ...
Setting up ow-shell (3.2p3+dfsg1-2) ...
Processing triggers for man-db (2.8.5-2) ...


I repeated the procedure with the SD-card newly flashed after having enabled both the 1-wire interface and i2c- interface via raspi-config and got a working system with two folders bus.0 and bus.1 in /mnt/1wire and all sensors in duplicate.

Hope that helps answering the question "Do you have the DS2482 or the W1 kernel module enabled?"

What to do?

Regards

hwissing

05/03/2020

Posted by:
hwissing

hwissing Avatar

I think this information is needed


pi@raspberrypi:~ $ lsmod
Module Size Used by
rfcomm 49152 4
bnep 20480 2
hci_uart 40960 1
btbcm 16384 1 hci_uart
serdev 20480 1 hci_uart
bluetooth 389120 29 hci_uart,bnep,btbcm,rfcomm
ecdh_generic 28672 1 bluetooth
fuse 110592 3
8021q 32768 0
garp 16384 1 8021q
stp 16384 1 garp
llc 16384 2 garp,stp
brcmfmac 311296 0
brcmutil 16384 1 brcmfmac
sha256_generic 20480 0
cfg80211 647168 1 brcmfmac
rfkill 28672 6 bluetooth,cfg80211
raspberrypi_hwmon 16384 0
v3d 73728 0
gpu_sched 28672 1 v3d
vc4 176128 0
drm_kms_helper 184320 1 vc4
drm 442368 5 v3d,vc4,gpu_sched,drm_kms_helper
drm_panel_orientation_quirks 16384 1 drm
snd_bcm2835 24576 1
snd_soc_core 192512 1 vc4
snd_compress 20480 1 snd_soc_core
snd_pcm_dmaengine 16384 1 snd_soc_core
snd_pcm 102400 4 vc4,snd_pcm_dmaengine,snd_bcm2835,snd_soc_core
snd_timer 32768 1 snd_pcm
syscopyarea 16384 1 drm_kms_helper
sysfillrect 16384 1 drm_kms_helper
sysimgblt 16384 1 drm_kms_helper
fb_sys_fops 16384 1 drm_kms_helper
snd 73728 7 snd_compress,snd_timer,snd_bcm2835,snd_soc_core,snd_pcm
i2c_bcm2835 16384 1
bcm2835_codec 36864 0
bcm2835_v4l2 45056 0
v4l2_mem2mem 24576 1 bcm2835_codec
bcm2835_mmal_vchiq 32768 2 bcm2835_codec,bcm2835_v4l2
v4l2_common 16384 1 bcm2835_v4l2
videobuf2_dma_contig 20480 1 bcm2835_codec
videobuf2_vmalloc 16384 1 bcm2835_v4l2
videobuf2_memops 16384 2 videobuf2_dma_contig,videobuf2_vmalloc
videobuf2_v4l2 24576 3 bcm2835_codec,bcm2835_v4l2,v4l2_mem2mem
videobuf2_common 45056 4 bcm2835_codec,bcm2835_v4l2,v4l2_mem2mem,videobuf2_v4l2
videodev 200704 6 bcm2835_codec,v4l2_common,videobuf2_common,bcm2835_v4l2,v4l2_mem2mem,videobuf2_v4l2
media 36864 3 bcm2835_codec,videodev,v4l2_mem2mem
vc_sm_cma 36864 1 bcm2835_mmal_vchiq
w1_gpio 16384 0
wire 45056 1 w1_gpio
rpivid_mem 16384 0
cn 16384 1 wire
hwmon 16384 2 wire,raspberrypi_hwmon
uio_pdrv_genirq 16384 0
uio 20480 1 uio_pdrv_genirq
i2c_dev 20480 2
ip_tables 24576 0
x_tables 32768 1 ip_tables
ipv6 454656 30
pi@raspberrypi:~ $

05/03/2020

Posted by:
andrew

andrew Avatar

Location:
United Kingdom

andrew Twitter  andrew Website  

Hello hwissing

I tried setting up a new raspbian image and after running through the steps in our owfs tutorial my Raspberry Pi was showing duplicates for each 1 wire device so it appears to be a problem with either the most recent version of Raspbian Linux or owfs.

I have found a possible fix that works on my Raspberry Pi and may work for you.

First, you have to disable 1 Wire in raspi-config under Interfacing Options > P8 1 Wire.

Next, add the ds2482 module into /etc/modules


sudo nano /etc/modules


Add the following to the bottom of the text file:


ds2482


Save and reboot your Raspberry Pi.

Once rebooted owfs should still work but you will still find duplicate devices in the /mnt/1wire folder.

To make it only show one version of each device you need to run the following command.


sudo owfs --w1


After running that command the duplicates should disappear and the remaining devices should work correctly.

You can make the change permanent by adding "owfs --w1" to /etc/rc.local before the last line "exit 0".

At the moment I am not sure why running the owfs --w1 command removes the duplicates but I will do a bit more research and once I understand the problem I will update our owfs tutorial.

08/03/2020

Posted by:
hwissing

hwissing Avatar

Thanks!

It works!

Regards

hwissing

25/04/2020

Posted by:
troxel

troxel Avatar

I had the same issue with multiple device (ds18b20) being listed in the /mnt/1wire directory

I looked at the systemd status for owfs

> systemctl status owfs.service

and noticed the executed command has two -c /etc/owfs.conf. That is:

CGroup: /system.slice/owfs.service
└─4319 /usr/lib/owfs/owfs -c /etc/owfs.conf -c /etc/owfs.conf --allow_other /run/owfs

Not sure why a repeated -c option. Looking at the service unit-file

ExecStart=/usr/bin/owfs -c /etc/owfs.conf --allow_other %t/owfs

Only one listed. I removed the -c option to:

ExecStart=/usr/bin/owfs --allow_other %t/owfs

Restarted and works fine with devices listed once! Yeah. Somewhere an extra -c option is being added upon execution. If someone knows where the -c option is coming from I would be interested to know.

25/04/2020

Posted by:
andrew

andrew Avatar

Location:
United Kingdom

andrew Twitter  andrew Website  

Hello troxel

After doing some research the problem appears to be a bug within owfs.

I tried stopping the owfs service and then started owfs manually with no parameters:


sudo owfs


Looking at the running processes:


ps -aux|grep owf


The following is shown for the owfs process:


root      1481  0.0  0.0  26156   632 ?        Ssl  12:41   0:00 /usr/lib/owfs/owfs -c /etc/owfs.conf


It looks like the "-c /etc/owfs.conf" has been hard-coded into the owfs executable and each time "-c /etc/owfs.conf" is parsed it creates a duplicate set of folders in /mnt/1wire.

I verified the problem by adding an extra "-c /etc/owfs.conf" into the ExecStart line in /lib/systemd/system/owfs.service. After restarting there were three sets of folders in /mnt/1wire.

I couldn't find any reference to "/etc/owfs.conf" in the official owfs GitHub repository so it looks like the bug is in the version of owfs available in the Raspbian apt repository.

I will add a note to our owfs tutorial explaining how to fix the bug using the method you found.

03/04/2022

Posted by:
chris44

chris44 Avatar

Thanks for all the work on this problem, it works a treat.

A bit of futher information, ! had a car system running with python 2 and OW which worked fine, (implemented several years ago) I upgraded to python 3 and pyownet . Tested code with 2 sensors on the bench, it worked find and values shown on GUI. Cloned SD card and tried on car, no values.

Same problem duplicate mnt folders in 1wire.

The amendment worked fine, but when looking at the bench RPi , yes there where duplicate mnt folders but the python codes worked OK and seemed to only read the folders with values in it.

My code generates an error count of missed 1-wire device reads, the bench system ran for 2 days with no errors. Either on RPi reboots, or program restarts .

This may indicate that your 'working' program could stop working if the erroneous folders are read. The SW was the same as cloned the SD card, but the bench system uses a RPi3B and the car a RPi4

03/04/2022

Posted by:
andrew

andrew Avatar

Location:
United Kingdom

andrew Twitter  andrew Website  

Hi Chris

If your setup is working on the bench but not in the car that would suggest that the problem may be hardware related. Was your old python 2 setup using an RPi 4 or an earlier version?

The problem could be caused by noise, either on the power supply to the Pi or being picked up on the 1-wire bus through crosstalk with other cables in the car.

Cars do generate a lot of electrical noise through the ignition and other systems which can cause problems with electronics. You may find that you need to add a power filter onto the power supply for the Raspberry Pi and use a shielded cable for the 1-wire bus.

Sign in to post your reply


Note: documents in Portable Document Format (PDF) require Adobe Acrobat Reader 5.0 or higher to view.
Download Adobe Acrobat Reader or other PDF reading software for your computer or mobile device.