# Tinkerforge: Symbolic Names in 1.8.1 don't seem to work

**URL:** <https://community.openhab.org/t/tinkerforge-symbolic-names-in-1-8-1-dont-seem-to-work/7993>\
**Category:** Bindings\
**Tags:** tinkerforge\
**Created:** [February 25, 2016, 5:05pm UTC](https://community.openhab.org/t/tinkerforge-symbolic-names-in-1-8-1-dont-seem-to-work/7993 "2016-02-25T17:05:45Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![tkuehne](https://community.openhab.org/letter_avatar_proxy/v4/letter/t/41988e/32.png) [@tkuehne](https://community.openhab.org/u/tkuehne)\
**Post date:** [February 25, 2016, 5:05pm UTC](https://community.openhab.org/t/tinkerforge-symbolic-names-in-1-8-1-dont-seem-to-work/7993/1 "2016-02-25T17:05:45Z")

</div>

H all,

I’m having some problems to get the Tikerforge Binding to behave as I want it to.  
I have a Tinkerforge weatherstation kit with a Wifi Master extension, and I’m using that together with the 1.8.1 binding.

It works, if I remove all but the barest config from openhab.cfg and put the uid’s in my items, such as:

openhab.cfg:

> tinkerforge:hosts=192.168.199.121:4223

site.items

> Number TFW\_temperature “Temperature [%.2f °C]” (TFW) {tinkerforge=“uid=vN7, subid=temperature”}

It should have the same effect, if I do:

openhab.cfg:

> tinkerforge:hosts=192.168.199.121:4223
> 
> tinkerforge:temperature.uid=vN7  
> tinkerforge:temperature.type=barometer\_temperature  
> tinkerforge:temperature.subid=temperature

site.items:

> Number TFW\_temperature “Temperature [%.2f °C]” (TFW) {tinkerforge=“name=temperature”}

However, the second example doesn’t work at all.

Also, according to the documentation, I should be able to influence the polling of the tinkersorge sensors by putting

openhab.cfg:

> tinkerforge.refresh=300000

Also, this seems to be ignored, and I get traffic every second.

Am I doing anything wrong, or is this broken?

Cheers.

Thomas

---

<div class="post-metadata">

**Author:** ![watou](https://community.openhab.org/user_avatar/community.openhab.org/watou/32/70595_2.png) [@watou](https://community.openhab.org/u/watou)\
**Post date:** [February 25, 2016, 6:29pm UTC](https://community.openhab.org/t/tinkerforge-symbolic-names-in-1-8-1-dont-seem-to-work/7993/2 "2016-02-25T18:29:44Z")

</div>

> [@tkuehne](#):
>
> tinkerforge.refresh=300000

Doc error I just fixed. Should be `tinkerforge:refresh=300000`

---

<div class="post-metadata">

**Author:** ![tkuehne](https://community.openhab.org/letter_avatar_proxy/v4/letter/t/41988e/32.png) [@tkuehne](https://community.openhab.org/u/tkuehne)\
**Post date:** [February 25, 2016, 8:33pm UTC](https://community.openhab.org/t/tinkerforge-symbolic-names-in-1-8-1-dont-seem-to-work/7993/3 "2016-02-25T20:33:28Z")

</div>

ok, corrected that. All the devices that support callbackPeriod still seems to be sending data every second. And I don’t seem to be able to add configuration for them to openhab.cfg, or the binding will jsut stop working.

This is what I have configured in the setup with symbolic names:

openhab.cfg:

> tinkerforge:hosts=192.168.199.121:4223  
> tinkerforge:refresh=300000
> 
> tinkerforge:lcddisplay.uid=vBL  
> tinkerforge:lcddisplay.type=bricklet\_LCD20x4
> 
> tinkerforge:lcdbacklight.uid=vBL  
> tinkerforge:lcdbacklight.subid=backlight  
> tinkerforge:lcdbacklight.type=backlight

> tinkerforge:lcdbutton0.uid=vBL  
> tinkerforge:lcdbutton0.subid=button0  
> tinkerforge:lcdbutton0.type=lcd\_button

> tinkerforge:lcdbutton1.uid=vBL  
> tinkerforge:lcdbutton1.subid=button1  
> tinkerforge:lcdbutton1.type=lcd\_button

> tinkerforge:lcdbutton2.uid=vBL  
> tinkerforge:lcdbutton2.subid=button2  
> tinkerforge:lcdbutton2.type=lcd\_button

> tinkerforge:lcdbutton3.uid=vBL  
> tinkerforge:lcdbutton3.subid=button3  
> tinkerforge:lcdbutton3.type=lcd\_button  
> tinkerforge:lcdbutton3.tactile=True

> tinkerforge:alight.uid=uMB  
> tinkerforge:alight.type=bricklet\_ambient\_lightv2  
> tinkerforge:alight.illuminanceRange=6  
> tinkerforge:alight.integrationTime=7  
> tinkerforge:alight.callbackPeriod=300000  
> tinkerforge:alight.threshold=0

> tinkerforge:barometer.uid=vN7  
> tinkerforge:barometer.type=bricklet\_barometer  
> tinkerforge:barometer.callbackPeriod=300000  
> tinkerforge:barometer.threshold=0

> tinkerforge:temperature.uid=vN7  
> tinkerforge:temperature.type=barometer\_temperature  
> tinkerforge:temperature.subid=temperature

> tinkerforge:humidity.uid=xvJ  
> tinkerforge:humidity.type=bricklet\_humidity  
> tinkerforge:humidity.callbackPeriod=300000  
> tinkerforge:humidity.threshold=0

site.items:

> Number TFW\_illuminance “Helligkeit [%.0f Lux]” (TFW) {tinkerforge=“name=alight”}  
> Number TFW\_temperature “Temperatur [%.2f °C]” (TFW) {tinkerforge=“name=temperature”}  
> Number TFW\_pressure “Luftdruck [%.1f hPA]” (TFW) {tinkerforge=“name=barometer”}  
> Number TFW\_humidity “rel. Luftfeuchte [%.1f %%]” (TFW) {tinkerforge=“name=humidity”}  
> String TFW\_LCD “LCD” { tinkerforge=“name=lcddisplay”}  
> Switch TFW\_LCDBacklight “LCD Hintergrundbeleuchtung” { tinkerforge=“name=lcdbacklight”}  
> Switch TFW\_Button0 “Button0: Hintergrundbeleuchtung” { tinkerforge=“name=lcdbutton0”}  
> Switch TFW\_Button1 “Button1” { tinkerforge=“name=lcdbutton1”}  
> Switch TFW\_Button2 “Button2” { tinkerforge=“name=lcdbutton2”}  
> Switch TFW\_Button3 “Button3” { tinkerforge=“name=lcdbutton3”}

---

<div class="post-metadata">

**Author:** ![tkuehne](https://community.openhab.org/letter_avatar_proxy/v4/letter/t/41988e/32.png) [@tkuehne](https://community.openhab.org/u/tkuehne)\
**Post date:** [February 25, 2016, 8:47pm UTC](https://community.openhab.org/t/tinkerforge-symbolic-names-in-1-8-1-dont-seem-to-work/7993/4 "2016-02-25T20:47:39Z")

</div>

When I change the config of the items to point to the symbolic names instead of the uid, I can see that the log output of my running oipenhab throws a null pointer exception for every item thus modified.

---

<div class="post-metadata">

**Author:** ![watou](https://community.openhab.org/user_avatar/community.openhab.org/watou/32/70595_2.png) [@watou](https://community.openhab.org/u/watou)\
**Post date:** [February 25, 2016, 9:15pm UTC](https://community.openhab.org/t/tinkerforge-symbolic-names-in-1-8-1-dont-seem-to-work/7993/5 "2016-02-25T21:15:02Z")

</div>

> [@tkuehne](#):
>
> When I change the config of the items to point to the symbolic names instead of the uid, I can see that the log output of my running oipenhab throws a null pointer exception for every item thus modified.

Could you provide this log output to try to diagnose the cause?

---

<div class="post-metadata">

**Author:** ![tkuehne](https://community.openhab.org/letter_avatar_proxy/v4/letter/t/41988e/32.png) [@tkuehne](https://community.openhab.org/u/tkuehne)\
**Post date:** [February 26, 2016, 7:01am UTC](https://community.openhab.org/t/tinkerforge-symbolic-names-in-1-8-1-dont-seem-to-work/7993/6 "2016-02-26T07:01:57Z")

</div>

Sure. This is my config when I start openhab.cfg (just one item highlighted to shorten the output):

> site.items:  
> Number TFW\_illuminance “Helligkeit [%.0f Lux]” (TFW) {tinkerforge=“uid=uMB, illuminanceRange=6, integrationTime=7, callbackPeriod=300000, threshold=0”}

> openhab.cfg:  
> tinkerforge:hosts=192.168.199.121:4223  
> tinkerforge:refresh=300000  
> tinkerforge:alight.uid=uMB  
> tinkerforge:alight.type=bricklet\_ambient\_lightv2  
> tinkerforge:alight.illuminanceRange=6  
> tinkerforge:alight.integrationTime=7  
> tinkerforge:alight.callbackPeriod=300000  
> tinkerforge:alight.threshold=0

The debug log shows:

> 07:39:22.710 [DEBUG] [i.internal.GenericItemProvider:341] - Start processing binding configuration of Item ‘TFW\_illuminance (Type=NumberItem, State=Uninitialized)’ with ‘TinkerforgeGenericBindingProvider’ reader.  
> 07:39:22.712 [DEBUG] [kerforgeGenericBindingProvider:81] - token: uid=uMB  
> 07:39:22.713 [DEBUG] [kerforgeGenericBindingProvider:81] - token: illuminanceRange=6  
> 07:39:22.713 [DEBUG] [kerforgeGenericBindingProvider:81] - token: integrationTime=7  
> 07:39:22.713 [DEBUG] [kerforgeGenericBindingProvider:81] - token: callbackPeriod=300000  
> 07:39:22.719 [DEBUG] [kerforgeGenericBindingProvider:81] - token: threshold=0  
> 07:39:24.982 [DEBUG] [.t.internal.TinkerforgeBinding:194] - TFINIT connectModel called  
> 07:39:24.987 [DEBUG] [o.b.t.i.c.ConfigurationHandler:179] - CONFIG key:value alight.callbackPeriod : 300000  
> 07:39:24.996 [DEBUG] [o.b.t.i.c.ConfigurationHandler:179] - CONFIG key:value alight.illuminanceRange : 6  
> 07:39:24.996 [DEBUG] [o.b.t.i.c.ConfigurationHandler:179] - CONFIG key:value alight.integrationTime : 7  
> 07:39:24.996 [DEBUG] [o.b.t.i.c.ConfigurationHandler:179] - CONFIG key:value alight.threshold : 0  
> 07:39:24.996 [DEBUG] [o.b.t.i.c.ConfigurationHandler:179] - CONFIG key:value alight.type : bricklet\_ambient\_lightv2

Then I change my site.items to:

> Number TFW\_illuminance “Helligkeit [%.0f Lux]” (TFW) {tinkerforge=“name=alight”}

And the corresponding output is:

> 07:41:05.357 [DEBUG] [kerforgeGenericBindingProvider:81] - token: name=alight  
> 07:41:05.357 [DEBUG] [.t.internal.TinkerforgeBinding:657] - ITEMUPDATE bindingChanged item TFW\_illuminance  
> 07:41:05.361 [ERROR] [AbstractGenericBindingProvider:120] - Binding org.openhab.binding.tinkerforge.internal.TinkerforgeBinding threw an exception:  
> java.lang.NullPointerException: null  
> at org.openhab.binding.tinkerforge.internal.TinkerforgeBinding.getDeviceIdsForDeviceName(TinkerforgeBinding.java:765) ~[na:na]  
> at org.openhab.binding.tinkerforge.internal.TinkerforgeBinding.updateItemValues(TinkerforgeBinding.java:633) ~[na:na]  
> at org.openhab.binding.tinkerforge.internal.TinkerforgeBinding.bindingChanged(TinkerforgeBinding.java:658) ~[na:na]  
> at org.openhab.model.item.binding.AbstractGenericBindingProvider.notifyListeners(AbstractGenericBindingProvider.java:118) [org.openhab.model.item\_1.8.1.jar:na]  
> at org.openhab.model.item.binding.AbstractGenericBindingProvider.addBindingConfig(AbstractGenericBindingProvider.java:112) [org.openhab.model.item\_1.8.1.jar:na]  
> at org.openhab.binding.tinkerforge.internal.TinkerforgeGenericBindingProvider.processBindingConfiguration(TinkerforgeGenericBindingProvider.java:103) [bundlefile:na]  
> at org.openhab.model.item.internal.GenericItemProvider.internalDispatchBindings(GenericItemProvider.java:348) [org.openhab.model.item\_1.8.1.jar:na]  
> at org.openhab.model.item.internal.GenericItemProvider.internalDispatchBindings(GenericItemProvider.java:324) [org.openhab.model.item\_1.8.1.jar:na]  
> at org.openhab.model.item.internal.GenericItemProvider.processBindingConfigsFromModel(GenericItemProvider.java:171) [org.openhab.model.item\_1.8.1.jar:na]  
> at org.openhab.model.item.internal.GenericItemProvider.modelChanged(GenericItemProvider.java:390) [org.openhab.model.item\_1.8.1.jar:na]  
> at org.openhab.model.core.internal.ModelRepositoryImpl.notifyListeners(ModelRepositoryImpl.java:159) [org.openhab.model.core\_1.8.1.jar:na]  
> at org.openhab.model.core.internal.ModelRepositoryImpl.addOrRefreshModel(ModelRepositoryImpl.java:100) [org.openhab.model.core\_1.8.1.jar:na]  
> at org.openhab.model.core.internal.folder.FolderObserver.checkFolder(FolderObserver.java:142) [org.openhab.model.core\_1.8.1.jar:na]  
> at org.openhab.model.core.internal.folder.FolderObserver.run(FolderObserver.java:99) [org.openhab.model.core\_1.8.1.jar:na]

On a sidenote:  
For my backlight configuration, I get:

openhab.cfg:

> tinkerforge:lcdbacklight.uid=vBL  
> tinkerforge:lcdbacklight.subid=backlight  
> tinkerforge:lcdbacklight.type=backlight

log output:

> 07:39:25.042 [DEBUG] [o.b.t.i.c.ConfigurationHandler:148] - deviceConfig {ohId=lcdbacklight, subid=backlight, uid=vBL, type=backlight}  
> 07:39:25.046 [DEBUG] [o.b.t.i.c.ConfigurationHandler:699] - CONFIG setting no tfConfig device\_type backlight  
> 07:39:25.047 [DEBUG] [o.b.t.i.c.ConfigurationHandler:723] - \*\*\* uid is “vBL”

It seems that the config is not recognized, although it should be correct, according to the binding documentation.

Kind regards,

Thomas

---

<div class="post-metadata">

**Author:** ![watou](https://community.openhab.org/user_avatar/community.openhab.org/watou/32/70595_2.png) [@watou](https://community.openhab.org/u/watou)\
**Post date:** [February 26, 2016, 9:42am UTC](https://community.openhab.org/t/tinkerforge-symbolic-names-in-1-8-1-dont-seem-to-work/7993/7 "2016-02-26T09:42:52Z")

</div>

Hi Thomas,

I’ve added a note to a [slightly related issue](https://github.com/openhab/openhab/issues/4030) because both that issue and this one related to unexpected NullPointerExceptions in the binding code. I think if the root cause of the NPE is fixed, then your configuration should (hopefully!) start to work.

---

<div class="post-metadata">

**Author:** ![theo](https://community.openhab.org/user_avatar/community.openhab.org/theo/32/70917_2.png) [@theo](https://community.openhab.org/u/theo)\
**Post date:** [February 26, 2016, 3:27pm UTC](https://community.openhab.org/t/tinkerforge-symbolic-names-in-1-8-1-dont-seem-to-work/7993/8 "2016-02-26T15:27:57Z")

</div>

Thanks for reporting this issue. I will soon look at it.

---

<div class="post-metadata">

**Author:** ![tkuehne](https://community.openhab.org/letter_avatar_proxy/v4/letter/t/41988e/32.png) [@tkuehne](https://community.openhab.org/u/tkuehne)\
**Post date:** [March 8, 2016, 1:48pm UTC](https://community.openhab.org/t/tinkerforge-symbolic-names-in-1-8-1-dont-seem-to-work/7993/9 "2016-03-08T13:48:34Z")

</div>

It seems there is another issue with the tinkerforge binding (or it might just be a followup symptom:

Since I am not able to set the parameters (Range and integration time) for the ambient light sensor through the config file, I need to use the Brick Viewer and set the parameters manually. In my case, I need to set integration time to 50ms and range to unlimited or the sensor will be saturated throughout the day.

When I do this, the Tinkerforge binding reports the illuminance as being a factor of 10 too high. This might be due to the mismatch in what the binding thinks are set as parameters and what I did through the brick viewer, or it might be a general calculation error.

If there is a fix for the first issue (symbolic names and the setting of parameters through openhab.cfg), I’ll gladly have a go at testing this behaviour with the ambient light bricklet.

Cheers,

Thomas

---

<div class="post-metadata">

**Author:** ![theo](https://community.openhab.org/user_avatar/community.openhab.org/theo/32/70917_2.png) [@theo](https://community.openhab.org/u/theo)\
**Post date:** [March 10, 2016, 9:30pm UTC](https://community.openhab.org/t/tinkerforge-symbolic-names-in-1-8-1-dont-seem-to-work/7993/10 "2016-03-10T21:30:50Z")

</div>

Hi @tkuehne,

I think that’s not related to the symbolic names issue. If you want to integrate the Ambient Light V2 Bricklet you have to use the bricklet\_ambient\_lightv2 type which is described here: [Tinkerforge Binding · openhab/openhab1-addons Wiki · GitHub](https://github.com/openhab/openhab/wiki/Tinkerforge-Binding#ambient-light-bricklet-v2) .  
You should be able to configure range and integration time within openhab.cfg.

Can you give it a try?

Thanks,  
Theo

---

<div class="post-metadata">

**Author:** ![tkuehne](https://community.openhab.org/letter_avatar_proxy/v4/letter/t/41988e/32.png) [@tkuehne](https://community.openhab.org/u/tkuehne)\
**Post date:** [March 12, 2016, 3:22pm UTC](https://community.openhab.org/t/tinkerforge-symbolic-names-in-1-8-1-dont-seem-to-work/7993/11 "2016-03-12T15:22:57Z")

</div>

Hi Theo,

thanks for following up. I can’t test it, because the display of data will stop if I configure any symbolic names in opnhab.cfg. So, for the moment, I think this requires a fix first, before this can be analyzed further.
