[BETA] Wink Relay - Custom SmartThings Integration

android
dth_lighting
dth_sensors
project_sensors
winkrelay

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

That fixed it. Uninstalling the newer version, then adb installing the old version and running it prompted me for root access. Once I was able to run it as root, I tested the switch control from the app, and then when that worked updated the app to the latest version.

I’m now able to directly automate my front porch instead of relying on faulty IFTTT logic that never really worked right.

Phenomenal work! The Relay is now a feasible piece of equipment for the ST platform.


(Joshua Lyon (SharpTools.io Dashboard)) #144

Thanks for the update. I’ll take a look and see if I can recreate on my side and fix.


#145

I’m happy to report that using your app for button/relay control and disabling the OEM app fixed the problem I was having with the buttons acting weird (bottom button turning the top relay on when depressed and back off when un-pressed, and top button acting flakey turning the relay on and immediately off at times). The toast notifications for top/bottom button pressed are also accurate now. This is a really elegant solution.


(Joshua Lyon (SharpTools.io Dashboard)) #146

Awesome! Glad to hear it’s working well for you and thanks for reporting your success!


(S H) #147

Perhaps this is more on a webCoRe question, but when i do a:
if Wink Realy bottombutton changes to on, then Reading Light turn On
it doesn’t work. The only way to make it work is to add an else statement:
if Wink Realy bottombutton changes to on, then Reading Light turn On else Reading light turn on.

Any idea why?


(S H) #148

Great app, I am having a little problem. It seems that the app is going to sleep or something like that. When left alone for a while and then i go try to turn on the top button to turn on the load it is connected to it doesn’t work. If i wake the screen up first and wait a second then it will work.


(Joshua Lyon (SharpTools.io Dashboard)) #149

I haven’t experienced that yet, but I’ve only had the new code running consistently for about 5 days now. The unit should wake the screen whenever buttons are pressed.

Just so I’m following correctly, you have the OEM app disabled and you have the top button configured in the STWinkRelay app to ‘Toggle Relay 1’? And when the screen is on and you tap the top button, relay 1 toggles on/off as expected. But if you wait 15 seconds and let the screen turn off, then when you tap the top button, relay 1 doesn’t toggle on/off? Does the LCD screen backlight turn on when you press the top button in this scenario? If so, when it comes on do you see the toast message showing the button event?

Also, are you leaving the STWinkRelay app running in the foreground or do you typically have another app/screen up?


(Joshua Lyon (SharpTools.io Dashboard)) #150

What events are you seeing come across for bottomButton? You can see the history of the events in the SmartThings IDE > My Devices > Wink Relay > Current States: bottomButton

image


(S H) #151

the bottombutton state is on


(S H) #152

It happened twice but I haven’t been able to reproduce. When it did happen:
you have the OEM app disabled and you have the top button configured in the STWinkRelay app to ‘Toggle Relay 1’? yes
And when the screen is on and you tap the top button, relay 1 toggles on/off as expected. But if you wait 15 seconds and let the screen turn off, then when you tap the top button, relay 1 doesn’t toggle on/off? Correct except it was more like 3-5 minutes not 15 seconds
Does the LCD screen backlight turn on when you press the top button in this scenario? No, unless i touch the screen to wake it up first
If so, when it comes on do you see the toast message showing the button event?Can’t answer becuase screen doesn’t come on with button touch.


(Joshua Lyon (SharpTools.io Dashboard)) #153

I think I’ve found an issue with the GPIO interrupts for the buttons and I believe that issue may be causing at least your second issue (if not both). I’ve primarily just been using the top-button, so I wasn’t experiencing the issue (at least not frequent enough to notice it).

I’ve been putting the system through some harder tests to try to reproduce your issue and I noticed there is a potential issue with the way the interrupts are being handled in native C code (which is called from Java). I’m still trying to figure out how to properly solve it, but just wanted to let you know that I’m looking into it.


(S H) #154

Thanks. I will let you know I have not been able to replicate the issue with the top button not turning on load 1 after the relay goes to sleep, so maybe i was wrong or perhaps it was trying to do some of my other commands at the time and had not processed it yet?

As for my other issue, perhaps I am programming it wrong on Webcore.

If I do:

If Wink relay bottombutton is On
Then Reading light switch turn on

it doesn’t work

But if I do:

If WInk relay bottombutton is On
Then Reading light switch turn on
Else Reading Light switch turn on

It will work. But then means i won’t be able to use a real If then Else command.


(ToyzRUsKid1976) #155

THANK YOU!!! Worked like a charm.


#156

Superhuynh, since the button is momentary, I think you will have to do something like:

If WinkRelay’s bottomButton changes to on
Then light switch turn on


(S H) #157

Thank you, Obi2000, but it has been on “changes to”, as Joshua instructed earlier in the thread.


#158

Hi Josh, I have been having the same issue with the wink relay resist to a previous state. For example I got rid of nova launcher and installed Total launche also updated to STWinkRelay 0.3 but soon as the wink reboots all gets removed an I’m back to the previous version and Nova launcher.

Did you ever find out what was causing that issue?


(Joshua Lyon (SharpTools.io Dashboard)) #159

No, I haven’t spent any time debugging it.


(Brad Buckles) #160

I finally got this all set up and working, and it was awesome. Then 2 weeks later my relay died :frowning:


(S H) #163

i have been using this and I have noticed that twice in the past week, the unit hasn’t been touched for a day or so and the unit is unresponsive with the screen turned off. I reset the unit with the bottom button and all is well. Anybody having this issue?

Could it be the screen on/off function is not responding?


(Joshua Lyon (SharpTools.io Dashboard)) #164

Are you using the bottom button? I’ve found that using the bottom button causes the STWinkRelay app to crash… and if it crashes after it turns the screen off, then you are stuck with the screen off. In my case, I have the STWinkRelay app on my homescreen so if I just tap where the icon is (even with the screen off), it will launch the app and everything comes back online.