[Beta] Wink Relay - LAN Integration

@josh I realize the thread is kind of stale, and that you no longer use your Wink Relays, but I just migrated over to HE and figure why not give it a try. Already had my Relays rooted, so I skipped all that way to the end, installing the STWinkRelay apk. Install there goes fine, however the app never opens. Hit the app button, blinks up, then immediately closes. Thoughts? Tried reboots, uninstall, and reinstall. Force Stop, Clear Cache etc.

U sure you’re clicking thr right app? If I remember, I had 2 apps with the same icon

2 Likes

It sounds like you've taken some good troubleshooting steps. The STWinkRelay app requires root access to run, so depending on what you've used for rooting the Wink Relay and what tools it has for granting root permissions, that could be a potential thing to look into.

You could also watch the ADB logs while you try to open the app. It sounds like the app is likely crashing when it first tries to open, which would likely be reported in your ADB logs.

The app crashing when it first opens could coincide with it expecting to have root permissions and failing to be able to take the actions it needs root for.

#facepalm. While I was\had rooted, I remembered after reading you reply that I had let the native Relay app run its last update, which killed off root. Re-running KingRoot has solved that issue

2 Likes

Curious if you still have this working, i.e. the Virtual Buttons. Trying to get this set up so that I can see the top and bottom loads in the dashboard

I actually got rid of the Wink Relay as it was becoming unstable.

My memory is also failing but I think it was within Button Controller (Now Rule Machine) that you could see the custom commands and tie to them.

Sorry.. I'm not much help on this one.

No worries. I have been able to get each light load configured, albiet with separate on\off functions. Meaning in the dashboard I would have 1 each for on and off for each light load. Not terrible, but not ideal as each on or off doesn't know about the other. Visually within the dashboard you wouldn't truly know if it is on or off as they could both report the same status.

Trial and error, I'll figure it out - probably with some If\Then statements within Rule Machine.

YEs, because it is a virtual button and not a switch it separates the functions or each relay

I think what I had at one point was the VR Switch that could be 'toggled' and "On" would hit button 1 aka RelayOn and "Off" would hit button 2 RelayOff

Then you could put the VR Switch on the Dashboard as your single reference point, instead of the two seperate button functions.

Sounds like you're on the right path.

2 Likes

You can create a custom command for each switch in Rule Machine and that will give you the ability to see them in Dashboard. I can't remember the steps now but I can take a look once I get home

1 Like

If you wouldn't mind sharing that would be great

I can't seem to the find the custom command feature in Rule Machine but I'll keep looking hopefully I find it somewhere

Have been able to create rules for each load load in SharpTools using If\Then that work.

if - Wink Relay - relay1 is 'on'
then - Wink Relay to execute command relay1off
else - Wink Relay to execute command relay1on

and the same for relay2

Now to replicate directly in HE, as I do not see the benefit of doing dashboards in SharpTools. Functionality doesn't seem that much greater.

Yes, you should be able to recreate this in Hubitat's Rule Machine.

I believe the way custom commands work changed with one of the Rule Machine updates. If I remember correctly, previously you had to manually define the custom command before you could use it. Now it's just one of the actions that can be taken and the custom commands from the device are listed directly during the rule creation process.

It's generally easier to build attractive and polished looking dashboards in SharpTools. There's also a number of unique features in SharpTools like Calendars, News Feeds, Album Art Tiles, integrations with other platforms, and more.

1 Like

Going to write up my steps by step process now that I have it ironed out. Probably post in a new thread.

I can most certainly see the benefits of SharpTools, and maybe I will get there but I am just not ready to have two different platforms for the same function. With some custom images, and some css though I think the native dashboards could hold there own.

1 Like

Hi folks,

First of all: THANK YOU.

Never in a million years did I think that all my Wink Relays would have a shot at life after Wink.

After following the awesome instructions here, a few reboots, and setting my Wink Relay to a reserved IP address, I got this working enough to add it manually using the USER APP and the IP address.

I can then go to the DEVICES pages and see the new device "Wink Relay" at the bottom of the alphabetical listing.

When I click on it to try and see its internals and perhaps rename it takes a few seconds, but ultimately it reports:

Error 500

A Server error has occurred

If you are seeing this screen repeatedly, please contact Support. For assistance, email ...

Logs continue to show Proximity every 5 seconds and Humidity every 1 minute.

There is another entry every 5 minutes:

app:752019-11-22 10:58:49.060 am debugβ•‘ 2. Searching for urn:sharptools-io:device:WinkRelay:1

Doesn't seem to point at any issue.

Any ideas what I can try?

Alright I tried using Rule Machine to test if it would work. I made a rule that uses button 1 or 2 pushed as the trigger.

This causes an action of toggling a zwave outlet.

In the Rule Machine setup screen I can RUN ACTIONS and see that the outlet toggles.

I can complete creation of the rule.

When I press a button on the Relay I get this in the log:

> dev:972019-11-22 11:28:28.197 am errorjava.sql.SQLException: An SQLException was provoked by the following failure: com.mchange.v2.resourcepool.ResourcePoolException: A ResourcePool cannot acquire a new resource -- the factory or source appears to be down. on line 145 (parse)

> dev:972019-11-22 11:28:04.794 am infoTop Button: on

The button push registers, but something between button push (trigger) and toggling outlet (action) is broken.

Hope this helps you help me.

Thanks.

Could you post your rule?

Out of curiosity, why manually add the Wink Relay rather than using the included App which does discovery and sets up the required configuration for the device?

Edit: Or are you saying that the device was added manually via the included App? My apologies... it's been a while since I've touched this stuff, so I forgot that was an option!

Also, based on the SSDP log line you posted (the one every five minutes), it sounds like app is finding the Wink Relay, so I would have thought it would have been automatically discovered and you could add it that way?

It's been a while since I've written (or used) this, but I took a look at the code and it looks like the IP address and Port are stored in the data of the device which isn't directly user editable. The SmartApp that does the discovery and device creation takes care of setting these values for you.

My guess is Hubitat is choking when it tries to get those data attributes and they are missing.

This help?
I removed LINKS but replaced them with text.

MEDIA ROOM LAMPS CONTROLBuilt In App

Settings

Name Type Value

actSubTypeMain.1 enum Toggle switches
actTypeMain.1 enum Control Switches, Push Buttons
ButtontDev1 number 2
ButtontDev2 number 1
logging enum ["Events","Triggers","Actions"]
origLabel text MEDIA ROOM LAMPS CONTROL
tCapab1 enum Button
tCapab2 enum Button
tDev1 capability.pushableButton WINK RELAY LINK
tDev2 capability.pushableButton WINK RELAY LINK
toggleSwitchMain.1 capability.switch OUTLET LINK
tstate1 enum pushed
tstate2 enum pushed
Event Subscriptions

Source Event Handler Filter

WINK RELAY LINK pushed.2 allHandler true
WINK RELAY LINK pushed.1 allHandler true
Application State

Name Value

actionDone true
actionListMain [1]
actionsMain {1={wait=null, delay=, modes={}, method=getToggleSwitch, rule=0, cond=0}}
actLabelIndent
actNdx 2
allVars {}
allVarsO []
capabActDone false
capabDone true
capabsfalse {}
capabstrue {1.true=Wink Relay button 2 pushed, 2.true=Wink Relay button 1 pushed, 3.true={}}
certainTimes []
editCondIf
globVars {}
gvList []
hasAll false
hasCompleteRule false
hasCondition false
hasDevice
hasElse false
hasRuleAct false
hasWaitEvent false
howManyT 3
inIf false
inRepeat false
installed true
installedCapabs [EnergyMeter, Telnet, Polling, PowerMeter, PowerSource, PushableButton, TemperatureMeasurement, ChangeLevel, Lock, Notification, Battery, Outlet, SwitchLevel, MotionSensor, Initialize, Switch, PresenceSensor, Configuration, Thermostat, Actuator, ContactSensor, Refresh, LockCodes, RelativeHumidityMeasurement, VoltageMeasurement, TamperAlert, Sensor]
lastEvtDate 22-Nov-2019
lastEvtTime 11:19 AM
locationBlocked []
lvList []
ndx.false 1
ndx.true 3
nestedBlockMain []
nestedIfMain []
nestedInIf []
nestedLabel []
nestedRepIf []
nestedSkipAllMain []
paramNdx 1
paramsDone false
prevState {PB=true}
private true
repeating []
ruleNdx 1
selectActionsParams {thisStr=Main, label=MEDIA ROOM LAMPS CONTROL}
simpleCond false
skippingMain false
subscribedVariables []
token 0
trigCustoms []
varUseList {}
waitB {}
waitBL {}
waitBV {}
waitCondNdx 1
waitConds []
waitEvents []