- Platform information:
- Hardware: RPi4
- OS: openhabian openhabian-pi-raspios64-202308121313-gitc6a2fa1-crcaf8d881d.img.xz
- Java Runtime Environment: 17.0.10+7-1~deb11u1
- openHAB version: 4.1.1-1
- Issue of the topic:
My owsetup apears to work fine but I’m struggling to make any devices appear in openhab. I have quite a lot of owfs experience, but just about none in openhab. I’m not sure if I’m doing it wrong or something is broken.
I have a LinkUSBi USB<->1-wire device plugged in. owserver and ow-shell are installed (3.2p4+dfsg1-4+b1)
I’ve set the device up to use the ftdi interface:
server: link = ftdi:s:0x0403:0x6001:A900fwfb (in /etc/owfs.conf)
owserver is running: ps aux | grep owserver
root 59126 0.0 0.0 172676 4660 ? Ssl Feb08 0:00 /usr/bin/owserver --foreground -c /etc/owfs.conf
I can read sensors from that server from the shell:
$ owdir -s 4304
/28.BA6529020000
/28.737129020000
/01.27A073140000
/bus.0
/uncached
/settings
/system
/statistics
/structure
/simultaneous
/alarm
Same output from ‘owdir -s localhost:4304’ (but not ‘127.0.0.1:4304’ or ‘openhabian:4304’)
This works: ‘owdir -s ::1:4304’ so that means that owserver is binding to the ipv6 loopback address but not the IPv4 one. This may or may not be important…
I can read temps:
owread -s 4304 28.BA6529020000/temperature
19.25
or owread -s ::1:4304 28.BA6529020000/temperature
or owread -s localhost:4304 28.BA6529020000/temperature
So that looks like it’s all working as it should.
I also have an existing machine that has a load of 1-wire sensors to drive my solar thermal system
I can read that remotely (the host is called ‘control’ and is a Pxa200 balloonboard running ancient debian (‘oabi’) from more than a decade ago):
$ owdir -s control:4304
bus.0
/bus.1
/bus.2
/bus.3
/bus.4
/bus.5
/bus.6
/bus.7
/settings
/system
/statistics
/10.62FC89010800
/10.73288A010800
/28.88FD93112006
/10.E7EE89010800
/28.7AF973010000
/28.959329020000
That system is using i2c to talk to an 8-channel 1-wire multiplex chip (DS2482-800)
So we have two different 1-wire netowrks we can talk to. One local, one remote.
The Onewire bridge binding is installed as a ‘Thing’.
Network Address: localhost
Port: 4304
and if I ‘save’ this it shows Status: OFFLINE (in red), COMMUNICATION_ERROR
but if I configure it for the remote owserver
Network Address: control
Port: 4304
(and save) then is shows Status: ONLINE (in green)
Eventually I worked out that I can get the local one into ‘ONLINE’ state by specifying ‘::1’ instead of localhost. (So why does ‘localhost’ work on the command-line with owdir and owread but not in openhab? Is that a bug?)
The problem is that I cannot work out how to get it to show me the actual devices or their readings. Once it’s working like this shouldn’t there be a list of device-ids that I could add as ‘Items’. What should I click on to get the bus enumerated. Do I have to do that externally myself and manually add the sensors (if so how?)
Also the openhab log is showing:
[WARN ] [.core.thing.binding.BaseThingHandler] - Handler OwserverBridgeHandler tried updating the thing status although the handler was already disposed.
4 times/second whether the status is shown as ‘ONLINE’ or ‘OFFLINE’. The log is rapidly becoming huge. Is that message significant?
I’ve tried looking in forum for old questions, but most of them are from 4 or 5 years ago and all talk about the old file-based config from openhab v1 2 or 3. Which doesn’t help much when one is using the UI-based config from openhab 4.
I’ve tried reading OneWire - Bindings | openHAB but again examples are in file-speak, not UI-speak. The file-config looks straightforward - I could put my IDs in there, but I don’t know how to do the equivalent in openhab’s UI.
I still haven’t really got my head around ‘Things’, ‘Items’, ‘Channels’, ‘Locations’ And how those map onto temp sensors.
Suggestions welcome on how to make some temp sensors appear (and get logged, and graphed).
- Please post configurations (if applicable):
- Items configuration related to the issue
UID: onewire:owserver:8a7545c675
label: OW Server
thingTypeUID: onewire:owserver
configuration:
port: 4304
network-address: control
and
UID: onewire:owserver:8a7545c675
label: OW Server
thingTypeUID: onewire:owserver
configuration:
port: 4304
network-address: ::1
- Services configuration related to the issue
/etc/owfs/conf
# 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
#Actually installed 2024.02.08
#LinkUSBi USB device access over /dev/ttyUSB0 using ftdi protocol
server: link = ftdi:s:0x0403:0x6001:A900fwfb
# USB device: DS9490
#server: usb = all
#
# Serial port: DS9097
#server: device = /dev/ttyS1
#
# owserver tcp address
#server: server = 192.168.10.1:3131
#
# random simulated device
#server: FAKE = DS18S20,DS2405
#
######################### OWFS ##########################
#
#mountpoint = /mnt/1wire
#allow_other
#
####################### OWHTTPD #########################