Giter Club home page Giter Club logo

openhab-smartthings's Introduction

OpenHAB-Smartthings

This openHAB Binding is now part of openHAB. It is called "Samsung Smartthings" in the Add-ons tab. Click here

This is an openHAB binding for use with the Samsung Smartthings hub. On 9/19/20 it was submitted to openHAB for review and addition to openHAB bindings collection. Until it has been accepted and added to the openHAB platform you can install it from here.

Requires Smartthings App

Previously this binding only worked with the Smartthings Classic app for your phone. Now it can work with either app

Installation instructions

  1. Shutdown openHAB. On openhabian the command is: sudo systemctl stop openhab2.service
  2. The org.openhab.binding.smartthings-2.5.9-SNAPSHOT.jar file which is located at org.openhab.binding.smartthings/target has to be copied to the addons folder in your openHAB installation. If you are using Openhabian this will be in the Samba share: openHAB/addons. Make sure there is only one smartthings jar file in the addons directory.
  3. Start openHAB. On openhabian the command is: sudo systemctl start openhab2.service
  4. Then follow the setup instructions in the README.md file in the org.openhab.binding.smartthing directory. Make sure to perform the Smartthings Configuration steps described in that file.

If you see any strange or unexpected behaviour after upgrading the Smartthings binding it is recommended that you Clear the Cache.

Also, make sure the code running on your Smartthings hub is the saame as in the contrib directory. This has been updated recently.

How to report issues

If you discover one of your devices doesn't work as expected please follow the instructions in the Troubleshooting file and raise an issue on my Github Repo BobRak

4/4/2019 Release Notes

  1. This update requires that you redeploy the smartthings code as described in the Smartthings Installation document. The location of the smartthings code has changed. It is now here
  2. The RGB bulb wasn't previously working. I recently purchased a Sengled bulb just to test this. I discovered that Samrtthings defines the hue as 0-100 and openHAB defines hue in the industry standard range of 0-360. The code has been updated. The README file has been updated with an example configuration for the Sengled RGB bulb.
  3. Since I started development of this binding Samsung has added capabilties for many of their appliances. I have had some requests to add that to this binding. I will do that but not until I complete code changes requested bu openHAB and it has been added to the base openHAB system. One reason for this delay is because I don't own any of these appliances and will have to build simulators first. So overall this will be a considerable amount of work.

4/5/2019 Release notes

Right after the 4/5 release I had reports that Discovery was no longer working. I retested discovery in my development environment and found it working. I also discovered some files that should have been deleted were still present so I removed them.

4/7/2020 Release notes

Added support for some of the proposed capabilities in the Samsung Smartthings Capabilities document. In particular support was added for the DryerOperatingState and DryerMode capabilitles. Sample config files can be found in my repo: Smartthings-SimulatedDryer. This addition included changes to the Smartthings Hub code so make sure you reinstall the SmartApp.

4/10/2020

Added support the following capabilities:

  1. Air Conditioner Mode
  2. Temperature Measurement
  3. Thermostat Cooling Setpoint - Note: I created a Simulated Air Conditioner Device Handler to test the capabilities 1 - 3. I could not make this one work in the simulator but I do beleive the code is correct. The openHAB code creates the correct message to the ST hub. The hub processes the message and calls the correct function to set the coolongSeptpoint but the attribute is not updated. I have given up on that after almost 2 days.
  4. Lock Only - I updated the code for this. I can confirm it will go to locked status. But, beacuse I don't have a way to set it to unlocked there is not as much testing as I would like.

4/20/2020

Added additional states to the following capabilities And additional testing of those capabilities

  1. Air Conditioner Mode
  2. Temperature Measurement
  3. Thermostat Cooling Setpoint
  4. Thermostat Fan Mode
  5. Thermostat Heating Setpoint
  6. Thermostat Mode
  7. Thermostat Operating State
  8. Thermostat

6/6/2020

Added support the following capabilities:

  1. Washer Operating State (with attributes machineState and washerJobState)
  2. Washer Mode

6/26/2020

Many uopdates based on feedback for the openHAB review. Things that you might notice include:

  1. Many of the debug logging messages have been removed and other changed.
  2. The exception The setThingHandlerFactory method has thrown an exception java.lang.ClassCastException has been fixed.

7/4/2020

Updates based on a second code review. No functional changes were requested.

7/15/2020

Minor code changes to logging

  1. Reduced logging done by DiscoveryService as it was 90% of the logging and not that useful.
  2. Changed log level from TRACE to DEBUG for state messages from Smartthings. These are useful to confirm the hub is sending data

Removed timing code from Smartthings code since it was eariler removed from openHAB code.

9/18/2020

Hopefully final code review changes as requested by openHAB. Also, a timeout can be set for each thing. See the README.md for details.

9/11/2020

This has been added to the openHAB distribution. It is called "Samsung Smartthings" in the Add-ons tab. Click here

1/20/2021

This version requires OH 3.1. It fixes a bug that caused the Discovery service to not find any devices connected to the Smartthings hub. This has been submitted to openHAB but is being posted here for anone that wants quicker access to the changes.

openhab-smartthings's People

Contributors

bobrak avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

openhab-smartthings's Issues

Possible issue with humidity channel?

I think the humidity sensor Thing ID may be defined incorrectly or inconsistently. I am not able to get consistent updates from humidity sensors in my network.

In the official ST capabilities reference, humidity sensors are defined as relativeHumidityMeasurement. They are also defined as relativeHumidityMeasurement in OpenHabAppV2.groovy and thing-types.xml

However, in SmartthingsBindingConstants.java, humidty sensors are defined with ID "humiditySensor".

I am totally guessing here, but perhaps this inconsistency is causing the performance issues with humidity sensors?

Enh Request: Add support for Lock()

Could you please add support for smart locks? I use a yale z-wave lock and it's not working because the necessary actions are not supported. Please add support for the following attributes and commands for capability.lock

lock: ENUM

    The state of the lock device

    locked
        The device is locked
    unknown
        The state of the device is unknown
    unlocked
        The device is unlocked
    unlocked with timeout
        The device is unlocked with a timeout

Commands

lock()
    Lock the device
unlock()
    Unlock the device

All things failing with No custom converter exists

All of my things started to fail with this message. I havent made any changes to the system in the last couple of days and it all started to throw these errors.

Note : i updated to the latest 2.2 SNAPSHOT this weekend.

19:02:35.776 [DEBUG] [org.openhab.binding.smartthings      ] - BundleEvent STARTED - org.openhab.binding.smartthings
19:02:35.794 [DEBUG] [org.openhab.binding.smartthings      ] - ServiceEvent REGISTERED - {org.eclipse.smarthome.core.thing.binding.ThingHandlerFactory, org.osgi.service.event.EventHandler}={event.topics=org/openhab/binding/smartthings/state, component.name=binding.smartthings, component.id=228, service.id=359, service.bundleid=232, service.scope=bundle} - org.openhab.binding.smartthings
19:02:35.824 [DEBUG] [org.openhab.binding.smartthings      ] - ServiceEvent REGISTERED - {javax.servlet.http.HttpServlet}={service.pid=org.openhab.smartthings, service.config.category=binding, service.config.label=Smartthings Servlet, component.name=org.openhab.binding.smartthings, component.id=229, service.config.description.uri=binding:smartthings, service.id=360, service.bundleid=232, service.scope=bundle} - org.openhab.binding.smartthings
19:02:35.862 [DEBUG] [org.openhab.binding.smartthings      ] - ServiceEvent REGISTERED - {javax.servlet.ServletContext}={osgi.web.symbolicname=org.openhab.binding.smartthings, osgi.web.version=2.2.0.201801151705, osgi.web.contextname=default, osgi.web.contextpath=/, service.id=361, service.bundleid=232, service.scope=singleton} - org.openhab.binding.smartthings
19:02:35.873 [INFO ] [artthings.internal.SmartthingsServlet] - Started Smartthings servlet at /smartthings
19:02:35.943 [DEBUG] [gs.internal.SmartthingsHandlerFactory] - SmartthingsHandlerFactory is now processing ThingTypeUID smartthings:smartthings
19:02:35.952 [DEBUG] [discovery.SmartthingsDiscoveryService] - Initializing discovery service
19:02:35.957 [DEBUG] [discovery.SmartthingsDiscoveryService] - SmartthingsDiscoveryService.activate() called
19:02:35.963 [DEBUG] [org.openhab.binding.smartthings      ] - ServiceEvent REGISTERED - {org.eclipse.smarthome.config.discovery.DiscoveryService}={service.id=362, service.bundleid=232, service.scope=singleton} - org.openhab.binding.smartthings
19:02:35.973 [DEBUG] [org.openhab.binding.smartthings      ] - ServiceEvent REGISTERED - {org.osgi.service.event.EventHandler}={event.topics=org/openhab/binding/smartthings/discovery, service.id=363, service.bundleid=232, service.scope=singleton} - org.openhab.binding.smartthings
19:02:36.013 [INFO ] [ome.event.ThingStatusInfoChangedEvent] - 'smartthings:smartthings:Home' changed from UNINITIALIZED to INITIALIZING
19:02:36.032 [INFO ] [ome.event.ThingStatusInfoChangedEvent] - 'smartthings:smartthings:Home' changed from INITIALIZING to ONLINE
19:02:36.032 [DEBUG] [gs.internal.SmartthingsHandlerFactory] - SmartthingsHandlerFactory is now processing ThingTypeUID smartthings:button
19:02:36.039 [DEBUG] [gs.internal.SmartthingsHandlerFactory] - Creating thing handler for smartthings:button
19:02:36.049 [INFO ] [ome.event.ThingStatusInfoChangedEvent] - 'smartthings:button:Home:ButtonThing' changed from UNINITIALIZED to INITIALIZING
19:02:36.059 [INFO ] [hings.handler.SmartthingsThingHandler] - No Custom converter exists for button (org.openhab.binding.smartthings.internal.converter.SmartthingsButtonConverter)
19:02:36.067 [INFO ] [hings.handler.SmartthingsThingHandler] - Using converter default
19:02:36.073 [INFO ] [ome.event.ThingStatusInfoChangedEvent] - 'smartthings:button:Home:ButtonThing' changed from INITIALIZING to ONLINE
19:02:36.074 [DEBUG] [gs.internal.SmartthingsHandlerFactory] - SmartthingsHandlerFactory is now processing ThingTypeUID smartthings:button
19:02:36.083 [DEBUG] [gs.internal.SmartthingsHandlerFactory] - Creating thing handler for smartthings:button
19:02:36.092 [INFO ] [ome.event.ThingStatusInfoChangedEvent] - 'smartthings:button:Home:Button2' changed from UNINITIALIZED to INITIALIZING
19:02:36.095 [INFO ] [hings.handler.SmartthingsThingHandler] - No Custom converter exists for button (org.openhab.binding.smartthings.internal.converter.SmartthingsButtonConverter)
19:02:36.102 [INFO ] [hings.handler.SmartthingsThingHandler] - Using converter default
19:02:36.108 [INFO ] [ome.event.ThingStatusInfoChangedEvent] - 'smartthings:button:Home:Button2' changed from INITIALIZING to ONLINE
19:02:36.109 [DEBUG] [gs.internal.SmartthingsHandlerFactory] - SmartthingsHandlerFactory is now processing ThingTypeUID smartthings:motionSensor
19:02:36.116 [DEBUG] [gs.internal.SmartthingsHandlerFactory] - Creating thing handler for smartthings:motionSensor
19:02:36.132 [INFO ] [hings.handler.SmartthingsThingHandler] - No Custom converter exists for motion (org.openhab.binding.smartthings.internal.converter.SmartthingsMotionConverter)
19:02:36.132 [INFO ] [ome.event.ThingStatusInfoChangedEvent] - 'smartthings:motionSensor:Home:MSense' changed from UNINITIALIZED to INITIALIZING
19:02:36.137 [INFO ] [hings.handler.SmartthingsThingHandler] - Using converter default
19:02:36.151 [INFO ] [ome.event.ThingStatusInfoChangedEvent] - 'smartthings:motionSensor:Home:MSense' changed from INITIALIZING to ONLINE
19:02:36.151 [DEBUG] [gs.internal.SmartthingsHandlerFactory] - SmartthingsHandlerFactory is now processing ThingTypeUID smartthings:temperatureMeasurement
19:02:36.159 [DEBUG] [gs.internal.SmartthingsHandlerFactory] - Creating thing handler for smartthings:temperatureMeasurement
19:02:36.169 [INFO ] [hings.handler.SmartthingsThingHandler] - No Custom converter exists for temperature (org.openhab.binding.smartthings.internal.converter.SmartthingsTemperatureConverter)
19:02:36.170 [INFO ] [ome.event.ThingStatusInfoChangedEvent] - 'smartthings:temperatureMeasurement:Home:TempSensor' changed from UNINITIALIZED to INITIALIZING
19:02:36.176 [INFO ] [hings.handler.SmartthingsThingHandler] - Using converter default
19:02:36.183 [INFO ] [ome.event.ThingStatusInfoChangedEvent] - 'smartthings:temperatureMeasurement:Home:TempSensor' changed from INITIALIZING to ONLINE

Things

      Thing button         ButtonThing           [ smartthingsName="Button1" ]
      Thing button         Button2               [ smartthingsName="Button2" ]
      Thing motionSensor   MSense                [ smartthingsName="Sensor1" ]
      Thing temperatureMeasurement     TempSensor            [ smartthingsName="Temperature Sensor" ]

Items

String  BButton   { channel="smartthings:button:Home:ButtonThing:button" }
String  Button2   { channel="smartthings:button:Home:Button2:button" }

String  Sensor "Hallway Sensor status [%s]"  { channel="smartthings:motionSensor:Home:MSense:motion" }

String  TempSensor "Temperature [%.0f]"  { channel="smartthings:temperatureMeasurement:Home:TempSensor:temperature" }

Unresolved dependency

Just putting this up incase it helps. I had an unresolved dependency error when setting this up on Windows. I added the below package into the addons folder which resolved the issue. http://www.java2s.com/Code/Jar/o/Downloadorgapachecommonscodecjar.htm

Full error was:
2018-03-30 06:44:08.976 [ERROR] [org.openhab.binding.smartthings ] - FrameworkEvent ERROR - org.openhab.binding.smartthings
org.osgi.framework.BundleException: Could not resolve module: org.openhab.binding.smartthings [209]
Unresolved requirement: Import-Package: org.apache.commons.codec

at org.eclipse.osgi.container.Module.start(Module.java:444) [?:?]
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1620) [?:?]
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1600) [?:?]
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.doContainerStartLevel(ModuleContainer.java:1571) [?:?]
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent(ModuleContainer.java:1514) [?:?]
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent(ModuleContainer.java:1) [?:?]
at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230) [?:?]
at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:340) [?:?]

2018-03-30 06:44:09.

Problems with Binding Method

Hi BobRak,
thanks for putting this together. It overall looks great. I only stumbled upon two minor points in the description of the SmartThings installation, but then could not get the whole thing working, because the Bridge is not recognised.
The OpenHAB log says:

19:27:51.818 [ERROR] [org.openhab.binding.smartthings ] - [binding.smartthings(221)] bind method [setThingTypeRegistry] not found; Component will fail
19:27:51.820 [ERROR] [org.openhab.binding.smartthings ] - [binding.smartthings(221)] bind method [setThingTypeRegistry] not found

I don't think it's relevant, but here is the starting fragment of my .things file:

Bridge smartthings:smartthings:Home [ smartthingsIp="10.0.0.25", smartthingsPort=39500 ] {
Thing battery SireneAussen [ smartthingsName="Sirene aussen" ]

Can you help me resolving this issue?

The two minor points mentioned above:

In the installation instructions for SmartThings in the first paragraph about the DeviceHandler you reference the SmartApp (instead of the device handler):

  1. Locate OpenHabAppV2.groovy in the /target/smartthings/DeviceHandlers Directory.

In the installation instructions for SmartThings in the paragraph „Create the Device“ steps 10 and 11 are not necessary.

Thanks again for putting this together - I hope we can get it work for me, so I can share feedback on several device types.

Best regards,
Andreas

tamperAlert capability does not have a channel associated with it

When using devices that have a tamperAlert capability there is no way to map an item to this Thing since there is no channel associated with it. The log produces this output:

2017-12-27 18:01:11.759 [WARN ] [re.thing.internal.ThingFactoryHelper] - Could not create channel 'tamper' for thing type 'smartthings:tamperAlert:Home:BackDoorSensor', because channel type 'smartthings:tamper-channel' could not be found.
2017-12-27 18:01:21.872 [WARN ] [ore.internal.thing.ThingTypeResource] - Cannot find channel type: smartthings:tamper-channel

MotionSensor

Hi,
would you be able to add motion sensor to the list of supported capabilities? I tried both contactSensor and motionSensor, but both are not present. Let me know if you need any more details from openhab or ST

19:50:46.832 [DEBUG] [s.internal.SmartthingsHandlerFactory] - SmartthingsHandlerFactory is now processing ThingTypeUID smartthings:motionSensor
19:50:46.833 [DEBUG] [s.internal.SmartthingsHandlerFactory] - Creating thing handler for smartthings:motionSensor
19:50:46.834 [INFO ] [smarthome.event.ThingAddedEvent     ] - Thing 'smartthings:motionSensor:Home:Sensor1' has been added.
19:50:46.840 [INFO ] [me.event.ThingStatusInfoChangedEvent] - 'smartthings:motionSensor:Home:Sensor1' changed from UNINITIALIZED to INITIALIZING
19:50:46.843 [INFO ] [ings.handler.SmartthingsThingHandler] - No converter exists for motion (org.openhab.binding.smartthings.internal.converter.SmartthingsMotionConverter)
19:50:46.848 [INFO ] [ings.handler.SmartthingsThingHandler] - Using converter default
19:50:46.851 [INFO ] [me.event.ThingStatusInfoChangedEvent] - 'smartthings:motionSensor:Home:Sensor1' changed from INITIALIZING to ONLINE

Item states in BasicUI

I am new to OH... I am not sure whats going on here for sure... yet ... but you asked if I had anything :)
After initial discovery most devices states are null.. expected.. ( I don't have mapdb persistence on yet )

I can see the /state requests to the ST HUB for all items starting on line 984... triggered by me dropping my items files in the /conf/items/ directory... ~ around 19:00 hours... now at 21:00 hours the states look like the screen shot below..

Logs and items files attached (if that helps)?

So, a couple observations/questions here...

  1. After the discovery I waited about ~10 minutes .. no /state requests... I assume this is because I had no items linked to the channels of these things? So on to item #2, add items :)
  2. Who's triggering the /state on .items file changes? See line 984 onward...
  3. Can your binding throttle it or can I? Maybe iterate / per capability every X seconds?
  4. Most of the switches are not displaying the correct textual state or slider state.
  5. The Basic UI goes blank when item #2 occurs... (aka all states seem to go null or -?)
  6. I picked the first item from the Basic UI (highlighted) in screen shot....
    Line 1606 of openhab.log says the binding changed it to state ON, yet it remains - in GUI

image
openhab.log
events.log

OH_conf_files.zip

When trying to discover "Things" in step 9 through the SmartThings binding, nothing is discovered.

Sorry, I may be doing something stupid, but I cannot discover any "Things" through the SmartThings binding.

I've gotten everything connected and am in the Inbox under the SmartThings binding, and run discovery, but nothing is found.

Is there something else that must be enabled to have discovery work?

I have also set up the SmartApp, Device Handler, and Device. I've exposed the relevant SmartThings devices through the Smart App in the SmartThings native app.

Thanks a lot!

Invalid characters in SmartThings devices stops discovery

I had some Things with invalid characters. This stopped discovery and additional devices did not show in Inbox. (So I would see some but not all things). Renaming the things in SmartThings fixed the issue.

2017-12-21 12:31:56.949 [INFO ] [hings.internal.SmartthingsHttpClient] - Sent message "{"discovery": "yes"}" with path "/discovery" to the Smartthings hub, recieved HTTP status 202
2017-12-21 12:31:57.383 [INFO ] [g.discovery.internal.PersistentInbox] - Added new thing 'smartthings:battery:c63cedcc:WaterLeakSensorBasement' to inbox.
2017-12-21 12:31:57.393 [INFO ] [g.discovery.internal.PersistentInbox] - Added new thing 'smartthings:battery:c63cedcc:WaterLeakSensorMasterBath' to inbox.
2017-12-21 12:31:57.394 [WARN ] [org.apache.karaf.services.eventadmin] - EventAdmin: Exception during event dispatch [org.osgi.service.event.Event [topic=org/openhab/binding/smartthings/discovery] {data=["{\"capability\": \"battery\", \"attribute\": \"battery\", \"name\": \"Water Leak Sensor Basement\", \"id\": \"4fffc491-4f4f-461c-b440-4051b593b6ef\" }","{\"capability\": \"battery\", \"attribute\": \"battery\", \"name\": \"Water Leak Sensor Master Bath\", \"id\": \"e13a4bb2-c4c8-4e8e-bd85-5467af8714f8\" }","{\"capability\": \"presenceSensor\", \"attribute\": \"presence\", \"name\": \"XXXXX's Android\", \"id\": \"8535a414-4600-41bd-bbec-d94e8d30a40d\" }","{\"capability\": \"temperatureMeasurement\", \"attribute\": \"temperature\", \"name\": \"Water Leak Sensor Master Bath\", \"id\": \"e13a4bb2-c4c8-4e8e-bd85-5467af8714f8\" }","{\"capability\": \"temperatureMeasurement\", \"attribute\": \"temperature\", \"name\": \"Water Leak Sensor Basement\", \"id\": \"4fffc491-4f4f-461c-b440-4051b593b6ef\" }","{\"capability\": \"waterSensor\", \"attribute\": \"water\", \"name\": \"Water Leak Sensor Basement\", \"id\": \"4fffc491-4f4f-461c-b440-4051b593b6ef\" }","{\"capability\": \"waterSensor\", \"attribute\": \"water\", \"name\": \"Water Leak Sensor Master Bath\", \"id\": \"e13a4bb2-c4c8-4e8e-bd85-5467af8714f8\" }"]} | {org.osgi.service.event.EventHandler}={event.topics=org/openhab/binding/smartthings/discovery, service.id=319, service.bundleid=206, service.scope=singleton} | Bundle(org.openhab.binding.smartthings_2.2.0.201712120439 [206])]
java.lang.IllegalArgumentException: UID segment 'XXXXXXXX'sAndroid' contains invalid characters. Each segment of the UID must match the pattern [A-Za-z0-9_-]*.
	at org.eclipse.smarthome.core.thing.UID.validateSegment(UID.java:96) [116:org.eclipse.smarthome.core.thing:0.10.0.b1]
	at org.eclipse.smarthome.core.thing.UID.<init>(UID.java:74) [116:org.eclipse.smarthome.core.thing:0.10.0.b1]
	at org.eclipse.smarthome.core.thing.UID.<init>(UID.java:48) [116:org.eclipse.smarthome.core.thing:0.10.0.b1]
	at org.eclipse.smarthome.core.thing.ThingUID.<init>(ThingUID.java:144) [116:org.eclipse.smarthome.core.thing:0.10.0.b1]
	at org.openhab.binding.smartthings.discovery.SmartthingsDiscoveryService.createDevice(SmartthingsDiscoveryService.java:190) [206:org.openhab.binding.smartthings:2.2.0.201712120439]
	at org.openhab.binding.smartthings.discovery.SmartthingsDiscoveryService.handleEvent(SmartthingsDiscoveryService.java:167) [206:org.openhab.binding.smartthings:2.2.0.201712120439]
	at org.apache.felix.eventadmin.impl.handler.EventHandlerProxy.sendEvent(EventHandlerProxy.java:415) [3:org.apache.karaf.services.eventadmin:4.1.3]
	at org.apache.felix.eventadmin.impl.tasks.HandlerTask.runWithoutBlacklistTiming(HandlerTask.java:82) [3:org.apache.karaf.services.eventadmin:4.1.3]
	at org.apache.felix.eventadmin.impl.tasks.SyncDeliverTasks.execute(SyncDeliverTasks.java:104) [3:org.apache.karaf.services.eventadmin:4.1.3]
	at org.apache.felix.eventadmin.impl.tasks.AsyncDeliverTasks$TaskExecuter.run(AsyncDeliverTasks.java:166) [3:org.apache.karaf.services.eventadmin:4.1.3]
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [?:?]
	at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:?]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:?]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:?]
	at java.lang.Thread.run(Thread.java:748) [?:?]

Bridge Configuration

Hi BobRak,
I am new to OpenHAB, I am not clear about the section you have for Bridge Configuration.
Where does the following goes Bridge smartthings:smartthings:Home [ smartthingsIp="192.168.1.12", smartthingsPort=39500 ] {

In discovery I cann add things but dont see anything when I click on select bridge.
Any help is much appreciated.
Thanks,

Slow Feedback from SmartThings Sensors To OpenHAB

I am experiencing pretty slow feedback from the my smart things sensors back to openhab. For example motion sensor states and power meter states are taking from 5 to 45 seconds to update in openhab. Is there something I can do to improve this?

SmartThings Device configs

Not an issue per se.

"Device Network ID: This needs to be the MAC address of your OpenHAB server with no spaces or punctuation"

Does this mean that the mac goes in as ABCDE12345 instead of AB:CD:E1:23:45?

Is there a limit to the number of devices?

Hello,

It seems as if I cannot use all of my devices, but only a certain number at a time. I haven't figured out exactly how many.

Is there a particular limit I should be aware of? Or is it possible one of my devices is bugging out discovery from OpenHAB?

Thank,

Sherwin

MotionSensor item not changing

Hi,
I added a motion sensor thing and item. I can see that the channel state changing, but the item state doesnt change and trigger a rule.
Where am I going wrong?

openhab logs

21:05:50.499 [DEBUG] [rtthings.internal.SmartthingsServlet] - Smartthings servlet service() called with: 192.168.0.113: POST /smartthings/state
21:05:50.501 [DEBUG] [rtthings.internal.SmartthingsServlet] - Smartthing servlet function requested: state with Method: POST
21:05:50.507 [DEBUG] [rtthings.internal.SmartthingsServlet] - Smartthing servlet processing "state" request. data: {"deviceDisplayName":"Sensor1","value":"active","capabilityAttribute":"motion"}
21:05:50.509 [DEBUG] [s.internal.SmartthingsHandlerFactory] - Event received on topic: org/openhab/binding/smartthings/state
21:05:50.520 [INFO ] [ings.handler.SmartthingsThingHandler] - Smartthings updated State for channel: smartthings:motionSensor:Home:MSense:motion to active

Items
Contact Sensor { channel="smartthings:motionSensor:Home:MSense:motion" }

Discover with payload > 45k from smartthings causing discover to fail.

Greetings Bob.

I installed the new snapshot with my device handler set to all devices... clicked discover... waited and waited... then it timed out showing nothing to add.. So as any good solder I went to the logs :)

The only entry...
2018-01-08 23:12:08.075 [INFO ] [hings.internal.SmartthingsHttpClient] - Sent message "{"discovery": "yes"}" with path "/discovery" to the Smartthings hub, recieved HTTP status 202

Multiple times (because I clicked the discover more than once)... each time no other messages...

So, like an loyal soldier...
I whipped up a simple script to debug what in the heck is going on here.
server.txt

Fired up an ssh session on the openhab box and fired a at the hub...
curl -H "Content-Type: application/json" -X POST -d '{"discovery":"true"}' http://192.168.1.123:39500/discover

Low and behold the smartthings hub is sending data...
However after multiple posts it became clear the hub is truncating the body every time...

All my devices enabled = 45826 bytes in payload, seems to be too much.
Output Excerpt from the attached script
Expected:48352 In:826

Buffer LEN:42826
Buffer LEN:45826

Notice how the buffer length stops at 45826... and is repeated...
Bottom line the code via the content-length header should receive 48352 bytes and only received 45826 so I never process the entire messages as the end of the JSON is not there..

To finish this and confirm what I found...
I went into my hub and started unchecking devices.... to get my payload down.
Seems the tip over point is anything > 45200.
So removing all my switch indicators reduced, my payload is 40630 bytes.
And multiple discover attempts seem to send the correct payload every time.

So it appears the handler code should limit its payload response / post < 45k, otherwise openhab is not going to get it all.

Hope this helps.

Default logging - feature :)

This is extremely low on priority and no worries if this is a PITA or you dont want to change.
I just see these as repetitive with 300+ channels :)

2018-01-15 19:07:46.825 [INFO ] [ings.handler.SmartthingsThingHandler] - No Custom converter exists for switch (org.openhab.binding.smartthings.internal.converter.SmartthingsSwitchConverter)
2018-01-15 19:07:46.828 [INFO ] [ings.handler.SmartthingsThingHandler] - Using converter default

Device Network Id null

I accidentally deleted my virtual OpenHabDevice. I added back but the Device Network Id which I saved with the MAC address changes to NULL after a few minutes. Maybe I need to take this up with Samsung?

Status update

It has been too long since anything has been posted about the Smartthings binding I am working on. I want everyone to know that I am still working on it and am making good progress. Based on issues raised I realized that if I want it to effectively work with all Smartthings devices then I would have to redesign how it translates data from Smartthings into openHAB items. And, to send the device specific commands back to Smartthings. That work is winding up and I hope to be able to post a new binding here before the end of August.

smartthings Device Network Id reverts to mac address

I am finding when I go into the smartthings developers site that the shortly after changing the Device Network Id (Mac Address without ":" ). It reverts back to the MAC ID (It appears to be with dashes instead of quotes). This prevents the discovery process from working. Discovery only works in that brief interim time before the reversion occurs.

It is possible as I am fairly new to this, that I have somehow created this issue, but for the life of me I do not know how.

Mark

My bad. I found the reversion is coming from the MAC setting on my smartthings hub.
I am leaving the issue open, as the updated one on the developers website should have been passed down to the hub. This, however may be beyond your control, so feel free to close it out.
You may however, want to change it from a MAC setting to network identifier name, or some such.

HTTPS Port not working

When specifying a HTTPS based port (e.g. 8443) in the Device called "OpenHabDevice" both the discovery and the manual definition of the Thing fails with the following logs in the Smartthings Live Logging:

3902fb37-c99e-432c-989f-51db41347806 14:18:13: error java.lang.NullPointerException: Cannot invoke method contains() on null object @line 77 (parse)
3902fb37-c99e-432c-989f-51db41347806 14:18:13: debug Msg '[index:15, mac:xxxxxxxxxxxx, ip:xxxxxxxxxxx, port:20FB, requestId:850b158a-89ac-4e43-b7eb-e6ca456937e6]'
3c19b957-cd92-4a13-9eaa-2d74b7be1c5d 14:18:13: debug Discovery is returning JSON: {"path":"/smartthings/discovery","body":["{"capability": "accelerationSensor", "attribute": "acceleration", "name": "Contact Sensor", "id": "8411b1fb-f7a7-45bd-a2d1-ac34c3240cd2" }","{"capability": "battery", "attribute": "battery", "name": "Contact Sensor", "id": "8411b1fb-f7a7-45bd-a2d1-ac34c3240cd2" }","{"capability": "contactSensor", "attribute": "contact", "name": "Contact Sensor", "id": "8411b1fb-f7a7-45bd-a2d1-ac34c3240cd2" }","{"capability": "temperatureMeasurement", "attribute": "temperature", "name": "Contact Sensor", "id": "8411b1fb-f7a7-45bd-a2d1-ac34c3240cd2" }","{"capability": "threeAxis", "attribute": "threeAxis", "name": "Contact Sensor", "id": "8411b1fb-f7a7-45bd-a2d1-ac34c3240cd2" }"]}
3c19b957-cd92-4a13-9eaa-2d74b7be1c5d 14:18:12: debug Entered discovery handler
3c19b957-cd92-4a13-9eaa-2d74b7be1c5d 14:18:12: debug Received device event from Message : [path:discovery]
3902fb37-c99e-432c-989f-51db41347806 14:18:13: debug Sending '{"path":"/smartthings/discovery","body":["{"capability": "accelerationSensor", "attribute": "acceleration", "name": "Contact Sensor", "id": "8411b1fb-f7a7-45bd-a2d1-ac34c3240cd2" }","{"capability": "battery", "attribute": "battery", "name": "Contact Sensor", "id": "8411b1fb-f7a7-45bd-a2d1-ac34c3240cd2" }","{"capability": "contactSensor", "attribute": "contact", "name": "Contact Sensor", "id": "8411b1fb-f7a7-45bd-a2d1-ac34c3240cd2" }","{"capability": "temperatureMeasurement", "attribute": "temperature", "name": "Contact Sensor", "id": "8411b1fb-f7a7-45bd-a2d1-ac34c3240cd2" }","{"capability": "threeAxis", "attribute": "threeAxis", "name": "Contact Sensor", "id": "8411b1fb-f7a7-45bd-a2d1-ac34c3240cd2" }"]}' to device
3902fb37-c99e-432c-989f-51db41347806 14:18:12: debug Creating event with message: [path:discovery]
3902fb37-c99e-432c-989f-51db41347806 14:18:12: debug Msg '[index:06, mac:xxxxxxxxxxxxx, headers:[post /discovery http/1.1:null, content-length:20, accept-encoding:gzip, host:xxxxxxxx:39500, user-agent:Jetty/9.3.22.v20171030, content-type:application/json], body:{"discovery": "yes"}, header:POST /discovery HTTP/1.1
Accept-Encoding: gzip
User-Agent: Jetty/9.3.22.v20171030
Content-Type: application/json
Host: xxxxxxxxxx:39500
Content-Length: 20, data:[discovery:yes], json:[discovery:yes]]'

Turning back to HTTP port (e.g. 8080) works but is not acceptable in terms of privacy and network security.

Please provide a fix for the HTTPS communication. I am more than happy to test it immediately.

Thank you

Merging Hue smart app and device

There is a really good default Hue discovery app on Smartthings, which works pretty much perfectly with the openhab hue emulator. So you can go the other way and import your openhab items into Smartthings. This conflicts with you binding on the Smartthings side, since both devices need to be on the same network address. I kind of found a work around by importing items then moving that device to say MAC/24, updating that smart app, then adding your smart app.

Everything in the first half an hour or so is very sketchy, with devices going offline, and commands pilling up for 10 minutes then all going through together in one one way while the other direction is fine.

So it would be quite useful if you could integrate the discovery of the hue emulator by the smartthings hub into your binding so it's fully integrated system. There is some example older code for basic Hue discovery on the Smartthings site so it might not be that much more work. But I've got limited understanding of how the smartthings side of things work.

powerMeter and energyMeter device have missing handlers/callbacks

When using devices that have powerMeter and energyMeter capabilities, there are warnings produced in the logs about missing handlers / callbacks.

After discovery / before adding Thing:
2017-12-27 17:41:55.267 [WARN ] [s.internal.SmartthingsHandlerFactory] - Unable to locate handler for display name: Smart Plug 2 with attribute: power

After adding Thing:
2017-12-27 17:51:25.504 [WARN ] [org.apache.karaf.services.eventadmin] - EventAdmin: Exception during event dispatch [org.osgi.service.event.Event [topic=org/openhab/binding/smartthings/state] {data={"deviceDisplayName":"Smart Plug 2","value":"94.519","capabilityAttribute":"power"}} | {org.eclipse.smarthome.core.thing.binding.ThingHandlerFactory, org.osgi.service.event.EventHandler}={event.topics=org/openhab/binding/smartthings/state, component.name=binding.smartthings, component.id=241, service.id=396, service.bundleid=240, service.scope=bundle} | Bundle(org.openhab.binding.smartthings_2.2.0.201712120439 [240])]
java.lang.IllegalStateException: Could not update state, because callback is missing
at org.eclipse.smarthome.core.thing.binding.BaseThingHandler.updateState(BaseThingHandler.java:303) [116:org.eclipse.smarthome.core.thing:0.10.0.201712141004]
at org.openhab.binding.smartthings.handler.SmartthingsThingHandler.handleStateMessage(SmartthingsThingHandler.java:144) [240:org.openhab.binding.smartthings:2.2.0.201712120439]
at org.openhab.binding.smartthings.internal.SmartthingsHandlerFactory.handleEvent(SmartthingsHandlerFactory.java:143) [240:org.openhab.binding.smartthings:2.2.0.201712120439]
at org.apache.felix.eventadmin.impl.handler.EventHandlerProxy.sendEvent(EventHandlerProxy.java:415) [3:org.apache.karaf.services.eventadmin:4.1.3]
at org.apache.felix.eventadmin.impl.tasks.HandlerTask.run(HandlerTask.java:70) [3:org.apache.karaf.services.eventadmin:4.1.3]
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [?:?]
at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:?]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:?]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:?]
at java.lang.Thread.run(Thread.java:748) [?:?]

Discard older status messages for switches/contact sensors

Receiving events at /smartthings/state should include and discard any updates that are older than the current state for switches/contacts.

As is, if you rapidly open/close a contact, requests might arrive in any order and leave the contact in the wrong state until triggered again.

Haven't dug into where/how here, but seems pretty straightforward - include msec timestamp in request, compare to last update of thing?

[WARN ] [s.internal.SmartthingsHandlerFactory] - Unable to locate handler for display name: Lolas Room door with attribute: temperature

I tried to setup temperature items for my Samsung multipurpose sensors. I remove them but Openhab seams to remember them somewhere. I see warnings like: [WARN ] [s.internal.SmartthingsHandlerFactory] - Unable to locate handler for display name: Lolas Room door with attribute: temperature.

I'm not sure if this problem is specific to OpenHab2 or the Binding. I can't find "Lola" in any of the items or other txt files.

Exception on shutdown?

Running it thru the paces...

2018-01-15 21:44:19.920 [INFO ] [ings.handler.SmartthingsThingHandler] - Attempt to send command to the Smartthings hub failed with: {}
java.util.concurrent.ExecutionException: java.nio.channels.AsynchronousCloseException
at org.eclipse.jetty.client.util.FutureResponseListener.getResult(FutureResponseListener.java:118) ~[?:?]
at org.eclipse.jetty.client.util.FutureResponseListener.get(FutureResponseListener.java:110) ~[?:?]
at org.eclipse.jetty.client.HttpRequest.send(HttpRequest.java:676) ~[?:?]
at org.openhab.binding.smartthings.internal.SmartthingsHttpClient.sendDeviceCommand(SmartthingsHttpClient.java:58) ~[?:?]
at org.openhab.binding.smartthings.handler.SmartthingsThingHandler.handleCommand(SmartthingsThingHandler.java:105) ~[?:?]
at org.eclipse.smarthome.core.thing.binding.BaseThingHandler.channelLinked(BaseThingHandler.java:243) ~[?:?]
at org.eclipse.smarthome.core.thing.link.ThingLinkManager.lambda$0(ThingLinkManager.java:290) ~[?:?]
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [?:?]
at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:?]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180) [?:?]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293) [?:?]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:?]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:?]
at java.lang.Thread.run(Thread.java:748) [?:?]
Caused by: java.nio.channels.AsynchronousCloseException
at org.eclipse.jetty.client.http.HttpConnectionOverHTTP.close(HttpConnectionOverHTTP.java:135) ~[?:?]
at org.eclipse.jetty.client.DuplexConnectionPool.close(DuplexConnectionPool.java:361) ~[?:?]
at org.eclipse.jetty.client.PoolingHttpDestination.close(PoolingHttpDestination.java:240) ~[?:?]
at org.eclipse.jetty.client.HttpClient.doStop(HttpClient.java:248) ~[?:?]
at org.eclipse.jetty.util.component.AbstractLifeCycle.stop(AbstractLifeCycle.java:89) ~[?:?]
at org.openhab.binding.smartthings.internal.SmartthingsHttpClient.stopHttpClient(SmartthingsHttpClient.java:79) ~[?:?]
at org.openhab.binding.smartthings.handler.SmartthingsBridgeHandler.dispose(SmartthingsBridgeHandler.java:68) ~[?:?]
at sun.reflect.GeneratedMethodAccessor28.invoke(Unknown Source) ~[?:?]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?]
at java.lang.reflect.Method.invoke(Method.java:498) ~[?:?]
at org.eclipse.smarthome.core.internal.common.AbstractInvocationHandler.invokeDirect(AbstractInvocationHandler.java:153) ~[?:?]
at org.eclipse.smarthome.core.internal.common.Invocation.call(Invocation.java:53) ~[?:?]
at java.util.concurrent.FutureTask.run(FutureTask.java:266) ~[?:?]
... 3 more
2018-01-15 21:44:19.926 [INFO ] [ings.handler.SmartthingsThingHandler] - Attempt to send command to the Smartthings hub failed with: {}
java.util.concurrent.ExecutionException: java.nio.channels.AsynchronousCloseException
at org.eclipse.jetty.client.util.FutureResponseListener.getResult(FutureResponseListener.java:118) ~[?:?]
at org.eclipse.jetty.client.util.FutureResponseListener.get(FutureResponseListener.java:110) ~[?:?]
at org.eclipse.jetty.client.HttpRequest.send(HttpRequest.java:676) ~[?:?]
at org.openhab.binding.smartthings.internal.SmartthingsHttpClient.sendDeviceCommand(SmartthingsHttpClient.java:58) ~[?:?]
at org.openhab.binding.smartthings.handler.SmartthingsThingHandler.handleCommand(SmartthingsThingHandler.java:105) ~[?:?]
at org.eclipse.smarthome.core.thing.binding.BaseThingHandler.channelLinked(BaseThingHandler.java:243) ~[?:?]
at org.eclipse.smarthome.core.thing.link.ThingLinkManager.lambda$0(ThingLinkManager.java:290) ~[?:?]
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [?:?]
at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:?]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180) [?:?]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293) [?:?]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:?]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:?]
at java.lang.Thread.run(Thread.java:748) [?:?]
Caused by: java.nio.channels.AsynchronousCloseException
at org.eclipse.jetty.client.http.HttpConnectionOverHTTP.close(HttpConnectionOverHTTP.java:135) ~[?:?]
at org.eclipse.jetty.client.DuplexConnectionPool.close(DuplexConnectionPool.java:361) ~[?:?]
at org.eclipse.jetty.client.PoolingHttpDestination.close(PoolingHttpDestination.java:240) ~[?:?]
at org.eclipse.jetty.client.HttpClient.doStop(HttpClient.java:248) ~[?:?]
at org.eclipse.jetty.util.component.AbstractLifeCycle.stop(AbstractLifeCycle.java:89) ~[?:?]
at org.openhab.binding.smartthings.internal.SmartthingsHttpClient.stopHttpClient(SmartthingsHttpClient.java:79) ~[?:?]
at org.openhab.binding.smartthings.handler.SmartthingsBridgeHandler.dispose(SmartthingsBridgeHandler.java:68) ~[?:?]
at sun.reflect.GeneratedMethodAccessor28.invoke(Unknown Source) ~[?:?]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?]
at java.lang.reflect.Method.invoke(Method.java:498) ~[?:?]
at org.eclipse.smarthome.core.internal.common.AbstractInvocationHandler.invokeDirect(AbstractInvocationHandler.java:153) ~[?:?]
at org.eclipse.smarthome.core.internal.common.Invocation.call(Invocation.java:53) ~[?:?]
at java.util.concurrent.FutureTask.run(FutureTask.java:266) ~[?:?]
... 3 more
2018-01-15 21:44:19.924 [INFO ] [ings.handler.SmartthingsThingHandler] - Attempt to send command to the Smartthings hub failed with: {}
java.util.concurrent.ExecutionException: java.nio.channels.AsynchronousCloseException
at org.eclipse.jetty.client.util.FutureResponseListener.getResult(FutureResponseListener.java:118) ~[?:?]
at org.eclipse.jetty.client.util.FutureResponseListener.get(FutureResponseListener.java:110) ~[?:?]
at org.eclipse.jetty.client.HttpRequest.send(HttpRequest.java:676) ~[?:?]
at org.openhab.binding.smartthings.internal.SmartthingsHttpClient.sendDeviceCommand(SmartthingsHttpClient.java:58) ~[?:?]
at org.openhab.binding.smartthings.handler.SmartthingsThingHandler.handleCommand(SmartthingsThingHandler.java:105) ~[?:?]
at org.eclipse.smarthome.core.thing.binding.BaseThingHandler.channelLinked(BaseThingHandler.java:243) ~[?:?]
at org.eclipse.smarthome.core.thing.link.ThingLinkManager.lambda$0(ThingLinkManager.java:290) ~[?:?]
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [?:?]
at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:?]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180) [?:?]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293) [?:?]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:?]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:?]
at java.lang.Thread.run(Thread.java:748) [?:?]
Caused by: java.nio.channels.AsynchronousCloseException
at org.eclipse.jetty.client.http.HttpConnectionOverHTTP.close(HttpConnectionOverHTTP.java:135) ~[?:?]
at org.eclipse.jetty.client.DuplexConnectionPool.close(DuplexConnectionPool.java:361) ~[?:?]
at org.eclipse.jetty.client.PoolingHttpDestination.close(PoolingHttpDestination.java:240) ~[?:?]
at org.eclipse.jetty.client.HttpClient.doStop(HttpClient.java:248) ~[?:?]
at org.eclipse.jetty.util.component.AbstractLifeCycle.stop(AbstractLifeCycle.java:89) ~[?:?]
at org.openhab.binding.smartthings.internal.SmartthingsHttpClient.stopHttpClient(SmartthingsHttpClient.java:79) ~[?:?]
at org.openhab.binding.smartthings.handler.SmartthingsBridgeHandler.dispose(SmartthingsBridgeHandler.java:68) ~[?:?]
at sun.reflect.GeneratedMethodAccessor28.invoke(Unknown Source) ~[?:?]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?]
at java.lang.reflect.Method.invoke(Method.java:498) ~[?:?]
at org.eclipse.smarthome.core.internal.common.AbstractInvocationHandler.invokeDirect(AbstractInvocationHandler.java:153) ~[?:?]
at org.eclipse.smarthome.core.internal.common.Invocation.call(Invocation.java:53) ~[?:?]
at java.util.concurrent.FutureTask.run(FutureTask.java:266) ~[?:?]
... 3 more
2018-01-15 21:44:19.923 [INFO ] [ings.handler.SmartthingsThingHandler] - Attempt to send command to the Smartthings hub failed with: {}
java.util.concurrent.ExecutionException: java.nio.channels.AsynchronousCloseException
at org.eclipse.jetty.client.util.FutureResponseListener.getResult(FutureResponseListener.java:118) ~[?:?]
at org.eclipse.jetty.client.util.FutureResponseListener.get(FutureResponseListener.java:110) ~[?:?]
at org.eclipse.jetty.client.HttpRequest.send(HttpRequest.java:676) ~[?:?]
at org.openhab.binding.smartthings.internal.SmartthingsHttpClient.sendDeviceCommand(SmartthingsHttpClient.java:58) ~[?:?]
at org.openhab.binding.smartthings.handler.SmartthingsThingHandler.handleCommand(SmartthingsThingHandler.java:105) ~[?:?]
at org.eclipse.smarthome.core.thing.binding.BaseThingHandler.channelLinked(BaseThingHandler.java:243) ~[?:?]
at org.eclipse.smarthome.core.thing.link.ThingLinkManager.lambda$0(ThingLinkManager.java:290) ~[?:?]
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [?:?]
at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:?]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180) [?:?]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293) [?:?]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:?]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:?]
at java.lang.Thread.run(Thread.java:748) [?:?]
Caused by: java.nio.channels.AsynchronousCloseException
at org.eclipse.jetty.client.http.HttpConnectionOverHTTP.close(HttpConnectionOverHTTP.java:135) ~[?:?]
at org.eclipse.jetty.client.DuplexConnectionPool.close(DuplexConnectionPool.java:361) ~[?:?]
at org.eclipse.jetty.client.PoolingHttpDestination.close(PoolingHttpDestination.java:240) ~[?:?]
at org.eclipse.jetty.client.HttpClient.doStop(HttpClient.java:248) ~[?:?]
at org.eclipse.jetty.util.component.AbstractLifeCycle.stop(AbstractLifeCycle.java:89) ~[?:?]
at org.openhab.binding.smartthings.internal.SmartthingsHttpClient.stopHttpClient(SmartthingsHttpClient.java:79) ~[?:?]
at org.openhab.binding.smartthings.handler.SmartthingsBridgeHandler.dispose(SmartthingsBridgeHandler.java:68) ~[?:?]
at sun.reflect.GeneratedMethodAccessor28.invoke(Unknown Source) ~[?:?]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?]
at java.lang.reflect.Method.invoke(Method.java:498) ~[?:?]
at org.eclipse.smarthome.core.internal.common.AbstractInvocationHandler.invokeDirect(AbstractInvocationHandler.java:153) ~[?:?]
at org.eclipse.smarthome.core.internal.common.Invocation.call(Invocation.java:53) ~[?:?]
at java.util.concurrent.FutureTask.run(FutureTask.java:266) ~[?:?]
... 3 more
2018-01-15 21:44:19.921 [INFO ] [ings.handler.SmartthingsThingHandler] - Attempt to send command to the Smartthings hub failed with: {}
java.util.concurrent.ExecutionException: java.nio.channels.AsynchronousCloseException
at org.eclipse.jetty.client.util.FutureResponseListener.getResult(FutureResponseListener.java:118) ~[?:?]
at org.eclipse.jetty.client.util.FutureResponseListener.get(FutureResponseListener.java:110) ~[?:?]
at org.eclipse.jetty.client.HttpRequest.send(HttpRequest.java:676) ~[?:?]
at org.openhab.binding.smartthings.internal.SmartthingsHttpClient.sendDeviceCommand(SmartthingsHttpClient.java:58) ~[?:?]
at org.openhab.binding.smartthings.handler.SmartthingsThingHandler.handleCommand(SmartthingsThingHandler.java:105) ~[?:?]
at org.eclipse.smarthome.core.thing.binding.BaseThingHandler.channelLinked(BaseThingHandler.java:243) ~[?:?]
at org.eclipse.smarthome.core.thing.link.ThingLinkManager.lambda$0(ThingLinkManager.java:290) ~[?:?]
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [?:?]
at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:?]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180) [?:?]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293) [?:?]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:?]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:?]
at java.lang.Thread.run(Thread.java:748) [?:?]
Caused by: java.nio.channels.AsynchronousCloseException
at org.eclipse.jetty.client.http.HttpConnectionOverHTTP.close(HttpConnectionOverHTTP.java:135) ~[?:?]
at org.eclipse.jetty.client.DuplexConnectionPool.close(DuplexConnectionPool.java:361) ~[?:?]
at org.eclipse.jetty.client.PoolingHttpDestination.close(PoolingHttpDestination.java:240) ~[?:?]
at org.eclipse.jetty.client.HttpClient.doStop(HttpClient.java:248) ~[?:?]
at org.eclipse.jetty.util.component.AbstractLifeCycle.stop(AbstractLifeCycle.java:89) ~[?:?]
at org.openhab.binding.smartthings.internal.SmartthingsHttpClient.stopHttpClient(SmartthingsHttpClient.java:79) ~[?:?]
at org.openhab.binding.smartthings.handler.SmartthingsBridgeHandler.dispose(SmartthingsBridgeHandler.java:68) ~[?:?]
at sun.reflect.GeneratedMethodAccessor28.invoke(Unknown Source) ~[?:?]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?]
at java.lang.reflect.Method.invoke(Method.java:498) ~[?:?]
at org.eclipse.smarthome.core.internal.common.AbstractInvocationHandler.invokeDirect(AbstractInvocationHandler.java:153) ~[?:?]
at org.eclipse.smarthome.core.internal.common.Invocation.call(Invocation.java:53) ~[?:?]
at java.util.concurrent.FutureTask.run(FutureTask.java:266) ~[?:?]
... 3 more

Null Pointer Exception.

I am getting Warning messages of the following form:
2018-07-28 06:26:47.080 [WARN ] [org.apache.karaf.services.eventadmin] - EventAdmin: Exception during event dispatch [org.osgi.service.event.Event [topic=org/openhab/binding/smartthings/state] {data={"deviceDisplayName":"Master Bedroom Outlet","value":"231.8","capabilityAttribute":"power"}, timestamp=1532777207075} | {org.eclipse.smarthome.core.thing.binding.ThingHandlerFactory, org.osgi.service.event.EventHandler}={service.id=325, service.bundleid=196, service.scope=bundle, event.topics=org/openhab/binding/smartthings/state, component.name=binding.smartthings, component.id=195} | Bundle(org.openhab.binding.smartthings_2.2.0.201801151705 [196])]
java.lang.NullPointerException: null
at org.openhab.binding.smartthings.internal.SmartthingsHandlerFactory.findHandler(SmartthingsHandlerFactory.java:149) [196:org.openhab.binding.smartthings:2.2.0.201801151705]
at org.openhab.binding.smartthings.internal.SmartthingsHandlerFactory.handleEvent(SmartthingsHandlerFactory.java:140) [196:org.openhab.binding.smartthings:2.2.0.201801151705]
at org.apache.felix.eventadmin.impl.handler.EventHandlerProxy.sendEvent(EventHandlerProxy.java:415) [3:org.apache.karaf.services.eventadmin:4.1.5]
at org.apache.felix.eventadmin.impl.tasks.HandlerTask.runWithoutBlacklistTiming(HandlerTask.java:82) [3:org.apache.karaf.services.eventadmin:4.1.5]
at org.apache.felix.eventadmin.impl.tasks.SyncDeliverTasks.execute(SyncDeliverTasks.java:104) [3:org.apache.karaf.services.eventadmin:4.1.5]
at org.apache.felix.eventadmin.impl.tasks.AsyncDeliverTasks$TaskExecuter.run(AsyncDeliverTasks.java:166) [3:org.apache.karaf.services.eventadmin:4.1.5]
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [?:?]
at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:?]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [?:?]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [?:?]
at java.lang.Thread.run(Thread.java:745) [?:?]
2018-07-28 06:26:55.123 [WARN ] [org.apache.karaf.services.eventadmin] - EventAdmin: Exception during event dispatch [org.osgi.service.event.Event [topic=org/openhab/binding/smartthings/state] {data={"deviceDisplayName":"Master Bedroom Outlet","value":"228.0","capabilityAttribute":"power"}, timestamp=1532777215119} | {org.eclipse.smarthome.core.thing.binding.ThingHandlerFactory, org.osgi.service.event.EventHandler}={service.id=325, service.bundleid=196, service.scope=bundle, event.topics=org/openhab/binding/smartthings/state, component.name=binding.smartthings, component.id=195} | Bundle(org.openhab.binding.smartthings_2.2.0.201801151705 [196])]
java.lang.NullPointerException: null
at org.openhab.binding.smartthings.internal.SmartthingsHandlerFactory.findHandler(SmartthingsHandlerFactory.java:149) [196:org.openhab.binding.smartthings:2.2.0.201801151705]
at org.openhab.binding.smartthings.internal.SmartthingsHandlerFactory.handleEvent(SmartthingsHandlerFactory.java:140) [196:org.openhab.binding.smartthings:2.2.0.201801151705]
at org.apache.felix.eventadmin.impl.handler.EventHandlerProxy.sendEvent(EventHandlerProxy.java:415) [3:org.apache.karaf.services.eventadmin:4.1.5]
at org.apache.felix.eventadmin.impl.tasks.HandlerTask.runWithoutBlacklistTiming(HandlerTask.java:82) [3:org.apache.karaf.services.eventadmin:4.1.5]
at org.apache.felix.eventadmin.impl.tasks.SyncDeliverTasks.execute(SyncDeliverTasks.java:104) [3:org.apache.karaf.services.eventadmin:4.1.5]
at org.apache.felix.eventadmin.impl.tasks.AsyncDeliverTasks$TaskExecuter.run(AsyncDeliverTasks.java:166) [3:org.apache.karaf.services.eventadmin:4.1.5]
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [?:?]
at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:?]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [?:?]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [?:?]
at java.lang.Thread.run(Thread.java:745) [?:?]

The Master Bedroom Outlet is in serial connection to an external switch. So the null pointer exception is likely occurring when the device is offline. It is non-fatal, but merely annoying.

I am running this on a raspberry pi 3b.

With regard to issue 31, I too get that warning. The items all work for me, so it too is simply an annoyance.

The responsiveness to changes seem slow. I have not fully checked this out, but for example when I open a door, Smartthings recognizes the change almost immediately, but it takes some time for that to be reflected in the display. I simply do not know where the time lag comes in. Do you poll, and if so how do you control the polling interval?

I hope your move is going well.

Mark

Question about bi-directional?

Does this binding allow you to see and control devices FROM the ST hub as well or only from the OH2 interface control ST devices?

installed this and on the ST app I can see the ST devices but not the OH2

Discovery Not Working

Hello

Thanks for this integration!

I haven't seen it work yet, but it seems promising.

I am stuck at the discovery step to add the binding.

When I click "Search for Things" nothing appears.
All other steps in the "SmartthingsInstallation.md" file went just as described.

Do I don't have OpenHab fully installed? I am still having to go to the download folder on my Windows Server computer and launch the "start.bat" file in order to access the OpenHab web interface. Is this my issue? I will look further into proper Openhab installation while I await your reply.
Thanks in advance.

Unable to start in OpenHAB 2.2

Running on Windows. Fresh install of OpenHAB 2.2. This binding does not show up in PaperUI and when I try to start it I get this error:

204 | Installed | 80 | 2.2.0.201712120439 | Smartthings Binding

openhab> bundle:start 204
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

openhab>

Trying to setup two openhab instances using same Smarthings Hub

After getting my OpenHAB working with OpenHAB-Smartthings, I cloned my Raspberry Pi to a second device and changed the IP address & device name. Then I duplicated the OpenHab-Smartthings setup making minor changes to the code pasted into the Smartthings developer site. For example the second mySmartApp is called OpenHabAppV2_2
with code change
definition(
name: "OpenHabAppV2_2"...

and

My Device Handler is bobrak : OpenHabDeviceHandler2 with code change
definition (name: "OpenHabDeviceHandler2"...

The rest of the config used the MAC and IP of the 2nd OpenHab2 device and a second automation in the SmartThings app (selecting all of the devices I want to use)

But I may have missed something as OpenHab2 Discovery does not work.

"Create the Device"... Documentation.

On the SmartHub documentation , item 9 under "Create the Device"...

Create the Device

 mac: (This is the same as the Device Network ID but with : between segments

I use the MAC without the colon and it works? Any value to adding the : ?

Can't Find in Discovery

Hey, I like the way this looks, but I'm having an issue with finding the device in Paper UI's discovery...Maybe you can help me figure out what I'm doing wrong? So far, I have:

  1. Copied the Snapshot file to the addons folder
  2. Created a .things, .items, .sitemaps file in config folders
  3. Followed the steps provided in SmartThings API setup tutorial

I can't seem to even get a response after following these steps at all...Even in the logs. I created the OpenHAB log to try troubleshooting and I see information about an MQTT broker, starting the UIs and all the normal stuff...Nothing about SmartThings. I looked at some other issues from the past, and I tried to follow your advice from those, but I can't seem to find anything. The .things file references the SmartThings IP address and the normal port and the SmartThings device references the IP address and MAC of the OpenHAB hub. The only thing I can think of is that OpenHABian doesn't like the fact that I first installed the NPM version of stjohnjohnson version of the SmartThings bridge. I can't figure out how to uninstall it though. Any thoughts? I feel like this should be working at this point, but I've been wrestling with this for days and have nothing to show for it.

Switch State for Dimmers

Is there anyway to interact with the switch state for dimmers, I only have access to change the level. I would like to preserve the state when turning ON/OFF and interact with the item as a switch in openhab. Any suggestions on how I would do this?

Configuration

Hi,

first of all: thanks for the great module. It is the first I amusing in GitHAB.

I followed your instructions very carefully and have set up everything correctly. However, I took me quite a while to configure the first device because I did not know that before you run the first auto discovery you have to add the smartings hub as a thing first. Maybe you could add this info to the instructions.

Also I saw that some things were no auto discovered automatically and some were.

For example in smartthings app I go to Smartapps-->OpenHabAppV2
Then I find the line named switch and add a few bulbs like KitchenBulb.

Then I go to OpenHAB and start auto discovery. The "kitchen bulb" is not found.
Then I click on add device manually, select switch and provide the kitchen bulb. Then it works.
Do you have an idea why the auto discovery does work for all devices?

Thanks
Evgeni

Problems getting started

I'm not having much luck getting started here:

d8de65d0-29ca-48da-a539-c1cbd891c235  11:20:02 PM: debug Subscribing to event handler null
d8de65d0-29ca-48da-a539-c1cbd891c235  11:20:02 PM: debug Subscribing inputHandler to device "[Plug1]" with attribute "switch"
d8de65d0-29ca-48da-a539-c1cbd891c235  11:20:02 PM: debug Updated with settings: [switch:[Plug1], openhabDevice:OpenHabDevice]
bd22d17d-65bc-4437-bf34-9f7854325d9a  11:20:02 PM: trace getPhrases(), state.welcomeIssue = null
bd22d17d-65bc-4437-bf34-9f7854325d9a  11:19:44 PM: trace getPhrases(), state.welcomeIssue = null
 11:19:34 PM: info Waiting on events...
 11:19:34 PM: info For past logs for individual things go to the My Devices section, find the device and click on the Events link on the device information page.
 11:19:34 PM: info This console provides live logging of your SmartThings.
  • Addon installed in openhab (raspberry pi/raspbian) and restarted the service:
wget https://github.com/BobRak/OpenHAB-Smartthings/blob/master/org.openhab.binding.smartthings/target/org.openhab.binding.smartthings-2.2.0-SNAPSHOT.jar
chown openhab:openhab org.openhab.binding.smartthings-2.2.0-SNAPSHOT.jar
chmod 664 org.openhab.binding.smartthings-2.2.0-SNAPSHOT.jar
mv org.openhab.binding.smartthings-2.2.0-SNAPSHOT.jar /usr/share/openhab2/addons/
systemctl restart openhab2.service
  • Created a simple smartthings.things file:
Bridge smartthings:smartthings:Home    [ smartthingsIp="192.168.1.98", smartthingsPort=39500 ] {
    Thing switch stPlug1Switch [ smartthingsName="Plug1" ]
}
# Root logger
log4j2.rootLogger.level = WARN
log4j2.rootLogger.appenderRefs = out, osgi
log4j2.rootLogger.appenderRef.out.ref = LOGFILE
log4j2.rootLogger.appenderRef.osgi.ref = OSGI

# Karaf 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

<snip>
  • I don't see any reference to the smartthings addon in the Bindings list in Paper UI, which may or may not be expected? I'm guessing this means I haven't even successfully installed the addon but this is the first addon I've installed manually so maybe that's expected as it wasn't installed through the UI.

  • There are no errors in the openhab log, if I messed up the installation of the addon I would have expected to see something there, but all I see different from when I started up prior to trying this out is the additional Loading model 'smartthings.things' log message.

Grouping sensors and attributes of one device into one item

It works really well thanks. It's even faster than than using the app 👍 The only comments I have are:

  • The readme could be a bit clearer, just before the openhab instructions should be instructions and links to how to set up the smartthings hub first. I was close to giving up before I went back and found the instruction about setting up the smartthings hub.

  • Would it be possible to group the various sensors and attributes of a device under one item. At the moment the battery life of the multipurpose sensor is different all of it's sensors, so the one device acts like 5 separate items. It's mainly a cosmetic issue but it's much easier to have a one device - one item setup unless there is a really good reason not to. I noticed that the Arrival sensor has the link quality and received signal strength indicators under the same item, so I'm hoping it's not that much work to add in the other attributes such as battery, and presence to that item.

  • Is the alarm/alert function for the presence sensor something we can use? Is it something I can add with a bit of code or is it something that is not available to the public.

Thanks again.

Smoke Detector carbonMonoxideDetector device discovered as "unknown"

Shows up in the inbox, but cant be added as a thing... see screen shot.
carbonmono

When you click add a thing, Paper UI shows pops up a snackbar message - 409 - conflict.

018-01-07 04:52:06.989 [WARN ] [g.discovery.internal.PersistentInbox] - Cannot create thing. No binding found that supports creating a thing of type smartthings:carbonMonoxideDetector.

powerMeter not working

hi Bob

This is a great addon and working for my switch testing. I have this Zigbee SmartPower Outlet from Smartthings, but configuring powerMeter seems not working.
Thing file:
...
Thing powerMeter PianoSideLampPower [smartthingsName="Piano Side Lamp"]
...

Item File:
Number S1_Piano_Side_Lamp_Power "Piano Side Lamp P [%.1f W]" (gLights, GF_Living) {channel="smartthings:power:Home:PianoSideLampPower:power"}

Openhab log file:

11:36:19.423 [DEBUG] [rtthings.internal.SmartthingsServlet] - Smartthings servlet service() called with: 192.168.1.2: POST /smartthings/state
11:36:19.425 [DEBUG] [rtthings.internal.SmartthingsServlet] - Smartthing servlet function requested: state with Method: POST
11:36:19.433 [DEBUG] [rtthings.internal.SmartthingsServlet] - Smartthing servlet processing "state" request. data: {"deviceDisplayName":"Piano Side Lamp","value":"10.2","capabilityAttribute":"power"}
11:36:19.438 [DEBUG] [s.internal.SmartthingsHandlerFactory] - Event received on topic: org/openhab/binding/smartthings/state
11:36:19.440 [DEBUG] [ngs.handler.SmartthingsBridgeHandler] - received message from Smartthings hub
11:36:19.441 [INFO ] [ngs.handler.SmartthingsBridgeHandler] - Could not map the message from the Smartthings hub: capabilityKey="null" with device name="Piano Side Lamp", capabilityAttribute="power", into an OpenHAB thing/channel, maybe this isn't configured in OpenHAB

Smartthings log:

6524383d-a8a9-4eb5-876a-6dc57a6f9743 11:35:49 AM: info [name:power, value:102, type:power]
6524383d-a8a9-4eb5-876a-6dc57a6f9743 11:35:49 AM: debug description is read attr - raw: 26B0010B040A0B05296600, dni: 26B0, endpoint: 01, cluster: 0B04, size: 0A, attrId: 050b, encoding: 29, value: 0066
6524383d-a8a9-4eb5-876a-6dc57a6f9743 11:35:19 AM: info [name:power, value:41, type:power]
6524383d-a8a9-4eb5-876a-6dc57a6f9743 11:35:19 AM: debug description is read attr - raw: 26B0010B040A0B05292900, dni: 26B0, endpoint: 01, cluster: 0B04, size: 0A, attrId: 050b, encoding: 29, value: 0029
6524383d-a8a9-4eb5-876a-6dc57a6f9743 11:35:19 AM: info [name:switch, value:on, type:switch]
6524383d-a8a9-4eb5-876a-6dc57a6f9743 11:35:19 AM: debug description is on/off: 1
6524383d-a8a9-4eb5-876a-6dc57a6f9743 11:35:18 AM: info [name:switch, value:on, type:switch]

It seems the mapping for this power attribute is not defined?

Installation Steps for OpenHab

I'm at the 4th install step for OpenHab:

  1. Add the appropriate configuration files (.things, .items, .sitemaps)

Which files are these in the archive? Where do they go in openhab?

2 Way communication

@BobRak
Thank you very much for this binding - its working fantastically.

However, it says that there is two-way communication? so far I have only been able to get Smartthings devices to show in OpenHab. It would also be useful for me to put some OpenHab devices in Smartthings.. is this possible?

How to get iPhone presence to openhab

I selected my iPhone as one of the objects listed in the OpenHabAppV2 smart app, but I cannot discover it in Openhab. This would be a great solution to the "presence problem".

Special characters causing a JSON parsing exception.

Let me start by saying thanks for starting this project!
With 90+ devices I am definitely looking for a discovery :)
I am running OH2(2.2.010) on a Synology NAS model DS1513 with your latest snapshot.
During discovery most of devices are not discovered.. json parse exception.

Need anything else let me know.

events.log
openhab.log

Cheers,
-don

Presence Sensor doesn't work

I see that the Smartthings Presence Sensor isn't on the list of supported devices. But I see "presenceSensor": in the bobrak : OpenHabAppV2 SmartApp. Should this work?

Should this binding work with the new Samsung Connect Home (Smartthings) hub?

I installed the Smartthings Binding but I'm not getting anything when I "Search for Things". I don't see anything logged on the Smartthings "Live Logging". Then I thought I should check if this binding will even work with the new Smartthings hardware. It does appear to be using the same port (39500).

Samsung Connect Home

Firmware Version 000.017.00055
Hardware Version Samsung Connect Home, US_CA

connection refused errors possibly after upgrading to 2.3

I recently upgraded to Openhab 2.3 on linux. Shortly after upgrading I noticed that the integration no longer works for sending commands to my SmartThings devices (status update events still work though). I'm not sure if it's because of the upgrade to 2.3 or some other change on the Samsung's side.

I'm getting the following errors:

==> /var/log/openhab2/openhab.log <==
2018-06-10 16:16:44.603 [INFO ] [ings.handler.SmartthingsThingHandler] - Attempt to send command to the Smartthings hub failed with: {}
java.util.concurrent.ExecutionException: java.net.ConnectException: Connection refused
at org.eclipse.jetty.client.util.FutureResponseListener.getResult(FutureResponseListener.java:118) [72:org.eclipse.jetty.client:9.3.21.v20170918]
at org.eclipse.jetty.client.util.FutureResponseListener.get(FutureResponseListener.java:110) [72:org.eclipse.jetty.client:9.3.21.v20170918]
at org.eclipse.jetty.client.HttpRequest.send(HttpRequest.java:676) [72:org.eclipse.jetty.client:9.3.21.v20170918]
at org.openhab.binding.smartthings.internal.SmartthingsHttpClient.sendDeviceCommand(SmartthingsHttpClient.java:58) [189:org.openhab.binding.smartthings:2.2.0.201801151705]
at org.openhab.binding.smartthings.handler.SmartthingsThingHandler.handleCommand(SmartthingsThingHandler.java:105) [189:org.openhab.binding.smartthings:2.2.0.201801151705]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:?]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?]
at java.lang.reflect.Method.invoke(Method.java:498) ~[?:?]
at org.eclipse.smarthome.core.internal.common.AbstractInvocationHandler.invokeDirect(AbstractInvocationHandler.java:153) [101:org.eclipse.smarthome.core:0.10.0.oh230]
at org.eclipse.smarthome.core.internal.common.InvocationHandlerSync.invoke(InvocationHandlerSync.java:59) [101:org.eclipse.smarthome.core:0.10.0.oh230]
at com.sun.proxy.$Proxy137.handleCommand(Unknown Source) [189:org.openhab.binding.smartthings:2.2.0.201801151705]
at org.eclipse.smarthome.core.thing.internal.profiles.ProfileCallbackImpl.handleCommand(ProfileCallbackImpl.java:75) [108:org.eclipse.smarthome.core.thing:0.10.0.oh230]
at org.eclipse.smarthome.core.thing.internal.profiles.SystemDefaultProfile.onCommandFromItem(SystemDefaultProfile.java:49) [108:org.eclipse.smarthome.core.thing:0.10.0.oh230]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:?]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?]
at java.lang.reflect.Method.invoke(Method.java:498) ~[?:?]
at org.eclipse.smarthome.core.internal.common.AbstractInvocationHandler.invokeDirect(AbstractInvocationHandler.java:153) [101:org.eclipse.smarthome.core:0.10.0.oh230]
at org.eclipse.smarthome.core.internal.common.Invocation.call(Invocation.java:53) [101:org.eclipse.smarthome.core:0.10.0.oh230]
at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:?]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:?]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:?]
at java.lang.Thread.run(Thread.java:748) [?:?]
Caused by: java.net.ConnectException: Connection refused
at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method) ~[?:?]
at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:717) ~[?:?]
at org.eclipse.jetty.io.SelectorManager.finishConnect(SelectorManager.java:355) ~[?:?]
at org.eclipse.jetty.io.ManagedSelector.processConnect(ManagedSelector.java:352) ~[?:?]
at org.eclipse.jetty.io.ManagedSelector.access$900(ManagedSelector.java:56) ~[?:?]
at org.eclipse.jetty.io.ManagedSelector$SelectorProducer.processSelected(ManagedSelector.java:289) ~[?:?]
at org.eclipse.jetty.io.ManagedSelector$SelectorProducer.produce(ManagedSelector.java:181) ~[?:?]
at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.executeProduceConsume(ExecuteProduceConsume.java:249) ~[?:?]
at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.produceConsume(ExecuteProduceConsume.java:148) ~[?:?]
at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.execute(ExecuteProduceConsume.java:100) ~[?:?]
at org.eclipse.jetty.io.ManagedSelector.run(ManagedSelector.java:147) ~[?:?]
at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:671) ~[?:?]
at org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:589) ~[?:?]
... 1 more

Channel Tamper for motion

2018-01-07 18:00:47.409 [WARN ] [ore.internal.thing.ThingTypeResource] - Cannot find channel type: smartthings:tamper-channel

During discovery... all my 4 in 1 Zooz tamper channels are ignored.

Question: Items file

Hi,

Not really an issue, but wanted to ask if there is a way if items file can be automatically created. I was able to add things after I added the smartapp/devicehandler within openhab, but I have about 49 devices on smartthings hub, and creating items for each device seems difficult, especially I can easily make a mistake. Is there a tool or way to automatically create items for all my smartthings things?

Thank you so much.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.