Wireless Sensor Tags Integration

That seems to work, thank you!

In the setup instructions you say to create a new device “type”. Is that the same as a New Device Handler or is that just creating a New Device?

See the community FAQ on custom code. It will explain the terminology used and the basic process. (The topic title is a clickable link)

I have three WSTs (2 humidity/temp sensors, 1 moisture sensor) and the WST hub. They’re all hooked up and working fine. I’m using them along with IFTTT to control a room humidifier. But now I’d like to make use of the ST integration to control some other stuff. I’m having problems getting the tags added into ST. I’ve read the community FAQ several times, but am still puzzled. Here’s what I’ve tried to get them into ST:

  • In the ST IDE I created a new smart app copy/pasting swanny’s (and asmuts) code as instructed here and in the FAQ, turned OAuth on for the app, and published it to myself.
  • In the IDE I created a new Device Handler from the published code.
  • In the ST iOS app (I’ve tried both the Classic and new apps) I add the newly created WST smart app. I can see it in my list of smart apps (on the phone), then tap on it. It asks me for my WST login credentials, then seems to log in fine (it says I’m connected). I grant access, say OK and it says my WST account is connected to ST. Great. Then in the next step it asks me which WST devices I want to add. It lists my three devices and I’ve tried selecting all three, or just one. When I tap Done to go to the next step, I get and error: “Something went wrong…” in the New ST app, or “An unexpected error occurred” in the classic app. I’ve tried deleting and recreating the smart app in the IDE, killing the iOS app and restarting it - to no avail.

I’m wondering if my mistake has to do with getting the device handler associated with my actual tags. In the FAQ under Using a Custom Device Handler it says I should already have the devices added into my ST account. But how do I add them? When I try to add a device in the iOS app, the tags don’t show up after a scan (in either the new or classic apps). And I can’t add them manually because WSTs aren’t in the list. The community FAQ suggests, for devices that don’t show up in a scan, creating a dummy device in the IDE, assigning it a unique Device ID, then assigning the WST handler to it. I tried that, but how does that actually get associated with one of my WSTs?

I’m missing something here, and probably a few brain cells. Help appreciated!

4/20/20 Update

In case anyone runs into a similar issue, I checked the error log in the IDE. Turns out it couldn’t find the motion DH. I hadn’t installed it because I don’t have any WST motion sensors. I installed that DH, and now all if fine.

1 Like

Hello Swanny. Are you still available for questions about your Wireless Tag Integration with SmartThings? I’ve attempted to use your code but there seems to be a couple of errors within the code and it will not allow me to continue past the first part of your instructions. Thank you!!! - Bill