Contribution - LG ThinQ Binding

Hi folks. I’m 5 years old user of OpenHab. I can say… this open source project is amazing !
However, in the past year, I missed a binding to integrate OpenHab with LG Thinq API. After a long research and study, I developed once, and I gonna be very happy to contribute in this project.
To do so, I read the contribution doc, opened a fork from the addons repository and put my biding on it (I’m still working on the documentations and some useful unit tests). Than I created an enhancement issue (as described in the contribution doc) and I believe the next step is to create a PR in the public addons repository to start the review process. Is that right ? Are there some other tips or missing steps ?

1 Like

Thanks for your effort an willing to contribute a new binding, highly appreciated.
As I added to your issue on github, I would suggest to rename it to LGThinq binding, to be extendable to more devices using Thinq API.
Next step then will be the pull request, which you can mark ad [WIP] - work in progress, until you finished the docs.

1 Like

:+1:

Look forward to this binding so I can connect my washing machine and dryer.
I´m not aware how much info is available through the api. But will power monitoring be possible?

This is already possible through a MQTT bridge, but a native binding will make things easier…

Hmm wasnt aware the ThinQ could be setup using MQTT.
I would however, always prefere a native binding.

No, you need a Thinq-MQTT-Proxy, I will post the link later…
Here it is …

1 Like

Hi, Kim. Actually, I’m still working on the WM device integration and I planning to release a PR for tests tomorrow to control Power and Course. But as I don’t have any LG’s WM, I need help to validate it. Currently, only Air Conditioners are relatively tested and should be working.

1 Like

I can do some testing if you like, both washingmaskine and dryer, both are connected to the ThinQ app. :slight_smile:

Great. Right now, I think you can help providing the capability file created by the binding in your OH3 intallation. Please, look at $OPENHAB_USERDATA/thinq and attach here all thinq-*-cap.json.

Regards,

Nemer.

He needs a working kar file for that … :wink:

1 Like

Just post the link to the binding, and I´ll attach the info you need :wink:

Ohhh sorry. It was my fault. We are still in PR tests Kim. It’s not officially available.

OK, I will build the kar later on and publish it here…

Here is the link to the last version :
https://github.com/hmerk/lg-thinq-binding/raw/main/org.openhab.binding.lgthinq-3.3.0-SNAPSHOT.kar

No worry… Seems like Hans-Jorg is on it :slight_smile:
I´ll give it a try asap, (just got home from work).

Thanks alot Hans-Jorg.

You‘re welcome, just had to upload it to github.

Hmm, am I missing somehting in my OH3.2 (I´m still trying to get used to OH3, used to use 2.5).

I get this error when installing the binding:

2022-02-07 17:49:16.592 [WARN ] [internal.service.FeaturesServiceImpl] - Can't load features repository mvn:org.openhab.core.features.karaf/org.openhab.core.features.karaf.openhab-core/3.3.0-SNAPSHOT/xml/features
java.lang.RuntimeException: Error resolving artifact org.openhab.core.features.karaf:org.openhab.core.features.karaf.openhab-core:xml:features:3.3.0-SNAPSHOT: [Could not find artifact org.openhab.core.features.karaf:org.openhab.core.features.karaf.openhab-core:xml:features:3.3.0-SNAPSHOT] : mvn:org.openhab.core.features.karaf/org.openhab.core.features.karaf.openhab-core/3.3.0-SNAPSHOT/xml/features
	at org.apache.karaf.features.internal.service.RepositoryImpl.load(RepositoryImpl.java:121) ~[bundleFile:?]
	at org.apache.karaf.features.internal.service.RepositoryImpl.<init>(RepositoryImpl.java:51) ~[bundleFile:?]
	at org.apache.karaf.features.internal.service.RepositoryCacheImpl.create(RepositoryCacheImpl.java:51) ~[bundleFile:?]
	at org.apache.karaf.features.internal.service.FeaturesServiceImpl.getFeatureCache(FeaturesServiceImpl.java:611) [bundleFile:?]
	at org.apache.karaf.features.internal.service.FeaturesServiceImpl.ensureCacheLoaded(FeaturesServiceImpl.java:582) [bundleFile:?]
	at org.apache.karaf.features.internal.service.FeaturesServiceImpl.getRepository(FeaturesServiceImpl.java:530) [bundleFile:?]
	at org.apache.karaf.kar.internal.KarServiceImpl.findMissingDependency(KarServiceImpl.java:165) [bundleFile:?]
	at org.apache.karaf.kar.internal.KarServiceImpl.install(KarServiceImpl.java:116) [bundleFile:?]
	at org.apache.karaf.kar.internal.KarServiceImpl.install(KarServiceImpl.java:95) [bundleFile:?]
	at org.apache.karaf.kar.internal.KarServiceImpl.install(KarServiceImpl.java:87) [bundleFile:?]
	at org.apache.karaf.deployer.kar.KarArtifactInstaller.install(KarArtifactInstaller.java:50) [bundleFile:?]
	at org.apache.felix.fileinstall.internal.DirectoryWatcher.install(DirectoryWatcher.java:950) [bundleFile:3.7.2]
	at org.apache.felix.fileinstall.internal.DirectoryWatcher.install(DirectoryWatcher.java:884) [bundleFile:3.7.2]
	at org.apache.felix.fileinstall.internal.DirectoryWatcher.doProcess(DirectoryWatcher.java:489) [bundleFile:3.7.2]
	at org.apache.felix.fileinstall.internal.DirectoryWatcher.process(DirectoryWatcher.java:365) [bundleFile:3.7.2]
	at org.apache.felix.fileinstall.internal.DirectoryWatcher.run(DirectoryWatcher.java:316) [bundleFile:3.7.2]
Caused by: java.io.IOException: Error resolving artifact org.openhab.core.features.karaf:org.openhab.core.features.karaf.openhab-core:xml:features:3.3.0-SNAPSHOT: [Could not find artifact org.openhab.core.features.karaf:org.openhab.core.features.karaf.openhab-core:xml:features:3.3.0-SNAPSHOT]
	at org.ops4j.pax.url.mvn.internal.AetherBasedResolver.configureIOException(AetherBasedResolver.java:803) ~[?:?]
	at org.ops4j.pax.url.mvn.internal.AetherBasedResolver.resolve(AetherBasedResolver.java:774) ~[?:?]
	at org.ops4j.pax.url.mvn.internal.AetherBasedResolver.resolve(AetherBasedResolver.java:657) ~[?:?]
	at org.ops4j.pax.url.mvn.internal.AetherBasedResolver.resolve(AetherBasedResolver.java:598) ~[?:?]
	at org.ops4j.pax.url.mvn.internal.AetherBasedResolver.resolve(AetherBasedResolver.java:565) ~[?:?]
	at org.ops4j.pax.url.mvn.internal.AetherBasedResolver.resolve(AetherBasedResolver.java:555) ~[?:?]
	at org.ops4j.pax.url.mvn.internal.Connection.getInputStream(Connection.java:123) ~[?:?]
	at java.net.URL.openStream(URL.java:1165) ~[?:?]
	at org.apache.karaf.features.internal.service.RepositoryImpl.load(RepositoryImpl.java:114) ~[bundleFile:?]
	... 15 more
	Suppressed: shaded.org.eclipse.aether.transfer.ArtifactNotFoundException: Could not find artifact org.openhab.core.features.karaf:org.openhab.core.features.karaf.openhab-core:xml:features:3.3.0-SNAPSHOT
		at shaded.org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:403) ~[?:?]
		at shaded.org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifacts(DefaultArtifactResolver.java:215) ~[?:?]
		at shaded.org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifact(DefaultArtifactResolver.java:192) ~[?:?]
		at shaded.org.eclipse.aether.internal.impl.DefaultRepositorySystem.resolveArtifact(DefaultRepositorySystem.java:247) ~[?:?]
		at org.ops4j.pax.url.mvn.internal.AetherBasedResolver.resolve(AetherBasedResolver.java:767) ~[?:?]
		at org.ops4j.pax.url.mvn.internal.AetherBasedResolver.resolve(AetherBasedResolver.java:657) ~[?:?]
		at org.ops4j.pax.url.mvn.internal.AetherBasedResolver.resolve(AetherBasedResolver.java:598) ~[?:?]
		at org.ops4j.pax.url.mvn.internal.AetherBasedResolver.resolve(AetherBasedResolver.java:565) ~[?:?]
		at org.ops4j.pax.url.mvn.internal.AetherBasedResolver.resolve(AetherBasedResolver.java:555) ~[?:?]
		at org.ops4j.pax.url.mvn.internal.Connection.getInputStream(Connection.java:123) ~[?:?]
		at java.net.URL.openStream(URL.java:1165) ~[?:?]
		at org.apache.karaf.features.internal.service.RepositoryImpl.load(RepositoryImpl.java:114) ~[bundleFile:?]
		at org.apache.karaf.features.internal.service.RepositoryImpl.<init>(RepositoryImpl.java:51) ~[bundleFile:?]
		at org.apache.karaf.features.internal.service.RepositoryCacheImpl.create(RepositoryCacheImpl.java:51) ~[bundleFile:?]
		at org.apache.karaf.features.internal.service.FeaturesServiceImpl.getFeatureCache(FeaturesServiceImpl.java:611) [bundleFile:?]
		at org.apache.karaf.features.internal.service.FeaturesServiceImpl.ensureCacheLoaded(FeaturesServiceImpl.java:582) [bundleFile:?]
		at org.apache.karaf.features.internal.service.FeaturesServiceImpl.getRepository(FeaturesServiceImpl.java:530) [bundleFile:?]
		at org.apache.karaf.kar.internal.KarServiceImpl.findMissingDependency(KarServiceImpl.java:165) [bundleFile:?]
		at org.apache.karaf.kar.internal.KarServiceImpl.install(KarServiceImpl.java:116) [bundleFile:?]
		at org.apache.karaf.kar.internal.KarServiceImpl.install(KarServiceImpl.java:95) [bundleFile:?]
		at org.apache.karaf.kar.internal.KarServiceImpl.install(KarServiceImpl.java:87) [bundleFile:?]
		at org.apache.karaf.deployer.kar.KarArtifactInstaller.install(KarArtifactInstaller.java:50) [bundleFile:?]
		at org.apache.felix.fileinstall.internal.DirectoryWatcher.install(DirectoryWatcher.java:950) [bundleFile:3.7.2]
		at org.apache.felix.fileinstall.internal.DirectoryWatcher.install(DirectoryWatcher.java:884) [bundleFile:3.7.2]
		at org.apache.felix.fileinstall.internal.DirectoryWatcher.doProcess(DirectoryWatcher.java:489) [bundleFile:3.7.2]
		at org.apache.felix.fileinstall.internal.DirectoryWatcher.process(DirectoryWatcher.java:365) [bundleFile:3.7.2]
		at org.apache.felix.fileinstall.internal.DirectoryWatcher.run(DirectoryWatcher.java:316) [bundleFile:3.7.2]
Caused by: shaded.org.eclipse.aether.resolution.ArtifactResolutionException: Error resolving artifact org.openhab.core.features.karaf:org.openhab.core.features.karaf.openhab-core:xml:features:3.3.0-SNAPSHOT
	at shaded.org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:413) ~[?:?]
	at shaded.org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifacts(DefaultArtifactResolver.java:215) ~[?:?]
	at shaded.org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifact(DefaultArtifactResolver.java:192) ~[?:?]
	at shaded.org.eclipse.aether.internal.impl.DefaultRepositorySystem.resolveArtifact(DefaultRepositorySystem.java:247) ~[?:?]
	at org.ops4j.pax.url.mvn.internal.AetherBasedResolver.resolve(AetherBasedResolver.java:767) ~[?:?]
	at org.ops4j.pax.url.mvn.internal.AetherBasedResolver.resolve(AetherBasedResolver.java:657) ~[?:?]
	at org.ops4j.pax.url.mvn.internal.AetherBasedResolver.resolve(AetherBasedResolver.java:598) ~[?:?]
	at org.ops4j.pax.url.mvn.internal.AetherBasedResolver.resolve(AetherBasedResolver.java:565) ~[?:?]
	at org.ops4j.pax.url.mvn.internal.AetherBasedResolver.resolve(AetherBasedResolver.java:555) ~[?:?]
	at org.ops4j.pax.url.mvn.internal.Connection.getInputStream(Connection.java:123) ~[?:?]
	at java.net.URL.openStream(URL.java:1165) ~[?:?]
	at org.apache.karaf.features.internal.service.RepositoryImpl.load(RepositoryImpl.java:114) ~[bundleFile:?]
	... 15 more

I move it to /srv/openhab-addons/ which I use to in OH2.5.

Depending to your installation it needs to be put in
/usr/share/openhab/addons