[SOLVED] Onewire - Read "power" state from DS1820 or speciific PIO.*/sensed.* from DS2408

Is there any possibility to read values from “power” state of DS1820? I think that’s not possible to configure direct from PaperUI. Iv’e build some flood sensor based on DS1820, whose logic is based on the active power status test (flood and shorting 2 pins on circuit disconnects via transistor the power supply of DS…).

I’ve tried adding to items file like:
Number TEST “TEST [%f %s]” {onewire=“deviceId=28.E6465D040000;propertyName=power;refreshinterval=60”}
and proper lines in sitemap file:
Text item=TEST
but there was no readings.

Any suggestions?

Infrastucture: OpenHAB 2.4, onewire (hosted from Ubuntu) configuration of it in PapuerUI (I don’t have bridge config in things file).

Not possible with the release version. The latest master has „direct access“ channels, you can use these to access owfs path directly. The item configuration you used above is for the onewire1 binding

Whitch version? Could you point it out (share link)? Is available for docker? Can I use onewire binding at the same time with “direct access” or maybe “da” is for example faster then ow?

PS I should add that I currently have several dozen components connected and configured in onewire.

Have a look here. Instructions are on that page. It‘s not faster than other access. You can add channels to the bridge in PaperUI and set the path to /sensorid/power (or whatever the correct path is).

Thanks. What shoulkd be the procedure of JAR echange? Shut down OH replace JAR and start it up again? Is it safe and I wont lose and configuration? :wink:

No need to shutdown, just follow the instructions. You can restart after the installation, if you want. All I can say is: I never lost my configuration.

Ok. Now I have all thing types doubled. Is it normal?

PS I had stoped openhab and then replaced JAR file.

Ok. After replacing it again doubled positions has gone.

From now on, as you said, I should add channel to OW Server Bridge, like this?

I supose after that I should create item fits to channel type (number) and link them together from PaperUI?

I’ve done that, but on sitemap there is still no value next to that thing. :frowning:

Number TEST_POWER “Test of POWER State [%s]”

Text item=TEST_POWER label=“Test of POWER State [%s]”

How did you configure the channel? There is a pencil on the right side of the Channel in PaperUI.

Configuration > Things > Channels (+):


Looks good. I‘ll check if it works for me later today.

Ok. Thanks.

I have new problem. Maye above issue is related witch this: [onewire binding on openhab in docker] Comunication problem

After yesterday JAR exchange (to new one and back to old one) my onewire in openhab stoped working. In logs there is multiple errors like:

2019-03-01 12:15:27.570 [TRACE] [internal.handler.OwBaseBridgeHandler] - refresh: getting handler for onewire:temperature:84eea56d:28_DC9663040000 (6 to go)
2019-03-01 12:15:27.571 [DEBUG] [internal.handler.OwBaseBridgeHandler] - onewire:temperature:84eea56d:28_DC9663040000 handler missing
2019-03-01 12:15:27.572 [TRACE] [internal.handler.OwBaseBridgeHandler] - refresh: getting handler for onewire:digitalio2:84eea56d:12_371581000000 (5 to go)
2019-03-01 12:15:27.573 [DEBUG] [internal.handler.OwBaseBridgeHandler] - onewire:digitalio2:84eea56d:12_371581000000 handler missing

I’ve deleted OW Serwer instance (bridge) and created new one with ID of previous bridge, but openhab seems to not discover my things anymore and could not read state of those defined earlier.

On old version of JAR (which worked just fine for yesterady) i have those errors, for new one there are no such errors, but non of my 1W components work (some of them (state) even flaps between on/off). Very strange.

Please help!

PS As I mantioned before my 1W items was in the first place defined via PaperUI, but in files I have things for other bindings. I found some info on Internet that when i define thing via PaperUI, then I cannot define other via files. Is it true?

You can’t use the old version after you installed the new version. This upgrade is not backwards compatible. We should fix the new version.

I just checked with one of my DS18B20 that the power status is correctly read and the channel is updated. Maybe %s is a problem, since the returned value is an integer (0 or 1). Try %d instead.

For now i have deleted all my things and I have to configure then from begining.

Ok, I will try, but could something mess up after my downgrade? I’m preety sure that after another version change to the new one (after that downgrade) nothing from 1W was working. Should I clear some cache or sometching?

No. It is expected not to work but nothing should break. However, I have never tried switching back and forth with version, only upgraded.

  1. Is there something to be sure that i’m starting from scratch (if I have to configute my thing from beginig)? Should I clear something? But please don’t tell me to start new clean docker with openhab, because i have there many, many other things configiured and running. :wink:

  2. When I Was unlinking channels and then removing things, they did not want to disappear. State was removing. I have to force remove. Maybe this step has break something?

I don‘t fully understand when this happened. If you select „remove“ again, you should be able to force OH to remove the things.

Deleting things should be enough, but: I never deleted any things since I first started with OneWire. I‘m still astonished that happened.

Ok, i’ve clean configuration, so I just added channel for “OW Server”:
and line in:
items: Number TEST_POWER “Test of POWER State N [%d]”
sitemap: Switch item=TEST_POWER label=“Test of POWER N State [%d]”
I wasn’t creating any things for DS1820. I’ve just linked to created channel item from items file.

On sitemap there is still no value.

You did it exactly the same way?

I added the item in PaperUI, but yes, the thing configuration is the same. Please try Text instead of switch in the Sitemap.

You can also use „smarthome:status itemName“ on the console. You should get the item status then.

If nothing helps, set org.openhab.binding.onewire to TRACE. You should see read and response from the owserver for the path above.