-
Notifications
You must be signed in to change notification settings - Fork 502
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fan Module (Hampton Bay) #932
Comments
I'd like to second this too please. Fan control is the one main area that I've not touched automation wise. G |
I have a couple of these that I’d love to integrate. |
So this is only the remote? Is there also some data available about the controller? Can you please also provide the basic cluster attributes? They should be visible when joining the device while sensor search is running. https://github.com/dresden-elektronik/deconz-rest-plugin/wiki/Request-Device-Support |
The fan/light controller which is wired to the ceiling fan has both an RF antenna and a zigbee controller. The remote it comes with is RF, but the controller can additionally be paired to a zigbee hub. |
I stumbled across these looking for a solution for my ceiling fans. They are everything you'd want. Unfortunately, only for the North-American market (110V, different mechanism to attach the fan to the ceiling, where the controller fits neatly under the canopy). |
Any other info needed? Been sitting on these units for a while after switching off smartthings. Would love to help in anyway. |
Receiver on when idle is true, cool. Looks like it would be exposed as a |
This driver helped me figure some info out: It looks like x0202 is the fan control. There is no cluster info on x0202 in deCONZ on my device, so i can't provide any screenshots on what that looks like. Not sure how to get that info. And x0008 is the light dimmer control. the id 0x0000 is the light dimmer level with values between 0 - 255 |
added this to general.xml for testing and it seems to be working for all fan control except breeze. It will read the value, but won't write it.
|
Ah, so the REST API should expose two resources, one for controlling the light, and one for controlling the fan. Where did you get the command from? I didn’t see any commands in the Fan Control cluster. I think there also a value 5 for Auto. Value 6 means on while occupancy is detected, which would need an Occupancy Sensing cluster. Can you control the fan using the command from the deCONZ GUI? |
That’s how it’s supposed to work, according to the ZCL spec. |
I updated general.xml with the ZCL spec for Fan Control. As the Fan Control cluster is on the same ZigBee endpoint as the On/Off and Level Control cluster, we cannot create an additional With the above commit, you should see a single Obviously, I cannot test this without the Fan Module. Could you please compile and test this PR? Re-pair the Fan Module, or search for new devices from Phoscon and read the Basic cluster to trigger the creation of the REST resource. Please list the REST resource, so I can check that it's working as intended. |
I was able to add the device to the REST interface and it shows up as a light device. Here are some screenshots of it in phoscon. I am not able to see the fan speed in the interface.
|
I have two of these installed and ready at home. I can provide testing and debugging to get fan control working, too. |
Phoscon won’t show the fan speed in the interface, but it should be included in the REST resource. Can you please GET @anacozero where did you get the object info from? The REST API reports the object with the keys sorted; I’m afraid this comes from another system that might filter out |
Here's the JSON direct from the API:
|
Damn, no |
Looks like I didn't include it in the response of GETting the light state. Can you please check if it appears in websocket notifications, when you change the speed (from the remote or through the deCONZ GUI)? |
So interesting behavior. Only turning on and off the light sent notifications on the websocket. Changing the fan on the controller didn't.
Tried changing the fan speed in the GUI through the attributes editor, and still no notifications. But if I changed the speed on the remote (or GUI), THEN force read the value through the GUI, I'd get the notification. So it only showed when I pressed READ in the GUI. I can change the fan speed all I want, but it doesn't update in the websocket notifications until I click READ.
EDIT: I just checked the REST resource and state.speed isn't listed. |
Hi, I pulled the code from your branch, rebuilt the plugin, restarted deconz, and added my fan.
I do see the brightness immediately change in notification/websocket:
I went through these steps and when I write the new value (Off -> On, for example), I see the fan start spinning however I do not see any notification via websocket that the value has changed unless I repeat the steps @anacozero went through to manually read the attribute in the deCONZ GUI. Only then do I see the notification fired with the value of the new fan state. |
Does it show
Hm, the the Smartthings Device handler sets up attribute reporting for 0x202/0x0000: Its data type is |
I followed your steps for setting up attributes reporting and can now immediately see notifications on the websocket for state.speed when the fan speed is changed. The brightness change of the light is also shown in the websocket immediately. I will have to wait till the next version is released. I recently moved deCONZ and Conbee off of my raspberry pi to a Windows VM. I'll try to spin up an Ubuntu VM of deCONZ this week and compile it and test it on there. |
Cool. I’ll see if I can make the REST API plugin setup the reporting. And then of course, change the fan speed thru the API. |
My mistake, I forget to add the reporting change information as you had in your screenshot. Once I added the reporting information and wrote the changes I do see notifications in the websocket api. |
Include `state.speed` in light state map, see #932.
I've started deCONZ with the 2 debugging options. I'm probably looking in the wrong place, but all I see are entries in syslog for.. phoscon deCONZ[883]: 12:59:36:961 Poll light node Office Fan Lights That's the only thing I can see that mentions the fan. I've tired a couple of times setting from PostMan, and nothing else is showing up. Am I looking in the right place, or is there some other log file that I need to check somewhere? G |
No, there's only one log. Could you try
|
OK... Just to make sure it's running correctly.. /usr/bin/deCONZ --http-port=80 --dbg-info=2 --dbg-aps=2 --dbg-error=1 Trying to set the speed to 2.... [ Here's what I'm getting in syslog... the 2nd one has a bit more context around it... ay 28 14:55:46 phoscon deCONZ[881]: 14:55:45:852 Poll APS request to 0x000D6FFFFE2DDB6B cluster: 0x0006 dropped, values are fresh enough May 28 14:57:09 phoscon deCONZ[881]: 14:57:04:912 Poll light node TRADFRI Outlet Dining Room |
Trying to set the speed to 2.... [ That's not good: it reports having set the speed to 0? Did you specify a body of
Datatype 0x30 is Could you please humour me, turn the fan on using the remote (or the GUI) and see of the API call turns if off?
This is what I wanted to see.
Not good. Looks like I'm sending a half-initialised task. I'll remove that. Would you be able to compile the REST API plugin for testing? |
No, it does not. I've tried it from all different speeds, changing to different speeds, including off, and nothing happens.
That's probably beyond what I'd be able to do - I've not tried to build deCONZ from scratch before, and there's probably too much I could mess up in the interim with setting up a toolchain - unless it's a straight pull from git and compile on the Pi? Now, if you want to send me an updated binary, I'd be happy to drop that in place on my Pi for testing if you'd like. G |
Pretty much so, see README.
What Pi are you on? What OS? |
So a Pi 2 Model B
Originally installed from the SD card image, and have been doing apt-get updates ever since. G |
Is that Raspbian stretch? |
Yes it is.
|
Unzip with If you want to save the current version, move it out of the |
ok.. So, we're running again...
And you have a winner... :) I've managed to change the fan speed between all 4 values (0 - 4), as well as to 6, which is the comfort-breeze according to the manual. I've also changed it to 5, but I have NO idea what that does - the fan doesn't seem to make any noticable changes. Thank you very much for working on it. I am presuming that we won't see a separate device entry for the fan (it'll be a light) until API v2? G |
I've been struggling how best to deal with the fan function. It's on the same Zigbee endpoint as the light function, which supports groups. I don't know if the fan state is also saved and restored to Zigbee scenes, but might very well be. That means we want to expose the fan function as a
Speed 5 is "Auto" according to the ZCL spec (see also the dropdown values in the GUI). I don't think the Hampton Bay supports it. |
Should the API return an invalid value when it's set to 5 then?
I noticed that on another thread, and commented there.. G |
Could be, but would need another whitelist (assuming we will eventually support other fans that do support this). More interesting: do we want to continue to use these number values, or should the API expose string values?
The wired dimmer to control the lights is integral part of the module. Whether you wired one or more lights to it is a different question. In theory, the module could measure current and check whether a light is connected, but I doubt it does. It's not exposed over Zigbee, as far as I can tell.
So it's gonna be interesting how to expose the module to HomeKit in Homebridge Hue. The logical mapping would be a single accessory with a Lightbulb and a Fan v2 service, which should show as two tiles in Home. Since it's the same |
I'm a computer guy, so I like numbers :) But it should probably be consistent with what the majority of other devices in the API return/use for settings.
I agree, and as you say, I doubt the current draw etc is even measured. What I was just pointing out, is that this is a fan unit, with optional lights, rather than a lighting unit, with a fan. If you're going to start a new "class" of device, then I'd suggest making it a fan. If you're going to overload the lights, then what you're saying makes sense - and I suspect you're going to have to overload the lights class, at least in v1 of the API.
In HomeSeer speak, what would make logical sense to me (and I don't have to maintain the code), would be to have a root device which would be the whole unit, with 2 child devices, one for the fan, and one for the lights. I think (but I'm not 100% sure), that you could put some configuration in the root device to enable/disable the light unit. I'm not sure how Wim is going to expose it in Homeseer - we'll see when he does a beta release :) G |
@gmitch64 for Homebridge Hue I need to map the |
- Add support for Hampton Bay fan modules, see dresden-elektronik/deconz-rest-plugin#932; - Use `state.lift` and `state.tilt`for window covering devices; - Don't sound siren on warning devices on _Identify_.
That's going to be a tricky one, since it's a variable speed. According to the install guide, "comfort mode" (speed 6)
I wouldn't quite have worded it that way, but it does somewhat randomly alternate the fan speeds. I haven't used that long enough to pay attention to whether it's a straight up and down, or a random speed change. G |
Thanks, I'll ignore it for now, until finding a proper way to support it. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
I'm good with the way it's been added at the moment - seems to work well. I'm not the original issue opener, but I am good with this being closed. |
How would I go about adding this fan to home assistant? |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Reading through the comments, it appears that this device at least mostly works. Is there something special I need to do to use it? |
I would like to use this module with the gateway.
https://www.homedepot.com/p/Hampton-Bay-Universal-Wink-Enabled-White-Ceiling-Fan-Premier-Remote-Control-99432/206591100
This is a universal zigbee fan controller with fan and light controls.
I have included a bunch of screeen shotes of the nodes as well as the device handler from smartthings. Not sure if this will help in any way. Please let me know what other info you will need.
Smartthings Device handler.
https://github.com/dcoffing/KOF-CeilingFan/blob/master/devicetypes/dcoffing/kof-zigbee-fan-controller.src/kof-zigbee-fan-controller.groovy
The text was updated successfully, but these errors were encountered: