Hampton Bay Zigbee Ceiling Fan/Light Controller installation HOWTO

Is this in a github repository anywhere?


Samsung forced me over to the new app a couple of weeks ago (nightmare). I began using your King of Fans device handlers at that time and they worked fine.

Last night the lights on two fans - without touching any physical switch or the app - started coming on. While on they pulse, dimming down and then back up. If you turn the lights off on the app they come back on, on their own, within a few minutes. The only way to turn them off and keep them off is by using the wall switch, which in our case also disables the fan.

We’re using the Hampton Bay controllers. So far I’ve seen this occur on two of the eight fans we have.

I updated to your latest device handler last night through the IDE Github pull and then directly from Github today (copy and paste) today, but the problem continues. Any help you could provide would be really appreciated.

The github link is 3 years old. Is this the right one? Are the e more recent updates?

That’s the right one: https://github.com/rafaelborja/SmartthingsKingOfFansZigbee

I deleted the old fan out of the app and IDE, flick the power five times and repair. Works great now. Thanks!

I was wondering if I can get some help on how to update the device handlers. I have went into IDE and updated the controller and light child device to Rafael’s new code. My Device Handlers has two of Rafael’s handler (Light and Fan Control) and an old one of dfcoffing: KOF Zigbee Fan Controller - Fan Speed Child Device. In the new Smartthings App, it only says Checking Status. All my devices used the new handlers and receive an error when deleting the old dfcoffing speed.


You have to unpair (delete) and pair it again.

Best regards!

I have two of these controllers installed and I’m using the latest version of the @Rafael_Borja DTH from Repo. One of the fans works great, but the other’s light always turns off whenever I switch out of Max Fan to any other setting. This happens in SmartThings (new) and using the remote. Any suggestions for troubleshooting?

Can you describe it step by step so I can try to reproduce it?

I’m glad you asked for details, because I checked more closely. It turns out it’s not just the light turning off, but the fan and light.

Starting from the fan and light set to off:

Light-On (light turns on)
Light-Off (light turns off)
Light-On (light turns back on)
Fan-On and Max (fan turns on to Max)
Fan-Any setting other than Max (fan AND light turn off)
Fan-Any setting (fan turns back on and the proper setting AND light turns back on)

Again, this happens with the remote as well and my other controller exhibits no issues. Does that suggest a problem with this controller or could it be something in the DTH?

I actually just saw the setting in the app to change the dimmer for the fan device to control the fan. Now alexa can adjust the fan speed based off the dimmer commands of the device.


@Rafael_Borja got your new device handler installed and connected to my device and I can finally control the fan speed and light from the new smart things app. I also was able to connect it via Alexa and can turn the fan light off and on. Do you know the trick to control the fan speed via alexa? It doesn’t work via just the alexa app controls or voice commands.

Thank you,

I just set up the DTH from @Rafael_Borja for my 2 fans and since I ran into a few stumbling blocks along the way, I thought I’d share what I did to help anyone else out.

I did not want to delete and re-pair my fans, because they don’t have hardwired switches I can flip and for one of them that would be impossible to add so I’d have to flip the whole circuit. So I started out by creating the new device handlers. I couldn’t get the repo to work because it kept saying I didn’t have permission, so I copied/pasted/published. It has been a couple of years since I’ve done anything like this in Smartthings though so maybe I was missing something obvious.

For a fan that shows connected with the old DTH but doesn’t work in the new app, all you should have to do is delete the child devices and then switch the DTH to the new one. You will have to delete any associated routines, or at least delete the child devices from it before you can delete the child devices. Deleting the child devices includes deleting the light (I wasn’t sure about this but yes you have to, if you don’t it will look right but it will always show disconnected). After switching over to the new DTH, I deleted the old DTHs from my library but I don’t know that it was necessary. It should create a new light child device and everything should work after this.

That worked for one of my fans, but the other wasn’t showing up connected in the new app at all. I had done some work on that circuit earlier in the month and the breaker flipped a few times due to a faulty fixture, so I suspect that messed it up somehow. It worked in the old app but not the new, so who knows. I tried everything above and it did look correct and it created the child light etc but did not work as it would not show connected.

To get it to work, I deleted it completely - both child and parent devices, the whole thing. However I did NOT exclude it. I then flipped the breaker and left it off for 10 seconds, then turned it back on. I went into Smartthings and put it in pairing mode and it found the fan and the light, and now everything works great. I saw a suggestion somewhere that this might work to fix the connection and it did, and I managed to avoid flipping the breaker on and off 5 times. For anyone having connectivity problems, this is an easy thing to try first. I tried repairing the zigbee network first and that didn’t help at all.

As suggested above somewhere, I also changed the “dimmer” on each fan to control the fan, allowing for me to tell Alexa to set it at certain percentages etc. I am super excited to have these both working correctly again!

1 Like

I have had an issue where after I get the device setup and configured with the device handler, it will work for 12-24 hours and then both the fan device and light device will stop working. The app never says that they are disconnected, but controls stop working for them.

@Rafael_Borja Do you have any idea what could be causing the issue I mentioned above?

I have this exact same issue


When I try to add your repo to my smartthings IDE I get the following error.

“You don’t have access to rafaelborja/SmartthingsKingOfFansZigbee”

Okay I got it to work, sort of. I couldn’t get the IDE to allow me access to the Github repos for some reason. I downloaded the source, added the devices, and self published, they went in nice and smooth, but for some reason when I set the fan to low, it changes the light state from either off to on, or on to off depending on where it was. Easy enough to work around, but quirky for sure.

Anyone have any of these that they want to offload? I’m trying to rid myself of as many wifi dependent devices as possible, but these are discontinued so I can’t buy any.

Since this controller is discontinued, have you checked out the FAQ here about alternatives - FAQ: 2020 Ceiling Fan and Dimmer light wall mount control compatible with SmartThings and Alexa?

There’s an Inovelli Fan/Light Zwave (non-wifi) device that I have three of and works very well. - https://inovelli.com/red-series-fan-light-switch-z-wave/

There’s a reason this Hampton Bay device was discontinued. Range is awful on it, and it really was designed to work with Wink. I have one and would not recommend it even if you could find one. @Rafael_Borja developed a custom handler that works well but the future of custom code with Smartthings is up in the air right now with the Groovy IDE phaseout. You may want to look at an alternative to future proof a bit.

I wouldn’t totally give up on Wifi devices. If you can flash Tasmota to a wifi device or control it locally with MQTT somehow it still gives you local control. @hongtat mentioned a Sonoff fan control device with remote they “tasmotized” and use Tasmota connect here - Smartlife WiFi Fan Control.

1 Like

I’m looking at the inovelli

1 Like