Zigbee2mqtt: Support for Hampton Bay Wink Fan Control

Created on 13 Jun 2018  Â·  51Comments  Â·  Source: Koenkk/zigbee2mqtt

I'm trying to add support for this fan control. I am able to pair it to zigbee2mqtt. I have added it to devices.js, but I don't see any WARN messages with attributes. I've also been able to temporarily bind it to the coordinator using the code from Issue 102 (not entirely sure what that does to be honest, but I did it). I don't see any additional messages once I do that though.

It looks like someone has written some custom device handlers to get it working directly with Smartthings. I don't know if that will help at all.

Is there anything else I can try to get this working?

Added by Koenkk, TODO:

  • [x] Complete and check fan modes
  • [ ] Brightness level
  • [ ] On/off
new device support stale

All 51 comments

I’ll be watching this one with interest as I’d like to swap out the RF modules in our fans and until the Sonoff IFan02 came out this was really the only option. The Sonoff IFan02 is very cheap (about one fifth the price) but no tasmota support yet.

Hey ryan - let me know if you order any. I want to give these a crack, as
they look ideal for my fans as well!

On Wed, Jun 13, 2018, 8:43 AM Ryan Beaton notifications@github.com wrote:

I’ll be watching this one with interest as I’d like to swap out the RF
modules in our fans and until the Sonoff IFan02 came out this was really
the only option. The Sonoff IFan02 is very cheap (about one fifth the
price) but no tasmota support yet.

—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/Koenkk/zigbee2mqtt/issues/115#issuecomment-396778070,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AGU9IOPm_juh7EeApLSI4OFnUi2Jsc4Zks5t8GBGgaJpZM4UlWYF
.

Whats the output when running with DEBUG=* npm start?

Sorry for the delay. Below are the logs when fan control is bound to the coordinator and also one where it's not. In both cases the end of the log is the last output I get. I push buttons on the remote to turn the lights on and off, but nothing shows up in the log. Let me know what else I can do to help.

Fan-control-as-coordinator.txt
Fan-control-not-coordinator.txt

Could you provide the entry in data/database.db of this device?

Here is the entry for this device:

{"id":2,"type":"EndDevice","ieeeAddr":"0x0022a3000016c8b2","nwkAddr":15197,"manufId":4098,"manufName":"King Of Fans, Inc.","powerSource":"Unknown","modelId":"HBUniversalCFRemote","epList":[1],"status":"online","joinTime":1529615674,"endpoints":{"1":{"profId":260,"epId":1,"devId":14,"inClusterList":[0,3,4,5,6,8,514],"outClusterList":[3,25],"clusters":{"genBasic":{"dir":{"value":1},"attrs":{"zclVersion":1,"manufacturerName":"King Of Fans, Inc.","modelId":"HBUniversalCFRemote","powerSource":0}},"genIdentify":{"dir":{"value":3},"attrs":{"identifyTime":0}},"genGroups":{"dir":{"value":1},"attrs":{"nameSupport":0}},"genScenes":{"dir":{"value":1},"attrs":{"count":0,"currentScene":0,"currentGroup":0,"sceneValid":0,"nameSupport":0}},"genOnOff":{"dir":{"value":1},"attrs":{"onOff":1}},"genLevelCtrl":{"dir":{"value":1},"attrs":{"currentLevel":254,"onLevel":255}},"genOta":{"dir":{"value":2},"attrs":{}},"hvacFanCtrl":{"dir":{"value":1},"attrs":{"fanMode":0,"fanModeSequence":5}}}}},"_id":"Plt947WSsfo7ZJzW"}

Thanks, lets start with getting on/off to work.

In the zigbee2mqtt folder:

cd node_modules
rm -rf zigbee-shepherd-converters
git clone https://github.com/Koenkk/zigbee-shepherd-converters.git -b HBUniversalCFRemote

Now start zigbee2mqtt, you should now be able to turn the device on/off via zigbee2mqtt and get an event when you turn it off from the device itself.

To turn on/off from zigbee2mqtt: https://github.com/Koenkk/zigbee2mqtt/wiki/MQTT-topics-and-message-structure#zigbee2mqttdevice_idset

After I run those commands I cannot start zigbee2mqtt. I get the following output:

[email protected] start /opt/zigbee2mqtt
node index.js

module.js:549
throw err;
^

Error: Cannot find module 'debounce'
at Function.Module._resolveFilename (module.js:547:15)
at Function.Module._load (module.js:474:25)
at Module.require (module.js:596:17)
at require (internal/module.js:11:18)
at Object. (/opt/zigbee2mqtt/node_modules/zigbee-shepherd-converters/converters/fromZigbee.js:3:18)
at Module._compile (module.js:652:30)
at Object.Module._extensions..js (module.js:663:10)
at Module.load (module.js:565:32)
at tryModuleLoad (module.js:505:12)
at Function.Module._load (module.js:497:3)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] start: node index.js
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR! /home/zippyadmin/.npm/_logs/2018-06-23T13_08_26_694Z-debug.log

The log is attached here too.
2018-06-23T13_08_26_694Z-debug.log

Sorry, should be

cd node_modules
rm -rf zigbee-shepherd-converters
git clone https://github.com/Koenkk/zigbee-shepherd-converters.git -b HBUniversalCFRemote
cd zigbee-shepherd-converters
npm install

That worked! I can turn the light on and off now. When I turn it on or off I get this message:

2018-6-23 09:36:38 INFO Zigbee publish to '0x0022a3000016c8b2', genOnOff - on - {} - null
2018-6-23 09:36:38 WARN No converter available for '99432' with cid 'genOnOff' and type 'attReport'
2018-6-23 09:36:38 WARN Please see: https://github.com/Koenkk/zigbee2mqtt/wiki/How-to-support-new-devices.
2018-6-23 09:36:38 WARN No converter available for '99432' with cid 'genOnOff' and type 'devChange'
2018-6-23 09:36:38 WARN Please see: https://github.com/Koenkk/zigbee2mqtt/wiki/How-to-support-new-devices.

This is great progress. I have one of these modules in a fan that does not have a light. I have not been able to get it to pair with anything though. How did you get it paired with zigbee2mqtt?

@tube0013 You put the device in pairing mode by turning the power to it on for three seconds and then off for three seconds three times. Those directions are in the installation manual, but it doesn't make it clear that you have to use the power feed to the device and not the remote control to turn it on and off. I have mine cobbled together temporarily with a couple light bulbs and an extension cord, so it's easy to plug and unplug it to get it into pairing mode. I am not going to install it in a fan until I get it all working.

If you don't have a switch in line the "easiest" way would probably be flipping the breaker on and off. Unfortunately for you the way it signals that it's in pairing mode is by flashing the lights three times. Also, it seems like it has to be fairly close to the receiver in order to get it paired the first time. YMMV.

If you do get it paired you can use the commands from this comment to allow you to turn the light on and off with MQTT. I know you said you don't have a light, but that's all we've got working so far.

Dimming should also work now.

But lets first focus on fan mode first. Go to zigbee2mqtt directory:

cd node_modules
rm -rf zigbee-shepherd-converters zcl-id zcl-packet
git clone https://github.com/Koenkk/zigbee-shepherd-converters.git -b HBUniversalCFRemote
git clone https://github.com/Koenkk/zcl-id.git -b HBUniversalCFRemote
git clone https://github.com/Koenkk/zcl-packet.git -b HBUniversalCFRemote

cd zigbee-shepherd-converters
npm install

cd ../zcl-id
npm install

cd ../zcl-packet
npm install

Now try to control the fan using.

{
  "fan_mode": 2
}

Possible fan_modes are probably 0, 1, 2, 3, 4, 5, 6, 7.

No luck with that yet. I have a fan hooked up now. Here's the debug from when I run fan_mode command.
fan-debug.txt

Ok, lets first get it working, for sake of simplicity I now hardcoded to set the fanmode to 2 on on zigbee2mqtt startup.

rm -rf node_modules
npm install
cd node_modules
rm -rf zigbee-shepherd-converters
git clone https://github.com/Koenkk/zigbee-shepherd-converters.git -b HBUniversalCFRemote
cd zigbee-shepherd-converters
npm install

Does it turn on the fan on on zigbee2mtt startup?

Yes, the fan turns on when zigbee2mqtt starts now.

Ok, could you checkout the zigbee2mqtt HBUniversalCFRemote branch.

And then:

cd node_modules
rm -rf zigbee-shepherd-converters
git clone https://github.com/Koenkk/zigbee-shepherd-converters.git -b HBUniversalCFRemote
cd zigbee-shepherd-converters
npm install

You should now be able to control the fan via:

{
  "fan_mode": "medium"
}

Possible fan_mode are: off, low, medium, medium-high, high, comfort-breeze, light.

Sorry I'm still very new to git and Linux. What commands do I need to run to checkout a specific branch? I don't want to do it incorrectly and give you bad info based on the results.

In the zigbee2mqtt directory

git fetch
git checkout -b HBUniversalCFRemote origin/HBUniversalCFRemote

Ok, did the fetch, checkout, and then cloned the HBUniversalCFRemote shepherd converters again. Zigbee2mqtt runs and I can turn the light on and off still. When I try to set the fan_mode zigbee2mqtt crashes with the following output:

/opt/zigbee2mqtt/node_modules/proving/index.js:11
throw new TypeError(msg || 'Input value should be a number and cannot be a NaN.');
^

TypeError: epId should be a number.
at Object.proving.number (/opt/zigbee2mqtt/node_modules/proving/index.js:11:15)
at ZShepherd.find (/opt/zigbee2mqtt/node_modules/zigbee-shepherd/lib/shepherd.js:361:13)
at Zigbee._findDevice (/opt/zigbee2mqtt/lib/zigbee.js:226:32)
at Zigbee.write (/opt/zigbee2mqtt/lib/zigbee.js:182:29)
at Object.keys.forEach (/opt/zigbee2mqtt/lib/controller.js:473:29)
at Array.forEach ()
at Controller.handleMQTTMessageDevice (/opt/zigbee2mqtt/lib/controller.js:445:27)
at Controller.handleMQTTMessage (/opt/zigbee2mqtt/lib/controller.js:327:18)
at MQTT.handleMessage (/opt/zigbee2mqtt/lib/mqtt.js:61:18)
at emitThree (events.js:136:13)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] start: node index.js
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR! /home/zippyadmin/.npm/_logs/2018-06-24T15_02_19_261Z-debug.log

Made a mistake, fixed now, can you update by doing a git pull?

Ok, each of the fan modes work now, but any time I run one it crashes zigbee2mqtt. Here is the output from an "off" command.

2018-6-24 11:20:27 INFO Zigbee publish to '0x0022a3000016c8b2', hvacFanCtrl - fanMode - 0 - null - write
/opt/zigbee2mqtt/lib/controller.js:488
if (p.message.zclData.hasOwnProperty('transtime')) {
^

TypeError: Cannot read property 'hasOwnProperty' of undefined
at published.forEach (/opt/zigbee2mqtt/lib/controller.js:488:35)
at Array.forEach ()
at Controller.handleMQTTMessageDevice (/opt/zigbee2mqtt/lib/controller.js:483:19)
at Controller.handleMQTTMessage (/opt/zigbee2mqtt/lib/controller.js:327:18)
at MQTT.handleMessage (/opt/zigbee2mqtt/lib/mqtt.js:61:18)
at emitThree (events.js:136:13)
at MqttClient.emit (events.js:217:7)
at MqttClient._handlePublish (/opt/zigbee2mqtt/node_modules/mqtt/lib/client.js:956:12)
at MqttClient._handlePacket (/opt/zigbee2mqtt/node_modules/mqtt/lib/client.js:315:12)
at work (/opt/zigbee2mqtt/node_modules/mqtt/lib/client.js:271:12)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] start: node index.js
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR! /home/zippyadmin/.npm/_logs/2018-06-24T16_20_27_367Z-debug.log

Can you do a git pull again? Should be fixed now.

Yep, that's got it. Looks like the fan is all good.

I can't set the brightness still. I tried this:

{
"state": "on",
"brightness": "120"
}

The light turns on. But only at the previous light level. Here's the output:

2018-6-24 11:41:44 INFO Zigbee publish to '0x0022a3000016c8b2', genOnOff - on - {} - null - functional
2018-6-24 11:41:44 INFO Zigbee publish to '0x0022a3000016c8b2', genLevelCtrl - moveToLevel - {"level":"120","transtime":0} - null - functional
2018-6-24 11:41:44 INFO MQTT publish, topic: 'zigbee2mqtt/0x0022a3000016c8b2', payload: '{"state":"ON","brightness":200}'
2018-6-24 11:41:44 WARN No converter available for '99432' with cid 'genOnOff' and type 'devChange'
2018-6-24 11:41:44 WARN Please see: https://github.com/Koenkk/zigbee2mqtt/wiki/How-to-support-new-devices.

Ok, lets first complete the fan_mode.

  • After setting fan_mode, are there any No converter available message? (as the fan_mode should be reported back.
  • What is the mode when sending: {"fan_mode": "5"} (as I couldn't map this one).
  • Are all the fan modes correct? e.g. when setting to comfort-breeze is this this comfort breeze mode?
  • There are No converter available messages any time I run a valid fan command.

  • Running {"fan_mode": "5"} turns the fan off and generates a No converter available message if the fan is on. With the remote that came with the fan you can turn the fan off by cycling through the speeds with one button or using the power button. It may have something to do with that, but it doesn't seem to quite do the same thing as the power button. That button turns the lights off as well. The manual is here if you want to look for clues. It explains how the remote works as well as a little about the integration with Wink.

  • All the fan modes work correctly as far as I can tell. comfort-breeze does seem to be the comfort breeze mode. light seems to act like `comfort-breeze'. Maybe a lower speed version? It's hard to tell. The installation guide doesn't say anything about a low speed comfort breeze though.

Can you try updating again?

  • Is it reported now?
  • Ok, i've removed this one.
  • Ok, possible options: off, low, medium, medium-high, high, breeze.

This is what I get when I run through each of the fan modes by sending MQTT messages. They all work like they are supposed to on the fan.

2018-7-11 17:46:09 INFO Zigbee publish to '0x0022a3000016c8b2', hvacFanCtrl - fanMode - 1 - null - write
2018-7-11 17:46:10 WARN No converter available for '99432' with cid 'hvacFanCtrl' and type 'devChange'
2018-7-11 17:46:10 WARN Please see: https://github.com/Koenkk/zigbee2mqtt/wiki/How-to-support-new-devices.
2018-7-11 17:46:39 INFO Zigbee publish to '0x0022a3000016c8b2', hvacFanCtrl - fanMode - 2 - null - write
2018-7-11 17:46:39 WARN No converter available for '99432' with cid 'hvacFanCtrl' and type 'devChange'
2018-7-11 17:46:39 WARN Please see: https://github.com/Koenkk/zigbee2mqtt/wiki/How-to-support-new-devices.
2018-7-11 17:46:51 INFO Zigbee publish to '0x0022a3000016c8b2', hvacFanCtrl - fanMode - 3 - null - write
2018-7-11 17:46:51 WARN No converter available for '99432' with cid 'hvacFanCtrl' and type 'devChange'
2018-7-11 17:46:51 WARN Please see: https://github.com/Koenkk/zigbee2mqtt/wiki/How-to-support-new-devices.
2018-7-11 17:47:06 INFO Zigbee publish to '0x0022a3000016c8b2', hvacFanCtrl - fanMode - 4 - null - write
2018-7-11 17:47:06 WARN No converter available for '99432' with cid 'hvacFanCtrl' and type 'devChange'
2018-7-11 17:47:06 WARN Please see: https://github.com/Koenkk/zigbee2mqtt/wiki/How-to-support-new-devices.
2018-7-11 17:47:23 INFO Zigbee publish to '0x0022a3000016c8b2', hvacFanCtrl - fanMode - 6 - null - write
2018-7-11 17:47:23 WARN No converter available for '99432' with cid 'hvacFanCtrl' and type 'devChange'
2018-7-11 17:47:23 WARN Please see: https://github.com/Koenkk/zigbee2mqtt/wiki/How-to-support-new-devices.
2018-7-11 17:48:01 INFO Zigbee publish to '0x0022a3000016c8b2', hvacFanCtrl - fanMode - 0 - null - write
2018-7-11 17:48:01 WARN No converter available for '99432' with cid 'hvacFanCtrl' and type 'devChange'
2018-7-11 17:48:01 WARN Please see: https://github.com/Koenkk/zigbee2mqtt/wiki/How-to-support-new-devices.

If I remember correctly, I was getting the No converter available messages when I triggered the fan/light with the remote control. I'm not seeing those messages anymore though.

Good, last thing to complete the fanmode; the fan should report back it's new state when you set it (both via remote and zigbee2mqtt). Can you update and check if you see any No converter available messages when changing the fanmode?

Yes, I see No converter available messages for off, low, medium, medium-high, high, and breeze when I trigger via MQTT or the remote. It shows three each time it's triggered via MQTT like this:

2018-7-12 12:56:42 INFO Zigbee publish to '0x0022a3000016c8b2', hvacFanCtrl - fanMode - 0 - null - write
2018-7-12 12:56:43 WARN No converter available for '99432' with cid 'hvacFanCtrl' and type 'attReport'
2018-7-12 12:56:43 WARN Please see: https://github.com/Koenkk/zigbee2mqtt/wiki/How-to-support-new-devices.
2018-7-12 12:56:43 WARN No converter available for '99432' with cid 'hvacFanCtrl' and type 'devChange'
2018-7-12 12:56:43 WARN Please see: https://github.com/Koenkk/zigbee2mqtt/wiki/How-to-support-new-devices.
2018-7-12 12:56:43 WARN No converter available for '99432' with cid 'hvacFanCtrl' and type 'devChange'
2018-7-12 12:56:43 WARN Please see: https://github.com/Koenkk/zigbee2mqtt/wiki/How-to-support-new-devices.

There are two messages each time I trigger it with the remote, like this:

2018-7-12 13:01:38 WARN No converter available for '99432' with cid 'hvacFanCtrl' and type 'attReport'
2018-7-12 13:01:38 WARN Please see: https://github.com/Koenkk/zigbee2mqtt/wiki/How-to-support-new-devices.
2018-7-12 13:01:38 WARN No converter available for '99432' with cid 'hvacFanCtrl' and type 'devChange'
2018-7-12 13:01:38 WARN Please see: https://github.com/Koenkk/zigbee2mqtt/wiki/How-to-support-new-devices.

There is also a button on the remote that sets a 2, 4, or 8 hour timer to turn the fan off. I don't see any messages when that's triggered via the remote.

Can you update again and provide the output?

Looks good. Here's what I get when I cycle through modes with the remote and then MQTT messages.

DATA { cid: 'hvacFanCtrl', data: { fanMode: 4 } }
DATA { cid: 'hvacFanCtrl', data: { fanMode: 3 } }
DATA { cid: 'hvacFanCtrl', data: { fanMode: 2 } }
DATA { cid: 'hvacFanCtrl', data: { fanMode: 1 } }
DATA { cid: 'hvacFanCtrl', data: { fanMode: 0 } }
DATA { cid: 'hvacFanCtrl', data: { fanMode: 6 } }
DATA { cid: 'hvacFanCtrl', data: { fanMode: 0 } }
2018-7-14 15:12:33 INFO Zigbee publish to '0x0022a3000016c8b2', hvacFanCtrl - fanMode - 1 - null - write
DATA { cid: 'hvacFanCtrl', data: { fanMode: 1 } }
2018-7-14 15:12:44 INFO Zigbee publish to '0x0022a3000016c8b2', hvacFanCtrl - fanMode - 2 - null - write
DATA { cid: 'hvacFanCtrl', data: { fanMode: 2 } }
2018-7-14 15:12:52 INFO Zigbee publish to '0x0022a3000016c8b2', hvacFanCtrl - fanMode - 3 - null - write
DATA { cid: 'hvacFanCtrl', data: { fanMode: 3 } }
2018-7-14 15:12:57 INFO Zigbee publish to '0x0022a3000016c8b2', hvacFanCtrl - fanMode - 4 - null - write
DATA { cid: 'hvacFanCtrl', data: { fanMode: 4 } }
2018-7-14 15:13:03 INFO Zigbee publish to '0x0022a3000016c8b2', hvacFanCtrl - fanMode - 6 - null - write
DATA { cid: 'hvacFanCtrl', data: { fanMode: 6 } }
2018-7-14 15:13:11 INFO Zigbee publish to '0x0022a3000016c8b2', hvacFanCtrl - fanMode - 0 - null - write

Can you update zigbee2mqtt and zigbee-shepherd-convters? (both HBUniversalCFRemote branch).

  • Is the fan_mode now reported back?
  • When turning the fan on/off via remote, is this reported back?
  • Does brightness adjustment work?
  • The fan mode is now reporting back when triggered by MQTT

2018-7-15 08:24:56 INFO Zigbee publish to '0x0022a3000016c8b2', hvacFanCtrl - fanMode - 4 - null - write
2018-7-15 08:24:56 INFO MQTT publish, topic: 'zigbee2mqtt/0x0022a3000016c8b2', payload: '{"fan_mode":"high"}'
2018-7-15 08:25:07 INFO Zigbee publish to '0x0022a3000016c8b2', hvacFanCtrl - fanMode - 3 - null - write
2018-7-15 08:25:07 INFO MQTT publish, topic: 'zigbee2mqtt/0x0022a3000016c8b2', payload: '{"fan_mode":"medium-high"}'
2018-7-15 08:25:20 INFO Zigbee publish to '0x0022a3000016c8b2', hvacFanCtrl - fanMode - 2 - null - write
2018-7-15 08:25:20 INFO MQTT publish, topic: 'zigbee2mqtt/0x0022a3000016c8b2', payload: '{"fan_mode":"medium"}'
2018-7-15 08:25:27 INFO Zigbee publish to '0x0022a3000016c8b2', hvacFanCtrl - fanMode - 1 - null - write
2018-7-15 08:25:27 INFO MQTT publish, topic: 'zigbee2mqtt/0x0022a3000016c8b2', payload: '{"fan_mode":"low"}'
2018-7-15 08:25:33 INFO Zigbee publish to '0x0022a3000016c8b2', hvacFanCtrl - fanMode - 0 - null - write
2018-7-15 08:25:33 INFO MQTT publish, topic: 'zigbee2mqtt/0x0022a3000016c8b2', payload: '{"fan_mode":"off"}'

  • Fan mode is reported back when triggered by remote

    2018-7-15 08:23:43 INFO MQTT publish, topic: 'zigbee2mqtt/0x0022a3000016c8b2', payload: '{"fan_mode":"high"}'
    2018-7-15 08:23:44 INFO MQTT publish, topic: 'zigbee2mqtt/0x0022a3000016c8b2', payload: '{"fan_mode":"medium-high"}'
    2018-7-15 08:23:46 INFO MQTT publish, topic: 'zigbee2mqtt/0x0022a3000016c8b2', payload: '{"fan_mode":"medium"}'
    2018-7-15 08:23:47 INFO MQTT publish, topic: 'zigbee2mqtt/0x0022a3000016c8b2', payload: '{"fan_mode":"low"}'
    2018-7-15 08:23:48 INFO MQTT publish, topic: 'zigbee2mqtt/0x0022a3000016c8b2', payload: '{"fan_mode":"off"}'

  • Brightness adjustment does not work. When I try to turn the light on to a specific brightness level it just turns it on at the previous brightness level set by the remote.

{
  "state": "on",
  "brightness": "50"
}

2018-7-15 09:53:34 INFO Zigbee publish to '0x0022a3000016c8b2', genOnOff - on - {} - null - functional
2018-7-15 09:53:34 INFO Zigbee publish to '0x0022a3000016c8b2', genLevelCtrl - moveToLevel - {"level":"50","transtime":0} - null - functional

When changing the brightness through the remote and running zigbee2mqtt with DEBUG=* npm start, do you see any messages being logged?

No, there are no messages at all when I control the light with the remote. Even when I start it with debug turned on I don't see anything when I turn the light on and off or adjust the brightness.

Sorry for replying late to you, can you check if it works with the latest https://github.com/Koenkk/zigbee-shepherd-converters/tree/HBUniversalCFRemote

Hmm, maybe I did something wrong here.

Did this to update:

git pull
cd node_modules
rm -rf zigbee-shepherd-converters
git clone https://github.com/Koenkk/zigbee-shepherd-converters.git -b HBUniversalCFRemote
cd zigbee-shepherd-converters
npm install

Now it hangs when I try to start it with the following:

> [email protected] start /opt/zigbee2mqtt
> node index.js

2018-8-6 16:21:20 INFO Starting zigbee2mqtt version 0.0.0 (commit #86a2f86)
2018-8-6 16:21:20 INFO Starting zigbee-shepherd
2018-8-6 16:21:28 WARN Error while starting zigbee-shepherd, attemping to fix... (takes 60 seconds)
2018-8-6 16:22:28 INFO Starting zigbee-shepherd
2018-8-6 16:22:36 ERROR Error while starting zigbee-shepherd!
2018-8-6 16:22:36 ERROR Failed to start
        {"message":"request timeout","stack":"Error: request timeout\n    at CcZnp.<anonymous> (/opt/zigbee2mqtt/node_modules/cc-znp/lib/ccznp.js:254:22)\n    at Object.onceWrapper (events.js:315:30)\n    at emitOne (events.js:116:13)\n    at CcZnp.emit (events.js:211:7)\n    at Timeout.<anonymous> (/opt/zigbee2mqtt/node_modules/cc-znp/lib/ccznp.js:233:18)\n    at ontimeout (timers.js:498:11)\n    at tryOnTimeout (timers.js:323:5)\n    at Timer.listOnTimeout (timers.js:290:5)"}

Apparently I was not. Updated that and I'm back in business.

Here's what I get when I use the remote to turn the lights on, then off, then on, then adjust the brightness, and finally off. You can see the brightness is only reported after it has been set from when the device in the fan first starts.

2018-8-7 16:33:42 INFO MQTT publish, topic: 'zigbee2mqtt/0x0022a3000016c8b2', payload: '{"state":"ON"}'
2018-8-7 16:33:42 WARN No converter available for '99432' with cid 'genOnOff' and type 'devChange'
2018-8-7 16:33:42 WARN Please see: https://github.com/Koenkk/zigbee2mqtt/wiki/How-to-support-new-devices.
2018-8-7 16:33:45 INFO MQTT publish, topic: 'zigbee2mqtt/0x0022a3000016c8b2', payload: '{"state":"OFF"}'
2018-8-7 16:33:45 WARN No converter available for '99432' with cid 'genOnOff' and type 'devChange'
2018-8-7 16:33:45 WARN Please see: https://github.com/Koenkk/zigbee2mqtt/wiki/How-to-support-new-devices.
2018-8-7 16:33:47 INFO MQTT publish, topic: 'zigbee2mqtt/0x0022a3000016c8b2', payload: '{"state":"ON"}'
2018-8-7 16:33:47 WARN No converter available for '99432' with cid 'genOnOff' and type 'devChange'
2018-8-7 16:33:47 WARN Please see: https://github.com/Koenkk/zigbee2mqtt/wiki/How-to-support-new-devices.
2018-8-7 16:33:51 WARN No converter available for '99432' with cid 'genLevelCtrl' and type 'attReport'
2018-8-7 16:33:51 WARN Please see: https://github.com/Koenkk/zigbee2mqtt/wiki/How-to-support-new-devices.
2018-8-7 16:33:51 INFO MQTT publish, topic: 'zigbee2mqtt/0x0022a3000016c8b2', payload: '{"state":"ON","brightness":109}'
2018-8-7 16:34:34 INFO MQTT publish, topic: 'zigbee2mqtt/0x0022a3000016c8b2', payload: '{"state":"OFF","brightness":109}'
2018-8-7 16:34:34 WARN No converter available for '99432' with cid 'genOnOff' and type 'devChange'
2018-8-7 16:34:34 WARN Please see: https://github.com/Koenkk/zigbee2mqtt/wiki/How-to-support-new-devices.

I get this when I turn on the light and attempt set a brightness via MQTT:

2018-8-7 16:47:52 INFO Zigbee publish to '0x0022a3000016c8b2', genOnOff - on - {} - null - functional
2018-8-7 16:47:52 INFO Zigbee publish to '0x0022a3000016c8b2', genLevelCtrl - moveToLevel - {"level":"255","transtime":0} - null - functional
2018-8-7 16:47:53 INFO MQTT publish, topic: 'zigbee2mqtt/0x0022a3000016c8b2', payload: '{"state":"ON"}'
2018-8-7 16:47:53 WARN No converter available for '99432' with cid 'genOnOff' and type 'devChange'
2018-8-7 16:47:53 WARN Please see: https://github.com/Koenkk/zigbee2mqtt/wiki/How-to-support-new-devices.

The light turns on, but it stays at whatever brightness it was before it was turned off.

I've made some updates, can you try again if setting brightness works?

It works now. Although I picked 50 to test with and for some reason that particular number seems to cause it to set a brightness of 51.

2018-8-8 16:30:22 INFO Zigbee publish to '0x0022a3000016c8b2', genLevelCtrl - moveToLevelWithOnOff - {"level":"50","transtime":1} - null - functional
2018-8-8 16:30:22 INFO MQTT publish, topic: 'zigbee2mqtt/0x0022a3000016c8b2', payload: '{"state":"ON"}'
2018-8-8 16:30:22 INFO MQTT publish, topic: 'zigbee2mqtt/0x0022a3000016c8b2', payload: '{"state":"ON","brightness":51}'

Tried a few other brightness levels and they all return the correct level.

2018-8-8 16:31:24 INFO Zigbee publish to '0x0022a3000016c8b2', genLevelCtrl - moveToLevelWithOnOff - {"level":"56","transtime":1} - null - functional
2018-8-8 16:31:24 INFO MQTT publish, topic: 'zigbee2mqtt/0x0022a3000016c8b2', payload: '{"brightness":56}'
2018-8-8 16:31:37 INFO Zigbee publish to '0x0022a3000016c8b2', genLevelCtrl - moveToLevelWithOnOff - {"level":"250","transtime":1} - null - functional
2018-8-8 16:31:38 INFO MQTT publish, topic: 'zigbee2mqtt/0x0022a3000016c8b2', payload: '{"brightness":250}'
2018-8-8 16:31:58 INFO Zigbee publish to '0x0022a3000016c8b2', genLevelCtrl - moveToLevelWithOnOff - {"level":"50","transtime":1} - null - functional
2018-8-8 16:31:58 INFO MQTT publish, topic: 'zigbee2mqtt/0x0022a3000016c8b2', payload: '{"brightness":51}'
2018-8-8 16:32:09 INFO Zigbee publish to '0x0022a3000016c8b2', genLevelCtrl - moveToLevelWithOnOff - {"level":"52","transtime":1} - null - functional
2018-8-8 16:32:09 INFO MQTT publish, topic: 'zigbee2mqtt/0x0022a3000016c8b2', payload: '{"brightness":52}'
2018-8-8 16:32:21 INFO Zigbee publish to '0x0022a3000016c8b2', genLevelCtrl - moveToLevelWithOnOff - {"level":"54","transtime":1} - null - functional
2018-8-8 16:32:21 INFO MQTT publish, topic: 'zigbee2mqtt/0x0022a3000016c8b2', payload: '{"brightness":54}'
2018-8-8 16:32:36 INFO Zigbee publish to '0x0022a3000016c8b2', genLevelCtrl - moveToLevelWithOnOff - {"level":"55","transtime":1} - null - functional
2018-8-8 16:32:36 INFO MQTT publish, topic: 'zigbee2mqtt/0x0022a3000016c8b2', payload: '{"brightness":55}'

What's next? Transition time or something else?

@gitalpaca I've made some final changes, can you check if it still works? The settings brightness 50 -> actual 51 should also be fixed now.

So everything is working now? Than we can merge!

Not working quite yet. Transition does not affect the transition time yet. The 50/51 thing still happens too.

{
  "brightness": "50",
  "transition": "10"
  }
2018-8-9 17:57:03 INFO Zigbee publish to '0x0022a3000016c8b2', genLevelCtrl - moveToLevelWithOnOff - {"level":"50","transtime":100} - null - functional
2018-8-9 17:57:03 ERROR No converter available for 'transition' (10)
2018-8-9 17:57:03 INFO MQTT publish, topic: 'zigbee2mqtt/0x0022a3000016c8b2', payload: '{"brightness":51,"fan_mode":"off"}'

It could be that this device does not support transition, but except that and the 50/51 issue everything is working?

@gitalpaca Is everything working?

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 just got zigbee2mqtt working and I'm really interested in using this Hampton Bay device.
I can help debugging it :) I just have to order it!

Hello,
This should work fine(maybe with minor modifications) with ceiling fans that already have the Wink module integrated right? They even share the same remote control
The ones like this

Hello, at this point what are the steps that I have to follow to try this?
I tried following all the commands listed here, but some of them dont work anymore

@YamiFrankc please create a new issue with your database.db and a link that works (with this one I get access denied).

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Courty40 picture Courty40  Â·  4Comments

mpuff picture mpuff  Â·  4Comments

andreasbrett picture andreasbrett  Â·  3Comments

jwilling picture jwilling  Â·  4Comments

RefineryX picture RefineryX  Â·  4Comments