Wink Relay - Independent Light Loads in Dashboard - Tutorial

Being a Wink defector, I still had usable devices - i.e. Wink Relays that I wanted to take advantage of. Writing this little "tutorial" as a piggyback to the amazing work\post by @josh from [Beta] Wink Relay - LAN Integration

In order to get the two light loads to function independently within the Dashboard, meaning show up individually AND show the correct on\off state, I came up with the following in Rule Machine. If someone has a different or more elegant solution I am all ears.

  1. Follow the referenced post, above, to get your Relays working in Hubitat.

  2. Create a Virtual Device - specifically a Virtual Switch - for each Light Load and name accordingly.

  3. Enter Rule Machine, select Create New Rule
    3.1 Name Rule According to Virtual Switch you will work with first - i.e. Wink Relay - Kitchen - Top Load

    3.2 Select Trigger Events
    3.2.1 Select Capability for New Event Trigger - Choose type "Switch"
    3.2.2 Select the Top Load switch you create, i.e. in my example Wink Relay - Kitchen - Top Load

    3.2.3 Set Switch turns to "changed"

    3.2.4 Select Done, then Done again.
    So far you should have the following

    3.3 Select Actions to Run
    3.3.1 Select Action Type to add - Choose "Conditional Actions"
    3.3.2 Select Which Action - Choose "IF (conditions) THEN"
    3.3.3 Define Condition - Choose "New Condition"
    3.3.4 Select capability for Action Condition - Choose "Custom Attribute"
    3.3.5 Select Device - Choose your Wink Relay - NOT THE VIRTUAL DEVICE(s) Created in step 2
    3.3.6 Select Attribute - Choose "relay1" (this is important, relay1 is the Top Load,
    relay2 is the Bottom Load)
    3.3.7 Select Value - Choose "on" (note here, make sure that the Top and Bottom loads are set to
    off in the actual Wink Relay device in Hubitat - or physically on the device if you have already
    assigned the Top and Bottom loads via the app from the other post)*

    3.3.8 Select Done, then Done again
    3.3.9 Select Action Type to add - Choose "Set Mode or Variable, Run Custom Action"
    3.3.10 Select Which Action - Choose Run "Custom Action"
    3.3.11 Select capability of action device - Choose "Switch"
    3.3.12 Select Device - Choose your Wink Relay - NOT THE VIRTUAL DEVICE(s) Created in step 2
    3.3.13 Select custom command - Choose "relay1Off"

    3.3.14 Choose Done
    3.3.15 Select Action Type to add - Choose "Conditional Actions"
    3.3.16 Select Which Action - Choose "Else"
    3.3.17 Select Action Type to add - Choose "Set Mode or Variable, Run Custom Action"
    3.3.18 Select Which Action - Choose Run "Custom Action"
    3.3.19 Select capability of action device - Choose "Switch"
    3.3.20 Select Device - Choose your Wink Relay - NOT THE VIRTUAL DEVICE(s) Created in step 2
    3.3.21 Select custom command - Choose "relay1On"
    3.3.22 Select Done
    3.3.23 Select Action Type to add - Choose "Conditional Actions"
    3.3.24 Select Which Action - Choose "END-IF"
    3.3.25 Choose Done, then Done again
    It should look like this

    Choose Done

Test by going back in to the newly created Rule and selecting Run Action - or better yet go in to your Dashboard of choice, create a new tile targeting the Top Load Virtual Switch and test.

Repeat the steps in section 3 above for the Bottom Light Load and you are all set.

Hope this helps those of you who are still rocking Wink Relays. Granted this is only for those who are, and still want independent control of the light loads. For anyone using Top as On and Bottom as Off this isn't much help.


Works like a charm.

I goofed it up by not having it off initially, but then that helped me understand what it was actually doing instead of just following steps blindly.


I should have mentioned that in the steps...whichever State the light/switch/button currently is in reverse the on off sequence. Maybe I'll edit to account for that; "make sure load is set to off".

That's perfect! Thanks for sharing.

EDIT: I've followed the instructions and setup the virtual buttons on 2 Wink Relays. It seems to work for the most part, but I'm finding that the lights are getting out of sync on the Hubitat Dashboard (ie the light is showing ON in Dashboard, but the light actually OFF). I can correct it by going into the devices on Hubitat, selecting the Wink Relay and turning relay1 OFF or relay1 ON to have it show the correct state in Hubitat Dashboard. I've noticed my final rule looks a little different than the post. i've tried recreating the rule several times and it still looks like this... Any hints?

My rules look like yours as well even after redoing it several times. The switches seem to work though so maybe there was an update to the rule engine and how the logic is displayed.

I also noticed that if I manually turn on relay 1 or 2 at the switch the status doesn't show correctly in my dashboard for these virtual switches. I haven't had time to dig into it yet to see what the issue is. My Wink Relay seems a bit unstable since I rooted it and installed these other apps so I'm not sure if I'm going to stick with this idea yet or just ditch the relay like most others have.

Thanks for the reply. I ended up abandoning the Wink Relays for Innovelli switches. I found the relays too unreliable.

I have hacked the original code to support child devices for both the top and bottom switches and also the back light as well, which means no need to create virtual switches and code with rule machine. If anyone is interested in trying it out and kicking the tires do let me know.

1 Like

I have a rooted Wink Relay with virtual buttons in RM and this looks interesting. Could you share the code?

There is a PR on the existing original code that has the child switches in [Beta] Wink Relay - LAN Integration

Download the Hubitat app