[DEPRECATED][Alpha] Hampton Bay/Home Decorators Zigbee Ceiling Fan Controller

OK, I am trying to find a universal method to modify my existing 3-speed fan control smartapp to work with your new device type as well as the other z-wave fan controller now. The timer functions can be implemented in my smartapp which is helpful for the GE devices but redundant on the HamptonBay. This is why I was interested in monitoring the status within the Hampton Bay because it can conflict with the automatic control applications.

I looked at your code for the zwave fan controller. it seems to be able to select the level as a dimmer function between 0-100. You can create any number of speeds by defining the values for each. So, the controller can theoretically work at 100 different speeds as long as you set it up to do so, although the fan may not support the same. But the zigbee fan controller only uses 6 discreet states: Off, One, Two, Three, Four, Comfort Breeze. And it also handles both the light and fan functionality vs the zwave controller handling only fan modes.

That being said, you will need to make the code generic enough to determine which fan was selected and call a different function based on the fan selected. If you look at my DTH, there are custom commands (fanOff, fanOne, fanTwo, fanThree, fanFour, fanAuto) that you need to call to set the speeds from your smartapp. If you select the zigbee fan with the current code, it will set the light to 30% for low, 60% for med & 90% for high and not operate the fan at all.

2 Likes

I just wanted to say thank you @ranga !!
I just installed and quickly tested the handler and it works like a champ with no issues on install/setup/use.

This was my last remaining “wink” item I had to deal with in my conversion to smart things and could not be happier.
A work around for Wink and Alexa was to create a shortcut (routine) using the light and then add it to Alexa. Once it was in and tested we would go back in wink and change the shortcut to fan speed.

Phil
PS Is their any way we can get it to show up in CoRE as a “control thermostat or fan”?? Would give us a ton of automation options based on temp and motion etc.

Edit, found it in the switch’s/lights!

1 Like

I am glad it is working for you! It was one of the last standing Wink items for me as well.

To be able to use the fan function from either Alexa or Google Home, I created a virtual switch for each function using CoRE. The light function though is available automatically.

My next steps is to work on getting either a smartapp preconfigured to do the same and have Alexa/Google Home to automatically find the virtual switches.

I wanted to do this, but there is no ST inbuilt “Capability” for fans. If you want the device to show up under Thermostats, just add a line to the code under the metadata/definition where the rest of the capabilities are listed:

capability “Thermostat”

2 Likes

Got some strange behavior on the OnOff tile not acting the same as the Remote OnOff. For example the Remote OnOff always toggles the fan and light and remembers the last known state to return to when toggling on. However on the Tile OnOff sometimes I get a lock up and it sticks on “blue” background and I can’t control from any tile now. If I use the remote to change speeds it will and the Tiles become unfrozen. The Tile OnOff seems to only be controlling fan motor.

UPDATE: looking at the code it looks like you intended the Tile to work like this to only operate the fan.

OK after a few more days of operating the device I have some feature requests. I tried to do this via your github but I am still really new on github and I could not make it work right on pull requests and such.

FEATURE REQUESTS:
-Move the light control tile off the primary location down to a standard tile in the mobile app and instead…

  • Duplicate the method that @ChadCK uses on his z-wave GE fan smart device so that the ceiling fan speed control/status is on the primary tile. I find this is more useful from the user interface when viewing the Things listing on the app. This was my original suggestion in the other thread.
    -Change the fanOff to be onOff function so that it mimics the remote and toggles both light and fan
    -Rename the fan speeds LOW, MED, MED-HI, HIGH

-Is it possible to have the Timer function triggered on the device handler as well as the Reverse function? I can’t remember what you found if those features where being made available on the zigbee side of things.

-Making custom icons to be compatible with SmartThings device handlers was more challenging then I thought it should have been but after lots of tweaking of the some custom icons to get them to look correctly I finally have some draft versions, thanks to my designer son they are at least suitable for testing.

I am modifying the device handler locally on my ST hub for testing as I try to implement some of the feature requests to see how it works plus I am wanting to learn coding a zigbee device handler so I am learning as you work. I have broken it so many times LOL

This is a screen capture below is concept only to show latest tweaks to the icons look in the tiles. The icons designs were taken from the remote control itself so that we have matching functions and less confusion to the user. I used the lighting icon just to show it to you but of course we need to move the lighting control off the primary tile. For some reason I was unable to change the multiAttributeTile icon yet but I wasn’t spending time on it because I think that location should be the fan control/status only with the light/dimmer control down below in the secondary tile locations.

Any thoughts, concerns?

Fan Icon

Breeze Icon

Light Icon

OnOff Icon

Correct, I tried to match the same functionality in the Wink app. The app is not exactly a copy of the remote.

I am reading further into the tiles and interface for ST and am planning to make some changes to this. I will hopefully get some time soon to work on it.

Thanks for the icons!

I am doing the same. So far every time I have attempted to duplicate the interface that ChadCK did I get an error so I am hunting down the syntax issue I am having. With the helpful people on this forum we are going to get this beast tamed :grinning:

Sorry about not knowing GitHub enough but I think I am supposed to be able to make changes on my local version that you can see somehow and merge at your discretion. But in the meantime I am just testing off a local version that isn’t linked.

I am about half way done and having lots of fun in learning and applying device handler code. I have just about finished with making all the changes that I was suggesting. :grinning:

Update: My hub decided to “go on vacation” this morning causing a little slow down in me getting the device handler finished. :confused: Tech Support is on it.

Ok, got this fan hooked up, but having trouble getting it linked up to SmartThings.

I’ve tried the instructions to do a factory reset, but it’s not working. Anyone have a solution to that?

It should be pretty straight forward. Did you do it like I did in the PAIRING paragraph?

And I’m an idiot… Thought I had tried that, but apparently not. Got it working now. Maybe I’ll get the hang of all this eventually and stop asking stupid questions. :slight_smile:

Thanks!

1 Like

When you press the tiles a second time it isn’t acting as you would think for the indications or the action controls.

@ranga I am needing some help on the zigbee commands please.

I see for example that you defined fanOne to be the command for low speed using the zigbee string with the final parameter being {01}. And each speed has its own parameter {02}, {03} etc.

def fanOne() {
sendEvent(“name”:“fanMode”, “value”:“fanOne”)
def cmds=[
“st wattr 0x${device.deviceNetworkId} 1 0x202 0 0x30 {01}”
]
return cmds
log.info “Setting fan speed to One”
}

You didn’t define {05} or {07} etc.?
I need to define a command that mimics when I press the On-Off button to toggle ON, the same for Dimming the light. I am guessing it is one of those? You defined one for OFF but not ON and nothing for changing the light levels. Sorry for any improper language but just trying to learn so I can add another function to the handler.

I guess it doesn’t hurt to experiment… :yum: I can just define some new commands with those zigbee strings and see how the device responds.

UPDATE: Got the dimming in cluster:0008,
raw: 4ED801000808000020A2, dni: 4ED8, endpoint: 01, cluster: 0008, size: 08, attrId: 0000, encoding: 20, value: a2

Can’t seem to determine correct toggle commands for light versus fan motor

@dalec zigbee device has clusters and their values predetermined by the manufacturer.

Setting the values to 5/7 will not work as the values are not supported by the fan.

To turn off/on the light, you can use the cluster: 0006 and attrId: 0000, (values can be 0 for off /1 for on).

1 Like

Got it! Thanks

Update: Just finishing up the rework on your device handler , I’m running down a little bug on the mobile app’s nextState function I believe but it should be done in just a little bit here.

I am just about finished with my testing of the rework of @ranga original alpha device handler to make it more like the way I want to see and operate the fan. I added all my custom icons to match the wireless remote and the device handler is more of a match in operation like the wireless remote. Thanks to @ChadCK @johnconstantelo for their GE Smart Fan device code so I redid the main tile so it’s primary function isn’t displaying the light now but it is all about the fan speeds indications with the slider only for control of the light. All these changes allowed it to not simply match the remote but it is more like what I have already with my other ceiling fan GE Smart Fan device handler.


Updated:
Latest changes I’ve made to the device handler. I should have the github request in tonight for Ranga

1 Like

So I’m having some issues still with this. The first day I hooked it up, everything worked fine, I could control from SmartThings perfectly fine.
Since then though I’m unable to control the fan and am getting very intermittent updates in SmartThings. I have another Zigbee device that’s about the same distance from the hub but has less walls/ceiling/insulation to travel through (fan is on a vaulted ceiling, other device is a contact sensor in the same room on a door).
Any ideas? Was going to try resetting the hub to rebuild the Zigbee mesh, but figured I’d ask if there were any other ideas.

@Fredbob711 can you send me the fan related logs from the IDE? Unfortunately there is no easy way to determine what the signal strength is. But if there is something apparent from the logs, I might be able to debug. To get info from the fan, hit the refresh button on the device handler and see what it produces in the log.

Try placing a powered zigbee device in between your ST and the fan and see if it helps.

If nothing else works, remove the fan from ST and re-add it.

I am looking forward to adding a device health capability as soon as ST releases some documentation on it.

I’ll send the logs once I get it added back into SmartThings.

I added an Iris Smart Plug in between the hub and the fan and no dice. I removed the fan from SmartThings, but now I’m having trouble getting it added back in. I’m wondering if the fan wiring has a loose connection. Tomorrow I might have a chance to pull the ladder back out and double check all the connections.

This is great @dalec! Your changes are perfectly inline with my interface/control preferences. I doesn’t look like @ranga has published your changes yet. I’d love to give them a try if you’re willing to PM me the code.