[BETA] Wink Relay - Custom SmartThings Integration

android
dth_lighting
dth_sensors
project_sensors
winkrelay

(Joshua Lyon (SharpTools.io Dashboard)) #245

Typo on my side. I meant on touch. The motion values are there, but since they seem to be different for each device, I didn’t build in a threshold. You could use a rule engine or write/modify the SmartApp to trigger the screen on anytime the motion value goes over a specified threshold though.


(Efrain) #246

@joshua_lyon any tip fo me? so It can discover the device?


(Adam) #247

Cool, thanks for the info and all of the great work on this! I know it would be at about “zero” on your priority list, but is it easy to add a setting to toggle screen on in the settings of the app? I’m guessing I’m in the minority but it’s just nice to be able to have the Wink Relay always-on for an information display and a live wallpaper running in the background.


(Efrain) #248

Ok, so after hours of research i found out the problem is in the SmartApp in this lines:
ssdpSubscribe()
//subscribeNetworkEvents()
when I swap them I get 3 devices but I only have one, I tried adding them and I get an error:


also this is the log from smarthings: https://gist.github.com/ered15/b3cabcca792100d8793cf350edd04135 please let me know what is wrong.


(Joshua Lyon (SharpTools.io Dashboard)) #249

Uncommenting/swapping those lines won’t help…

ssdpSubscribe() is a more granular method which looks for SSDP events specifically from the Wink Relay devices:

It’s looking for something that matches:

urn:sharptools-io:device:WinkRelay:1

The subscribeNetworkEvents() subscribes to ALL network events for the Hub, so you may be getting responses from other devices that aren’t necessarily Wink Relays… so sure, you’ll get items in the list, but they aren’t valid items.


Keep in mind, the logs have the following format:

 ☆ uuid:b57809e1dc14af32 @ C0A80049:1F90 (B479A71C3E9F)
uuid:{deviceUUID} @ {HexIP}:{HexPort} ({HexMacAddress})

So decoding the above, we get:

  • C0A80049 = 192.168.0.73
  • 1F90 = 8080
  • B479A71C3E9F = B4-79-A7-1C-3E-9F

The logs are showing that, for whatever reason, we aren’t seeing a response from the Wink Relay. I don’t know if that means the request is never being sent, the response is never coming back, or the callback is never being triggered for some reason. Looking through the logs you submitted, it looks like the SSDP request is being received by the Wink Relay, it’s responding with the SSDP response, and then the HTTP request for device.xml is coming in (presumably from the SmartThings Hub)… so it’s not really clear to my why you aren’t seeing it show up as verified.

Your best bet would be to add some additional logging to various steps of the SmartApp process and see if you can figure out where things are going wrong.


(Efrain) #250

hey @joshua_lyon thanks for answering, well I’ve tried everything but it wont discover the Wink Relay on the SmartApp, any suggestions in what lines should I add additional logging? BTW this is my Hub info:

Firmware Version: 000.022.00013
Hardware Version Hub v2 US


(Adam) #251

@joshua_lyon Sorry to bug you again, and I’m sure it’s not anywhere on your priority list, but would it be hard to add a “screen always-on” option in the settings? I’ve tried a few different things, developer options screen always-on and some different apps to see if they’d help keep it awake, but they don’t seem to counteract what this app does. Thanks in advance!


(Joshua Lyon (SharpTools.io Dashboard)) #252

Did you try the manual pairing approach? If that doesn’t work, I would suggesting adding logging statements to the SmartApp to trace what part is failing.


(Joshua Lyon (SharpTools.io Dashboard)) #253

Sure, I can add it at some point. To be perfectly transparent, it’s not high on my priority list as this was just a fun project for me and I’m busy with some big projects at the moment. :grin:


(Adam) #254

Awesome! And I totally understand, I’ve had the Wink Relay set up for a few months and had been looking to add it to SmartThings, but for some reason just never ran across this project you did, it’s amazing. And I don’t mind throwing a few bucks your way via PayPal or something to show my appreciation if you’d like. The relay is now so much more useful to me


(alvarez513@gmail.com) #255

Hi Joshua, I recently received a replacement Wink and wanted to confirm if root access is a necessity to install/run the Custom Integration you created?


(Joshua Lyon (SharpTools.io Dashboard)) #256

Yes. Root is required.

The instructions in the first post are up to date. Stop at step 32 in the linked Wink Relay Wiki. No need for the special root disabler app or any ADB commands. The STWinkRelay APK takes care of everything once it has root access.


(Arturo Ortega) #257

Thanks Joshua! I’ve performed your integration on my two relays and they are working like a charm. Routines are performing just nice. Actually my Wink was stored in a box this weekend.
As my relays are now basically an android tablet I decided to install Smartthings app on one of them to control all things from there. I create a widget on main screen to control one routine.
But it seems that ST app gets stucked after a few hours open and needs to be closed and reopened.
Does any one have issues like this?


(Joshua Lyon (SharpTools.io Dashboard)) #258

I try not to run too much on them all at once as they aren’t the most powerful devices. You could try running the SharpTools Android app as it also has SmartThings widgets available (or even the SharpTools.io web dashboard), but I won’t promise anything as the device is better suited to running one core application rather than many!


(Webxl) #259

@joshua_lyon Is it possible to post the source code for the Android app? I’d like to hack on it a bit, make it tie in directly to mqtt. Thanks for doing all of this!


(Joshua Lyon (SharpTools.io Dashboard)) #260

I don’t have any plans to open source the Android app at the moment. If you are looking for an MQTT integration, there is one available in the following repository.


(Webxl) #261

I discovered that and wink-relay-manager right after bugging you (sorry), but I’m not sure they have all the same features, and I have to undo what I’ve done to get your system up and running, plus some extensions to your groovy code to handle button push events. I can submit a PR for that if anyone is interested.


(Joshua Lyon (SharpTools.io Dashboard)) #262

Yeah, their code is really focused on just the MQTT side of things in native C - it doesn’t look like it has a UI and it’s definitely not designed to work with SmartThings natively. :slight_smile:

Sending you a PM…


(Arturo Ortega) #263

Yesterday one of my relays, the one with ST app, went crazy and was on a continius reset cycle, no commands were accepted so I had to factory reset it again and perform all procedure once again.
After doing it all over I just installed Sharptools app and its working fine.


#264

Mine is doing the same thing. I think an update they did on their side might be causing it. Do you have the Wink app disabled? I don’t. I’m running both. It’s not an immediate boot loop but Android crashes and reboots about every two to four hours.