# One-Wire Binding setup in openHAB2- newbi mistake?

**URL:** <https://community.openhab.org/t/one-wire-binding-setup-in-openhab2-newbi-mistake/50625>\
**Category:** Bindings\
**Tags:** onewire\
**Created:** [September 2, 2018, 9:58am UTC](https://community.openhab.org/t/one-wire-binding-setup-in-openhab2-newbi-mistake/50625 "2018-09-02T09:58:57Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![daniel\_grufman](https://community.openhab.org/letter_avatar_proxy/v4/letter/d/439d5e/32.png) [@daniel\_grufman](https://community.openhab.org/u/daniel_grufman)\
**Post date:** [September 2, 2018, 9:58am UTC](https://community.openhab.org/t/one-wire-binding-setup-in-openhab2-newbi-mistake/50625/1 "2018-09-02T09:58:57Z")

</div>

Hi,

First, thanks to all for a great community, I’ve spent many hours reading the very informative post! Not much of programmer but can make my way with the examples provided but is now a bit stuck with the One-Wire binding in openHAB 2.3.

Running currently a fairly small OH2 network with only Z-wave things for the lights. Now I want to create a watchdog for the heating in the house so therefore the One-Wire interest . I have a basic understanding of how Things-Items-Sitemap fit together but never created a thing from a file before.

**Basic Problem**  
I have tried to display the temperature reading from an OneWire 18b20 sensor in the sitemap. I’m using the OWserver and can read the sensor through it, but I cannot get the reading on to the sitemap.

I hav stayed as close to the One-Wire binding manual as possible:  
[https://www.openhab.org/addons/bindings/onewire/](https://www.openhab.org/addons/bindings/onewire/)

_I’m hoping somebody can find the mistake or give me some pointers in how to trouble shoot this. All suggestions appreciated! /Regards Daniel_

**HW + OS**

- Raspberry Pi 2 + Raspbian Stretch + I2C One-Wire board + one 18b20 temp sensor.

**openHAB**

- apt-get installed OH2.3
- PaperUI installed OneWire binding. Configured with Local IP (127.0.0.1) and Port (4304)
- I get the following in the _openhab.log_, looks ok to me:

```auto
2018-09-02 11:06:35.287 [INFO] [nternal.connection.OneWireConnection] - Connected to owserver [IP '127.0.0.1' Port '4304']

```

**OWserver**

- OWserver installed, and working. Checking with _“sudo owread /28.51DEAD060000/temperature”_ returns accurate temperature.
- Modified the “owfs.conf” file with “server: port = 127.0.0.1:4304” (instead of “server: port = localhost:4304”).

**Things file** - As close to the Manual as possible:[OneWire - Bindings | openHAB](https://www.openhab.org/addons/bindings/onewire/#channels)

```csv
//OneWire server 
Bridge onewire:owserver:mybridge [network-address="127.0.0.1"] {
    temperature mysensor [id="28.51DEAD060000"] 
}

```

**Items file**

```csv
Number:Temperature WDTemp1 "WDTemp1 [%.1f %unit%]" { channel="onewire:mybridge:mysensor:temperature" }

```

**Site map**

```php
sitemap arosenius_watchdog label="Aroseniusvägen Watchdog"
{
	Frame label="Temps" {
		Text item=WDTemp1 label="Aktuell TemperaturX [%.1f °C]"
	}

```

---

<div class="post-metadata">

**Author:** ![sihui](https://community.openhab.org/user_avatar/community.openhab.org/sihui/32/55674_2.png) [@sihui](https://community.openhab.org/u/sihui)\
**Post date:** [September 2, 2018, 12:00pm UTC](https://community.openhab.org/t/one-wire-binding-setup-in-openhab2-newbi-mistake/50625/2 "2018-09-02T12:00:29Z")

</div>

Don’t put a label and a format in items **and** sitemap definition.  
Delete one after the other and try if it helps.

---

<div class="post-metadata">

**Author:** ![daniel\_grufman](https://community.openhab.org/letter_avatar_proxy/v4/letter/d/439d5e/32.png) [@daniel\_grufman](https://community.openhab.org/u/daniel_grufman)\
**Post date:** [September 2, 2018, 2:47pm UTC](https://community.openhab.org/t/one-wire-binding-setup-in-openhab2-newbi-mistake/50625/3 "2018-09-02T14:47:41Z")

</div>

@sihui thanks for the suggestion!

Unfortunately I did not get it to work regardless. Tried the following as shown below, maybe not correct?

Is there a way of debugging the binding somehow?

**Items**

```csv
//Number:Temperature WDTemp1 "WDTemp1 [%.1f %unit%]" { channel="onewire:mybridge:mysensor:temperature" }
Number:Temperature WDTemp1 "WDTemp1" { channel="onewire:mybridge:mysensor:temperature" }

```

**Site map**

```php
sitemap arosenius_watchdog label="Aroseniusvägen Watchdog"
{
	Frame label="Temps" {
		Text item=WDTemp1 label="Temperature"
		Text item=WDTemp1 label="Temperature with formatting [%.1f °C]"
	}

```

---

<div class="post-metadata">

**Author:** ![Thedannymullen](https://community.openhab.org/user_avatar/community.openhab.org/thedannymullen/32/73361_2.png) [@Thedannymullen](https://community.openhab.org/u/Thedannymullen)\
**Post date:** [September 2, 2018, 3:08pm UTC](https://community.openhab.org/t/one-wire-binding-setup-in-openhab2-newbi-mistake/50625/4 "2018-09-02T15:08:15Z")

</div>

> [@daniel\_grufman](#):
>
> "onewire:mybridge:mysensor:temper

What if you changed this part of the channel to “onewire:owserver:mybridge:mysensor:temperature”.

Just a stab at it. I know the docs don’t state this, but curious.

---

<div class="post-metadata">

**Author:** ![sihui](https://community.openhab.org/user_avatar/community.openhab.org/sihui/32/55674_2.png) [@sihui](https://community.openhab.org/u/sihui)\
**Post date:** [September 2, 2018, 6:12pm UTC](https://community.openhab.org/t/one-wire-binding-setup-in-openhab2-newbi-mistake/50625/5 "2018-09-02T18:12:55Z")

</div>

> [@daniel\_grufman](#):
>
> Is there a way of debugging the binding somehow?

As with all bindings:

> **[Defining what to log - Logging](https://www.openhab.org/docs/administration/logging.html#defining-what-to-log)**
>
> This article describes the logging functionality in openHAB. This includes how to access logging information and configure logging for user-defined rules. | a vendor and technology agnostic open source automation software for your home

---

<div class="post-metadata">

**Author:** ![daniel\_grufman](https://community.openhab.org/letter_avatar_proxy/v4/letter/d/439d5e/32.png) [@daniel\_grufman](https://community.openhab.org/u/daniel_grufman)\
**Post date:** [September 10, 2018, 8:25pm UTC](https://community.openhab.org/t/one-wire-binding-setup-in-openhab2-newbi-mistake/50625/6 "2018-09-10T20:25:16Z")

</div>

Closing the loop.

If I replace the openHAB2 style, Things/Items definition, and replace it with an openHAB 1.x Item connection as per below, things work just fine. (now corrected as per KidSquid’s comment below.)

Maybe this is not so surprising since the PaperUI reports the binding as “binding-onewire1 - 1.12.0”, note the “onewire1”. I just wonder where the openHAB2 version that is described in the documentation ended up?

This works:

```php
Number WDTemp1 "Watchdog temperature" {onewire ="deviceId=28.51DEAD060000;propertyName=temperature;refreshinterval=10"}

```

---

<div class="post-metadata">

**Author:** ![KidSquid](https://community.openhab.org/user_avatar/community.openhab.org/kidsquid/32/3985_2.png) [@KidSquid](https://community.openhab.org/u/KidSquid)\
**Post date:** [September 10, 2018, 8:48pm UTC](https://community.openhab.org/t/one-wire-binding-setup-in-openhab2-newbi-mistake/50625/7 "2018-09-10T20:48:54Z")

</div>

Just to be clear for anyone else who stumbles across this thread…

> [@daniel\_grufman](#):
>
> and replace it with an openHAB 1.x Thing connection

There are no 1.x THINGS…Things only exist in OH2.

You used a 1.x ITEM

Not at all trying to be an ass, just want to help make sure others that come along don’t get even more confused by the nomenclature which is really easy to do! 😏

Glad you got it all working.

---

<div class="post-metadata">

**Author:** ![rossko57](https://community.openhab.org/user_avatar/community.openhab.org/rossko57/32/70263_2.png) [@rossko57](https://community.openhab.org/u/rossko57)\
**Post date:** [September 10, 2018, 9:09pm UTC](https://community.openhab.org/t/one-wire-binding-setup-in-openhab2-newbi-mistake/50625/8 "2018-09-10T21:09:02Z")

</div>

> [@daniel\_grufman](#):
>
> I just wonder where the openHAB2 version that is described in the documentation ended up?

Remains a mystery so far

> [@Onewire add-on binding not in the binding list](https://community.openhab.org/t/onewire-add-on-binding-not-in-the-binding-list/50882):
>
> I used to have onewire temp sensor configured, upgraded and running in the latest snapshot 2.4 (on PI) I don’t see the onewire binding anymore. The value for my tempsensor is not updated anymore so all seems to be gone. I can still connect to the owhttp etc.

---

<div class="post-metadata">

**Author:** ![daniel\_grufman](https://community.openhab.org/letter_avatar_proxy/v4/letter/d/439d5e/32.png) [@daniel\_grufman](https://community.openhab.org/u/daniel_grufman)\
**Post date:** [September 10, 2018, 9:15pm UTC](https://community.openhab.org/t/one-wire-binding-setup-in-openhab2-newbi-mistake/50625/9 "2018-09-10T21:15:23Z")

</div>

Appreciate the correction. Completely second the idea of keeping the confusion to a minimum.
