{"id":295,"date":"2016-08-22T22:02:27","date_gmt":"2016-08-22T22:02:27","guid":{"rendered":"https:\/\/smartlifeautomated.wordpress.com\/?p=295"},"modified":"2017-06-20T15:30:07","modified_gmt":"2017-06-20T15:30:07","slug":"smartlife-rgbw-controller-documentation","status":"publish","type":"post","link":"https:\/\/smartlife.tech\/blog\/2016\/08\/22\/smartlife-rgbw-controller-documentation\/","title":{"rendered":"SmartLife RGBW Controller Documentation"},"content":{"rendered":"<p>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.<!--more--><\/p>\n<h3>Connecting it to your wifi<\/h3>\n<p>When power is first applied it creates a wifi AP titled \u201cespRGBW.[MAC address]\u201d. This is for ease and convenience of adding it to your home network. After connecting to the access point with the password \u201cconfigme\u201d, 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.<\/p>\n<h3>SmartThings Service Manager SmartApp<\/h3>\n<p>The service manager is designed to pick up after the above step is complete. You install the SmartApp and run its \u201cdiscover\u201d 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.<\/p>\n<p>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.<\/p>\n<h3>Web Interface<\/h3>\n<div id='gallery-1' class='gallery galleryid-295 gallery-columns-3 gallery-size-thumbnail'><figure class='gallery-item'>\n\t\t\t<div class='gallery-icon portrait'>\n\t\t\t\t<a href='https:\/\/smartlife.tech\/blog\/2016\/08\/22\/smartlife-rgbw-controller-documentation\/sl_web3\/'><img loading=\"lazy\" decoding=\"async\" width=\"150\" height=\"150\" src=\"https:\/\/smartlife.tech\/blog\/wp-content\/uploads\/2016\/08\/sl_web3-150x150.png\" class=\"attachment-thumbnail size-thumbnail\" alt=\"\" \/><\/a>\n\t\t\t<\/div><\/figure><figure class='gallery-item'>\n\t\t\t<div class='gallery-icon landscape'>\n\t\t\t\t<a href='https:\/\/smartlife.tech\/blog\/2016\/08\/22\/smartlife-rgbw-controller-documentation\/sl_web4\/'><img loading=\"lazy\" decoding=\"async\" width=\"150\" height=\"150\" src=\"https:\/\/smartlife.tech\/blog\/wp-content\/uploads\/2016\/08\/sl_web4-150x150.png\" class=\"attachment-thumbnail size-thumbnail\" alt=\"\" \/><\/a>\n\t\t\t<\/div><\/figure>\n\t\t<\/div>\n\n<p>The web interface has the the following pages:<\/p>\n<p><strong>\/<\/strong> (root)<br \/>\n<strong>\/advanced<\/strong> (advanced configuration)<br \/>\n<strong>\/control<\/strong> (relay control)<br \/>\n<strong>\/update<\/strong> (firmware update)<\/p>\n<p>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 &amp; firmware update, as well as control. If you do setup a control password here, you must input the password into the device within SmartThings.<\/p>\n<p>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.<\/p>\n<h3>Password Protection<\/h3>\n<p>The username for password protection of the config and the control is: \u201cadmin\u201d<\/p>\n<h3>JSON endpoints<\/h3>\n<p>On the main page of the device, there is a listing of all the JSON endpoints. Here is a listing of their function.<\/p>\n<p><strong>status:<\/strong> This will return a status of the relay (power) and the switches uptime (uptime).<\/p>\n<p><strong>config:<\/strong> 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 &#8220;on&#8221; command is used. This is also the color it will change to when a physical switch (that is attached to J3) is activated.<\/p>\n<p><strong>on:<\/strong> 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.<\/p>\n<p><strong>rgb:<\/strong> Control the channels labeled RGB. Accepts value=xxxxxx where xxxxxx is a color value in hex representation. Example: \/rgb?value=ffffff<\/p>\n<p><strong>r:<\/strong> Control the R channel of the device. Accepts value=xx where xx is a hex representation of the desired color. Example: \/r?value=ff<\/p>\n<p><strong>g:<\/strong> Control the G channel of the device. Accepts value=xx where xx is a hex representation of the desired color. Example: \/g?value=ff<\/p>\n<p><strong>b:<\/strong> Control the B channel of the device. Accepts value=xx where xx is a hex representation of the desired color. Example: \/b?value=ff<\/p>\n<p><strong>w1:<\/strong> Control the W1 channel of the device. Accepts value=xx where xx is a hex representation of the desired color. Example: \/w1?value=ff<\/p>\n<p><strong>w2:<\/strong> Control the W2 channel of the device. Accepts value=xx where xx is a hex representation of the desired color. Example: \/w2?value=ff<\/p>\n<p><strong>off:<\/strong> Turns all channels on the device to 0.<\/p>\n<p><strong>program:<\/strong> Send a string that will be parsed into commands for the controller to run. Accepts value, repeat, &amp; off. Documentation for this to come. Example: \/program?value=d~ff0000~0-3000_d~0000ff~1000-3000&amp;repeat=-1&amp;off=true<\/p>\n<p><strong>stop:<\/strong> Stops the running program<\/p>\n<p><strong>reboot:<\/strong> Reboots the device<\/p>\n<p><strong>info:<\/strong> Returns the firmware version (version), date (date), and the MAC address (mac) of the device.<\/p>\n<h3>Firmware Update<\/h3>\n<p>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 \u201cUpdate\u201d button.<\/p>\n<p>The latest firmware can be found here: <a href=\"https:\/\/github.com\/erocm123\/SmartThingsPublic\/raw\/master\/devicetypes\/erocm123\/smartlife-rgbw-controller.src\/SmartLifeRGBWController.ino.generic.bin\" target=\"_blank\">https:\/\/github.com\/erocm123\/SmartThingsPublic\/raw\/master\/devicetypes\/erocm123\/smartlife-rgbw-controller.src\/SmartLifeRGBWController.ino.generic.bin<\/a><\/p>\n<h3>Physical Switch<\/h3>\n<p>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:<\/p>\n<p><a href=\"https:\/\/community.smartthings.com\/t\/legrand-adorne-paddle-switch-hack-convert-to-pushbutton\/3296\" target=\"_blank\">https:\/\/community.smartthings.com\/t\/legrand-adorne-paddle-switch-hack-convert-to-pushbutton\/3296<\/a><\/p>\n<h3>Factory Reset<\/h3>\n<p>There are two ways to reset the settings back to their defaults:<\/p>\n<ol>\n<li>This method might be easier to do with a surge strip with a button attached. Unplug controller and plug back in. Within 2 &#8211; 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.<\/li>\n<li>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.<\/li>\n<\/ol>\n<h3>Downloads<\/h3>\n<p>Device Handler:<\/p>\n<p><a href=\"https:\/\/github.com\/erocm123\/SmartThingsPublic\/tree\/master\/devicetypes\/erocm123\/smartlife-rgbw-controller.src\" target=\"_blank\">https:\/\/github.com\/erocm123\/SmartThingsPublic\/tree\/master\/devicetypes\/erocm123\/smartlife-rgbw-controller.src<\/a><\/p>\n<p><a href=\"https:\/\/github.com\/erocm123\/SmartThingsPublic\/tree\/master\/devicetypes\/erocm123\/smartlife-rgbw-virtual-switch.src\" target=\"_blank\">https:\/\/github.com\/erocm123\/SmartThingsPublic\/tree\/master\/devicetypes\/erocm123\/smartlife-rgbw-virtual-switch.src<\/a><\/p>\n<p>SmartApp:<\/p>\n<p><a href=\"https:\/\/github.com\/erocm123\/SmartThingsPublic\/blob\/master\/smartapps\/erocm123\/smartlife-rgbw-light-connect.src\/smartlife-rgbw-light-connect.groovy\" target=\"_blank\">https:\/\/github.com\/erocm123\/SmartThingsPublic\/blob\/master\/smartapps\/erocm123\/smartlife-rgbw-light-connect.src\/smartlife-rgbw-light-connect.groovy<\/a><\/p>\n<p>Firmware:<\/p>\n<p><a href=\"https:\/\/github.com\/erocm123\/SmartThingsPublic\/raw\/master\/devicetypes\/erocm123\/smartlife-rgbw-controller.src\/SmartLifeRGBWController.ino.generic.bin\" target=\"_blank\">https:\/\/github.com\/erocm123\/SmartThingsPublic\/raw\/master\/devicetypes\/erocm123\/smartlife-rgbw-controller.src\/SmartLifeRGBWController.ino.generic.bin<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>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 [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_exactmetrics_skip_tracking":false,"_exactmetrics_sitenote_active":false,"_exactmetrics_sitenote_note":"","_exactmetrics_sitenote_category":0,"footnotes":""},"categories":[6,4,5],"tags":[],"class_list":["post-295","post","type-post","status-publish","format-standard","hentry","category-home-automation","category-sonoff","category-wifi"],"_links":{"self":[{"href":"https:\/\/smartlife.tech\/blog\/wp-json\/wp\/v2\/posts\/295","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/smartlife.tech\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/smartlife.tech\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/smartlife.tech\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/smartlife.tech\/blog\/wp-json\/wp\/v2\/comments?post=295"}],"version-history":[{"count":1,"href":"https:\/\/smartlife.tech\/blog\/wp-json\/wp\/v2\/posts\/295\/revisions"}],"predecessor-version":[{"id":762,"href":"https:\/\/smartlife.tech\/blog\/wp-json\/wp\/v2\/posts\/295\/revisions\/762"}],"wp:attachment":[{"href":"https:\/\/smartlife.tech\/blog\/wp-json\/wp\/v2\/media?parent=295"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/smartlife.tech\/blog\/wp-json\/wp\/v2\/categories?post=295"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/smartlife.tech\/blog\/wp-json\/wp\/v2\/tags?post=295"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}