[OBSOLETE] SmartLife (H801) RGBW LED Strip Wifi Controller & Bulb

Speaking on behalf of Eric…

Based on some if the Frameworks he is using i guess Arduino, but he might need to confirm. Sadly nothing open source at the moment, he wants to do some kind of framework when he has time. I’ve been trying to build something similar for my house alarm recently, and am almost ready to release it, but it’s a million times simpler than @erocm1231 's code! Hence will sit tight for now!

I’m having trouble connecting to my first H801 via the smart app. Linking (web app functions, FW update) and lights are working, and I can see the 801 on my network (router device report, ping, etc.) Steps taken in smart app are:

  • Open SmartLife RGBW Light (Connect)
  • Select ‘Discover Devices’
  • Wait for device name to appear (Select RGBW Device (1found)
  • Select device in both 1st and second select screens
  • Select done
  • Receive error: ‘Error - bad state. Unable to complete page configuration.’

Troubleshooting already completed:

  • Verified network access/connectivity
  • Verified device handler published (to me)
  • Verified smartapp code published (to me)
  • Powered H801 off/on (several times)
  • Confirmed H801 connections (all working through web app)
  • Loaded latest firmware via web app (twice)
  • Turned off network extender
  • Restarted smartphone (using for smartthings config)
  • Repaired Z-wave network

I’m out of ideas… Anyone have ideas for what to try next?

1 Like

I rest the wifi and it connected again. It took my credentials, now it seems to be stuck in a screen that says “Credentials Saved. Trying to connect ESP to network. If it fails reconnect to AP to try again”.

It’s been in this screen for about 5 minutes niw

And does the fact that I don’t have and LEDs physically wired to the unit mean anything? Its just powered up. I also see in my routers connected devices list, ESP_9951BE. I assume that means its had connected correctly?

Yes, if you see it in your routers device list then it is all configured. I assume you are using the current device handler and current smart app?

If you look in the router for the IP address and connect to that IP address directly from your computer, do you get a page that lets you change settings and configuration settings?

No. Adding the IP directly in the smart app results in the same error message (‘Error - bad state. Unable to complete page configuration.’).

…Just reloaded the handlers and app. Your response about the latest versions prompted me to verify and reload. It worked! Thanks!

1 Like

Also, yes, I installed the latest device handler and smart app.

I figured as much :slight_smile:

As this thing is replacing an arduino setup, it should be fairly straightforward to alter the dev process for myself.

I’ve made a pretty significant change to the RGBW controller DH that directly ties the RGB values to the level. It replaces the psuedo dimming code with the actual HSV algorithm for dimming a color. Since I’m new to this smartthings community, what is the etiquette for code collaboration or branching projects?

Short reply. I’ve got it working.

Long reply… The automatic discovery didn’t work. When I checked my router, I noticed that the IP was handed out via DHCP. I changed it to a static IP. I then used that IP in the SmartThings app to add it manually. It took. Even though my LEDs haven’t come yet, I’m just playing with the h801 without lights. I can use the smart app to turn on on the light and adjust the RGBW channels. If I unplug the h801, the smart app doesn’t respond… So I’m fairly confident I’m all set.

But, that leaves me to wonder why it didn’t detect it initially? The smart app I used I took from the original post. The smart app * Date: 2016-06-23. The DH Controller * Date: 2016-12-10. The virtual switch doesn’t have a date stamp on it other than, Copyright 2015 SmartThings… Do I have the current versions?

Great post, was very helpful. A couple things to add:

I bought the Adafruit FTDI that you linked to at Amazon. I’m glad I read through some posts before I hooked it up because it ships configured to output 5v. The h801 needs 3.3v. This board does not have a removeable jumper to accomodate the difference in voltage. On the back side of the Adafruit FTDI there is circuitry that lets you adjust the voltage. You can see that the top left circuit is labled 5v and the one next to it is labeled 3v. You can see the 5v has a little bridge between the two square completing the circuit. I had to “cut” that little bridge (I did it by scraping it with a small flat head screw driver) and then soldering a bead of solder bridging the circut on the 3v side. A multimeter confirmed 3.3v before continuing.

Also for that board, I had to go to this page. http://www.ftdichip.com/Drivers/VCP.htm I used the “Available as a setup executable” link in the “comments” of the Windows section. Installation was easy and after installing the driver, the Adafruit adaptor worked great.

Other than that, everything went as planned. I would, however, suggest using the faked FTDI versions that have actual jumpers to adjust power output if you don’t have a soldering iron handy.

1 Like

If you want to submit a pull request through github I will take a look and discuss anything if necessary.

You can get more info here about submitting a pull request at the links below. It depends if you created a fork or not of @erocm1231 repo.

https://help.github.com/articles/creating-a-pull-request/

https://help.github.com/articles/creating-a-pull-request-from-a-fork/

update: it looks like Eric beat me to it. :slight_smile: It took me too long to find the info in the documentation.

1 Like

I think the reason multiple times is required sometimes is because of faulty (loose) connections at the H801 when using the smaller jumper cables. They can fit kind of loose in the PCB holes and the H801 connection The only time I have had to do multiple loads was because of that so for me I just used my fingers and applied light pressure on the jumpers and held still during the loading process. If I got a no load when trying this I would apply pressure in the other direction.

What’s the difference between “SmartLifeRGBW.ino.generic.bin” and “SmartLifeRGBWController.ino.generic.bin”?

So with the new firmware, setting the transition speed to “Fast” helps with the flickering that happens on dim up/down. It’s not perfect, but it’s better.

This makes me think it’s not necessarily my hardware, but that somehow the transition function or timer method interferes with the power regulation in an unexpected way? I’m not sure if that makes sense or not.

For what it’s worth, these are the LEDs I have. When I have only one side connected it’s smooth as butter. It’s pretty odd - almost like the transition function can’t handle dimming two channels at once. But surely the folks with RGB strips would have noticed this, too?

Just wondering if anyone has run into this :slight_smile:

So I just noticed that I order an RGB led strip, not RGBW, that only has 4 wires. Is it safe to assume that I use the RGB wires on their respective ouputs and the 4th white wire on VCC? And just not use the “W1” output?

That is correct. Red, Green, Blue wires will go to the RGB channels (see FYI below) and the Black wire will go to VCC. The W1 and W2 channels will be spares for you. In my case I used a second cool-white only LED strip on a spare W2 channel to give me task lighting on the W2 and RGBW strip for color on the RGBW channels.

FYI: note that it very common for the RGB strip manufacturers to NOT match the colors of the wires for the RGB color of the LED themselves. So that means field testing on your part to determine the correct way to terminate the wires. Use the device handler as the “master” if you will. So have the device handler turn on Red channel 100% and terminate the correct LED strip wire that produces the Red color which hopefully is the red wire but could be the green or blue as well. The black seems to be the only common I have seen thus far which is the VCC or positive power

I don’t know if I did it right… but I did something on github :slight_smile:

1 Like

So I have my light hooked up, (which is an RGB, not RGBW, if that makes a difference) and I’m having problems with the colors. If I slide the channels individually, it works fine… the red, green, and blue sliders change the colors correctly. However… If I try to use the color selector, the colors come out no where close to being correct. When I try doing it through Google Home, “green” changes to 94% blue, 4% green. Red changes to 94% green. Yellow is 100% green, 29% blue. Orange is 97% green, 75% blue. When I use the color presets in the color selector, it does get it somewhat close, but not as close as I would like it… “red” is a magenta, “green” is an aqua… blue, yellow, and purple are pretty close.

I’ve also noticed that I cannot get programs to run. And when I tap the “configure” button, nothing happens… well at least not in the app. When I tap the configure button, depending on what colors I have on, it’ll flicker different colors really quickly.

Try this updated function. It fixed my google-assistant/home issue

def huesatToRGB(float hue, float sat) {
	if (hue <= 100) {
		hue = hue * 3.6
    }
    sat = sat / 100
    float v = 1.0
    float c = v * sat
    float x = c * (1 - Math.abs(((hue/60)%2) - 1))
    float m = v - c
    int mod_h = (int)(hue / 60)
    int cm = Math.round((c+m) * 255)
    int xm = Math.round((x+m) * 255)
    int zm = Math.round((0+m) * 255)
    switch(mod_h) {
    	case 0: return [cm, xm, zm]
       	case 1: return [xm, cm, zm]
        case 2: return [zm, cm, xm]
        case 3: return [zm, xm, cm]
        case 4: return [xm, zm, cm]
        case 5: return [cm, zm, xm]
	}   	
}