Support Forum

Share your projects and post your questions

Register   or   Sign In
The Forum

OWFS Duplicates

2838 Views - Created 19/02/2020

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 -linsgesamt 0drwxrwxrwx 1 root root 4096 Feb 19 13:20 28.0A35192D1901drwxrwxrwx 1 root root 4096 Feb 19 13:20 28.0A35192D1901drwxrwxrwx 1 root root 4096 Feb 19 13:20 28.629B082D1901drwxrwxrwx 1 root root 4096 Feb 19 13:20 28.629B082D1901drwxrwxrwx 1 root root 4096 Feb 19 13:20 28.CF52142D1901drwxrwxrwx 1 root root 4096 Feb 19 13:20 28.CF52142D1901drwxr-xr-x 1 root root 4096 Feb 19 12:29 alarmdrwxr-xr-x 1 root root 4096 Feb 19 12:29 bus.0drwxr-xr-x 1 root root 4096 Feb 19 12:29 bus.1drwxr-xr-x 1 root root 4096 Feb 19 12:29 settingsdrwxrwxrwx 1 root root 4096 Feb 19 13:20 simultaneousdrwxr-xr-x 1 root root 4096 Feb 19 12:29 statisticsdrwxr-xr-x 1 root root 4096 Feb 19 12:29 structuredrwxr-xr-x 1 root root 4096 Feb 19 12:29 systemdrwxr-xr-x 1 root root 4096 Feb 19 12:29 uncachedpi@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 owfsReading package lists... DoneBuilding dependency tree       Reading state information... DoneThe following additional packages will be installed:  libow-3.2-3 owfs-common owfs-fuse owftpd owhttpd owserverSuggested packages:  owfs-docThe following NEW packages will be installed:  libow-3.2-3 owfs owfs-common owfs-fuse owftpd owhttpd owserver0 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] YGet: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 versionSetting 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 1Setting 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 unconfiguredSetting 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 owfsE: 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-owReading package lists... DoneBuilding dependency tree       Reading state information... DoneThe following NEW packages will be installed:  python-ow0 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-shellReading package lists... DoneBuilding dependency tree       Reading state information... DoneThe following NEW packages will be installed:  ow-shell0 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:~ $ lsmodModule                  Size  Used byrfcomm                 49152  4bnep                   20480  2hci_uart               40960  1btbcm                  16384  1 hci_uartserdev                 20480  1 hci_uartbluetooth             389120  29 hci_uart,bnep,btbcm,rfcommecdh_generic           28672  1 bluetoothfuse                  110592  38021q                  32768  0garp                   16384  1 8021qstp                    16384  1 garpllc                    16384  2 garp,stpbrcmfmac              311296  0brcmutil               16384  1 brcmfmacsha256_generic         20480  0cfg80211              647168  1 brcmfmacrfkill                 28672  6 bluetooth,cfg80211raspberrypi_hwmon      16384  0v3d                    73728  0gpu_sched              28672  1 v3dvc4                   176128  0drm_kms_helper        184320  1 vc4drm                   442368  5 v3d,vc4,gpu_sched,drm_kms_helperdrm_panel_orientation_quirks    16384  1 drmsnd_bcm2835            24576  1snd_soc_core          192512  1 vc4snd_compress           20480  1 snd_soc_coresnd_pcm_dmaengine      16384  1 snd_soc_coresnd_pcm               102400  4 vc4,snd_pcm_dmaengine,snd_bcm2835,snd_soc_coresnd_timer              32768  1 snd_pcmsyscopyarea            16384  1 drm_kms_helpersysfillrect            16384  1 drm_kms_helpersysimgblt              16384  1 drm_kms_helperfb_sys_fops            16384  1 drm_kms_helpersnd                    73728  7 snd_compress,snd_timer,snd_bcm2835,snd_soc_core,snd_pcmi2c_bcm2835            16384  1bcm2835_codec          36864  0bcm2835_v4l2           45056  0v4l2_mem2mem           24576  1 bcm2835_codecbcm2835_mmal_vchiq     32768  2 bcm2835_codec,bcm2835_v4l2v4l2_common            16384  1 bcm2835_v4l2videobuf2_dma_contig    20480  1 bcm2835_codecvideobuf2_vmalloc      16384  1 bcm2835_v4l2videobuf2_memops       16384  2 videobuf2_dma_contig,videobuf2_vmallocvideobuf2_v4l2         24576  3 bcm2835_codec,bcm2835_v4l2,v4l2_mem2memvideobuf2_common       45056  4 bcm2835_codec,bcm2835_v4l2,v4l2_mem2mem,videobuf2_v4l2videodev              200704  6 bcm2835_codec,v4l2_common,videobuf2_common,bcm2835_v4l2,v4l2_mem2mem,videobuf2_v4l2media                  36864  3 bcm2835_codec,videodev,v4l2_mem2memvc_sm_cma              36864  1 bcm2835_mmal_vchiqw1_gpio                16384  0wire                   45056  1 w1_gpiorpivid_mem             16384  0cn                     16384  1 wirehwmon                  16384  2 wire,raspberrypi_hwmonuio_pdrv_genirq        16384  0uio                    20480  1 uio_pdrv_genirqi2c_dev                20480  2ip_tables              24576  0x_tables               32768  1 ip_tablesipv6                  454656  30pi@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.