LightwaveRF - New LightwaveRF Binding

Watch it whilst you remove the jar and then when you re-add it. See if anything comes up

Also, not sure how you add ‘things’ on v3 but see if it shows up there when you have to select what you want to add

I’ll fire up my v3 instance in about 20-30 mins, see what it does

1 Like

Knew you’d have a docker at hand :joy:

Will look more at v3 soon as want to move myself at some point but working on Sonoff binding at present so I tied up getting that ready for deployment

How’s the websocket been performing @xela… seems to be behaving here. Have noticed though I don’t think it receives the link plus updates…

I’ve had no issues at all, I’ve restarted the link plus, killed the connection on the docker and so far so good.

Does it do a regular poll just in case it does miss an update?

No mention on removal or on reloading the jar file. Interested in the Sonnof binding too as I have my blinds operating via ewelink. Cheers

It doesn’t, should just restart the websocket. I will add this in at some point on connection loss.

I’ve put a jar up to collect item types:

Again it’s only 2.5.11 atm tho.

OK, added again and got the following in the log:-

2021-01-18 20:37:56.027 [WARN ] [ig.xml.osgi.XmlDocumentBundleTracker] - The XML document ‘/OH-INF/thing/d21.xml’ in module ‘org.openhab.binding.lightwaverf’ could not be parsed:

com.thoughtworks.xstream.io.StreamException:

at com.thoughtworks.xstream.io.xml.StaxDriver.createReader(StaxDriver.java:124) ~[bundleFile:1.4.13]

at com.thoughtworks.xstream.XStream.fromXML(XStream.java:1334) ~[bundleFile:1.4.13]

at com.thoughtworks.xstream.XStream.fromXML(XStream.java:1288) ~[bundleFile:1.4.13]

at org.openhab.core.config.xml.util.XmlDocumentReader.readFromXML(XmlDocumentReader.java:106) ~[bundleFile:?]

at org.openhab.core.config.xml.osgi.XmlDocumentBundleTracker.parseDocuments(XmlDocumentBundleTracker.java:396) [bundleFile:?]

at org.openhab.core.config.xml.osgi.XmlDocumentBundleTracker.processBundle(XmlDocumentBundleTracker.java:382) [bundleFile:?]

at org.openhab.core.config.xml.osgi.XmlDocumentBundleTracker$2.run(XmlDocumentBundleTracker.java:347) [bundleFile:?]

at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515) [?:?]

at java.util.concurrent.FutureTask.run(FutureTask.java:264) [?:?]

at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304) [?:?]

at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) [?:?]

at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) [?:?]

at java.lang.Thread.run(Thread.java:834) [?:?]

Caused by: javax.xml.stream.XMLStreamException: java.io.IOException: /var/lib/openhab/cache/org.eclipse.osgi/302/1/bundleFile

at com.sun.org.apache.xerces.internal.impl.XMLStreamReaderImpl.setInputSource(XMLStreamReaderImpl.java:240) ~[?:?]

at com.sun.org.apache.xerces.internal.impl.XMLStreamReaderImpl.<init>(XMLStreamReaderImpl.java:210) ~[?:?]

at com.sun.xml.internal.stream.XMLInputFactoryImpl.createXMLStreamReader(XMLInputFactoryImpl.java:143) ~[?:?]

at com.thoughtworks.xstream.io.xml.StaxDriver.createParser(StaxDriver.java:234) ~[bundleFile:1.4.13]

at com.thoughtworks.xstream.io.xml.StaxDriver.createReader(StaxDriver.java:110) ~[bundleFile:1.4.13]

... 12 more

Caused by: java.io.IOException: /var/lib/openhab/cache/org.eclipse.osgi/302/1/bundleFile

at org.eclipse.osgi.storage.bundlefile.ZipBundleEntry$ZipBundleEntryInputStream.enrichExceptionWithBaseFile(ZipBundleEntry.java:190) ~[org.eclipse.osgi-3.12.100.jar:?]

at org.eclipse.osgi.storage.bundlefile.ZipBundleEntry$ZipBundleEntryInputStream.read(ZipBundleEntry.java:153) ~[org.eclipse.osgi-3.12.100.jar:?]

at com.sun.org.apache.xerces.internal.impl.XMLEntityManager$RewindableInputStream.readAndBuffer(XMLEntityManager.java:3026) ~[?:?]

at com.sun.org.apache.xerces.internal.impl.XMLEntityManager.setupCurrentEntity(XMLEntityManager.java:704) ~[?:?]

at com.sun.org.apache.xerces.internal.impl.XMLEntityManager.startEntity(XMLEntityManager.java:1398) ~[?:?]

at com.sun.org.apache.xerces.internal.impl.XMLEntityManager.startDocumentEntity(XMLEntityManager.java:1349) ~[?:?]

at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.setInputSource(XMLDocumentScannerImpl.java:256) ~[?:?]

at com.sun.org.apache.xerces.internal.impl.XMLStreamReaderImpl.setInputSource(XMLStreamReaderImpl.java:225) ~[?:?]

at com.sun.org.apache.xerces.internal.impl.XMLStreamReaderImpl.<init>(XMLStreamReaderImpl.java:210) ~[?:?]

at com.sun.xml.internal.stream.XMLInputFactoryImpl.createXMLStreamReader(XMLInputFactoryImpl.java:143) ~[?:?]

at com.thoughtworks.xstream.io.xml.StaxDriver.createParser(StaxDriver.java:234) ~[bundleFile:1.4.13]

at com.thoughtworks.xstream.io.xml.StaxDriver.createReader(StaxDriver.java:110) ~[bundleFile:1.4.13]

... 12 more

Caused by: java.io.IOException: Stream closed

at java.util.zip.InflaterInputStream.ensureOpen(InflaterInputStream.java:68) ~[?:?]

at java.util.zip.InflaterInputStream.read(InflaterInputStream.java:122) ~[?:?]

at java.io.FilterInputStream.read(FilterInputStream.java:83) ~[?:?]

at org.eclipse.osgi.storage.bundlefile.ZipBundleEntry$ZipBundleEntryInputStream.read(ZipBundleEntry.java:151) ~[org.eclipse.osgi-3.12.100.jar:?]

at com.sun.org.apache.xerces.internal.impl.XMLEntityManager$RewindableInputStream.readAndBuffer(XMLEntityManager.java:3026) ~[?:?]

at com.sun.org.apache.xerces.internal.impl.XMLEntityManager.setupCurrentEntity(XMLEntityManager.java:704) ~[?:?]

at com.sun.org.apache.xerces.internal.impl.XMLEntityManager.startEntity(XMLEntityManager.java:1398) ~[?:?]

at com.sun.org.apache.xerces.internal.impl.XMLEntityManager.startDocumentEntity(XMLEntityManager.java:1349) ~[?:?]

at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.setInputSource(XMLDocumentScannerImpl.java:256) ~[?:?]

at com.sun.org.apache.xerces.internal.impl.XMLStreamReaderImpl.setInputSource(XMLStreamReaderImpl.java:225) ~[?:?]

at com.sun.org.apache.xerces.internal.impl.XMLStreamReaderImpl.<init>(XMLStreamReaderImpl.java:210) ~[?:?]

at com.sun.xml.internal.stream.XMLInputFactoryImpl.createXMLStreamReader(XMLInputFactoryImpl.java:143) ~[?:?]

at com.thoughtworks.xstream.io.xml.StaxDriver.createParser(StaxDriver.java:234) ~[bundleFile:1.4.13]

at com.thoughtworks.xstream.io.xml.StaxDriver.createReader(StaxDriver.java:110) ~[bundleFile:1.4.13]

... 12 more

Must be some eclipse hangovers there. Give me 20

Hold on…

You added the 2.5.11 version…
I think you need to clean the cache… google will tell you how.

Then you can re add the 3 version and monitor log.

Lol, just went through and checked the whole binding as well. :roll_eyes:

I can’t get my v3 running:

2021-01-18 20:48:34.158 [WARN ] [org.apache.felix.fileinstall        ] - Error while starting bundle: file:/openhab/addons/org.openhab.binding.lightwaverf-3.0.0-SNAPSHOT.jar
org.osgi.framework.BundleException: Could not resolve module: org.openhab.binding.lightwaverf [203]
  Unresolved requirement: Import-Package: org.openhab.core.config.core
	at org.eclipse.osgi.container.Module.start(Module.java:444) ~[org.eclipse.osgi-3.12.100.jar:?]
	at org.eclipse.osgi.internal.framework.EquinoxBundle.start(EquinoxBundle.java:383) ~[org.eclipse.osgi-3.12.100.jar:?]
	at org.apache.felix.fileinstall.internal.DirectoryWatcher.startBundle(DirectoryWatcher.java:1260) [bundleFile:3.6.4]
	at org.apache.felix.fileinstall.internal.DirectoryWatcher.startBundles(DirectoryWatcher.java:1233) [bundleFile:3.6.4]
	at org.apache.felix.fileinstall.internal.DirectoryWatcher.doProcess(DirectoryWatcher.java:520) [bundleFile:3.6.4]
	at org.apache.felix.fileinstall.internal.DirectoryWatcher.process(DirectoryWatcher.java:365) [bundleFile:3.6.4]
	at org.apache.felix.fileinstall.internal.DirectoryWatcher.run(DirectoryWatcher.java:316) [bundleFile:3.6.4]

Try feature:install org.openhab.core.config.core from the console - could check it’s installed first.

I’ll make a v3 skeleton tomorrow, just made the modifications to the v2 binding today

Hmm… core.config.core… don’t sound right

Deleted the container and recreated, it’s loaded now

So sorry. I have cleared cache and removed and loaded the Jar file. Log doesnt change at any point

Have you tried to add an account thing? Does it show up?

@xela will probably be better assistance as I’ve not even looked at 3. Assuming it worked after you readded the container yesterday

Tried incrementing the name to get it to recognise it as a new binding but got the follwoing in the log:-

2021-01-19 15:02:20.062 [WARN ] [org.apache.felix.fileinstall ] - A bundle with the same symbolic name (org.openhab.binding.lightwaverf) and version (3.0.0.202101181654) is already installed. Updating this bundle instead.

2021-01-19 15:04:30.663 [WARN ] [org.apache.felix.fileinstall ] - Failed to uninstall bundle: /usr/share/openhab/addons/org.openhab.binding.lightwaverf-3.0.0-SNAPSHOT1.jar with id: 302. The bundle has already been uninstalled

2021-01-19 15:05:14.752 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing ‘hue:0210:ecb5fa3171c8:19’ changed from ONLINE to OFFLINE: Hue bridge reports light as not reachable.

2021-01-19 15:05:30.621 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing ‘hue:0210:ecb5fa3171c8:19’ changed from OFFLINE: Hue bridge reports light as not reachable. to OFFLINE (BRIDGE_OFFLINE)

2021-01-19 15:04:30.663 [WARN ] [org.apache.felix.fileinstall ] - Failed to uninstall bundle: /usr/share/openhab/addons/org.openhab.binding.lightwaverf-3.0.0-SNAPSHOT1.jar with id: 302. The bundle has already been uninstalled

Yeah, having a quick look today something isn’t quite right, even when loaded and working, it doesn’t show in the interface as a binding, yet my things are there (configured through file) and if I try and add a thing it shows the binding in the list there.

Mine also didnt load the binding until I restarted openhab, but that might be my setup as it wouldnt read the things file without a restart either

I’ll try and get the skeleton created tonight.

I have managed to get the lwrf things to appear in Openhab3, on config though its looking for the device id. Got a device id from looking at the source on my LW web app, … thing stays in initialising. Used wireshark to find the R9D2 value of the switch Im trying to use, but this too causes the thing to continue at initialising. Any thoughts ?

Just thought I’d ask… you are using a link plus hub (smart series) and not a v1 hub (connect series)?

If so… add your account thing with the username / password, then run discovery and add the things that way, and it will automatically find the deviceIds

I still have the Gen 1 controller, but have the gen 2 being delivered today.