[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 open source 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