[OBSOLETE] Wink Relay - Custom SmartThings Integration

First, thanks for all your time and work. I had decompiled the Wink APK and was looking to build something like this.

On the proximity sensor, based on observations, I think you need a rate of change routine to detect a very near and quickly approaching reflecting object. The example below is a little primative.

OnProximityChange(newNumber)
{
var deltaValue = savedValue - newNumber;
var changeAsPer = (deltaValue / savedValue) * 100;

If (changeAsPer > Threshold)
{
    BackLight.On();
}
savedValue = newNumber;

}

To truley get the rate, you would have to incorporate time. For instance, storing the old proximity value and (date time) as ticks and comparing the new proximity value and ticks. Taking the difference of both and dividing.

newRateOfChangePerMicroSecond
= Absolute(DeltaProximityValue)/DeltaTimeInMicroseconds

changeRateAsPercentage = (newRateOfChangePerMicroSecond / storedRateOfChangePerMicroSecond)*100

1 Like

Can anyone provide steps on how to add this in the new smartthings app?

never mind. just found out the classic app is still around! installed it and got it added. thanks OP & everyone. i may/may not put it on the wall, based on multiple reports of reset/reboot/freezing/general wonkiness of the wink relay, but will see how its working on the desk for couple weeks before deciding.

1 Like

As you noted in your edit, you’ll need to use the SmartThings Classic app. The new SmartThings app still isn’t at feature parity with Classic. :grinning:

Did anyone figure out how to work around the wink relays that revert to a common image after reboot? I.e. Groundhog Day? I’m totally stuck in this state.

I have been looking a for a solution as well I have two relays stuck in that state

Just went through my first Relay on my switch from Wink to ST. Thank you @joshua_lyon!

Is there a way to get the “smart bulb” functionality, where the lights are always on and the button press tells Hue (or ST) to turn on the associated bulbs?

As far as the groundhog days, I only had this happen once. Did a factory image reset (only clearing the data always got me stuck on a boot loop), restarted the steps, and it worked fine.

1 Like

You can change what the button presses do via the STWinkRelay app settings (eg. configure the buttons to not control the internal on/off relays) and the integration will still send the button press events to SmartThings. Then you can setup whatever desired reaction from the button presses in SmartThings (eg. if top button pressed, turn on X bulbs).

Think I found it now. I set the button to “Do Nothing” so I have the event to program off of. Then on the main STWinkRelay App I set the button to “On”. Looks like it will stay powered and then I can do what’s needed with the button event to the smart bulb.

Thanks again! My Relays were the only thing keeping me on Wink, which is dying a slow and painful death. Have converted 4 of my 7 relays so far without issues and they are functioning much faster.

1 Like

@joshua_lyon did you ever figure out a way to get the Wink Realy’s with the common image after reboot recovered (i.e. groudhog day)? I’ve got a device stuck in that state.

No. I gave up on the Wink Relays and switched to wall mounted tablets running SharpTools.io :smiley:

I still have them in a box and occasionally get the itch to reinstall them (they are a very cool form factor), but then the groundhog day nightmares start coming back! :rofl:

So it sounds like no one is having any luck fixing the Groundhog Day state of their Relay? Had never seen this behavior until installing this app on the Relay and wasn’t sure if any setting changed behind the scenes to trigger this behavior ( I was wondering if it has something to do with a R/W permissions). Just trying to make one final go before I pull out the Relays and send to the e-cycler.

These devices are sleek, too bad about the groundhog state… i have gone through this process way too many times with my 2 relays that now I just have them on stock firmware… what a pity

@joshua_lyon since you gave up on the wink relay and I just started with them, let me say: nice work on the apk and integration so far.
Would you mind sharing the source code for the apk? Could not find them in your github repo and I would like to tinker with it.
Hoping to be able to get some all-in-one solution with local control going.

Thanks and I would hope I can help other here with my/your work!

Thanks for the interest! Do you have experience with JNI and C++?

Sounds interesting! Can you clarify what you mean here? While the integration operates over the LAN, SmartThings still fundamentally requires the cloud.

@joshua_lyon Yes, I’ve been working with C++ and JNI for 10+ years now.

Sorry, I didn’t make it very clear, not a smartthings user.

This forum simply had the most action about using and hacking the wink :slightly_smiling_face:. Using homeassistant.

I’ll shoot you a PM. :smiley:

This solution uses C++ and JNI as an interface layer for the interacting with the hardware (reading sensors, controlling relays). The layer for interfacing with SmartThings/Hubitat includes SSDP for discovery and a nano-webserver for communication (status updates and device control).

Thanks!

PS: I was wondering how to PM here… Did not find it. Had I known I would have done that, lol.

1 Like

I am so disappointed in Will-i-am. It is nice that he is keeping the server going but Wink only needed 4 GOOD full-time employees to make it successful.

I guess since he got it so cheap, he is like… I’ll just purchase it since it looks good next to my AMAZING AI SYSTEM that no one has ever thought of.

It would not have been hard to turn it around. It is just about too late now. The main developer thinks it more important to haggle other DIY developers than it is to grow its core use-case scenario.

Anywaaaayyyy… So I have been moving to smartthings. Trying to go as much as I can local and use the smart apps FOR EVERYTHING even motion power light on events so I don’t have to maintain WebCore Pistons, wait for IFTTT (Wink), or look at another android boot session until the day I die…

So I bought like 14 Wink Relays from Home Depot and am now putting them up on eBay for approx $30-4$0 per unit with shipping. OUUUCCCHHH Thanks for falling off the face of the Earth Wink!!!

So

I too found it a HUGE PITA to use this Hack and will never look at a groundhog the same way again. So spent.

All I wanted was to use the damn buttons directly in SmartTHings without constant issues.

GOOD-BYE FOREVER WINK

Now If I could just find something that looks like the Iotty but does not require internet. (Local Zigbee or Zwave) Any ideas? 2 Gang preferred.

I picked up a handful of Aeotec Nanos and am super happy with the result so far. FYI there is not much info on the WallSwipe but it is SUPER REACTIVE, like instant. It also has the most amazing Dimmer I HAVE EVER SEEN! Hands down. (The also installed an old Aeotec Touchpanel and it is INSTANT too)

Going back to the speed of the Wink is embarrassing after experiencing the Aeotec switches.

Anyone else have an cool 2 gang touch or simple style switches that could replace the Relay Winks for a decent price?!?!?

EUREKA!!!

With the $60 Aeotec Dual Nano Switch you can make the two manual light switches on your wink relay work with ST ! (Because you can wire the relay’s red wired to S1 & S2 on the Dual Nano)

100% Tested and working flawlessly!

Everything is now local, and instant!

Edit:

Oops… Looking back a few posts, I see that you gave up on the Wink Relay, but thanks for the work you did anyway. Guess I’ll have to look for solutions elsewhere.

/Edit

So now that Wink has decided they want start charging a subscription fee in a few days to do much of anything with their devices it looks like I’m finally going to have to get serious about installing a solution like yours and getting control of my Wink Relays through SmartThings.

Is it easy/possible to root and use ADB on a fully upgraded Wink Realy?

Also, is there anything from the Wink Relay Manager that would be useful to improve your SmartThings integration?:
https://github.com/jimpastos/wink-relay-manager

I’d imagine there will be other folks like me looking for ways to use the features of their relays without Wink in the next few days.

Thanks for your work on this!