Wireless Sensor Tags Integration

@tamaracks Ok, if it’s triggering but after a minute, I’d definitely check the Motion mode and make sure it’s set to Accel. By chance is your poll timer set to a minute in the SmartApp?

That’s the motion rearm time setting? If it’s set to nothing, then it defaults to 60, right?

@tamaracks The timer I was meaning was the “Minutes between poll updates of the sensors” in the optional settings under where you select your devices. That just changes how often the ST devices poll the WST system.

The main thing to try though for getting instantaneous motion alerts is changing the “Motion mode” to “Accel” in the device to see if that gives instant updates on motion or acceleration for you.

Just a comment, but for my personal use, I removed the “Presence” and “Switch” capabilities from the motion / water tag device types. I felt that they were cluttering up my view of lights and family presence indicators.

Also, I changed the rounding on the temperature to more accurately reflect degrees F. Just sent that in as a pull request on the github repo.

1 Like

I am fixing to get SmartThings for the first time. I have the Sensor Tags. I have no experience with coding like used earlier in this thread to “marry” the sensor tags with the Smarthings hub. Can someone point me to a fairly plain explanation for how I do this? Thanks

This is one of the situations where it’s going to seem very simple to people who code and very complex to people who don’t.

The essence of it is that if you want to use the custom code available from the link to github up above, you’re going to copy and paste two separate pieces, A device type and a smart app, from github into your cloud account at SmartThings.

After they are pasted in, and you make a couple of other adjustments, you will be able to discover your sensors just like the device types that come built into the SmartThings mobile app.

And then you will be able to use a set up wizard that you also just published to yourself to use the individual sensors.

The process is pretty straightforward, and @swanny , Who is the author of this particular code, has written very good instructions in the comments to the part that you will copy, but it’s still going to seem very technical. Here is the FAQ on how custom code is used was SmartThings. This is a clickable link:

If all of that seems a little complicated but doable, I’m sure people in this thread will be happy to help you as you go through it.

If all of that just seems too techie, there is a completely different way which will also give you the ability to use your wireless sensor tags with SmartThings and doesn’t require any cutting and pasting.

The second method is something you can actually already use with the tags you have before you get smartthings, so it’s worth looking into anyway.

There is a free service called IFTTT. (if this, then that.) companies pay IFTTT to include their products. Both the company that makes the wireless tags and SmartThings do this, so they each have a “channel” at IFTTT.

With the channel, you can set up simple rules, which they call recipes, to make something happen when one of your devices is triggered.

For example, if you have a Hue multicolor bulb you could have A movement alert on your motion sensor tag cause your hue bulb to start blinking orange. If movement, then blink. If this, then that.

This allows you to set up integrations between many different companies devices even when there is no direct integration.

Anyway, it’s a second way of marrying SmartThings and the wireless sensor tags. The rules are simpleer than the ones you can use with a direct integration, and there may be a slight lag since now the tag has to talk to IFTTT and IFTTT has to talk to SmartThings, and that is done over the Internet.

But you don’t have to do any cut and pasting, you just select things from drop-down list while you set up your recipes.

Eventually you will probably want to use the cut-and-paste method, because it will be both more powerful and a faster integration. But you can use the IFTTT method initially while you get Used to smartthings if you like. And a lot of people end up using each method for different situations, it just depends on exactly what you’re trying to do each time.

1 Like

Thanks guys… :grinning:

1 Like

Getting some “unexpected error” when trying to add several of my tags… I have 9 added, but need to get my last 3 added. I’ve tried each of the remaining 3 individually (9 existing checked, + 1st, failed, + 2nd, failed, + 3rd, failed), but I get the same error each time.

1 Like

@talz13 Can you check out the log in the IDE to see what it says when you try to add the tags? Feel free to message me the logs and I’ll check them out.

I’ll check out your pull request too. I have been noticing the clutter especially from the way presence appears in the new app.

1 Like

I didn’t yet try adding another tag yet, but here’s what I see when a periodic refresh triggered:

11:30:27 AM: error java.util.concurrent.TimeoutException: Execution time exceeded 20 app execution seconds: 375369270988347 @ line 394
11:30:03 AM: trace success
11:30:02 AM: trace sending /ethClient.asmx/GetTagList
11:30:02 AM: trace pollHandler

Seems pretty explanatory that it killed itself because it was running too long? I’ve got 9 tags added to ST, not sure how many should reasonably be supported due to polling time?

Yes, it looks like the ST system is timing out waiting for the devices to update from the wireless tags system. I’ve only tried about 5 or 6 tags myself. I’ll make a note to look at any optimizations that could be done to reduce the time.

Smartapps are only allowed to run for 20 seconds at a time before the cloud kills them. It’s to keep them from using up too many cloud resources.

It’s quite common when you have smart apps that handle many different devices to run multiple instances of the same smart app to avoid this problem.

I don’t know if that’s a possibility for you here, it could be you’re just running into a timeout to the service connection.

One thought I had… Many SmartApps allow multiple instances to be installed… Like Keep Me Cozy, Laundry Monitor, etc. If you add an option to name the SmartApp at install time, it could be simple to divide the sensors among installed apps. That would hopefully allow users to put, say, 5 tags on an app, and then create a new app, and so on. It might be more clutter, but it might work around the issue temporarily at least.

Edit: LOL, maybe if I actually read the reply before mine, I would see that the idea was already posted :sweat_smile:

1 Like

I’ve been trying to track down an issue I’m seeing with Wireless Tags… Seems my front door and inside garage door keep getting disarmed in the morning, and I don’t believe I have anything set up to disarm them in ST… I also checked the Motion settings on the tag manager web app, and no kind of schedule is enabled to arm/disarm these tags.

Something of note, when I go through the Wireless Tag (Connect) setup again, it seems to arm all of the tags that it polls… can that be disabled? I’m thinking this SmartApp may have something to do with my unexplained arm/disarm cycle for those tags.

I have submitted a change that allows for named instances of the SmartApp so you can split up your tags between multiple apps. I also integrated your pull request for the temperature.

If you want to turn off the initialization of the tags when you install the SmartApp, you can go to line 219 in the latest version and comment out “d.updated()”. Otherwise, I’m not sure what would be causing the reset you mention.

I may make the presence and switch changes as well at some time in the main line. It does tend to clutter up the app, and I don’t expect many people are using that functionality.

1 Like

Trying to find some more switches that will be usable by my service dog. If we stuck a wireless tag on a hanger strap, like a bell pull, if the dog hit the strap I’ll get a motion alert, right? So how likely is it that I’m going to get false alerts if the strap is just hanging there most of the day? That is, how sensitive are these in every day use?

Do we need to get an actual tilt (two angle change) or is just a slide along one axis going to be enough?

Thanks! :sunglasses::dog:

Hi @JDRoberts,

I tested a sensor on about a 3 foot loop of thin 26 gauge wire (that’s what I had handy). I then hung it on a door knob for my testing. In the mobile app,I tweaked the sensitivity to 75% and change the response to Fast (worst battery life).

With those settings, I could move the sensor with the back of my hand trying to imitate the dog pushing against it (2-3 inches of movement or more) and it would trigger reliably, but I could blow on it hard without triggering motion. From 10-15 minutes of testing, those settings seemed pretty good. I’m not 100% sure it’ll work the way you want but it seems close enough that it may be worth trying.

1 Like

Excellent, thank you so much! Just looking for some more options. I can put a Contact sensor on a drawer and the dog can easily pull it open or close it again. But I myself can’t. So we look for things that both of us can do, just to get a few more options.

It’s the dog who works traditional toggle switches. I can do some pushbuttons if it’s a fairly broad flat surface, like the smartenIT 3 toggle. And some rocker switches, but if they’re on the wall they’re typically too high for me as I can’t really raise my arms up very far.

I can easily do some kind of hand wave over a PIR motion detector in a box pointing up, and we use those a lot for touchless switches, but they get expensive and I had an idea for a placement where I think a swing rope would work better.

Again, thanks for checking! :sunglasses::dog:

No problem. Happy to help. This does seem like a potentially viable option for you both to use.

1 Like

By the way, if anyone is curious, we have tug straps hanging all over the house now for opening cabinet doors and pulling out shelves and things like that. He doesn’t play with them, he knows they’re for work. Some of the other people in the house might trigger it unintentionally, but I’m not worried about the dog.

Dog’s eye view of the refrigerator. :sunglasses: The white rectangle on the left here is a Phillips hue dimmer switch that we can both use. And this is a typical tug rope.