OH3 Smartthings Add-on Discovery not working

Eclipse gets every 3 months a new release, so the screenshots tend to get outdated quickly. But both versions or any recent version is ok.

For pull requests always use the main branch. The other ones are for patch releases and are mostly only used to port bug fixes back from the main branch for a bug fix you want in a patch release.

Hi, Are you any further along with this? Interestingly, with a clean build and fresh install of OH3, after manually adding the hub the scan will find all the attached devices. It’s only after a second scan you lose sync.

Thanks

Antony

I am making progress. I have been seriously slowed down because I am having problems getting the Eclipse development environment to work properly. I recently installed the VS Code development environment and that works much better… I should be able to finish it in the next couple of days. I could put a copy in my github and you could get it right away. Let me know if you want that. This version will require openHAB 3.1. I’ve found some differences between the way 3.0 and 3.1 sends commands from OH to the binding.

BTW. If your system only has one binding installed the existing version is fine. It is when additional bindings are installed that it fails.

Bob

2 Likes

I completed the changes needed to make the discovery service work correctly. I submitted them to openHAB but I’m not sure how long it will take them to publish the update. I have deployed it on my github repo which you can find here. Make sure to download the jar file: org.openhab.binding.smartthings-3.1.0-SNAPSHOT.jar.

This requires OH 3.1. If you are running OH 3.0 you will have to upgrade. I had to choose 3.1 because that is the version in the openHAB add-ons repo.

I believe the correct installation steps would be:

  1. Setting -> Bindings -> select Smartthings -> click uninstall
  2. upgrade your install to 3.1 if necessary.
  3. shutdown openHAB
  4. copy the new jar file to the addons directory in you installation
  5. start openHAB
  6. when you click on Settings -> Bindings I believe that you will see Smartthings is already present.
1 Like

Hi - I am using a new 3.1 (Windows 10) fresh install of OH3.1. Completed ST Device/Handers configuration and copied your .jar to the
“C:\Program Files\PRODOpenHAB\userdata\tmp\mvn\org\openhab\addons\bundles\org.openhab.binding.smartthings\3.1.0-SNAPSHOT”

directory but still no luck. Using the ST Dev “Live Logging” I can see the request but not getting anything back in OH when I SCAN. Live Logging Below:

e75ba0c8-a557-4af3-b6f1-3e80ab65eeb3 9:06:11 AM: debug Creating event with message: [path:discovery]

e75ba0c8-a557-4af3-b6f1-3e80ab65eeb3 9:06:11 AM: debug Msg ‘[index:A4, mac:302432EAD1C0, headers:[post /discovery http/1.1:null, content-length:20, accept-encoding:gzip, host:192.168.2.201:39500, user-agent:Jetty/9.4.20.v20190813, content-type:application/json], body:{“discovery”: “yes”}, header:POST /discovery HTTP/1.1
Accept-Encoding: gzip
User-Agent: Jetty/9.4.20.v20190813
Content-Type: application/json
Host: 192.168.2.201:39500
Content-Length: 20, data:[discovery:yes], json:[discovery:yes]]’

Any Thoughts? The area I am not 100% confident, being a noob to this, is the .jar file. When I go to the addons dir above it has several files created from the bindings. so it is not a direct file replace. I really appreciate your time and efforts on this.

I have the same issue. I am un ubuntu. JAR file added to /usr/share/openhab/addons/. The binding does not show up in settings but is there when you add a thing. I also noticed an update to the smartapp so I updated the IDE. Even tried removing the smartapp and re-adding it but no luck.

It looks like the discovery request is being sent but no data is being returned. In the Smartthings Installation document did you complete the Configuration in the smartthings app? If not that is most likely your issue.

Also, I suspect you haven’t copied the jar file to the correct location. In the Windows Installation guide it says to unzip to a directory. Where is that on your system? There is an addons directory under where you unzipped to. On my system I copied the zip contents to d:\openhab so the addons dir is at D:\openhab\addons

@Antony_Price
OK, here are a bunch of things to try

Check the file permissions
Check the permissions of the Smartthings jar you copied to addons. The owner should be openhab:openhab and the permissions at least -rw-rw-r–

Check the bindings
In the UI: Settings -> Bindings
There should not be a Smartthings binding installed. If you see otherwise let me know the version.

Check the Things for the Smartthings Hub
In the UI: Settings -> Things
Is there an entry for Smartthings Hub? If so click on it and make sure it is correctly configured.
If not, Click on the Plus sign and see if you can add the Smartthings Hub. And, then configure the IP and port if possible.

Check if openhab has a copy of the Smartthings binding loaded
Open the console using these instructions
enter: bundle:list | grep Smartthings
What is the version? I think it should be 3.1.0.202101191633. I f not let me know what it is. Also, are there 2 Smartthings bundles?

Flush the caches
Sometime flushing the caches helps. Try that using these instructions. Then it would be good to go through there instructions again.

Let me know how all of this goes.

Hi, I’m having a similar problem. I am running Openhabian 3 Main branch (very latest version of Openhabian) on a RPi3+. The reason for trying to link back to my Smartthings v2 hub is because I have 3 Nest Protects working on it and I can’t migrate them onto Openhabian.

The binding (v3.0.0) has installed fine and the hub shows up as online but when I scan it doesn’t detect the Nest Protects.

Should I install the 20 Jan 2021 update of the binding? In which case I need to make sure that Openhabian is at v3.1. I think it is at 3.0.0 still. If so where do I install? I can’t see anything loaded already in /usr/share/openhab/addons but maybe that is the wrong location on OH3.

Or should I adopt a manual approach to configure the things?
thanks George

@kingswindsor
Manual configuration will certainly work.

I’m not sure what the 20 Jan 2021 binding is. Is that from my github/BobRak?

Look at post 8 in this thread and follow those instructions to get the version 3.1 binding from my github. According to the docs /usr/share/openhab/addons is the right location and I think that is correct.

Also have a look at posts 11 & 12. Unfortunately neither of those people provided any response.

Please let me know how it goes.

Is one of the nest products you integrated into ST a thermostat? I have a nest thermostat and would sure like to get that working again.

Bob

@Antony_Price Have you made any progress? Any feedback would be helpful to me and possibly others reading this thread.

Thank you!

@pesparza Have you made any progress? Any feedback would be helpful to me and possibly others reading this thread.

Thank you!

@BobRak Still no luck. I have reviewed all doc and procedures. Tried re-installing on a diff computer. I do see the binding when I am adding a thing but not in bindings - as expected from your JAR file. Not sure what the heck I am missing. I do appreciate your help but I am not sure where to go from here. I can see it hitting ST Live Logging (img below) so I know the request is going out.

Thanks Bob,
I’ve checked what the latest version of openhabian main branch is and it says its at v3.0.0-1 so I don’t meet the prerequisites for the new jar file. So I guess I need to try manually but that looked a bit confusing - will try. Is the manual method all done through the OH3 user interface?

The Nest things I have are 3 Nest Protects , but no thermostat. I’ll let you know how I get on though.

I’m sorry you are having such a difficult time with this.

In post 12 I asked if you performed the step in the section of the install document titled Configuration in the smartthings app. Could you please make sure you have performed the steps to configure your smartthings SmartApp. It looks to me like the binding is sending in the discovery request but there is no response.

Also, in the section “Create the Device” Make sure the ip, mac and port match those of your openhab server.

Are you familiar with the Curl command that is used to send network messages to other computers? If so I could send you instruction of how to sent a discovery request to smartthings and see what it sends back.

Bob

It will take a couple of days but I’ll try to setup a new version 3.1 openhab server and make sure I can provide you with better instructions.

Bob

The Nest-Smarthings integration released last week doesn’t expose any Nest devices through the API. Unfortunately there’s no way to get these devices into OpenHab using the SmartThings binding - at least until Google and Samsung do a bunch more development to let this happen.

Nest devices don’t even appear as devices in the SmartThings IDE…

@jpeden Thanks for this.

@pesparza
In addition to the info in post 19, check the running version by viewing the file: {openhab dir}\userdata\etc\version.properties. It should look like:

openHAB Distribution Version Information

build-no : Build #2152
online-repo : https://openhab.jfrog.io/openhab/libs-snapshot
Repository Version

openhab-distro : 3.1.0-SNAPSHOT
openhab-core : 3.1.0-SNAPSHOT
openhab-addons : 3.1.0-SNAPSHOT
karaf : 4.2.7

Get the updated smartthings jar file from: here. Make sure to pick the file: org.openhab.binding.smartthings-3.1.0-SNAPSHOT.jar.
And place it in {openhab dir}\addons. Finally restart openhab

I’ve tries this on my windows setup and it works just fine.

@kingswindsor
Here is how to upgrade your linux system to ver 3.1
Run “sudo openhabian”
pick 40 - Switch the installed openHAB version or apply tweaks
select openHAB snapshot
Will get message that snapshot is running
from the linux console
cat /var/lib/openhab/etc/version.properties
you should see that 3.1.0-SNAPSOT is installed