BobRak / OpenHAB-Smartthings

53 stars 54 forks source link

binding doesn't appear in paperUI #56

Closed arrow53 closed 5 years ago

arrow53 commented 5 years ago

i've placed the file org.openhab.binding.smartthings-2.4.0-SNAPSHOT.jar in my directory /usr/share/openhab2/adddons and set the owner per chown openhab:openhab.

But, when I try to add things the binding doesn't show up. The only one that is there is my existing z-wave binding.

I'm on OH 2.4.0.M5, Ubuntu 18.04, apt install

I also made smartthings.things and smartthings.items files.

I've restarted several times. Anything else I should be doing?

arrow53 commented 5 years ago

@BobRak I'm going to close this. But, as an FYI on a clean install (via apt per above) the same issue as #15 regarding the commons codec thing appears. Downloading per #15 and then renaming it to org.apache.commond.codec.jar allows the plugin to work.

BobRak commented 5 years ago

Hi: As you see from #15 others have had this issue of not having the commons-codec jar. I've not had to copy this file to addons and have never had messages that it is missing. I had been thinking this had to do with different versions of openHab. But now I suspect I haven't had this issue because the Windows OpenHAB eclipse install includes this jar file. And, my openhabian install on my RPi includes that jar file which is located at: /usr/share/openhab2/runtime/system/commons-codec/commons-codec/1.6/commons-codec-1.6.jar. Could you please check your installation and see if you have a commons-codec*.jar in your runtime path someplace? I would appreciate your help in resolving this issue once and for all. Thanks, Bob

arrow53 commented 5 years ago

@BobRak I do see ./usr/share/openhab2/runtime/system/commons-codec/commons-codec/1.6/commons-codec-1.6.jar

So, not clear why I had problems but my sense is that it's complaining because your jar wants it to be called org.apache.commons.codec and not just commons.codec. When I downloaded it for manual install (didn't realize I actually had it on my filesystem) I had to rename it to get it to work.

BobRak commented 5 years ago

arrow53: It's not clear to me why you are having this problem. The only dependency I have on org.apache.commons.codec is that I added it to my dependencies in the MANIFEST.MF file. I added that as a result of isse #15. That was on Windows. And, that is an older problem and I've built new jar files against later versions of OpenHAB so I don't think that is relevant any longer.

I've looked at other bindings and their import statements in MANIFEST.MF are identical to mine.

I know there are others who are using my binding and have not had to add the commons-codec file to their addon's directory.

Do you know which version of OpenHAB you installed? Have a look at this post in the OpenHAB Community. If it isn't too much trouble could you try to install a SNAPSHOT version of OpenHAB. If you don't have time I can try but it maybe a few weeks as I'll be out of town for a while.

Bob

arrow53 commented 5 years ago

Sure, i'll have access to the machine tomorrow to confirm. I believe though I tried on both testing and snapshot. Started with testing and that didn't work so I installed snapshot. i'll take a look at the manifest.mf file tomorrow and see if I notice anything weird. This is a development box so happy to wipe it and start fresh if that helps.

arrow53 commented 5 years ago

I did indeed try on testing and snapshot. @BobRak could it be in your manifest you should just drop the org.apache on the front in the manifest?

BobRak commented 5 years ago

Thank you very much for trying with the SNAPSHOT version of the Linux install. Just to make sure we are on the same page, are you getting: Error executing command: Error executing command on bundles: Error starting bundle 204: Could not resolve module: org.openhab.binding.smartthings [204] Unresolved requirement: Import-Package: org.apache.commons.codec

I have removed the org.apache.commons.codec line from my MANIFEST.MF. I've never needed it and only added it to try to resolve issue #15. I'll deploy it in the next couple of days. I'll let you know when it is deployed. For now I guess you will just need to include the codec jar in your addons directory.

Thanks again for helping.

Bob

BobRak commented 5 years ago

I've just uploaded a new release. This one doesn't include org.apache.commons.codec. If you have time could you try it? Please send me any error messages. I'm not suspecting this change will help with the codec problem. But, I will submit this to the openHAB community and see if they have any recommendations. Like I said earlier I don't have the codec file in my addons directory on my Raspberry Pi or on my Windows machine and both of those are fine.

BTW this requires that you reinstall the device handler and SmartApp on the hub

Thanks again,

Bob