[OBSOLETE] Wink Relay - Custom SmartThings Integration

That is when no one is near it. Standing in front 30” away it’s 3630. As I inch closer it goes up about 200 each inch. 8-10” away it reads 6000+. If I put my finger an inch in front of the sensor it’s 46000.

This is pretty awesome, going to test this out hoping it still works. Good way to stick it to Wink for making people pay in a WEEKS time ( yes they changed it to two weeks)…still.

Hi there. I just installed everything and it seems to be working but I do not have a smartthings hub yet just working locally on the relay to make sure it all installed properly BUT I clicked to disable the Wink app and did not change any setting so I am a bit concerned if something goes wrong I will have a brick. While it is currently working is there a way to “re-install” the wink apps but not use them in the event I encounter an issue? Thanks!

If the button disappears, that means it was successful.

When the STWinkRelay app is loaded, it checks to make sure the OEM Wink Relay app is disabled. If it’s not disabled when the app first loads, it will show the pink button again.

The Wink Relay apps just get disabled. They’re still on the system, so you can always re-enable them.

When the Disable OEM App button is pressed, it’s basically just running the root shell commands:

pm disable com.quirky.android.wink.projectone
am force-stop com.quirky.android.wink.projectone

You could always run the reverse commands to re-enable the package.

I am having the same issue with this. I am only seeing the Wink Relay that contains both switches inside of the legacy app. Inside the new app, there is only one on and off option and no way to assign the individual switches to Alexa.

I am looking at the code now but the simulator keeps failing on both my device and the sim using the Selected Devices method. It always worked for me using the Manual add by IP/Host. I keep getting this error when running the IDE.

java.lang.NullPointerException: Cannot get property 'value' on null object @line 270 (doCall)

Looking at the Wink Relay smart app code I can’t figure out how the Wink Relay Switch device handler is called and created. I am brand new at looking at this sort of code though so I might be missing something completely obvious.

Side note ended up switching 6 relays over in a few hours. Amazing stuff @joshua_lyon. Saved me time, money, and plenty of headaches.

1 Like

But when I click home now on the assistive touch now and look at the apps the “wink” one is gone. Sorry I am not a “power” user just followed the instructions and can kinda navigate my way around! I just clicked to disable the oem software but later read buried in this thread to enable something before i do that (which I didnt do) so as to have a fallback. Just want to make sure either 1 it doesnt matter or 2 i can install something now if needed while its still functioning. Thx!!!

I haven’t spent any time testing this with the new SmartThings app. For the longest time, the new SmartThings app had significant compatibility issues with community drivers and only allows devices to follow very strict capability specs. This also means no custom UIs in the new SmartThings app for community devices at the moment.

From what I understand, SmartThings has plans to allow for developers to deviate from core capabilities in a future update, but it’s not quite available yet.

You won’t be able to use the Simulator. When the devices are discovered / installed from the SmartApp, it adds some data into the device that is created which is required. If you’re a developer and you’re dead set on using the Simulator, you could probably adjust the code a bit to work around the dependency on these data properties (or simulate them). Otherwise, I would recommend just using a real device.

Can you clarify what you mean here?

When the main ‘Wink Relay’ device is created, it calls the createChildDevices() method which creates the two child Switch devices for each of the independent relays.

Whenever status of each of the relays is reported in the parse() method, it passes that status down to the child.

Similarly, if you control one of the child devices directly, it actually passes the on/off command up to the parent in the relevant relayOn(relayId) or relayOff(relayId)commands.

When the OEM app is disabled, it disappears from the list. It’s still on the device and can be recovered if need be.

I guess I’m not understanding what the issue is. It sounds like everything is working as expected.

Sorry I guess its fine then! Sorry I am not an expert.

Also I downloaded google play and its installed but when I open it it turns white screen then just closes…any help here would be superb and I want to install things like Bose Soundtouch.

Sorry…I am learning slowly!

BTW you are super on top of all this and insanely helpful!!

Maybe someone else can help you with that one. I generally recommend against side-loading Google Play services on devices that don’t ship with it. It often introduces performance issues and quirks with the devices… and these devices are already performance constrained and quirky enough on their own.

That being said, you might be able to download the Soundtouch app from APKPure if they have a version that works for the old Android version that runs on these devices (Android 4.3)

Or you might be able to use the SmartThings Bose SoundTouch integration:

https://support.smartthings.com/hc/en-us/articles/205380174-Bose-SoundTouch-Systems

@joshua_lyon Thanks you for all the help with the Wink Relay. Saved me from trashing them. Much appreciated.

Is there anyway to Map one of the buttons to other devices on SmartThings? It appears that these switches now only operate local wired lights.

Please let me know.

Thank you again!

Peter

Ah ok maybe I got a little too bold but I was hoping now that its rooted and has the nova launcher I could add other apps to use with the device now, etc. I guess most people on this string install your cool app and just leave that as the thing that is on all the time?

I dont have my smarttings hubs set up yet but I set up this with the all custom app and the top button turns on my lights but the bottom button does nothing. Is it not able to be linked up to a wifi switch or light now?

Yes, you can configure the buttons to ‘Do Nothing’ within the STWinkRelay app. When you pressed the ‘Disable OEM App’ you should have been prompted to configure the button actions.

Even when the buttons are configured to ‘Do Nothing’ in the STWinkRelay app, the button press events still come across to SmartThings and you can use an automation to react to those button presses and control other devices.

When i did the ‘Disable OEM App’ i didnt get prompted - what do i do now? Thx!!!

After pressing the ‘Disable OEM App’, it redirects you to the Settings > Button Mappings screen.

You can always revisit the Settings > Button Mappings in the STWinkRelay app to update things.

Hi Joshua, the disable OEM app was selected, however in the ST app there is no reference to Button One or two. I can see in the IDE that there are two buttons when I click on the Wink Relay device. Basically it doesn’t show up as its own button to map to any automation.

Thanks.

oh! so you likely cannot use the most recent version it has to be for android 4.3?! Maybe thats it.

The next version of the STWinkRelay app is available for anyone who wants to help me test it.

Installation Instructions

Unfortunately, I lost the development key that was used to sign the app, so you’ll have to manually update things to get onto the newest track (1.0+):

From the Wink Relay:

  1. Open the existing STWinkRelay app
  2. Tap the Settings icon in the top-right corner
  3. Tap General > Update
  4. Tap the Get Update button

    It will try to download and install the update, but won’t be able to complete it

  5. Navigate back to your homescreen and open the app drawer
  6. Long-press on the existing STWinkRelay app and uninstall it
  7. Open the Downloads app
  8. Select the STWinkRelay_1-0-0a file that should be in the downloads folder already
  9. Open the new STWinkRelay app and enjoy!

Alternatively, you can download things manually via a web browser on the Wink Relay (or install via ADB). Instructions are available at http://wink.boshdirect.com

2 Likes

Yeah I will test it. Sounds good. Thanks.