How to install a 2.X binding manually? (In this case KNX)

Strange. What does

bundle:list -s | grep knx

yield? It could very well be that both the 1.9 and 2.0 bindings are installed in your runtime, but what you show above it not pointing into that direction. In that case, you should

bundle:uninstall <wrong-binding>

it. You are sure that the /usr/share/openhab2/addons is the folder that is defined the .cfg holding the pointer to the add-ons folder?

Does this look right for you?

openhab> bundle:list -s | grep knx
193 | Active | 80 | 2.1.0.201702062042 | KNX Binding | org.openhab.binding.knx
openhab> feature:list -s | grep knx
openhab-binding-knx1 | 1.9.0 | | Uninstalled | addons-2.0.0 | KNX Binding

If yes, is it intentional that 2.0 does not show up in PauperUI? And do I need another configuration for KNX Binding 2.0 compared to 1.9? Probably yes. As mentioned in Loops on KNX bus I currently only have this one knx.items file with

Switch WZ_Deckenleuchte {knx="1/0/20"}
Switch WZ_Downlights {knx="1/0/24"}

Nothing else. My log shows me:

19:30:52.822 [INFO ] [smarthome.event.ItemCommandEvent    ] - Item 'WZ_Deckenleuchte' received command ON
19:30:52.827 [INFO ] [marthome.event.ItemStateChangedEvent] - WZ_Deckenleuchte changed from OFF to ON
19:30:53.794 [INFO ] [smarthome.event.ItemCommandEvent    ] - Item 'WZ_Deckenleuchte' received command OFF
19:30:53.798 [INFO ] [marthome.event.ItemStateChangedEvent] - WZ_Deckenleuchte changed from ON to OFF

Compared to my logs in 1.9 (Loops on KNX bus) the calimero stuff is missing. That’s probably why nothing happens.

Can you quickly give me the most simple KNX Binding 2.0 config which accomplishes what I had for 1.9? The stuff in ReadMe looks rather complicated. I’ll go through it.

Thanks again for your help and your work on 2.0.

Hi everyone,
I have managed to install the following KNX2.0 Binding https://github.com/openhab/openhab2-addons/files/784970/org.openhab.binding.knx_2.0.0.201702181144.jar.zip
and got it to work so far, as it is showing telegrams on the bus.

22:45:37.509 [TRACE] [nx.handler.KNXBridgeBaseThingHandler] - Received a Group Write telegram from ‘1.1.12’ for destination ‘2/4/1’
22:45:37.509 [DEBUG] [tuwien.auto.calimero ] - calimero.link.224.0.23.12:3671: indication from 1.1.12
2

Next step: I wanted to use the knx.knxproj file of my ETS5 to get all the things and items automatically created.
I am using a Raspberry 3 with Openhabian. With standard-settings while importing the file after about 5 minutes I am getting this:

22:21:49.892 [ERROR] [org.apache.felix.fileinstall ] - In main loop, we have serious trouble
java.lang.OutOfMemoryError: Java heap space

Last lines in the log before the OOM were (leaving out the telegram-listening-lines):

[TRACE] [x.internal.parser.KNXProject13Parser] - Found KNX manufacturer data for a device by ‘GIRA Giersiepen’
[TRACE] [x.internal.parser.KNXProject13Parser] - Found KNX manufacturer data for a device by ‘ABB’
[INFO ] [x.internal.parser.KNXProject13Parser] - Found KNX project data for project ‘Fl29’

So I changed the runtime/bin/karaf to

if [ “x${JAVA_MAX_MEM}” = “x” ]; then
JAVA_MAX_MEM=768M
export JAVA_MAX_MEM
fi

unfortunatelly the problem is still there, it just takes a lot longer and top looks like this all the time (the 100.2 is %CPU):

915 openhab 20 0 440364 338708 13260 S 100.2 34.0 15:49.49 java
413 openhab 20 0 6452 2840 2472 S 0.0 0.3 0:00.05 karaf

and it dies like this:

[WARN ] [he.sshd.server.session.ServerSession] - Exception caught
java.lang.OutOfMemoryError: Java heap space

Anyone else having problems importing the ETS5-File? Mine has a size of about 15MB - the project contains about 40 physical adresses.

My normal payload without importing the knx-file after about 5mins is like this:

918 openhab 20 0 428540 153000 13424 S 0.7 15.4 0:59.07 java
411 openhab 20 0 6452 2848 2480 S 0.0 0.3 0:00.05 karaf

is a new knx 2.x version available?

Hello @kgoderis

I am a new use for openhab2
Develop a new binding problem
Can you talk to you?
mail=z12385200@gmail.com

Thx,
tony

Hallo @kgoderis,
could you make the knx2.x version to me also available?
THANKS!!

mail=michael@familie-martens.de

Thank you
Michael

Hi all,

I meanwhile tried my luck by using the above:
org.openhab.binding.knx_2.0.0.201702181144.jar

I read carefully:

but log is telling:
[org.openhab.binding.knx ] - FrameworkEvent ERROR - org.openhab.binding.knx

and
201 | Installed | 80 | 2.0.0.201702181144 | KNX Binding | org.openhab.binding.knx

I created the things file and knx.cfg to name the proj

ANY IDEA ??? …
ANY help would be appreciated.

Michael

Hey there,

sorry for warming this up again: After dropping the jar into the addons folder, /var/log/openhab2/events.log gives me a bunch of error messages, starting with

2018-02-11 07:29:10.134 [ERROR] [org.eclipse.osgi                    ] - FrameworkEvent ERROR - org.eclipse.osgi
java.lang.NullPointerException: null
	at org.apache.karaf.features.extension.BundleWires.<init>(BundleWires.java:50) [?:?]
	at org.apache.karaf.features.extension.StoredWiringResolver.update(StoredWiringResolver.java:105) [?:?]
	at org.apache.karaf.features.extension.Activator.bundleChanged(Activator.java:51) [?:?]
[...]

2018-02-11 07:29:10.275 [ERROR] [org.openhab.binding.knx             ] - [org.opnhab.binding.knx.folderobserver(235)] Error during instantiation of the implementation object

java.lang.NoClassDefFoundError: org/eclipse/smarthome/core/service/AbstractWatchQueueReader
	at java.lang.Class.getDeclaredConstructors0(Native Method) ~[?:?]
	at java.lang.Class.privateGetDeclaredConstructors(Class.java:2671) ~[?:?]
	at java.lang.Class.getConstructor0(Class.java:3075) ~[?:?]
	at java.lang.Class.newInstance(Class.java:412) ~[?:?]
[...]

2018-02-11 07:29:10.288 [WARN ] [org.openhab.binding.knx             ] - FrameworkEvent WARNING - org.openhab.binding.knx

org.osgi.framework.ServiceException: org.apache.felix.scr.impl.manager.SingleComponentManager.getService() returned a null service object
	at org.eclipse.osgi.internal.serviceregistry.ServiceFactoryUse.factoryGetService(ServiceFactoryUse.java:232) [?:?]
	at org.eclipse.osgi.internal.serviceregistry.ServiceFactoryUse.getService(ServiceFactoryUse.java:111) [?:?]
	at org.eclipse.osgi.internal.serviceregistry.ServiceConsumer$2.getService(ServiceConsumer.java:45) [?:?]
[...]

The binding somewhat shows up and I can properly configure the bridge (KNX IP Router). All KNX devices are discovered and shown as Things. They however do not have any channels associated with them. From the above I would assume the automatic parsing of the ETS5 file does not work. But why and what can I do about it?

Thanks,
Klayman