Installing LGTV bundle in OH2 fails

Hi there!
So I recently started the move to OH2 and one of the major functionalities I am still missing is the LGTV plugin.

I compiled the newest revision of the lgtv plugin and tried installing it via the Karaf console. The result is this:

openhab> bundle:install file:/path/to/bundle/org.openhab.binding.lgtv-1.9.0-SNAPSHOT.jar
Bundle ID: 169
openhab> bundle:start org.openhab.binding.lgtv
Error executing command: Error executing command on bundles:
Error starting bundle169: Could not resolve module: org.openhab.binding.lgtv [169]
Unresolved requirement: Require-Bundle: javax.servlet

Am I doing something wrong, or does the plugin need a fix?

Thanks for any help!
Jan

Try rebuilding the binding JAR after removing the last line from MANIFEST.MF:

Require-Bundle: javax.servlet

If the binding works on OH2 after that change, either submit a pull request or please report back here, and I will do so. Thanks.

Did that and it work! Great!
I think I need to fork the thing in GitHub to create pull requests, right?
Don’t know if that is the way you would go about it, I have never created a pull request on GitHub.
Unless you wanna talk me through that, you are probably better served to handle it yourself.
Thank you!

1 Like

Yes! Fork openhab/openhab, and follow these instructions to get a full IDE setup. Then create a branch for your fix, commit your change on it, push it to origin, and go back to github to submit your branch as a pull request. I am happy to do it if it’s not high on your list. :slightly_smiling:

Created the pull request. Thank you for your help!

1 Like

Newbie here… I do not see the lgtv binding in online snapshot, how/when it is available?

As soon as somebody tests and adds it. How about you?

Per the above conversion I assume jaykay did that already, but it is not in the online snapshot. If not i am happy to do that if i could :slight_smile:

@oorkalan: I don’t see the LGTV binding in the features, so please test and add per Kai’s instructions. Thanks!

It worked with my LGTV.
Copied the lgtv addon file (org.openhab.binding.lgtv-1.8.3.jar) into 2.0 addon directory. Created lgtv.cfg file with binding parameters under conf/services. It gave me javax.servlet error initially. Removed the below line from the MANIFEST.MF file inside the jar file as suggested. The error is gone and started working.

@watou I am very new this with little technical knowledge, not comfortable yet to work on eclipse to include this in the feature.

I submitted a PR so the LGTV binding can be installed from the Paper UI:

Hi

After installing LGTV Addons ( binding-lgtv1 - 1.9.0) on OpenHABian PI 6.13.170302, no module in bindings confuration appears.

When looking in Karaf log, I’ve got this java error : Unexpected problem updating configuration org.openhab.lgtv.

Don’t know what to do …

Thanks

I have this same behavior - were you able to get it working bdo.labo?