[OBSOLETE] Wink Relay - Custom SmartThings Integration

Try the apps listed in the Wink Relay ThingsThatAreSmart.wiki article. Specifically:

  • Assistive Touch for Android (Assistive Touch Team)
  • Google Chrome or Firefox
  • Nova Launcher (TeslaCoil Software)

For the time being, when your Wink Relay reboots it will ultimately try to load up the Wink Relay software, so setting up Nova Launcher before the update and having something like Assistive Touch in place to let you go back to the launcher is important.

1 Like

Hey,

Made it to step 35 under Disabling Updates and Saving Third Party Software
Passwords but don’t have a windows computer. Everything seems to be working
other than the wink relay app. Only loads black screen. I am assuming once
these last few steps are complete that would come back. I will see if I can
get a friend’s computer to complete. Thanks for the help!

For the purposes of this integration (STWinkRelay), you’re good stopping at step 32 and then continuing with the instructions listed in the original post of this thread.

Currently, the STWinkRelay integration runs side-by-side the Wink Relay app since I haven’t yet integrated the ability to wake the screen from touch/proximity nor setup mapping of the buttons to control the built-in relays.

1 Like

Got up to the smartthings mobile app and it is not listed under my apps. I
did publish to my account but still not showing up.

Can you share a screenshot of the My SmartApps and My Device Handlers tabs from your IDE? And a screenshot of the Add a SmartApp > My Apps from your phone?

image

image

The ThingsThatAreSmart.wiki entry on Installing Custom Code might be helpful as a reference here.

1 Like

Do you have any intentions of replacing the functionality of the wink app (proximity, relay buttons) within your own app? Ideally if we could get rid of the wink software all together that would be amazing.

Yes. I mentioned it a bit earlier in the thread, but I’m still not sure what I’ll use for triggering based on the proximity sensor since it seems the values for the proximity sensor aren’t consistent across devices. What kind of values do you see for your proximity sensor when you are standing in front of it and when you are away from it?

Haven’t yet been able to revive my boot looping Relays yet. Replacements are on the way though and I can provide values once I get them up and going.

Honestly for me, proximity isn’t a show stopper and I’m happy to use touch to activate the screen. I’d just love a way to have the physical relays function without needing the pesky wink software running.

It’s high on my list too. :slight_smile:

I get about 2460 when I’m away from the device. And the screen will turn on at around 2510. Maybe it would be best to just have a setting in the app where people can set their own screen activation level? It’s not really super important to me either. More of a nice to have feature.

I used to just leave the screen on all the time, with a clock/temp app running. But it was kinda bright. And I guess that’s probably bad to do because of screen burn in.

Thanks for the numbers. I’m not sure a threshold alone would suffice. I’ve found that my threshold seems to vary slightly throughout the day…

I built in a number of the features into my development copy of the app including:

  • Dark Theme
  • Fixed button press events (correct button IDs)
  • Touch screen to turn on
  • Automatically turn off after X seconds of no touch
  • Map top button / bottom button to:
    • Do Nothing (Send Events Only)
    • Toggle Relay 1
    • Toggle Relay 2

…but I’ve run into a bit of a snag. I haven’t yet figured out how to disable or remove the built-in Wink Relay software. From what I gather from other projects, they are replacing either:

/system/bin/edisonwink

or

/system/app/wink-projectone-release.apk

I’ve tried deleting those files, creating modified copies of them, etc… but everytime I reboot the Wink Relay, the files get replaced with their originals.

Has anyone else disabled the built-in Wink Relay software and if so, how did you go about it?

Hmm, its been a while since I did this, but definitely in the past replacing the wink-projectone-release.apk didn’t result in this behavior. I used the modified APK that @acerbix posted and the changes seemed to survive a reboot fine. I wonder if this is something they are doing in the later updates? If this is the case they must have a startup script (Init.d?) that is kicking this off right? Perhaps that can be modified.

Not exactly the most graceful, but alternative is you just have your app kill their processes / stop services at launch?

2 Likes

I’d be curious to hear feedback from @acerbix as well as I’m not sure what he process was (eg. resigning the APK, etc).

I was thinking this might be the fallback, but I was hoping to better understand the process that is replacing the files first.

To do some basic testing, I was just manually disabling a bunch of the packages with wink or edison in their name and it works, but it’s not ideal as I’m not sure what’s actually happening behind the scenes that might break that in the future if I automated it in my app.

I have used Root Package Disabler from the APKPure to disable the wink app successfully. However, i only tested a few hours to see that it works (and kept ST logged in), but I re-enabled the app because the screen won’t turn itself off anymore when it is disabled which is a no-no in the bedroom right by the bed. If your app turns off the screen and touch to turn it back on then I could disable it again. i don’t know if it remains disabled after a reboot.

Do you recall if you rebooted the Wink Relay after disabling the package? And do you remember which specific package you disabled?

The unreleased build does. I may just put some of these features behind an settings option (to enable/disable them) and then release the build and let you guys play with it.

Sorry, I didn’t do a reboot when i disabled it. I think I disabled the WinK Relay app listed under System in the Root Package Disabler (VuDanThanh). After disabling this, the hard buttons don’t work anymore but your unreleased build would solve that too.

I used package disabler too. On the system tab you disable “Wink Relay - com.quirky.android.wink.projectone”. I also disabled WinkUpgrade to be safe. It worked fine for me.

1 Like

Just tested by disabling Wink Relay in the Root Package Disabler (VuDanThanh). It survived the reboot, ST stayed logged in and the hard buttons do not work (because the Wink Relay remain disabled)!

1 Like

There must be something else going on with my Wink Relay. Everytime I reboot it, it seems to do a restore of the previous state (even reverting STWinkRelay and other apps to their previous versions). From what I can tell, the Root Package Disabler is doing the same thing I was trying from my app as well as it recognized that I had already frozen the package.

I may have to factory reset the device and see if I can get it back to a clean state.

Edit: Even a factory reset isn’t working… I’ll have to poke around a bit more another day.

set_parm: some changes failed
E:Error in /cache/recovery/edison.zip
(Status 7)