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”}
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:
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.
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:
I’ve added a note to a slightly related issue 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.
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.
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: 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.
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.