-
Notifications
You must be signed in to change notification settings - Fork 53
Description
Hi, I placed the rather lengthy post reproduced below on the OH forum, but perhaps it is more appropriate here.
In brief: I bought a V3 hub and got it to work with the Smartthings phone app. Then I installed your software on the hub, following the procedure described in the binding doc. The OpenHabDevice is now reported to be connected by my phone app. I added to my OH config a thing file as described in you doc, and OH now reports that a thing called "Smartthings Hub" is connected.
But beyond that point, all the attemps I made (as decribed in the post reproduced below) at discovering and communicating with the devices connected to my hub failed.
I really hope you can help me look in the right places. Thanks in advance,
-- Pierre
Problem getting the SmartThings OH binding to work
Hello all,
Background: running OH 2.5.8 on a Windows 10 computer.
I recently acquired a Samsung SmartThings Hub V3. I was able to get it to work fine for controlling two heating devices using the SmartThings phone app.
Next step for me was to gain access to the hub and its connected devices from OH.
I went thgrough the installation steps described in the SmartThings bonding documentation.
- Placed a copy of "org.openhab.binding.smartthings-2.5.9-SNAPSHOT.jar" in my addons folder
- Used the SmartThings development tools to install OpenHabAppV2 and OpenHabDeviceHandler on the hub ans=d create the device
After that, the OpenHabDevice was shown as connected on my phone SmartThings app.
Back to OH, I then created a smartthings.things file with the following content:
Bridge smartthings:smartthings:SMThub [ smartthingsIp="192.168.2.49", smartthingsPort=39500 ] {}
Restarting OH, I can now see in Paper UI that a thing named "Smartthings Hub" has been created and is reported to be "online".
From there I expected that by launching the inbox search process on the smartthing binding would result in the objects already connected (my two heaters) to my SmartThings hub would be found by OH. Unfortunately that did not happen. The inbox search process did not find anything.
Then I thought that the discovery process perhaps needs to be done synchronously in OH and the SmartThings hub. So, I had the SMT hub "forget" the heaters and I relaunched the search from OH. Again, nothing was found.
I then tried to add the heaters directly to the things file. To that end, I had the hub "relearn" about the heaters. Then I edited the smartthings.things file in the following way:
Bridge smartthings:smartthings:SMThub [ smartthingsIp="192.168.2.49", smartthingsPort=39500 ] {
Thing thermostat ConvecteurSDB [smartthingsName="Convecteur SdB"]
Thing thermostat ConvecteurCdM [smartthingsName="Convecteur CdM"]
}
In the above, the smartthingsName provided is exactly the same as in my SmartThings phone app. Restarting OH, I can now see inpaper UI that two new things that have been created for my heaters. Surprisingly, their names in the list of things is "Thermostat" in both cases. I expected the names woyls be shown as "ConvecteurSDB" and "ConvecteurCdM". The list of available channels shown for each of the two things is larger than the list of channels shown in my phone app. For example, it includes a channel named "Cooling Setpoint" while my heaters do not provide a cooling function. However, I was hopeful since the list does include "Heating Setpoint" which clearly corresponds with a basic function on my heaters. The channel paths also make sense. For example, the Heating Setpoint function is associated with a channel named "smartthings:thermostat:SMThub:ConvecteurSDB:heatingSetpoint" with "thermostat" as type, "SMTHub" as the name of my Hub, "ConvecteurSDB" as the identifier of my heater and "heatingSetpoint" as the function being triggered.
I was then hopeful that adding items such as the following would allow me to read/modify the setpoint on my heaters:
Number SDB_HeatingSetpoint "Temperature cible" {channel="smartthings:thermostat:SMThub:heatingSetpoint"}
and adding lines such as the following to my sitemap:
Setpoint item=SDB_HeatingSetpoint label="SDB:cible [%.1f \u00B0C]" icon="temperature" minValue=12 maxValue=25 step=0.5
But neither the read nor the write have any effect on the device (and the phone app).
Thus it seems that no real communication OH/hub is taking place.
The openhab.log contains only a few lines about smartthings:
020-11-14 16:41:44.472 [INFO ] [vice.internal.HttpServiceFactoryImpl] - Binding bundle: [org.openhab.binding.smartthings_2.5.9.202009181937 [267]] to http service
2020-11-14 16:41:44.492 [INFO ] [ce.jetty.internal.HttpServiceContext] - registering context DefaultHttpContext [bundle=org.openhab.binding.smartthings_2.5.9.202009181937 [267], contextID=default], with context-name:
2020-11-14 16:41:44.492 [INFO ] [ce.jetty.internal.HttpServiceContext] - registering context DefaultHttpContext [bundle=org.openhab.binding.smartthings_2.5.9.202009181937 [267], contextID=default], with context-name:
2020-11-14 16:41:44.493 [INFO ] [ce.jetty.internal.HttpServiceContext] - registering JasperInitializer
2020-11-14 16:41:44.506 [INFO ] [.jetty.server.handler.ContextHandler] - Started HttpServiceContext{httpContext=DefaultHttpContext [bundle=org.openhab.binding.smartthings_2.5.9.202009181937 [267], contextID=default]}
2020-11-14 16:41:44.508 [INFO ] [d.internal.element.ServletWebElement] - Ignoring servlet [428] without valid alias or url patterns property.
2020-11-14 16:41:46.524 [INFO ] [vice.internal.HttpServiceFactoryImpl] - Binding bundle: [org.openhab.core.boot_2.5.0 [137]] to http service
My events.log files reports initilization of things:
2020-11-14 16:41:44.574 [hingStatusInfoChangedEvent] - 'smartthings:smartthings:SMThub' changed from UNINITIALIZED to INITIALIZING
2020-11-14 16:41:44.577 [hingStatusInfoChangedEvent] - 'smartthings:smartthings:SMThub' changed from INITIALIZING to ONLINE
2020-11-14 16:41:44.581 [hingStatusInfoChangedEvent] - 'smartthings:thermostat:SMThub:ConvecteurCdM' changed from UNINITIALIZED to INITIALIZING
2020-11-14 16:41:44.582 [hingStatusInfoChangedEvent] - 'smartthings:thermostat:SMThub:ConvecteurSDB' changed from UNINITIALIZED to INITIALIZING
2020-11-14 16:41:44.589 [hingStatusInfoChangedEvent] - 'smartthings:thermostat:SMThub:ConvecteurSDB' changed from INITIALIZING to ONLINE
2020-11-14 16:41:44.591 [hingStatusInfoChangedEvent] - 'smartthings:thermostat:SMThub:ConvecteurCdM' changed from INITIALIZING to ONLINE
```
and also reports any attempts to change setpoint values (though they ultimately probve unsuccessful):
```
2020-11-14 16:50:03.145 [ome.event.ItemCommandEvent] - Item 'SDB_HeatingSetpoint' received command 12
2020-11-14 16:50:03.157 [nt.ItemStatePredictedEvent] - SDB_HeatingSetpoint predicted to become 12
2020-11-14 16:50:03.162 [vent.ItemStateChangedEvent] - SDB_HeatingSetpoint changed from NULL to 12
2020-11-14 16:50:04.274 [ome.event.ItemCommandEvent] - Item 'SDB_HeatingSetpoint' received command 12.5
2020-11-14 16:50:04.285 [nt.ItemStatePredictedEvent] - SDB_HeatingSetpoint predicted to become 12.5
2020-11-14 16:50:04.295 [vent.ItemStateChangedEvent] - SDB_HeatingSetpoint changed from 12 to 12.5
2020-11-14 16:50:05.225 [ome.event.ItemCommandEvent] - Item 'SDB_HeatingSetpoint' received command 13
2020-11-14 16:50:05.237 [nt.ItemStatePredictedEvent] - SDB_HeatingSetpoint predicted to become 13
2020-11-14 16:50:05.250 [vent.ItemStateChangedEvent] - SDB_HeatingSetpoint changed from 12.5 to 13
```
That's it for now.