SmartThings Community

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


(Dale C) #8

(Dale C) #9

Are all the functions of the remote control not affected with this device handler? I am referring to

  • “walk away time delay”
  • 2-4-8 hour timers
  • Comfort Breeze

If yes, are you able to make any of the states or any info about these other items available to ST for monitoring


(Ranga Pedamallu) #10

The Comfort Breeze is available in the DTH. If the remote changes the mode to Comfort Breeze, then ST gets updated as well. If the fan is set to any speed, the ST gets updated as well.

The 2-4-8 hour timers are not available in the DTH. I don’t remember them being available in Wink app as well. If someone is using from the Wink app, please let me know if that is not the case.

I do not know what you meant by “walk away time delay”.

The only function that Wink has additionally is the fan direction. Unfortunately, I cant read the value of the fan direction in the DTH. If anyone who has the original fan is willing to help me, I can try to add that feature as well.


(Dale C) #11

I grabbed this from the manual about the walk away feature.

So if I understand you correctly the DTH kind of sits in the background while the remote control can provide local control of the fan/light. It is unfortunate the hardware isn’t passing some kind of indication when the Timer button is pressed so that we could tell the Timer is operational. Same with the Comfort Breeze button being monitored, going “blind” will cause confusion on the ST monitoring side of things.


(Ranga Pedamallu) #12

Ah, interesting… never knew that. Shoulda read the manual :slight_smile:

The remote works independently to the Zigbee control. I believe it is still RF. All the functions you would do with a remote work as is. The only ones available from Zigbee control are the light, speed control including comfort breeze and a setting for the fan direction. And as I said before, I could not get the fan direction to work as I am unable to read the value being set. I dont want to try it too much and kill my perfectly working fan motor as my fan has a physical switch to reverse the direction and does not support the feature. If this feature is supported on your fan, I can send in a different code and we can try to figure the values out.

Although we can write a smartapp to add timers to ST, it would not be working in conjunction with the remote. I am looking into creating one to add this feature as well as voice control via Amazon Echo or Google Home.


(Dale C) #13

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.


(Ranga Pedamallu) #14

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.


#15

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!


(Ranga Pedamallu) #16

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”


(Dale C) #17

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.


(Dale C) #18

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


Home Decorators Ceiling Fan/Light Controller MR101Z - First Impressions
(Ranga Pedamallu) #19

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!


(Dale C) #20

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.


(Dale C) #21

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.


(Michael Harman) #22

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?


(Dale C) #23

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


(Michael Harman) #24

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!


(Dale C) #25

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


(Ranga Pedamallu) #26

@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).


(Dale C) #27

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.