Closed durera closed 6 years ago
I'm sorry you are having troubles getting the binding to work. From what you've sent I'm not seeing any obvious problem with your installation.
Are you seeing any log message that indicate they are messages from DEBUG level logging? My first message that is smartthing specific is:
2017-12-27 22:12:27.498 [DEBUG] [.c.thing.internal.ThingManager:907 ] - Thing handler factory 'SmartthingsHandlerFactory' added
If you are not seeing any DEBUG level message I would figure that out first. The first smartthing message I see at INFO level is:
2017-12-27 22:12:28.305 [INFO ] [.s.internal.SmartthingsServlet:56 ] - Started Smartthings servlet at /smartthings
If you are not seeing this I would say that the binding isn't getting loaded. In my installation the /usr/share/openhab2 directory looks like:
` drwxrwxrwx 2 openhab openhab 4096 Aug 31 23:08 addons
drwxr-xr-x 2 root root 4096 Feb 20 2017 bin
-rw-r--r-- 1 openhab openhab 11232 Jan 22 2017 LICENSE.TXT drwxr-xr-x 7 openhab openhab 4096 Feb 20 2017 runtime -rwxr-xr-x 1 openhab openhab 73 Jan 22 2017 start_debug.sh -rwxr-xr-x 1 openhab openhab 116 Jan 22 2017 start.sh `
And, my addons directory looks like:
-rwxrw-rw- 1 openhabian openhabian 44249 Dec 11 20:39 org.openhab.binding.smartthings-2.2.0-SNAPSHOT.jar
Please check those items and let me know.
Right now I am swamped and have very limited time to spend working on OH2 addons but I'll do my best to answer your questions.
Thanks,
Bob
Did the comments I sent you 10 days ago? Ok, have you just given up. Now another user is reporting similar problems. I'll set up a new system soon and see if I can reproduce the problem you are reporting. Please let me know your status.
I've had another crack at it this weekend (hadn't had a chance to get back to this over Christmas sadly) and tracked down my mistake.
Schoolboy error at the very first hurdle:
I had done this: wget https://github.com/BobRak/OpenHAB-Smartthings/blob/master/org.openhab.binding.smartthings/target/org.openhab.binding.smartthings-2.2.0-SNAPSHOT.jar
to obtain the addon.
That's not the right URL, it needed to be: https://github.com/BobRak/OpenHAB-Smartthings/raw/master/org.openhab.binding.smartthings/target/org.openhab.binding.smartthings-2.2.0-SNAPSHOT.jar
So I didn't even have a valid jar file, just a html page :) Which is why nothing was showing up in the logs. It would have been nice if openhab could have logged something like "Hey dummy, invalid jar file in the addons directory" or something, and it never crossed my mind before to check if the thing I had downloaded was actually what I thought I had downloaded the first time around.
Having corrected that I see the addon springing into life, easiest way to show proof of life for future reference would be by looking in the events log .. it's clear as day there when this starts up:
2018-01-07 11:18:16.237 [hingStatusInfoChangedEvent] - 'smartthings:smartthings:home' changed from UNINITIALIZED to INITIALIZING
2018-01-07 11:18:16.342 [hingStatusInfoChangedEvent] - 'smartthings:smartthings:home' changed from INITIALIZING to ONLINE
2018-01-07 11:18:16.386 [hingStatusInfoChangedEvent] - 'smartthings:switch:home:stPlug1Switch' changed from UNINITIALIZED to INITIALIZING
2018-01-07 11:18:16.453 [hingStatusInfoChangedEvent] - 'smartthings:switch:home:stPlug1Switch' changed from INITIALIZING to ONLINE
I created a simple .items file to connect a couple of switches and have them being turned on/off via OpenHab now (although I did get a bit confused for a while when only plug 1 was responding to commands; until I remembered that I had to enable support for plug 2 via the smartApp, as I'd only added plug 1 when I made my first pass at this).
Switch Plug1_Power "Standing Lamp" <switch> (GF_LivingRoom) ["SmartThings"] { channel="smartthings:switch:home:stPlug1Switch:switch" }
Switch Plug2_Power "Digitial PhotoFrame" <switch> (GF_LivingRoom) ["SmartThings"] { channel="smartthings:switch:home:stPlug2Switch:switch" }
Basically, it all worked first time once I actually download the addon properly, looking forward to giving it a more thorough run through in the coming weeks 👍
Thank you for the feedback.
I just deployed a new release (including jar file) that corrects a number of issues with device configuration. It also corrects a bug in the messages handling between OpenHAB and the Smartthings hub that cause slow response. This release is much faster. Thanks to @fx for figuring this out.
I'm not having much luck getting started here:
Addon installed in openhab (raspberry pi/raspbian) and restarted the service:
Created a simple
smartthings.things
file:log4j.logger.org.openhab.binding.smartthings = DEBUG
per the docs here https://github.com/BobRak/OpenHAB-Smartthings/blob/master/org.openhab.binding.smartthings/Troubleshooting.md but that did nothingKaraf Shell logger
log4j2.logger.shell.name = org.apache.karaf.shell.support log4j2.logger.shell.level = OFF log4j2.logger.shell.appenderRefs = stdout log4j2.logger.shell.appenderRef.stdout.ref = STDOUT
Security audit logger
log4j2.logger.audit.name = org.apache.karaf.jaas.modules.audit log4j2.logger.audit.level = INFO log4j2.logger.audit.additivity = false log4j2.logger.audit.appenderRefs = audit log4j2.logger.audit.appenderRef.audit.ref = AUDIT
openHAB specific logger configuration
log4j2.logger.smartthingsBinding.name=org.openhab.binding.smartthings log4j2.logger.smartthingsBinding.level = DEBUG
log4j2.logger.openhab.name = org.openhab log4j2.logger.openhab.level = INFO