Wireless Sensor Tags Integration

Hi, I started using a pro tag to monitor a wine cellar. It’s been working well with ST but I’m wondering if there is a way to increase the decimal on the temperature value received in ST. Right now it’s only reporting round temperature with no decimal and given the potential level of precision from the tags (stated at least), it’d be great to be able to adjust this. What are your thoughts?

I’m sure it can be adjusted somewhere in the device handler code. Not sure exactly where though. Maybe someone with more coding experience can chime in.

I looked at the device handler code and cannot figure it out. I’m wondering if the value sent by the wirelesstag is just an integer and therefore the decimal cannot be pulled from st.

Would love to hear you guy’s opinion?

I see this thread has been a little dry lately. I have been using the temperature sensors and they work really well for that. And, as others have mentioned in this thread, you can’t beat the distances.

What I can’t seem to get is the battery level of these things. In the Smart Things hub and this code, it doesn’t seem to match what the actual battery level is. I have had a couple of these sensors battery go dead and I didn’t find out about it for a couple days. I use Smart Rules and I would like to set up a rule that monitors the battery level and when it goes below a certain level, I get alerted and I can change the battery.

Anyone else seeing this behavior with the battery level reporting?

Thanks,

Cliff

I have followed all the setup instructions to the t ,a couple times now. When I try to add the app in the ST interface on my phone it says “something`s wrong we can’t load your screen right now” it has a retry button at the bottom but it just gives me the same error and adds a new nonfunctional instance of the Wireless Tags (connect) to ST. What the heck am I doing wrong? Please help! Thanks

Through the SmartThings IDE, make sure you enable oauth for the SmartApp. Go to the SmartApp then click App Settings then scroll down until you see OAuth. Click it then click Enable OAuth in SmartAppo. If you haven’t done this already, you’ll get the error you are seeing.

Hi,

I’ve been using the Wireless Tags/Smartthings Integration for a couple of years now - with great success! Lately though the Motion sensoring/acceleration capability has stopped working for all my devices (IR sensors and Sensor Tags). Temperature, Humidity, Light on/off still works perfectly.

Has anybody experienced the same or knows how to fix it?

I’ve try a factory reset of my Smartthings Hub, deleted/re-established the link between Smartthings/wireless tags account, reinstalled Wireless Tags SmartApp and DeviceHandler but nothing works!

Any help appreciated, thanks!

Best Regards
BRS

Sorry to bring this thread back from the dead, but I just got some wireless sensor tags and I would also really love to be able to see a temp with decimal point in the Smartthings app.

@asmuts or @swanny do you know if that’s possible? Thanks for sharing your work on these device handlers!

Yes. I changed mine when I first implemented it:

return celsiusToFahrenheit(celsius).toDouble().round(1)

1 Like

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

I just completed the install. Seems to be working like a charm! :slight_smile:

1 Like

One adjustment would be great; it shows the tag as a door sensor. If it would show as a temp sensor, it would be perfect.
Anyone with ideas on how to change the code to support that?

I setup the SmartApp and tried to connect it inside Smartthings, including choosing which sensors I want to include, but at the end after clicking “done” it gives me a message saying “We’re having trouble connecting. Check your network connection and try again.” I retried a couple times and no change.

However back in the main page of Smartthings I can see my sensors showing up and it shows most of the readings like vibration, battery, temperature, humidity, and whatever else built into the sensor.

The problem is when I arm a motion detector I start getting emails from wirelesstag.net saying “Could not call URL for “motion detector 1” at event motion_detected due to following error” Then it lists a long callback URL to smartthings and shows a 500 internal server error.

When pulling up that URL from the email I see this in the browser.
{"error":true,"type":"java.lang.NumberFormatException","message":"An unexpected error occurred."}

WirelessTag tech support said a 500 error means it’s not their problem. Has anyone else seen this problem or know how to troubleshoot it?

How do you prevent the Wireless Tags for arming constantly? I have the SmartThings Smartapp installed and working, but I do not want the tag to be armed at all hours. I need it to use the same time schedule that I have already set up in the Wireless Tag IOS app.

A question for this crowd…

On the strength of what I have read here, I went ahead and purchased a wireless sensor tag Hub and two moisture sensors. I installed the Hub and the moisture sensors and they came up and started running almost immediately. I then installed swanny’s DH for the moisture sensor and the motion sensor, and then installed the smartapp.

Once again everything came up great and seems to be working perfectly.

My question however is about the data…

In the wireless sensor tag app, it shows the moisture sensor is reporting a wet-dry status as well as a moisture percentage. In the smart app on SmartThings, however, the moisture number shows up as humidity. I was going to change the tile in the smart app to say moisture rather than humidity, but before I did I want to make sure that is the right thing to do.

This is in the new SmartThings app, not the classic app, so if I change the tile label in the code to read moisture will that show up properly in the smart app? Also I want to make sure that what is being reported really is moisture and not humidity to SmartThings.

Has anyone had experience with this?

Also, a hat tip to @asmuts - thanks for picking this DH code up when the original author stopped working on it. WST should reach out to ST to do an integration, they are really nice products.

1 Like

I’ve used this great code for a few years. It worked great. It was added in the classic app then was migrated to the new app by ST. It stopped reading temperatures a couple of months ago. After a few attempts to get it working, I uninstalled the smart app and device drivers. Re-added them using the code from ASMUTS. No errors in the logs, but the new smart app will not show up as an automation on the iPhone app.
Does anyone have an idea on what I might try to get it into the app?
Thanks in advance!