Hi!
I have for a long time been struggling to get my onewire interface working together with OpenHAB without success. Since I’m out of clues for the moment I’m asking for help here. It’s probably something simple but I just can’t figure it out. Any suggestion on what I have done wrong/missed or how to debug the problem would be appreciated.
I’m using a Raspberry PI with an i2c 1wire expansion module and an USB connected TellStick Duo device for 433MHz units.
It has Raspbian Jessie Lite, owserver, TellStick software and OpenHAB 1.8.1 installed.
Tellstick is working fine together with OpenHAB.
The onewire interface has two DS18B20 temperature sensors connected at the moment.
Owserver seems to be working also since I can use “owread -s localhost …” to read the temperature from the sensors.
When running openhab with start_debug.sh the only sign I can see from onewire is the following two lines:
12:47:02.588 [DEBUG] [b.o.internal.OWServerActivator:34 ] - OWServer binding has been started.
12:47:02.788 [DEBUG] [o.b.o.internal.OWServerBinding:96 ] - OWServer: Activate
Otherwise nada! The rrd4j service is trying to log the temperature from the sensors so I see these lines occurring every minute:
12:49:00.149 [TRACE] [o.c.p.internal.PersistItemsJob:56 ] - Storing item ‘Temperature_OW1’ with persistence service ‘rrd4j’ took 7ms
12:49:00.159 [TRACE] [o.c.p.internal.PersistItemsJob:56 ] - Storing item ‘Temperature_OW2’ with persistence service ‘rrd4j’ took 7ms
but no temperature is logged. At least the bindings seems to have been recognized somehow.
According to the One wire binding page caching could be a problem so I have tested the “onewire:post_only_changed_values=false” openhab.cfg and with the “Switch OneWireClearCache “OneWireClearCache” {onewire=“control=CLEAR_CACHE”}” but with no success.
I have tried both “onewire:ip=localhost” and “onewire:ip=127.0.0.1” in the openhab.cfg file.
Previously I was using OpenHAB 1.7.1 with same problems (never got onewire working).
OpenHAB has the following addons installed:
org.openhab.binding.http-1.8.1.jar org.openhab.persistence.exec-1.8.1.jar
org.openhab.binding.ntp-1.8.1.jar org.openhab.persistence.logging-1.8.1.jar
org.openhab.binding.owserver-1.8.1.jar org.openhab.persistence.rrd4j-1.8.1.jar
org.openhab.binding.tellstick-1.8.1.jar
Onewire configuration in openhab.cfg file looks like this:
############################## OneWire Binding ########################################
OwServer IP address
onewire:ip=localhost
OwServer Port (optional, defaults to 4304)
#onewire:port=
the retry count in case no valid value was returned
upon read (optional, defaults to 3)
#onewire:retry=
defines which temperature scale owserver should return temperatures in. Valid
values are CELSIUS, FAHRENHEIT, KELVIN, RANKINE (optional, defaults to CELSIUS).
#onewire:tempscale=
only changed values are posted to the event-bus, (optinal, defaults to true - values true or false)
onewire:post_only_changed_values=false
########################### NetworkHealth Binding #####################################
My .items file looks like this:
Group Home
Group gBF (Home) /* Basement floor /
Group gGF (Home) / Ground floor /
Group gFF (Home) / First floor /
Group gOutdoor (Home) / Outdoor */
Group gBF_Living “Living Room” (gBF)
Group gGF_Living “Living Room” (gGF)
Group gGF_Kitchen “Kitchen” (gGF)
Group gGF_Toilet “Toilet” (gGF)
Group gGF_Hall “Hall” (gGF)
/* Onewire fix */
//Switch OneWireClearCache “OneWireClearCache” {onewire=“control=CLEAR_CACHE”}
/* Lights */
Switch Light_GF_Living “Window” (gGF_Living) { tellstick=“Relay 1:Command” }
Switch Light_BF_Living “Window” (gBF_Living) { tellstick=“Relay 2:Command” }
/* Temperatures */
Group gTempChart
Number Temperature_OW1 “Temperature [%.1f °C]” (gTempChart, gOutdoor) {onewire=“deviceId=28.576FE0000000;propertyName=temperature;refreshinterval=30”}
Number Temperature_OW2 “Temperature [%.1f °C]” (gTempChart, gOutdoor) {onewire=“deviceId=28.3597E0000000;propertyName=temperature;add=0.0;multiply=1.0;refreshinterval=60;ignore85CPowerOnResetValues”}
Number Temperature_GF_Loft “Temperature [%.1f °C]” (gTempChart, gGF_Living) { tellstick=“11:Temperature:Temperature:mandolyn” }
Number Temperature_Outdoor “Temperature [%.1f °C]” (gTempChart, gOutdoor) { tellstick=“12:Temperature:Temperature:mandolyn” }
Number Temperature_GF_Kitchen “Temperature [%.1f °C]” (gTempChart, gGF_Kitchen) { tellstick=“13:Temperature:Temperature:mandolyn” }
/* NTP binding demo item */
DateTime Date “Date and Time: [%1$tA, %1$tY-%1$tm-%1$td %1$tR]” { ntp=“Europe/Stockholm:se_SE” }
//DateTime Date “Date [%1$tA, %1$td.%1$tm.%1$tY]” { ntp=“Europe/Stockholm:se_SE” }