Update 2017-09-30: I have now added support for RGBWW strips! This is verified with both 24V and 12V Strips as well!
I bought a device that looked like a good deal to control my 24VDC RGB Strips (longer runs, still bright, and not as hot as 12VDC) in hopes that it would connect to SmartThings. When I later found that it didn’t and that the Alexa integration sends the username and password in plain text, I decided to make something to connect them.
Due to a limitation in the SmartThings Platform, I am not able to send RAW Hex values to a device, so I also had to create a Man-in-the-Middle solution to translate commands out to the device that runs on another platform. Hopefully in the future this is fixed and I can output directly to the device. Until this is in place, I have only intended to send commands, so I am not reading or authenticating responses from the device (such as should you change the state from the app or another method).
Here is the controller device that I purchased:
This DTH should work with anything that uses either of these apps for RGBWW Control:
https://itunes.apple.com/us/app/magic-home-wifi/id944574066?mt=8
Here is my DeviceTypeHandler:
Here is my Man-in-the-Middle source project:
Steps to Success:
-
You need a supported architecture to run the tcptunnel (I use CygWin on Windows x64).
-
git clone my tcptunnel repository and then configure tcptunnel
-
make tcptunnel
-
start tcptunnel and direct it to the IPAddress of your controller [in example, mine is at 10.10.10.103]
./tcptunnel --local-port=5577 --remote-port=5577 --remote-host=10.10.10.103 --log --stay-alive
local-port = Listen Port on PC / Raspberry PI (Port for DTH Settings)
remote-port = Port for LED Controller
remote-host = IP Address of LED ControllerPORT 5577 This is the default for Magic Home controlled LED devices. If you have multiple strips running through the same PC / Raspberry PI, you will need to run multiple instances of the program each with a unique Listen Port number, but likely all Remote-ports will still be 5577.
-
Load DTH into SmartThings via IDE
-
Create a new Device in the IDE of this DeviceType
-
From your SmartThings App, goto this device’s settings, and put in the IP Address of your Man-in-the-Middle Server and port number. This is typically 5577; however, if you have multiple devices you will need a unique port for each Man-in-the-Middle Server.
-
Control your RGB Lights!
Known Limitations:
- This DTH has only implemented some Animations, all known animations are defined, but only some have buttons created.
- Explictly: White Color Temperature is not implemented at this time (I can’t test them with my strips, needs RGBWW)
- The Brightness Slider will update the light immediately for color changes and is not active for Animations
- The Speed slider is a previous requirement for the Animations (if you change it you need to press an Animation Button to activate the change)
- Does not poll current light status, it is only currently aware of settings made with this Device in SmartThings.
- It has been reported with no logs that in some case changing brightness will also change the color of the RGB Channels, if you find this, please send the TCPTunnel Console Data.
Configurations:
Configurations need to be selected based on the controller style you are using, not the light style attached to it.
- RGB = Can be used with RGB and some RGBW Controllers (use WW slider near bottom for White Channel, MUST leave CW slider at 0)
- RGBW = RGBWW = set all 5 channels at once as supported on RGBWW and some RGBW Controllers
- RGB+WW = Set White channels then set color channels, not sure if anyone needs this, but it was a legacy operation mode
Support / Thanks:
If you would like to thank the developer, donations of any value are welcome via Paypal. Please DM me for any support requests, bug/feature requests should be made in the main thread.
Further Background:
The DTH Name is based on something that was quickly abandoned by @steve_ledridge that I found on github
I found the best support of the interface from here: http://www.jpelectron.com/sample/Electronics/WiFi%20LED%20control/