Define Things & Channels with OneWire Binding

Hi J-N-K,

it works with the bridge, but not with the sensors.

Auto discovery in Paper UI works, things file does not.

I just tried to manually add sensors with Paper UI. Looks like this doesn’t work, too, and the channel name for my test sensor is “onewire:temperature:test”, so the server/bridge is missing here. There seems to be another problem? This sensor stays “initializing”, too.

Thanks :slight_smile:

Please try to use this. There was a small but very important bug for manually (not autodiscovered) things. In all other aspects, this JAR is the same as the release version.

1 Like

1.) I am getting this error now:

2018-12-21 00:54:05.803 [ERROR] [rg.eclipse.smarthome.binding.onewire] - FrameworkEvent ERROR - org.eclipse.smarthome.binding.onewire
org.osgi.framework.BundleException: Could not resolve module: org.eclipse.smarthome.binding.onewire [230]
  Another singleton bundle selected: osgi.identity; type="osgi.bundle"; version:Version="0.10.0.201812201759"; osgi.identity="org.eclipse.smarthome.binding.onewire"; singleton:="true"

But I think it just means that the onewire plugin is existign twice? Beside that error the plugin is working.

2.) A sensor, which was manually defined in Paper UI, is now working. This bug is fixed :slight_smile:

3.) At first my sensor, which was defined in my things file was still not working. But now it wasn’t failing silently but it throws a message:

2018-12-21 00:59:00.140 [WARN ] [mmon.WrappedScheduledExecutorService] - Scheduled runnable ended with an exception:
java.lang.ClassCastException: java.math.BigDecimal cannot be cast to java.lang.String
        at org.eclipse.smarthome.binding.onewire.internal.device.DS18x20.configureChannels(DS18x20.java:62) ~[?:?]
        at org.eclipse.smarthome.binding.onewire.internal.handler.TemperatureSensorThingHandler.configureThingChannels(TemperatureSensorThingHandler.java:89) ~[?:?]
        at org.eclipse.smarthome.binding.onewire.internal.handler.TemperatureSensorThingHandler.lambda$1(TemperatureSensorThingHandler.java:67) ~[?:?]
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) ~[?:?]
        at java.util.concurrent.FutureTask.run(FutureTask.java:266) ~[?:?]
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180) ~[?:?]
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293) ~[?:?]
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:?]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:?]
        at java.lang.Thread.run(Thread.java:748) [?:?]

So it looks like “resolution” has to be a string and not a “BigDecimal”.

This thing definition is working now :slightly_smiling_face:

Bridge onewire:owserver:t-owserver [network-address="172.19.1.12", port=4304]
{
    Thing temperature 28_FF2526A41504 "Temperatursensor 28_FF2526A41504" [id="28.FF2526A41504", refresh=20]
        {Type temperature-por-res:temperature [ignorepor=true, resolution="12"]}
}

Thank you very much for the quick fix :slight_smile:

1 Like

Thanks for your work. I’ll try configuring it the same way. It seems that things are getting worse with every update if one doesn’t want to use the UI :disappointed:

I guess that 90% of the reported issues in OneWire are fixed within less than a week. Those things that are not fixed are feature requests where the OP doesn’t respond.

I don‘t get your problem. Feel free to use other software.

C’mon… This is FLOSS (Free & Libre Open Source Software), people are developing it as their hobby. They do it for free, not earning any money - and you didn’t pay for it, you get it for free. Be happy, that you can use it without paying for it and be happy, that this bug has been fixed so quickly - at least this is what I feel about it :wink:

1 Like

hello all!
just want to give a short feedback: i just did a clean install of latest openhabian with openhab 2.4.0-1. on old installation i used onewire-binding 1.13 and now i want to switch to 2.4.0

i had exact the same problem when manually added things and items: the brigde was online but the temperature sensors stayed at initializing.

now i deinstalled the binding in karaf-console and put the jar file from j-n-k in my addons-folder

this worked for me - thanks a lot to j-n-k !

Glad you got it working.:+1:

I tried the same but I just can’t get the file-things to work. It works using the default 2.4.0 onewire binding and automatic discovery - but I want to avoid using it as much as possible due to mixed configuration location and worse backup/versioning possibilities.

  • I removed onewire from the addons.cfg bindings list
  • I uninstalled it in paperUI
  • stopped openhab
  • copied the jar to the addons directory
  • “list” in karaf console only shows “openHAB Add-ons :: Bundles :: OneWire Binding” version 2.5.0.201907130752, not the 0.10.0.oh240 version

Things:
Bridge onewire:owserver:mybridge [ network-address=“127.0.0.1” ] {

Thing temperature heatpumpprimout    [id="28.FFA7C24E0400" ]
Thing temperature heatpumpsecfloor   [id="28.B26B52050000" ]
 {Type temperature-por-res:temperature [ignorepor=true, resolution="12"]}

…}
(I tried different approaches)

items:

Number:Temperature Temp_Heatpump_Prim_Out “Temp WP Prim Rücklauf [%.2f °C]” { channel=“onewire:temperature:mybridge:heatpumpprimout:temperature” }

Number:Temperature Temp_Heatpump_Sec_Floor “Temp WP Sek Heizung [%.2f °C]” { channel=“onewire:temperature:mybridge:heatpumpsecfloor:temperature-por-res” }{ channel=“onewire:temperature:mybridge:heatpumpprimout:temperature-por-res” }

I get errors in the logging:
2019-11-27 12:01:06.401 [TRACE] [ternal.handler.OwserverBridgeHandler] - refresh: getting handler for onewire:temperature:mybridge:heatpumpprimout (11 to go)
2019-11-27 12:01:06.402 [DEBUG] [ternal.handler.OwserverBridgeHandler] - onewire:temperature:mybridge:heatpumpprimout handler missing

Things in PaperUI are UNINITIALIZED, HANDLER_MISSING_ERROR (note that handler is not missing with 0.10.0.oh240 binding version)

Any advice?

Try with

Bridge onewire:owserver:mybridge [ network-address="127.0.0.1" ] {
      Thing basic heatpumpprimout    [
             id="28.FFA7C24E0400",
             temperaturesensor="DS18B20" 
             ] { 
                Channels:
                         Type temperature-por-res : temperature [
                                 ignorepor=true, resolution="12"
                          ]
             }
      Thing basic heatpumpsecfloor   [
             id="28.B26B52050000",
             temperaturesensor="DS18B20" 
             ] { 
                Channels:
                         Type temperature-por-res : temperature [
                                 ignorepor=true, resolution="12"
                          ]
            }
}

There have also been wrong quotation marks in your bridge definition.

1 Like

Thanks a lot, it works now finally, after hours of trying!

There was not even a wrong quotation mark (I did not set the format correctly for posting). I took your example and then narrowed it down to a single difference: using “basic” instead of “temperature” Thing. I tried this before, but I assume I got the bindings mixed (not uninstalling oh240 version correctly, probably because it was still configured in addons.cfg).

Anyway, here is my working config for onewire binding 2.5.0.201907130752:
Things:

Bridge onewire:owserver:mybridge [ network-address="127.0.0.1" ] {

    Thing basic HeatpumpPrimIn     [id="28.F90252050000"]
     {Type temperature-por-res : temperature [ignorepor=true, resolution="12"]}
    ...
}

items:

Number:Temperature Temp_Heatpump_Prim_In     "Temp WP Prim Vorlauf [%.2f °C]"    <temperature>   { channel="onewire:basic:mybridge:HeatpumpPrimIn:temperature" }

And make sure there is only this one onewire binding installed (not the 0.10.0.oh240) (command is for karaf console):

openhab> list|grep onewire -i
245 x Active   x  80 x 2.5.0.201907130752     x openHAB Add-ons :: Bundles :: OneWire Binding