Custom integration for connecting the Wink Relay to Hubitat including control of light loads (relays) and instant status updates for the sensors, light loads, and button presses. The integration is all performed over your local network with no additional dependencies on IFTTT, Stringify, or other cloud services.
The integration is comprised of three components:
- Custom Android app which runs on the Wink Relay
- Custom App for automated device discovery
- Custom Device Driver
In this initial alpha release, I've focused primarily on the two-way communication between SmartThings and the Wink Relay. This includes the following features:
- Instant Status Updates for:
- Relay 1 and Relay 2
- Top and Bottom Buttons
- Relay 1
- Relay 2
- Both relays simultaneously
humidity will only post an update to SmartThings if they change by more than
0.5 units each.
proximity will only change when it has changed more than
Starting with release 0.3.0, the Android app includes a feature to disable the OEM Wink Relay app and includes the ability to wake the LCD screen based on screen touches or button presses.
Also note that the proximity values are currently sent across as the raw value anytime the raw number changes more than
100 units. It's not clear to me what the unit of measure is for the proximity sensor, so I'll need to investigate this further before I feel comfortable adding some logic to map it to a
This release includes a few additional features which are not exposed in the device tiles, but may be helpful in other SmartApps and Integrations.
Wink Relay Buttons
The status of the Wink Relay buttons are mapped to attribute values in the device driver as switch style attributes as well as pushable button attributes. These button events can be used in Rule Machine to trigger actions like controlling other things, changing modes, running scenes, etc.
topButton = [ "on", "off"]
bottomButton = [ "on", "off"]
pushed = [1, 2]
- 1=top, 2=bottom
Screen Backlight Control
The screen backlight can be controlled with the
screenBacklightOff() commands. These can be called from other custom Apps like Rule Machine.
High Level Instructions
- Open the Hubitat portal on your hub and:
- On the Wink Relay (achieve root and install the custom app):
Install the STWinkRelay.apk custom app
Note: You can either do this by opening the APK using your web browser (if you still have it) or install via ADB. For the web-browser approach, make sure you have "Unknown Sources" allowed for installation.
For the ADB approach:
- Download the STWinkRelay.apk to your computer
- Open a command prompt / terminal
- Change directory to the location where you downloaded the apk
- Run the installation command:
adb install -r STWinkRelay_0-3-0a.apk
Note: You will either have to have ADB in your path or have ADB accessible in the same directory in which you have the APK downloaded. If you have installation protection enabled from KingRoot, be sure to approve the installation physically on the device before the timer runs out.
Open the custom Wink Relay app at least once
Note: If you have root management enabled, be sure to approve the permission request on the physical device before the timer runs out.
Note: There are a number of services which run in the background including device discovery, services for watching the sensors and buttons, and a web server for SmartThings to send commands to the device. These services are set to automatically start when the device is booted, but you may have to open the app once immediately after installing it in order to kick off the services.
- From the Hubitat portal on your Hub:
- Navigate to the Apps tab
- Choose to Add a New App
- Scroll down to the bottom of the screen and select "STWinkRelay" and tap to continue
- Wait for the Device Discovery to complete
- After selecting your device from the list, select Save to complete the installation of your device
You should now have a working 'Wink Relay' device in your Devices list! Open the device from your Device list and tap refresh to make sure everything is synced up.
Coming soon! In the mean-time, use the instructions above and the Wink Relay wiki entry on ThingsThatAreSmart.wiki as a reference: