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

Also @ranga, when I tap on the main multi-attribute tile it turns the fan off, but when I tap it again, it does nothing. Is this by design or is the fan supposed to resume its last state?

I never used the original DH so I don’t know what behavior to expect and why.

Updated the metadata and definition.

@stephack, will look into this later today.

The original was strictly light on-off control. This is by design for the interim, the device handler has several ON states; LOW, MED, MED-HI, HIGH, BREEZE. So currently the design is you can turn off any of the speeds, The ON is by selecting one of the 5 “ON” speeds so the question is what should happen when you hit the tile for ON? Ideally we want to restore to the last state. It is easy enough to force a default speed of HIGH or whatever but I am working on a user selectable default ON speed. FYI: this same condition exists as well on the BREEZE tile for the same reasons.

The way the wireless remote works is whenever you use the master ON_OFF switch it will return it to the last condition. I do not know of a way to store a last speed state to accomplish this identical sequence of operation in the device handler. If any one has ideas put them out :wink:

@krlaframboise @Sticks18 do you have any ideas for me on accomplishing a way to store the last speed state that was selected by the device handler?

I might be missing something, but couldn’t you just create a custom attribute and update it every time you update the main attribute?

2 Likes

This. Then check that attribute at the end of your on() call and fire off the correct fan speed command.

2 Likes

I worked on creating a Master switch that remembers the “last states” last night. It works as designed but will need some feedback regarding a few configs. I have it saved on my github and would like to post it here but don’t want to step on any toes (@ranga, @dalec) . Let me know if it’s ok or if I should PM instead.

This is what I’ve done to make this DH more suitable for my needs.

Everything off

Fan Low

Fan MED

Fan MED-HI

Fan HI

Fan BREEZE

Here’s what I’ve changed

  • cleaned up code spacing and tabs to read and edit easier
  • removed the fanOff button
  • added Master Switch button
    When master turned off it logs the state of the fan and light and then turns everything off. When turned on again it will set both the fan and light to the saved settings.
  • The main multiattribute tile now turns the master switch on and off.
  • Each fan speed button can be used to turn off the fan.
  • moved the log.info code before the return statements so they execute properly.
  • set shades of green for fan speed.

The master switch will automatically turn off if both the light and fan are turned off individually. In this case however, it does not log the “last states” of the light and fan. It retains the setting from the last time the master switch was used. I think this is the best use case but time will tell if this should be changed.
I think I will remove the Master switch button entirely once I feel comfortable that the main tile should continue to be used for this purpose.

1 Like

Just installed Gardinier ceiling fan and the latest merged DTH works great so thanks to ranga for DTH. Now to figure out the Alexa voice control portion.

As far as I can tell only the switch function (light control) is exposed to Alexa. I think the next project will be to create a simple smartapp that ties a virtual switch to the fan buttons (if possible).

1 Like

@stephack thanks so much for sharing your code with me. I was working on the states, but hasnt completed that yet. I will merge your code into the main branch over the weekend. I am also working on other core related functionality.

I am currently in process of creating a smart app to automatically create the virtual switches as ST does not allow more than 1 end point for a DTH currently. In the mean time, if you create a virtual switch to call the fanOne/fanTwo/fanThree/fanFour/fanBreeze functions, you will be able to control the speeds via Alexa/GH. I am using CoRE to call the function. But Alexa Helper/GH Helper would be able to do the same as well.

2 Likes

Awesome news and look forward to checking out that smartapp when it’s ready as I was only able to control light with Alexa today.

Use a github pull request to @ranga from your github is the correct way to request a change to the code. From what I can tell it thens keeps track of not only changes but allows for feedback back and forth with from specific lines of codes and it will show up that way in @ranga github as well.

The “last states” is needed to allow for the simple change to enable the turn “ON” of the tiles.

Send me your github so I can see your changes and I can make better comments but I wouldn’t remove the On_Off tile because that is what mimics the wireless remote On-Off function. Regardless if the multiAttribute tile and speed tiles also allow for turning fan back on. Giving the user choice is best even if it is duplicated, think about it… that is exactly why we use the remote control is because it gives us the choice to operate the fan from our phone OR the remote and they duplicate the same function. Keep the ON-OFF tile and leave it on the bottom like I had it because it is a lower use over the other tiles. …that is my 2 cents. :slight_smile:

How do you put the controller into pairing mode without its remote?

I originally had this set up in Wink in a manner where I tied off the original physical switch for the old fan location and mounted a Lutron Connected Smart Bulb remote over the gang box. The only way I can cut power to the controller is at the breaker panel. I tried cycling the breaker a few times while in pairing mode but ST does not discover anything.

It is also worth noting the the HD controller is mounted inside a new fan that has pull chains for both the lights and fan controls.

I know it is wired correctly because it worked perfectly in Wink. The Wink app did its thing while the Lutron remote was programmed for light on, light off, fan low, and fan off. The only thing that could break the setup was if someone manually pulled the chains until either the lights, fan or both were in the off position.

Sorry I don’t know understand how this setup is wired up with the device. You say the Lutron did light on, off, fan off but the Wink receiver does that? UPDATE: I just read up on the Lutron and I see what you did.

So confirm these exact steps in the exact order you try it…

  • Fan breaker on.
  • Then from home screen of ST mobile app drill down to + Add Things in Things view.
  • Select Add Things at the bottom of list to get the hub searching for new devices
  • within a few seconds of Hub searching for devices, cycle breaker OFF for a couple seconds then back ON
  • Hub should find new zigbee device within 30 seconds.
1 Like

I didn’t do it exactly like that but will try now.

I moved the ST hub to be in close proximity to the fan controller using an ethernet PowerLine adapter and an extension cord. That should remove any proximity variables from the equation.

Edit:

Just tried it again exactly per instructions. Still nothing.

I then remembered seeing a post by @JDRoberts where he mentioned something about letting Zigbee devices stay off for -15 min before “rebuilding” a Zigbee mesh. Maybe the Zigbee “innards” need to be powered down long enough to forget about their prior relationship with the Wink hub.

I have the breaker controlling this fan in the off position now and will re-test in 15-20 min.

Edit 2:

Tried again with no luck. It looks like I am going to have to take the fan down in order to figure this out. Perhaps a HD remote is necessary in some cases after all?

Did you disjoin the controller from the wink hub before trying to connect to the ST hub. I don’t know if zigbee is like zwave, but if it is, it won’t try to pair to a new hub unless it has been properly disassociated from the old (wink).

If that is the case and you still have the wink hub, disassociate it from there first and try again. Other wise there may be a way to factory reset the controller. I will look at the manual later and let you know if I see anything helpful there.

3 Likes

See gray box in pic below. Might be difficult doing this at the breaker but worth a shot.

2 Likes

I did dis-join the controller from Wink before getting rid of it.

One thing I forgot to add is that when I was initially installing the fan, it did show up in ST. I wasn’t far enough into my upstairs renovation to set it up so I deleted it from ST. I also am on my second ST hub (as the first one had issues with letting me add/remove Z-Wave devices). When this fan was initially paired to ST. I am 99% sure it was paired to the faulty ST hub (that I exchanged).

Interesting… I might re-add the physical switch and try to replicate this setup behavior. As it currently stands, when I cycle the breaker, the fan comes on at low speed but I have no idea whether the light blinks. The light may also be on the incorrect chain setting so that adds another variable to the mix.

I now have a few more things I can change and test for so there is still some light at the end of the tunnel!

EDIT:

Just saw the part about resetting the controller. Looks like the same procedure as with a GE Link Bulb. Going to try that and report back.

EDIT2:

Reset (On 3 secs, Off 3 secs, X5) worked!!! Thanks for the help guys!

2 Likes

Can you share instructions on how to set up a virtual switch with CoRE to control fan speed? Thanks.

[quote=“pilot04, post:62, topic:79552”]
Can you share instructions on how to set up a virtual switch with CoRE to control fan speed? Thanks.
[/quote] Here is a great place to get help for CoRE with Jason @bamarayne CoRE - Get peer assistance here with setting up Pistons

1 Like