I need to connect to some DS18B20 OneWire temperature sensors from my new OpenHAB system (on Raspberry Pi). I plan to do this using a DS9490R. What software do I need to install? Do I need OWFS, or just OWSERVER? Can this run on the same RPi as OH, or do I need a different one? As step-by step guide on how to get from my virgin OH system to beaing able to read temperatures from the DS18b20s would be really helpful for me.
How many sensors do you have, and how close are they all to your Pi?
Iāve deployed many of these sensors by attaching them to an NodeMCU clone flashed with Tasmota, and then grabbing the data into openHAB via MQTT. All over wi-fi, so the sensors are far away from the openHAB machine. Thereās quite a few steps involved with this setup, so it would be good to understand a little more on your physical arrangement!
I will eventually have 13 sensors. They will be placed throughout the house (one in each room that I need to control the heating in). The house is about 20m long, so the OneWire cable will be longer than this having snaked around all the locations that need a sensor.
I have tried to install OWFS. Hereās a section of the log:
Creating config file /etc/owfs.conf with new version
Setting up libow-3.2-4:arm64 (3.2p4+dfsg1-4+b1) ā¦
Setting up owhttpd (3.2p4+dfsg1-4+b1) ā¦
Created symlink /etc/systemd/system/multi-user.target.wants/owhttpd.service ā /lib/systemd/system/owhttpd.service.
Job for owhttpd.service failed because the control process exited with error code.
See āsystemctl status owhttpd.serviceā and ājournalctl -xeā for details.
Setting up owserver (3.2p4+dfsg1-4+b1) ā¦
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.
Job failed. See ājournalctl -xeā for details.
Processing triggers for libc-bin (2.31-13+rpt2+rpi1+deb11u2) ā¦
Processing triggers for man-db (2.9.4-2) ā¦
Updating FireMotD available updates count ā¦
Does the ājob failedā message matter? If so, how do I fix this?
If the installation is OK, what do I have to do next to read temperatures from my DS18B20 sensor?
If I connect to http://openhabian:8080, I see a page saying " Overview Page Not Configured Yet". The documentation tells me to click the Settings item in the menu, but when I do this nothing at all happens. Not sure how to proceed.
If I enter the command line āsudo /opt/owfs/bin/owfs -F --allow_other /dev/ttyS0 /var/1Wire/mntā as recommended on Testing - owfs, I get ā-bash: /usr/bin/sudo: Input/output errorā. How do I find out what is wrong and fix it?
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 003: ID 04fa:2490 Dallas Semiconductor DS1490F 2-in-1 Fob, 1-Wire adapter
Bus 001 Device 002: ID 2109:3431 VIA Labs, Inc. Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
ls -l /dev/serial/by-path gives me:
ls: cannot access ā/dev/serial/by-pathā: No such file or directory
When I did watch ādmesg | tail -20ā andplugged in the DS9490R, I got:
[ 1654.498403] usb 1-1.1: USB disconnect, device number 3
[ 1728.941040] usb 1-1.1: new full-speed USB device number 4 using xhci_hcd
[ 1729.048152] usb 1-1.1: New USB device found, idVendor=04fa, idProduct=2490, bcdDevice= 0.02
[ 1729.048188] usb 1-1.1: New USB device strings: Mfr=0, Product=0, SerialNumber=0
Does this tell me what name to use for this port? What do I use?
Nothing says āattached toā. What does this mean? What do I try next?
Iām sorry about my absolute lack of knowledge with Linux. I have been using computers for over 50 years but never Unix/Linux, so Iām early on the learning curve.
openhabian@openhabian:~ $ ls -l /usr/share/owfs
total 4
-rw-rār-- 1 root root 1103 Oct 30 2020 owfs.conf
openhabian@openhabian:~ $
Which of these is meant to be the OWFS binary? And having found it, how do I enable the OS to find it when I type owfs? Actually Iām not sure that I successfully installed the whole of OWFS, since I read somewhere that it was not necessary for OH, that only OWSERVER was necessary.
Is the whole of OWFS necessary? If so, how do I install it properly? And how do I verify that it is properly installed? And how do I get it to list all the devices that it finds on the OneWire bus (to prove that everything is working properly)?
I donāt know how far did you get, but good luck. I went the OWFS way with the DS9490R in the middle. I lost aloooooot of time, and got it (almost) working in one of the 4 fresh (the most messed up) installs in a row. All of the other times failed, no mater how hard I tried. Thus, what can I say - OH, it itās current state of development is mostly for enthusiasts with eternity of time available on their hand, who can learn all the internals of the Linux system underneath it, unearth all of the bugs and glitches hidden here and there.
Currently I just dropped the project and left it as it is laying on the table till the moment I will have more time to drain there.