SmartThings and OpenHABian

  • Platform information:
    • Hardware: Raspbery Pi 3 Model B
    • OS: OpenHABian v. 2.2.0
  • Issue of the topic: SmartThings Bridge isn’t communicating

I am brand new to OpenHAB, so please bear with me…I’m trying to get OpenHAB to communicate with my SmartThings Hub. I’ve tried both the binding/add-on version and the Home Assistant version I previously got working on Home Assistant. I used npm install for the stjohnjohnson version. I’m also using a configuration that previously worked for Home Assistant for the SmartThings Device Handler, SmartApp, and Device. I have also tried setting up everything from the binding version on SmartThings API. I’m not sure that this matters at this point, but my current item and things setup looks like the following:

Contact FrontDoor "Front Door [%s]" <door> { mqtt="<[openhabian:smartthings/Front_Door:state:open]" }

Switch OfficeLight "Office Light" <light> { mqtt=">[openhabian:smartthings/Office_Light/cmd:command:ON:1],>[openhabian:smartthings/Office_Light:command:OFF:0]" }

I can’t seem to get either working, but as I said, I don’t see any sign that the two are even communicating in the first place. It looks like SmartThings is sending messages that fail to get received, but I’m not sure. Here is some of the relevant log information from SmartThings:

11:40:35 PM: error java.lang.NullPointerException: Cannot invoke method deviceNotification() on null object
11:40:35 PM: debug Forwarding device event to openhabDevice: {"path":"/smartthings/state","body":{"deviceDisplayName":"Front_Door","value":"closed","capabilityAttribute":"contact"}}
11:40:33 PM: error java.lang.NullPointerException: Cannot invoke method deviceNotification() on null object
11:40:33 PM: debug Forwarding device event to openhabDevice: {"path":"/smartthings/state","body":{"deviceDisplayName":"Front_Door","value":"open","capabilityAttribute":"contact"}}
11:40:32 PM: error java.lang.NullPointerException: Cannot invoke method deviceNotification() on null object
11:40:32 PM: debug Forwarding device event to openhabDevice: {"path":"/smartthings/state","body":{"deviceDisplayName":"Front_Door","value":"closed","capabilityAttribute":"contact"}}
11:40:31 PM: error java.lang.NullPointerException: Cannot invoke method deviceNotification() on null object
11:40:31 PM: debug Forwarding device event to openhabDevice: {"path":"/smartthings/state","body":{"deviceDisplayName":"Front_Door","value":"open","capabilityAttribute":"contact"}}

Please let me know if you see anything…

Have you even tried to search this Forum for hints regarding your device, this is what I found.

Yes, I saw that one and 2 other posts that say it’s possible to make this work, but don’t explain how they made it work other than “I followed the instructions”. I’m not buying 2 more $50 devices to replace one $50 device that I already have. I also already followed the instructions and must be missing something… :confused:

Didn’t @rlkoshak say: “In the meantime, you can use the HTTP binding to interact with the Hub through its HTTP REST API.” That way you wouldn’t need any extra device.

Hmmmm, I’ll take a look into this and see if I can’t get it to work…I’ll let you know what happens. Thanks for pointing that out. I missed that. :slight_smile:

Edit: I’ll have to look into it tomorrow though…I don’t see any Device Handlers, SmartApps, or Devices right off hand that I can use, so it will take a bit more thought than my brain can spare right now, haha.