This page is a living (for now) manual for the SmartLife RGBW controller. I say living, because I am still developing on it as I find new features to add or bugs to fix. Of course, it was meant to be used with SmartThings, but it does have a web interface and can be used independently.
Connecting it to your wifi
When power is first applied it creates a wifi AP titled “espRGBW.[MAC address]”. This is for ease and convenience of adding it to your home network. After connecting to the access point with the password “configme”, you browse to 192.168.4.1 and connect it to your wifi access point. At that point it should reboot and obtain an ip address from your network.
SmartThings Service Manager SmartApp
The service manager is designed to pick up after the above step is complete. You install the SmartApp and run its “discover” mode. It will find all the SmartLife RGBW Controllers on your network. It will also display the IP address that the devices obtained so you can connect to their web interface if you desire. Connecting to their web interface is an optional step as the service manager will configure the switch to work with your SmartThings hub.
The service manager also allows you to create programs for the controller, rename it, and create virtual switches that can start/stop the programs you create. These virtual switches can be used throughout SmartThings to have the created programs trigger based on whatever event you would like. For example, you could have police lights flash when someone opens a door or a motion sensor is tripped. Really the possibilites are endless here.
The web interface has the the following pages:
/advanced (advanced configuration)
/control (relay control)
/update (firmware update)
From here you can do some advanced configuration. You can set a static IP address if you would like. You can also configure a password to use for configuration & firmware update, as well as control. If you do setup a control password here, you must input the password into the device within SmartThings.
There is also a way to graphically control the controller from the web interface. You can change the color of the LED strip click of the mouse.
The username for password protection of the config and the control is: “admin”
On the main page of the device, there is a listing of all the JSON endpoints. Here is a listing of their function.
status: This will return a status of the relay (power) and the switches uptime (uptime).
config: This endpoint is intended to be used by the HA system to send configuration parameters to the switch. You can send the HA hub ip address (haip), communication port, (haport) and default color (dcolor). Default color is what the controller will change to when the “on” command is used. This is also the color it will change to when a physical switch (that is attached to J3) is activated.
on: Turns the device on. It will by default go to its previous color. If the dcolor config option is set, it will go to that instead.
rgb: Control the channels labeled RGB. Accepts value=xxxxxx where xxxxxx is a color value in hex representation. Example: /rgb?value=ffffff
r: Control the R channel of the device. Accepts value=xx where xx is a hex representation of the desired color. Example: /r?value=ff
g: Control the G channel of the device. Accepts value=xx where xx is a hex representation of the desired color. Example: /g?value=ff
b: Control the B channel of the device. Accepts value=xx where xx is a hex representation of the desired color. Example: /b?value=ff
w1: Control the W1 channel of the device. Accepts value=xx where xx is a hex representation of the desired color. Example: /w1?value=ff
w2: Control the W2 channel of the device. Accepts value=xx where xx is a hex representation of the desired color. Example: /w2?value=ff
off: Turns all channels on the device to 0.
program: Send a string that will be parsed into commands for the controller to run. Accepts value, repeat, & off. Documentation for this to come. Example: /program?value=d~ff0000~0-3000_d~0000ff~1000-3000&repeat=-1&off=true
stop: Stops the running program
reboot: Reboots the device
info: Returns the firmware version (version), date (date), and the MAC address (mac) of the device.
Updating the firmware is an extremely simple process. You navigate to /update for the switch you are wanting to update, click and select the bin file you downloaded, and hit the “Update” button.
The latest firmware can be found here: https://github.com/erocm123/SmartThingsPublic/raw/master/devicetypes/erocm123/smartlife-rgbw-controller.src/SmartLifeRGBWController.ino.generic.bin
You can connect a physical switch to the two pins labeled J3 on the board. This must be a momentary switch that is NO (Normally open). If not, if the device reboots, it will boot up into its firmware flashing mode. A typical Decora switch can be converted to a momentary switch following the instructions posted here:
There are two ways to reset the settings back to their defaults:
- This method might be easier to do with a surge strip with a button attached. Unplug controller and plug back in. Within 2 – 5 seconds after plugging in, unplug and plug back in. Repeat this process 4 times. You can know you are doing it correctly because on the second plug in the LED Strip will light up GREEN, the third it will light up BLUE, and the fourth it will light up RED. After it turns RED, you can just leave it alone. The little red led will blink 5 times slowly and then the RED LED strip will start to flash as the storage is being wiped. After that is finished the LEDs will turn off.
- After the device is turned on, jump J3 for a) between 10-20 seconds will reset the wifi b) between 20-60 seconds will reset everything. If you reset the wifi correctly the little RED LED will blink 3 times quickly. If you reset all the device settings correctly the little RED LED will blink 5 times slowly.