I’ve just bought a USB9097 1-Wire adapter which I want to get working with the Openhab 1-Wire binding. It works on Windows so I now need to climb through a few hoops to get it working on Raspbian.
Getting this working apparently needs OWFS installing on the Pi2, and apparently this relies on something called “fuse.”
I’ve had a google but can’t find anything obvious that explains what needs to be installed, in which order and what commands to use.
Can someone help me with this one - I’ve been in computers all my life, but not Linux / Unix
Thanks
Hi,
you don’t need owfs. You only need owserver and (optional) owhttpd. Then you don’t need fuse.
I have a usb master, the 9097 is a serial bus master via usb and need a different configuration. It should work like this:
Plug in the bus master. Type
cat /var/log/dmesg
So you should see in the output a line like
ch341-uart converter now attached to ttyUSB4
Then configure the /etc/owfs.cfg file like this:
# 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
#timeout_usb = 20
#error_level = 9
#
# Serial port: DS9097
server: device = /dev/ttyUSB4 <--TODO: insert here your correct ttyS1 Port
#
# 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 = localhost:4304
then
service owserver start
Greetings
Dennis
Thanks very much for your reply, I’ll give it a try next week
Have a good weekend!
That worked, thanks very much!.
A couple of points for others following in my footsteps.
- I also opened a port on the firewall to allow local access to OWSERVER by typing
sudo ufw allow 2121/tcp which allowed me to access OWSERVER from my desktop by typing
http://address of machine with owserver on it:2121
This allowed me to find the individual device serial numbers that I needed to add to the items file. - I configured OWSERVER to start on boot with the command
sudo update-rc.d owserver enable
Its been a few weeks now and this has been working flawlessly. thanks again for your help Dennis650!
I was having a similar problem in that I could see the one-wire server on a host Raspberry Pi, but I could not see it from another host running the Openhab server. From the Pi I could see the server using a server address of “localhost” or 127.0.0.1, but not if I used the hostname or the assigned network IP address.
Eventually I “fixed” the problem by changing the following lines in the /etc/owfs.cfg file:
...
#!server: server = localhost:4304
!server: server = *:4304
...
####################### OWSERVER ########################
#server: port = localhost:4304
server: port = *:4304
This seems to fix the port table to accept requests from any IP address.
Listing the ports before the change:
$ sudo lsof -Pnl +M -i4
...snip
owserver 6195 0 7u IPv4 15146 0t0 TCP 127.0.0.1:4304 (LISTEN)
$
Listing the ports after the change and restarting the owserver
$ sudo lsof -Pnl +M -i4
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
...snip
owserver 20459 0 7u IPv4 112454 0t0 TCP *:4304 (LISTEN)
$
Hope this helps someone in the future!