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

@coreylista, @patrick I just changed one of my fans over to this driver. Question is how do I control the speeds with the Dashboard? Only thing I see is the on/off. How can I choose a speed?

thanks

Same question for the Button Controllers app. I can select "adjust fan" in the "set dimmers, bulbs, shades, fans" area but I don't get an option of what to "adjust" it to.

Assuming this works the same as it did in smartthings. It cycles through the fan speeds. Take a look at the code sample below. This would only apply to the fan component device.

def adjustFan(device) {
	log.debug "Adjusting: $device"
	def currentLevel = device.currentLevel
	if(device.currentSwitch == 'off') device.setLevel(15)
	else if (currentLevel < 34) device.setLevel(50)
  	else if (currentLevel < 67) device.setLevel(90)
	else device.off()
}

Ahhh, ok. I was kinda hoping to use a single Pico button to turn on some lights and the fan at a certain speed but if that just changes the speed every time you press the button that won't do for me.

I plan to update the ABC app to work with this soon. It should accomplish what you need.

If you turn the parent controller on, the light and fan will both turn on to the previous brightness and speed.

The built in button controller can set the fan to a specific speed using a pico. The fan component works like a dimmer in this case.

You’d have to set it as a dimmer for now. I’ll see if we can get a fan tile. We might have one already in the works.

3 Likes

I was planning to post a request for this today. Hope it happens.

1 Like

Thanks, the dimmer works but need to get the icon changed to a fan. Also would be great to get a 'Comfort Breeze' button added to the same tile too. :wink: Then it would be perfect!

@stephack you may recall that I do not have any lights and am using a webCoRE piston to control fan speed, so you suggested I'd be just as well off staying with your first version (no child devices); which is where I am today.

I'm hoping/expecting/praying that means I can do a simple driver switch from your code to the new built-in driver. Your opinion, please?

I haven't tried adding to the dashboard yet but it seems like it would be a bit tricky because 1 through 6 would also be the different fan speeds.

Are you using the setSpeed command in your pistons?
If so, then I believe it should work. Make sure you hit configure and save after loading the new driver.

When moving the slider it jumps to 25%, 50%, 75% and 100%. But missing the 'comfort breeze' option.

Correct, the dimmer for the fan component will snap to the closest 1/4 percent.

If you have very small fingers you could set it to 6% which would be auto (Comfort Breeze) :stuck_out_tongue_winking_eye:

2 Likes

Yes, exclusively [even setSpeed (0) for "off"].

Ha, confirmed...it works! Now try to explain that one to the family!

1 Like

I think you should be good to go. Worst case scenario, you switch back to the custom driver.

1 Like

A question about querying fan speed, using webCoRE. I'm using the parent device only - have not turned on the child devices since I don't have lights.

I can successfully use setSpeed but I can't fetch the current speed. In the device handler, the "speed" is correct, e.g. "medium", but the parameter "speed" in webCoRE always returns "0".

It seems like a bug, but experience says it's usually me doing something wrong. Anyone else?

If I remember correctly, you need to specify the type of value for a parameter in webcore. My driver was strictly numeric. I believe the HE driver is actually a string (eg medium) but you can use numeric values to set the value and they translate it in the code.

You might need to change the parameter type in webcore to string to get the speed value.

Thanks, Stephan, but I don't think that's it. For testing, I'm simply logging the values I get back so there's not a variable type involved. However, to test, I created a variable and set it to the device speed. Whether the variable is type dynamic, string, integer or decimal, the value always come back 0.