SmartThings Community

[BETA] Wink Relay - Custom SmartThings Integration



oh boy, many of us have had failures with the recovery, but that’s a new one to me.

Some info about that error here:


I really wish we could get TWRP on these so we could take proper device backups/restores

(Tony) #125

I have been using a non-rooted Relay (for ActionTiles) that began to show some bad behavior (lockups and random reboots). Using the ‘wipe data/factory reset’ didn’t fix it, but choosing the ‘wipe cache’ recovery option (which apparently the factory reset choice doesn’t do) did get it working again.


Once, when I was first fooling around with this thing, from a adb shell I ran:
pm disable

That’s the only other thing I can think of.

(Joshua Lyon ( Dashboard)) #127

@Obi2000 that’s what I was doing in my tests and is likely the same thing Root Package Disabler is doing.

Turns out the problem wasn’t with the command, but something else with my system where it gets reset to the previous state anytime it gets rebooted.

The good news is I should be able to automate much of this for other people. The bad news is I’d really rather test it on my own system before releasing it into the wild in case there are negative effects so it may be a few days. :smile:

(T1tentrum) #128

Is someone able to open ActionTiles when the Wink Relay starts. Fully kiosk does not run on Android 4. All the other kiosks apps I’ve tried do not keep ActionTiles’ ID in memory after closing. I created a chrome shortcut on the desktop but it is impossible to launch it at startup. I have tried all the software using macros to be able to launch after startup but none see the shortcut of google.

(Tony) #129

Yes, I messaged you so as to not clutter the thread.

(S H) #130

Any update of when you are gonna roll out the update?

(Joshua Lyon ( Dashboard)) #131

Are you asking me when will then be now?

(Joshua Lyon ( Dashboard)) #132

I just pushed STWinkRelay 0.3.0a to the update server.

You can navigate to Settings > General > Update app. If you have network connectivity, it should find the the newest version and enable you to download/install it. Remember to open the app at least once after the install to get the services started again.

WARNING: I have not been able to test this release as thoroughly as I would like since my Wink Relay is on the fritz. I would strongly encourage you to make sure ADB debugging is enabled before you disable the OEM app - that way you have a fallback if anything goes awry.

This release includes the following features:

  • OEM Disabler
  • Dark Theme
  • Fixed button press events (correct button IDs)
  • Touch screen or buttons to turn on
  • Automatically turn off after 15 seconds of no touch/button presses
  • Map top button / bottom button to:
    • Do Nothing (Send Events Only)
    • Toggle Relay 1
    • Toggle Relay 2
  • Add HTTP mapping to remotely turn the LCD backlight on/off


Good job! Looks like it’s working fine to me. The buttons are registering correctly and control the relays. Love the dark theme too! Thanks for all your hard work. Sorry to hear about your Wink Relay having problems though.

(Joshua Lyon ( Dashboard)) #134

Thanks for the feedback. Glad to hear that the initial results are positive.

My concern is more with the long-term. Android has a built in memory management feature which attempts to kill apps/services when the device needs to free up memory. My concern is that the STWinkRelay services will all be working as expected and turn the LCD backlight off as expected and then Android could kill the services which would prevent the screen from turning back on. The workaround would be a simple reset with the physical button below the screen (or ADB to relaunch the app). I added in some code to promote the services to be foreground services which would normally make it extremely unlikely that Android would kill the app, but the Wink Relay is a pretty resource constrained device so it wouldn’t surprise me! If the issue does crop up I think the next step would be make the STWinkRelay app a system app.

(S H) #135

Using this app, can I make the bottom button, which is not connected to any load, trigger a ST routine or device? If so, how?

(Joshua Lyon ( Dashboard)) #136

Yes, the button events are always sent over to SmartThings even if you don’t have them controlling a load.

You can use any of the SmartThings rule engines to use the button presses to trigger Routines, control devices, etc. For example, you could use webCoRE to monitor the topButton and/or bottonButton attributes and react to those.

I’m not at home to test, but something like the following would probably work:

Note that the bottomButton and topButton attributes work like a momentary switch. While the button is pressed down, the value will be on and as soon as you let go of the button the value will change back to off.



Sounds like this will be the kick in the butt I need to finally get webCoRE setup and working. I’m planning on setting up the top button to control all the smart bulbs and a led strip in my den

(Joshua Lyon ( Dashboard)) #138

Awesome! Let me know how it works.

(The Viking AKA "Holy Crap You're a Giant!") #139

We can update the TTAS Wiki entry for the Wink Relay to include your current instructions here…
Replacing everything after step 32 with this integration would likely make things infinitely easier to use and bring the document into the present.

I wrote the article, but stepped away from my multiple Wink units because of software updates and the modified APK not being updated. I’d love to bring them back into the mainstream again, possibly with a semi-official app integration into the Wink app with ActionTiles.

(Joshua Lyon ( Dashboard)) #140

Thanks for the suggestion! I’d like to give this a bit more ‘burn-in’ time before suggesting the masses use the OEM Disabler feature per my comment in post #134. I want to make sure the foreground service approach is sufficient and if not I’ll get my other Wink Relay installed and test out the System App approach.

(The Viking AKA "Holy Crap You're a Giant!") #141

I ran into some issues with the android app on the Wink Relay. It installed without issue, but when I launch it, I get a grey screen for half a second, then it goes away and the app is no longer running.

This is the unit I wrote the documentation with, so it’s been attached to the wall for the last many many months and I’ve done nothing more than use it for light control using IFTTT integration. I may have to wipe it and start fresh, which is no big deal… Has anyone else had a similar issue? If so, how did you resolve?

(Joshua Lyon ( Dashboard)) #142

A couple things you might try. You might start by trying an older version of the APK. While I can’t think of anything off the top of my head I suppose it’s possible that this new 0.3.0 version is dependent upon something in a previous version being there first.

The other thing you could do that would be helpful in diagnosing the issue is to run logcat while you try to run the app. If it is crashing for some reason, logcat should have it in the logs.