OH3 Smartthings Add-on Discovery not working

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 : JFrog
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

Hi Bob,
Great, done that and upgrade seems to happened successfully. However, the scan still doesn’t pick up anything from the smartthings hub. I’ve looked at the Smartthings Groovy IDE and when I list events for the Openhab device handler there are none - neither the Nest or the non-Nest items. I’m wondering whether I’m getting the same as @pesparza ? I’ve checked my setup and config and I think its ok.
Could you send me the curl instruction to test communications with smartthings?
George

Below are the instructions for using CURL on windows.

I also suggest you slowly go through the installation instructions again and make sure you haven’t missed anything.

  1. Especially make sure you have the ip and mac of your pc correct in the Create the Device section. If your PC has both wired and wireless adapters make sure you have selected the right one.
  2. Make sure you have selected the devices that you want openhab to know about in the SmartApp as described in the section Configuration in the Smartthings App

Here are pictures of the SmartApp from my phone:

Here are the CURL instructions:
Smartthings Curl Setup Instructions Bob Raker September 14, 2020

These instruction cover the setup of tools to be able to send requests to the Smartthings hub and view the results. This isn’t as easy as it might seem because Smartthings immediately responds to every request with an http-204. The actual results are sent by Smartthings in a separate message. Therefore one program is needed to send requests and another tool is needed to listen for and display the results. These instructions use curl for sending requests and PortListener for recieving the response. These instructions are specific to Windows.

Step 1 - Download and install
Download and install PortListener from rjlsoftware click here
Download and install curl from here

Step 2 - Create a record of your machine network information
First record the configuration of your PC. Usings a command prompt run ipconfig -all
Record your values in the table below. The Physical Address is the mac in the table

Record the existing values in your Smartthings Device settings
Logon the the Smartthings IDE click here
Select My Devices
Select your openhab device which is probably called OpenHabDevice
Record the preferences below.

Network Parameters

Device ------ ip ------ ------ port ------ ------ mac ------
Existing OpenHabDevice settings
Your PC
New OpenHabDevice settings
Smartthings Hub

Step 3 - Update the Smartthings OpenHabDevice to point to your PC In the Smartthings IDE change the Preferences as follows:

  • ip -> Your pc ip
  • mac -> Your pc mac (physical address)
  • port -> 8089

Step 4 - Start the port listener

  • Open a cmd window on your pc
  • cd to your port listener program
  • Execute: listener 8089

Step 5 - Send a discovery request to the Smartthings hub

  • Open a second cmd window on your pc
  • cd to your curl program
  • in the following command replace the ip and port with the values for your Smartthings hub
  • Execute: curl -H “Content-Type: application/json” -H “192.168.87.37:39500” --data “{“discovery”: “yes” }” http://192.168.87.37:39500/discovery In the PortListener window you should see the discovery results.

Here is output from my hub:

[ "{\"capability\": \"airConditionerMode\", \"attribute\": \"airConditionerMode\", \"name\": \"Simulated Air Conditioner\", \"id\": \"63b250ce-3b4c-41ed-b28c-db320f3f5bad\" }", "{\"capability\": \"dryerMode\", \"attribute\": \"dryerMode\", \"name\": \"Simulated Dryer\", \"id\": \"31b90e1b-1ed2-4d09-aa16-b95fd9d96139\" }", "{\"capability\": \"dryerOperatingState\", \"attribute\": \"machineState\", \"name\": \"Simulated Dryer\", \"id\": \"31b90e1b-1ed2-4d09-aa16-b95fd9d96139\" }", "{\"capability\": \"dryerOperatingState\", \"attribute\": \"dryerJobState\", \"name\": \"Simulated Dryer\", \"id\": \"31b90e1b-1ed2-4d09-aa16-b95fd9d96139\" }", "{\"capability\": \"lock\", \"attribute\": \"lock\", \"name\": \"Simulated Lock\", \"id\": \"5fec2472-38f2-474e-971c-434e3b4d1488\" }", "{\"capability\": \"switch\", \"attribute\": \"switch\", \"name\": \"Master Bedroom Lights\", \"id\": \"746da922-0351-4c5c-bad9-a0e27a7b2487\" }", "{\"capability\": \"switch\", \"attribute\": \"switch\", \"name\": \"Guest Bedroom Light\", \"id\": \"1ac2d431-fbb7-4315-b68a-2c90dac8473d\" }", "{\"capability\": \"switch\", \"attribute\": \"switch\", \"name\": \"Living Room Light\", \"id\": \"c684d874-3885-4b93-9a95-afe7455f6c2a\" }", "{\"capability\": \"switch\", \"attribute\": \"switch\", \"name\": \"Office Light\", \"id\": \"5fc65f46-c0ef-4439-b57d-563e46fddfcc\" }", "{\"capability\": \"switch\", \"attribute\": \"switch\", \"name\": \"Simulated Dryer\", \"id\": \"31b90e1b-1ed2-4d09-aa16-b95fd9d96139\" }", "{\"capability\": \"switchLevel\", \"attribute\": \"level\", \"name\": \"Sengled Bulb\", \"id\": \"e5878a31-3d0a-44e0-b61b-9c5c34075239\" }", "{\"capability\": \"temperatureMeasurement\", \"attribute\": \"temperature\", \"name\": \"Simulated Air Conditioner\", \"id\": \"63b250ce-3b4c-41ed-b28c-db320f3f5bad\" }", "{\"capability\": \"temperatureMeasurement\", \"attribute\": \"temperature\", \"name\": \"Garage Door\", \"id\": \"fe147198-9c03-4c88-bb1d-b46749bf2fad\" }", "{\"capability\": \"thermostat\", \"attribute\": \"temperature\", \"name\": \"Simulated Air Conditioner\", \"id\": \"63b250ce-3b4c-41ed-b28c-db320f3f5bad\" }", "{\"capability\": \"thermostat\", \"attribute\": \"heatingSetpoint\", \"name\": \"Simulated Air Conditioner\", \"id\": \"63b250ce-3b4c-41ed-b28c-db320f3f5bad\" }", "{\"capability\": \"thermostat\", \"attribute\": \"coolingSetpoint\", \"name\": \"Simulated Air Conditioner\", \"id\": \"63b250ce-3b4c-41ed-b28c-db320f3f5bad\" }", "{\"capability\": \"thermostat\", \"attribute\": \"thermostatSetpoint\", \"name\": \"Simulated Air Conditioner\", \"id\": \"63b250ce-3b4c-41ed-b28c-db320f3f5bad\" }", "{\"capability\": \"thermostat\", \"attribute\": \"thermostatMode\", \"name\": \"Simulated Air Conditioner\", \"id\": \"63b250ce-3b4c-41ed-b28c-db320f3f5bad\" }", "{\"capability\": \"thermostat\", \"attribute\": \"thermostatFanMode\", \"name\": \"Simulated Air Conditioner\", \"id\": \"63b250ce-3b4c-41ed-b28c-db320f3f5bad\" }", "{\"capability\": \"thermostat\", \"attribute\": \"thermostatOperatingState\", \"name\": \"Simulated Air Conditioner\", \"id\": \"63b250ce-3b4c-41ed-b28c-db320f3f5bad\" }", "{\"capability\": \"thermostatCoolingSetpoint\", \"attribute\": \"coolingSetpoint\", \"name\": \"Simulated Air Conditioner\", \"id\": \"63b250ce-3b4c-41ed-b28c-db320f3f5bad\" }", "{\"capability\": \"thermostatFanMode\", \"attribute\": \"thermostatFanMode\", \"name\": \"Simulated Air Conditioner\", \"id\": \"63b250ce-3b4c-41ed-b28c-db320f3f5bad\" }", "{\"capability\": \"thermostatHeatingSetpoint\", \"attribute\": \"heatingSetpoint\", \"name\": \"Simulated Air Conditioner\", \"id\": \"63b250ce-3b4c-41ed-b28c-db320f3f5bad\" }", "{\"capability\": \"thermostatMode\", \"attribute\": \"thermostatMode\", \"name\": \"Simulated Air Conditioner\", \"id\": \"63b250ce-3b4c-41ed-b28c-db320f3f5bad\" }", "{\"capability\": \"thermostatOperatingState\", \"attribute\": \"thermostatOperatingState\", \"name\": \"Simulated Air Conditioner\", \"id\": \"63b250ce-3b4c-41ed-b28c-db320f3f5bad\" }" ]

Let me know how it goes.

Bob

OK that worked. I was already ‘port listening’ before I sent the curl command from the PC and there were some logs of the form

{“capabilityAttribute”:“energy”,“deviceDisplayName”:“Ovens”,“value”:“0.284”}
Client disconnected
Client connected
POST /smartthings/state HTTP/1.1
Accept: /
User-Agent: Linux UPnP/1.0 SmartThings
HOST: 10.0.0.38:8089
Content-Type: application/json
Content-Length: 74

When I ran the curl command as per your instructions, this is what I got

["{“capability”: “battery”, “attribute”: “battery”, “name”: “Nest Protect - Kitchen”, “id”: “d8b16768-0c61-4a42-
a492-0767ce7bb7a8” }","{“capability”: “battery”, “attribute”: “battery”, “name”: “Nest Protect - Helen’s Wardrobe”
, “id”: “876aa607-0db3-44e5-8575-735bc1a16ee0” }","{“capability”: “battery”, “attribute”: “battery”, “name”: “Ne
st Protect - Living Room”, “id”: “3c65c752-c730-46ef-bfa1-9529c1ac9094” }","{“capability”: “battery”, “attribute”:
“battery”, “name”: “Front Door Smart Lock”, “id”: “4e136628-19a8-45b5-9334-efb3cd6a378c” }","{“capability”: “carbon
MonoxideDetector”, “attribute”: “carbonMonoxide”, “name”: “Nest Protect - Living Room”, “id”: “3c65c752-c730-46ef-b
fa1-9529c1ac9094” }","{“capability”: “carbonMonoxideDetector”, “attribute”: “carbonMonoxide”, “name”: "Nest Protect

  • Kitchen", “id”: “d8b16768-0c61-4a42-a492-0767ce7bb7a8” }","{“capability”: “carbonMonoxideDetector”, “attribute”:
    “carbonMonoxide”, “name”: “Nest Protect - Helen’s Wardrobe”, “id”: “876aa607-0db3-44e5-8575-735bc1a16ee0” }","{“capa
    bility”: “energyMeter”, “attribute”: “energy”, “name”: “Ovens”, “id”: “e90fd550-c609-4edc-a2ba-88822236c41a” }",
    “{“capability”: “energyMeter”, “attribute”: “energy”, “name”: “hot plates”, “id”: “59d21984-1d77-45f3-a0f0-0c15d
    37d4670” }”,"{“capability”: “lock”, “attribute”: “lock”, “name”: “Front Door Smart Lock”, “id”: “4e136628-19a8-
    45b5-9334-efb3cd6a378c” }","{“capability”: “powerMeter”, “attribute”: “power”, “name”: “Ovens”, “id”: “e90fd550
    -c609-4edc-a2ba-88822236c41a” }","{“capability”: “powerMeter”, “attribute”: “power”, “name”: “hot plates”, “id”:
    “59d21984-1d77-45f3-a0f0-0c15d37d4670” }","{“capability”: “powerSource”, “attribute”: “powerSource”, “name”: “Nes
    t Protect - Helen’s Wardrobe”, “id”: “876aa607-0db3-44e5-8575-735bc1a16ee0” }","{“capability”: “powerSource”, “attrib
    ute”: “powerSource”, “name”: “Nest Protect - Kitchen”, “id”: “d8b16768-0c61-4a42-a492-0767ce7bb7a8” }","{“capabilit
    y”: “powerSource”, “attribute”: “powerSource”, “name”: “Nest Protect - Living Room”, “id”: “3c65c752-c730-46ef-bf
    a1-9529c1ac9094” }","{“capability”: “relaySwitch”, “attribute”: “switch”, “name”: “Boiler Switch - 2=HW”, “id”:
    “1dffe26e-909a-4b83-a181-bf9724e35e9c” }","{“capability”: “relaySwitch”, “attribute”: “switch”, “name”: “Boiler Sw
    itch - 1=CH”, “id”: “3b9d82a1-9417-4f62-a171-f85c55ad65e9” }","{“capability”: “relaySwitch”, “attribute”: “switch”
    , “name”: “Boiler Switch”, “id”: “dc2acb89-2cea-49b2-8a09-e04eed5bf6a3” }","{“capability”: “smokeDetector”, “attri
    bute”: “smoke”, “name”: “Nest Protect - Living Room”, “id”: “3c65c752-c730-46ef-bfa1-9529c1ac9094” }","{“capability
    “: “smokeDetector”, “attribute”: “smoke”, “name”: “Nest Protect - Kitchen”, “id”: “d8b16768-0c61-4a42-a492-0767ce
    7bb7a8” }”,”{“capability”: “smokeDetector”, “attribute”: “smoke”, “name”: “Nest Protect - Helen’s Wardrobe”, “id
    “: “876aa607-0db3-44e5-8575-735bc1a16ee0” }”,”{“capability”: “smokeDetector”, “attribute”: “carbonMonoxide”, “name”
    : “Nest Protect - Living Room”, “id”: “3c65c752-c730-46ef-bfa1-9529c1ac9094” }","{“capability”: “smokeDetector”, “at
    tribute”: “carbonMonoxide”, “name”: “Nest Protect - Kitchen”, “id”: “d8b16768-0c61-4a42-a492-0767ce7bb7a8” }","{“ca
    pability”: “smokeDetector”, “attribute”: “carbonMonoxide”, “name”: “Nest Protect - Helen’s Wardrobe”, “id”: “876a
    a607-0db3-44e5-8575-735bc1a16ee0” }","{“capability”: “temperatureMeasurement”, “attribute”: “temperature”, “name”:
    “Heating Thermostat”, “id”: “34bb72ed-2cf8-437a-bedb-e79a77651bb8” }"]

Thanks again
George

P.S. don’t know why the pasting has inserted a bullet in the middle - it was pasted as plain text’
PPS. It was pasted from the window that spawned from Port Listener. It seems to have suppressed the back-slashes in the cut & paste. Let me know if that is crucial to troubleshooting and I’ll repeat from the cmd window.

Thank you for this. I had the same issue, and your new jar file and instructions solved it.

Thanks much!!!

Hi Bob,

It did initially work, then I added some more devices to my smartthings hub and it would no longer sync.

Thanks for the feedback. Knowing if things work or not is very helpful.

By sync do you mean it would not discover the new devices? If so, did you add them in the SmartApp? See message 27.

I’m pleased to report that auto-discovery works now for me after I updated the v3.1.0 SNAPSHOT installation. Thanks very much - I notice there has been a recent update to the binding on github which I have now picked up. It works for the zwave things that I still have on the Smartthings hub.

I’m still struggling to get the Nest things to work though. I’ve done various bits of troubleshooting which I’ll report on a new thread.

George:

Smartthings is redoing their whole development process and process for supporting custom integrations. It wouldn’t surprise me if the Groovy integration that I used to develop this binding doesn’t integrate with their new Nest integration.

Several months ago I looked into rewriting this binding using the new framework. It supports Java and many other languages. I was able to get their sample Java project to work but it wasn’t easy. In the end their instructions were out of date. After finally getting it working I looked at what it would take to redo this binding using the new framework. I posted some questions and there have never been answered so I have given up thinking about that for now.Here is the thread, Six months old and no answer.

Hi Bob
I don’t have the new Nest integration. I have the old Works with Nest configuration with a Nest API and NST Manager.

My investigations posted here make me think that the Smartthings end of things is reporting the events.

From the OH3 logs “Nest_Protect_-_Kitchen tried updating channel smoke although the handler was already disposed.” Any idea what this may mean?

George