Hi,
I use a 8 Channel I2C to 1-Wire host adapter to read OneWire temperature sensors in order to manage my heating system. On Saturday midnight I had a power outage. Since that my temperature sensors work strange.
Backup restored but nothing changed. It seems to be hardware issue, but I am far not sure.
Strange behaviour
If I turn off all rules regarding to temperatures I can see all the temperature values in my sitemap without any issue. In this case it looks like there is no any issue.
As soon as I activate rules which are triggered on temperature change, OneWire binding starts throwing errors, and temperature values disappear (Undefined) from sitemap. Only some of them remain active. I haven’t checked yet, but as I remember undefined temperatures are connected on same wire. It looks like one of the channels broke.
Error log
2019-02-25 05:16:29.727 [INFO ] [nternal.connection.OneWireConnection] - Trying to reconnect to owserver...
2019-02-25 05:16:30.184 [INFO ] [nternal.connection.OneWireConnection] - Connected to owserver [IP '127.0.0.1' Port '4304']
2019-02-25 05:16:30.194 [ERROR] [ding.onewire.internal.OneWireBinding] - Set Item for itemName=ff_bathroom_heating_temp to Undefined, because the readvalue is null
2019-02-25 05:17:15.348 [ERROR] [nternal.connection.OneWireConnection] - reading from path 28.0B1098060000/temperature attempt 1 throws exception
org.owfs.jowfsclient.OwfsException: Error -22
at org.owfs.jowfsclient.internal.OwfsConnectionImpl.readPacket(OwfsConnectionImpl.java:264) [200:org.openhab.binding.onewire:1.12.0]
at org.owfs.jowfsclient.internal.OwfsConnectionImpl.read(OwfsConnectionImpl.java:133) [200:org.openhab.binding.onewire:1.12.0]
at org.openhab.binding.onewire.internal.connection.OneWireConnection.readFromOneWire(OneWireConnection.java:291) [200:org.openhab.binding.onewire:1.12.0]
at org.openhab.binding.onewire.internal.OneWireBinding.updateItemFromOneWire(OneWireBinding.java:304) [200:org.openhab.binding.onewire:1.12.0]
at org.openhab.binding.onewire.internal.OneWireBinding.devicePropertyWantsUpdate(OneWireBinding.java:258) [200:org.openhab.binding.onewire:1.12.0]
at org.openhab.binding.onewire.internal.scheduler.OneWireUpdateTask.run(OneWireUpdateTask.java:61) [200:org.openhab.binding.onewire:1.12.0]
What do you think, is this a hardware issue? How can that happen, temperature values disappear when rule runs? May I use wrong method to read temperature sensors in my rule? My rule runs without any issue for months.
Example Item configuration:
Number ff_bedroom1_heating_temp "Hálószoba [%.1f °C]" (Heating_temps) {onewire="deviceId=28.0B1098060000;propertyName=temperature"}
Affected rule
rule "Heating - Check Demand"
when
Member of Heating_temps changed
or Member of Heating_setpoints changed
then
if (Heating_Main_Switch.state == ON) {
Heating_setpoints.allMembers.forEach[sp|
val String baseName = sp.name.split("_").get(0)+"_"+sp.name.split("_").get(1)
var current_temp = Heating_temps.allMembers.filter[m|m.name.startsWith(baseName)].last.state as Number //gettin temp value
var currentSetpoint = sp.state as Number //getting room setpoint
val demand = Heating_demands.members.filter[d|d.name.startsWith(baseName)].last
var Number hysteresis = 0.1
//logInfo("rules","BaseName: "+baseName)
if (sp.getGroupNames.contains("High_hysteresis")){
hysteresis = 0.2
} else {
hysteresis = 0.1
}
if( current_temp < (currentSetpoint - hysteresis) ){ //if temp lower than setpoint set demand
if ( Only_Radiator_Heating_Switch.state == ON && !demand.getGroupNames.contains("Radiator_hatings") ){
demand.postUpdate(OFF)
} else {
demand.postUpdate(ON)
}
} else if (current_temp >= currentSetpoint){
demand.postUpdate(OFF)
}
]
}
end
Thank you for your support!