[Deprecated] Hampton Bay Zigbee Fan Controller Driver (with Component Devices)

Update 6/27/18:
Fyi, the built in Hampton Driver for this controller has been updated to include a lot of the functionality of this driver. There are still some differences and benefits of my version but the built driver will cover almost everyone's needs. See this post below for details


UPDATE 6/02:
v1.0.20180602 of Fan Controller driver
added "cycle" command to cycle through fan speeds (like the remote)


UPDATE 5/30:
v1.0.20180530 of Fan Controller driver
fixes lastRunningSpeed script so that is does not get set to 0 if off() command sent while fan is already off.


Now that Hubitat supports Component Devices, I have updated the Hampton Bay Zigbee Controller Driver to more closely match its ST counterpart. There are a few minor differences because of the way HE presents their drivers.

NOTE:

  1. ALL 3 Drivers need to be installed.
  2. If you have already paired your controller to Hubitat and are simply pointing to this new driver, please do the following:
  • Point your existing device to the KOF Fan Controller driver and SAVE.
  • Click the Configure button
  • Click the Recreate Child Devices Button

Parent Driver

Hubitat/deprecated/drivers/KOF Fan Composite Driver/KOF Fan Controller.groovy at master · stephack/Hubitat · GitHub

Fan Speed Child Driver

Hubitat/deprecated/drivers/KOF Fan Composite Driver/KOF Zigbee Fan Speed Child.groovy at master · stephack/Hubitat · GitHub

Fan Light Child Driver

Hubitat/deprecated/drivers/KOF Fan Composite Driver/KOF Zigbee Fan Light Child.groovy at master · stephack/Hubitat · GitHub

Driver Page

Device List Page

4 Likes

This driver also includes Hubitat's “Fan Control” capability. Please also note that the “Set Speed” in my version accepts numbers :
0 : Off
1 : Low
2: Medium
3: Medium High
4: High
6: Breeze Mode/Auto

Dimmer functions are available in the Fan Light Child device, but can also be controlled from the Parent Controller device via the LightOn/LightOff/SetLightLevel buttons

On/Off on Parent device controls the fan. On will always resume the last fan speed before it was turned off.

Known Issue: Alexa does not differentiate between the following example:
Parent name is: Bedroom Fan
Child Light name is: Bedroom Fan Light
Telling Alexa to "Turn off Bedroom Fan Light" will turn fan off because it considers the "Light" at the end of a device name optional. I rename my Light child device to Bedroom Fan Lamp to avoid this issue.
I left Light as the default because I have been told that this is not an issue with Google Home/Assistant....and there was much discussion about what the "alternate" name should be (Lamp, Bulb,etc), so I will let you choose your own :slight_smile:

4 Likes

Thanks, Stephan. It all looks very familiar.

In my case, I do not have lights on the fans. Can I just skip installation of the light child?

I am using your original Hubitat device with webCoRE controlling my fans through the setSpeed(n) command. It looks like that will work the same if I update to this driver. Can you confirm?

Right now there is no way to skip the install or delete the child easily. PM me if this is really important to you and I can advise on how to edit the code for what you need.

setspeed should function the same.

I appreciate that, Stephan. Thinking about it some more, my fans are 100% controlled by a webCoRE piston, so I don't have a need for the light or fan child devices. Would it be just as well for me to stay with your deprecated version? Or, have you made other improvements in this version that I would miss?

There are functionally the same. The difference is primarily for voice control because each fan speed and the light can be shared and controlled individually.

You no longer need to create custom commands for each fan speed to attach to automations. If are using webcore for everything, then the single driver "might" be the better option.

1 Like

Thanks a lot for updating the driver, Stephan!

I was just playing around with Alexa after updating to the parent-child driver, and I've found that she can differentiate between the fan and the light!

For example, when I said "turn on the study fan," the fan turned on. When I said "turn on the study fan light," the light turned on. I was able to turn the fan and light off independently too.

Interestingly, she had difficulty with my living room fan. Initially she kept saying, "a few devices share that name." Since that wasn't an issue with the study fan, I thought that it might be that "living room" is two words, and somehow that was tripping her up.

Sure enough, I changed each of the living room fan component device names in the Alexa app (not in hubitat) from "living room" to "living-room" and now she can distinguish the fan and the light.

What you wrote in the text above that I quoted is how I remember things working with the ST device handler. So I wonder if Alexa got an update at some point to make this feature more on par with Google Home?

1 Like

Thanks for the update. I will test on my end soon. I really hope your workaround fixes this consistently because remembering to say Lamp for my fans has never been good for the WAF.

UPDATE 5/30:
v1.0.20180530 of Fan Controller driver
fixes lastRunningSpeed script so that is does not get set to 0 if off() command sent while fan is already off.

So..I tested and it does appear to work consistently with "light" as you mentioned. I'm going to keep testing because at one point, we thought Amazon had fixed this and it became inconsistent again. Let's hope my doubts are uncalled for :crossed_fingers:. Thanks for the heads up @marktheknife. If it continues to work, I'll update my driver notes .... and direct all Alexa issues to you :wink:

1 Like

@stephack Stephan - Thank you very much for this driver. I just received and installed the Hampton Bay Zigbee Fan Controller this evening. Your Composite Driver is working great!

2 Likes

Stephan,

Can you please explain the "Fan Control" capability? It appears that your current version of the KOF Parent Driver supports this capability, however I cannot figure out how to use this capability within any Apps, including your very cool ABC App. It appears that ABC, Button Controller, and Rule Machine are all looking for a device that supports "Switch Level", which is currently commented out of the KOF Parent driver. What am I missing?

Thanks,
Dan

There isn't any documentation on how to use the fan control capability. I added it because it is used in the official driver. The "setSpeed" command is part of that capability. Hopefully this command will be available without using custom commands at some point (@bravenel?). I created the component fan speeds so you don't need to use setLevel like other drivers. What is it you are trying to do?

I just didn't understand what the new "Fan Control" capability was, or how to use it. Sounds like Hubitat Engineering still needs to add it to their apps, and provide the documentation on the capability so other developers can incorporate it within custom apps.

I was hoping to be able to use a single Pico Button to cycle through all of the fan speeds, similar to how the included RF remote works (or even the pull chain.) That way I could use a pico button to toggle FAN On/Off (already easy to do using the appropriate KOF Child device), and another pico button to cycle through the fan speeds. (OR - maybe use the Up and Down arrow button to cycle through the fan speeds.)

I am able to simply use the KOF Child speed specific switches for now, each attached to a pico button. So nothing urgent, for sure.

Gotcha. At one point I was going to add a cycle speed command (to behave like the remote) , but since I don't use any speed higher than medium on my fans, I never bothered. It should be fairly simple to add.

Before you go through any trouble, let's wait and see what becomes of the "Fan Control" capability. Do you have any documentation, even preliminary, and what the specs look like?

I used the official driver as a reference. It automatically creates the setSpeed command button and the lastRunningSpeed state variable. I used a different variable in ST but I decided to use this variable so this driver would be as compliant as possible when the HE team started provided documentation and support in the official apps.

The official driver does not use numbers like I do but instead use strings (low, medium, etc). I decided not to use this method because it would be easier to write code to do things like what you want to do with numbers.

Is this the capability you're referring to, or something else? I cannot find a capability called "Fan Control" in the current ST documentation.

Classic ST
http://docs.smartthings.com/en/latest/capabilities-reference.html#fan-speed

New ST
https://smartthings.developer.samsung.com/develop/api-ref/capabilities.html#Fan-Speed

[EDIT] I just reread your previous post... Are you saying that the Hubitat driver for the Hampton Bay Zigbee Fan Controller implements a new "Fan Control" capability? Is it supported in any of the Hubitat Apps yet?

Not as far as I know.

I just posted v602 in github that has a new "cycle" method that does what you need. I will update the ABC app to support this soon.

2 Likes

Thanks Stephan! Again, no rush. I really appreciate all of your contributions to this community!

1 Like