Skip to content
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

Support for: Airam Led OP A60 ZB 9W/827 E27 and Airam CTR.U BX -remote #175

Closed
Kryzek opened this issue Dec 26, 2018 · 33 comments
Closed

Support for: Airam Led OP A60 ZB 9W/827 E27 and Airam CTR.U BX -remote #175

Kryzek opened this issue Dec 26, 2018 · 33 comments

Comments

@Kryzek
Copy link
Contributor

Kryzek commented Dec 26, 2018

I got my hands on Airam LED OP A60 ZB 9W/827 E27+CTR.U BX-box which has ZB3.0 led bulb and a remote which talks directly to the bulb (no bridge required). I think I can get the bulb working (maybe with little guidance) with the instructions provided here but how about the remote? I'm under impression that group support is almost there - should I leave messing with the dimmer/remote for the future or could I get something to work with it before that?

These things will be the first ZB devices I even try to use with ZB2M and since they are not yet on supported devices list it seems like an interesting journey :)

Thanks for the good folks here putting this piece of software together!

@Kryzek
Copy link
Contributor Author

Kryzek commented Dec 27, 2018

Here is devices.js entry I made for the bulb. Turns off and on via MQTT now.
devices.txt

I can't get any trace of the remote on log when trying to pair it.

@Koenkk
Copy link
Owner

Koenkk commented Dec 27, 2018

Bulb is supported now, what is the model number of the remote? (e.g. for the bulb it was ZBT-DimmableLight

@Kryzek
Copy link
Contributor Author

Kryzek commented Dec 28, 2018

I was unable to get the remote paired at all. Bulb was easy to pair, just reset it and it appears immediately. Remote seems to pair with the bulb but not with ZB2M. Any tricks I should try with it?

@Koenkk
Copy link
Owner

Koenkk commented Dec 29, 2018

Thats indeed strange, even the tradfri remote can be paired. Do you see any extra logging when pairing and running with DEBUG=* npm start

@Kryzek
Copy link
Contributor Author

Kryzek commented Dec 29, 2018

I think these are the lines you are interested in. This repeated couple of time in the log and I tried pairing twice.

https://pastebin.com/04fp8efV

@Koenkk
Copy link
Owner

Koenkk commented Dec 29, 2018

Is 0x00158d0001cded1c the address of your bulb?

@Kryzek
Copy link
Contributor Author

Kryzek commented Dec 30, 2018

Bulb is 0x00158d0001cded1c

"0x00158d0001cded1c" [label="{0x00158d0001cded1c|Router|Airam LED OP A60 ZB 9W/827 E27 (4713407)|offline}"];

@Kryzek
Copy link
Contributor Author

Kryzek commented Dec 30, 2018

It seems that I can pair the remote with bulb while bulb is paired with Zigbee2MQTT and I can control bulb with remote and Zigbee2MQTT. However bulb state doesn't get updated on ZB2M when controlled by remote.

@Koenkk
Copy link
Owner

Koenkk commented Dec 30, 2018

Perhaps it's only possible to pair the remote directly to the bulb because of some proprietary stuff. However can you update the definition of the bulb in devices.js as follows:

    // Airam
    {
        zigbeeModel: ['ZBT-DimmableLight'],
        model: '4713407',
        vendor: 'Airam',
        description: 'LED OP A60 ZB 9W/827 E27',
        supports: generic.light_onoff_brightness.supports,
        fromZigbee: generic.light_onoff_brightness.fromZigbee,
        toZigbee: generic.light_onoff_brightness.toZigbee,
        configure: (ieeeAddr, shepherd, coordinator, callback) => {
            const device = shepherd.find(ieeeAddr, 1);
            const cfg = {direction: 0, attrId: 0, dataType: 16, minRepIntval: 0, maxRepIntval: 1000, repChange: 0};
            const actions = [
                (cb) => device.bind('genOnOff', coordinator, cb),
                (cb) => device.foundation('genOnOff', 'configReport', [cfg], foundationCfg, cb),
            ];

            execute(device, actions, callback);
        },
    },

Can you check if the on/off state is now reported when changed by the remote?

@Kryzek
Copy link
Contributor Author

Kryzek commented Dec 31, 2018

I did changes while at work and restarted ZB2M. At startup there was

Succesfully configured 0x00158d0001cded1c 0x00158d0001cded1c

I noticed that Zigbee2MQTT had crashed at some point after that. I do not know if someone touched the remote or what was happened at home, but here is what was on console:

/opt/zigbee2mqtt/lib/extension/deviceReceive.js:54
        const converters = mappedDevice.fromZigbee.filter((c) => {
                                                   ^

TypeError: Cannot read property 'filter' of undefined
    at DeviceReceive.onZigbeeMessage (/opt/zigbee2mqtt/lib/extension/deviceReceive.js:54:52)
    at extensions.filter.forEach (/opt/zigbee2mqtt/lib/controller.js:112:31)
    at Array.forEach (<anonymous>)
    at Controller.onZigbeeMessage (/opt/zigbee2mqtt/lib/controller.js:112:14)
    at Zigbee.onMessage (/opt/zigbee2mqtt/lib/zigbee.js:173:18)
    at ZShepherd.emit (events.js:182:13)
    at ZShepherd.<anonymous> (/opt/zigbee2mqtt/node_modules/zigbee-shepherd/lib/shepherd.js:159:14)
    at ZShepherd.emit (events.js:182:13)
    at dispatchIncomingMsg (/opt/zigbee2mqtt/node_modules/zigbee-shepherd/lib/components/af.js:669:45)
    at Controller.zclIncomingMsgHandler (/opt/zigbee2mqtt/node_modules/zigbee-shepherd/lib/components/af.js:733:12)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! zigbee2mqtt@1.0.1 start: `node index.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the zigbee2mqtt@1.0.1 start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

And this is what was to be found on errorlog:

0 info it worked if it ends with ok
1 verbose cli [ '/usr/bin/node', '/usr/bin/npm', 'start' ]
2 info using npm@6.4.1
3 info using node@v10.14.2
4 verbose run-script [ 'prestart', 'start', 'poststart' ]
5 info lifecycle zigbee2mqtt@1.0.1~prestart: zigbee2mqtt@1.0.1
6 info lifecycle zigbee2mqtt@1.0.1~start: zigbee2mqtt@1.0.1
7 verbose lifecycle zigbee2mqtt@1.0.1~start: unsafe-perm in lifecycle true
8 verbose lifecycle zigbee2mqtt@1.0.1~start: PATH: /usr/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/opt/zigbee2mqtt/node_modules/.bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/local/games:/us$
9 verbose lifecycle zigbee2mqtt@1.0.1~start: CWD: /opt/zigbee2mqtt
10 silly lifecycle zigbee2mqtt@1.0.1~start: Args: [ '-c', 'node index.js' ]
11 silly lifecycle zigbee2mqtt@1.0.1~start: Returned: code: 1  signal: null
12 info lifecycle zigbee2mqtt@1.0.1~start: Failed to exec start script
13 verbose stack Error: zigbee2mqtt@1.0.1 start: `node index.js`
13 verbose stack Exit status 1
13 verbose stack     at EventEmitter.<anonymous> (/usr/lib/node_modules/npm/node_modules/npm-lifecycle/index.js:301:16)
13 verbose stack     at EventEmitter.emit (events.js:182:13)
13 verbose stack     at ChildProcess.<anonymous> (/usr/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14)
13 verbose stack     at ChildProcess.emit (events.js:182:13)
13 verbose stack     at maybeClose (internal/child_process.js:962:16)
13 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:251:5)
14 verbose pkgid zigbee2mqtt@1.0.1
15 verbose cwd /opt/zigbee2mqtt
16 verbose Linux 4.14.90-v7+
17 verbose argv "/usr/bin/node" "/usr/bin/npm" "start"
18 verbose node v10.14.2
19 verbose npm  v6.4.1
20 error code ELIFECYCLE
21 error errno 1
22 error zigbee2mqtt@1.0.1 start: `node index.js`
22 error Exit status 1
23 error Failed at the zigbee2mqtt@1.0.1 start script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 1, true ]

@Kryzek
Copy link
Contributor Author

Kryzek commented Dec 31, 2018

Started with DEBUG=* and I got this on crash, if this helps:

serialport:poller received "readable" +11s
  serialport:bindings read +11s
  serialport:unixRead Starting read +11s
  serialport:unixRead Finished read 8 bytes +1ms
  serialport:main binding.read finished +11s
  cc-znp { sof: 254,
  cc-znp   len: 3,
  cc-znp   type: 'AREQ',
  cc-znp   subsys: 'ZDO',
  cc-znp   cmd: 'srcRtgInd',
  cc-znp   payload: { dstaddr: 57849, relaycount: 0, relaylist: <Buffer > },
  cc-znp   fcs: 154,
  cc-znp   csum: 154 } +11s
  serialport:main _read reading +9ms
  serialport:bindings read +10ms
  serialport:unixRead Starting read +10ms
  cc-znp:AREQ <-- ZDO:srcRtgInd, { dstaddr: 57849, relaycount: 0, relaylist: <Buffer > } +4ms
  zigbee-shepherd:msgHdlr IND <-- ZDO:srcRtgInd +1ms
  serialport:unixRead waiting for readable because of code: EAGAIN +2ms
  serialport:poller Polling for "readable" +15ms
  serialport:poller received "readable" +4ms
  serialport:bindings read +8ms
  serialport:unixRead Starting read +6ms
  serialport:unixRead Finished read 32 bytes +1ms
  serialport:main binding.read finished +10ms
  cc-znp { sof: 254,
  cc-znp   len: 27,
  cc-znp   type: 'AREQ',
  cc-znp   subsys: 'AF',
  cc-znp   cmd: 'incomingMsg',
  cc-znp   payload:
  cc-znp    { groupid: 0,
  cc-znp      clusterid: 6,
  cc-znp      srcaddr: 57849,
  cc-znp      srcendpoint: 1,
  cc-znp      dstendpoint: 1,
  cc-znp      wasbroadcast: 0,
  cc-znp      linkquality: 21,
  cc-znp      securityuse: 0,
  cc-znp      timestamp: 5772092,
  cc-znp      transseqnumber: 0,
  cc-znp      len: 7,
  cc-znp      data: <Buffer 08 74 0a 00 00 10 00> },
  cc-znp   fcs: 198,
  cc-znp   csum: 198 } +15ms
  serialport:main _read reading +11ms
  serialport:bindings read +13ms
  serialport:unixRead Starting read +12ms
  cc-znp:AREQ <-- AF:incomingMsg, { groupid: 0, clusterid: 6, srcaddr: 57849, srcendpoint: 1, dstendpoint: 1, wasbroadcast: 0, linkquality: 21, securityuse: 0, timestamp: 5772092, transseqnumber: 0, len: 7, data: <Buffer 08 74 0a 00 00 10 00> } +5ms
  zigbee-shepherd:af dispatchIncomingMsg(): type: incomingMsg, msg: [object Object] +2ms
  zigbee-shepherd:msgHdlr IND <-- AF:incomingMsg, transId: 0 +13ms
  serialport:unixRead waiting for readable because of code: EAGAIN +16ms
  serialport:poller Polling for "readable" +30ms
  zigbee2mqtt:debug 12/31/2018, 8:58:05 AM Received MQTT message on 'zigbee2mqtt/bridge/config/devices' with data '1546239485543'
  zigbee2mqtt:info 12/31/2018, 8:58:05 AM MQTT publish: topic 'zigbee2mqtt/bridge/log', payload '{"type":"devices","message":[{"ieeeAddr":"0x00158d0001cded1c","type":"Router","model":"4713407","friendly_name":"0x00158d0001cded1c"}]}'
  zigbee-shepherd:af dispatchIncomingMsg(): type: zclIncomingMsg, msg: [object Object] +13ms
  zigbee2mqtt:debug 12/31/2018, 8:58:05 AM Received zigbee message of type 'attReport' with data '{"cid":"genOnOff","data":{"onOff":0}}' of device 'ZBT-DimmableLight' (0x00158d0001cded1c)
/opt/zigbee2mqtt/lib/extension/deviceReceive.js:54
        const converters = mappedDevice.fromZigbee.filter((c) => {
                                                   ^

TypeError: Cannot read property 'filter' of undefined
    at DeviceReceive.onZigbeeMessage (/opt/zigbee2mqtt/lib/extension/deviceReceive.js:54:52)
    at extensions.filter.forEach (/opt/zigbee2mqtt/lib/controller.js:112:31)
    at Array.forEach (<anonymous>)
    at Controller.onZigbeeMessage (/opt/zigbee2mqtt/lib/controller.js:112:14)
    at Zigbee.onMessage (/opt/zigbee2mqtt/lib/zigbee.js:173:18)
    at ZShepherd.emit (events.js:182:13)
    at ZShepherd.<anonymous> (/opt/zigbee2mqtt/node_modules/zigbee-shepherd/lib/shepherd.js:159:14)
    at ZShepherd.emit (events.js:182:13)
    at dispatchIncomingMsg (/opt/zigbee2mqtt/node_modules/zigbee-shepherd/lib/components/af.js:669:45)
    at Controller.zclIncomingMsgHandler (/opt/zigbee2mqtt/node_modules/zigbee-shepherd/lib/components/af.js:733:12)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! zigbee2mqtt@1.0.1 start: `node index.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the zigbee2mqtt@1.0.1 start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

@Koenkk
Copy link
Owner

Koenkk commented Jan 1, 2019

Please try with

    // Airam
    {
        zigbeeModel: ['ZBT-DimmableLight'],
        model: '4713407',
        vendor: 'Airam',
        description: 'LED OP A60 ZB 9W/827 E27',
        supports: generic.light_onoff_brightness().supports,
        fromZigbee: generic.light_onoff_brightness().fromZigbee,
        toZigbee: generic.light_onoff_brightness().toZigbee,
        configure: (ieeeAddr, shepherd, coordinator, callback) => {
            const device = shepherd.find(ieeeAddr, 1);
            const cfg = {direction: 0, attrId: 0, dataType: 16, minRepIntval: 0, maxRepIntval: 1000, repChange: 0};
            const actions = [
                (cb) => device.bind('genOnOff', coordinator, cb),
                (cb) => device.foundation('genOnOff', 'configReport', [cfg], foundationCfg, cb),
            ];

            execute(device, actions, callback);
        },
    },

@Kryzek
Copy link
Contributor Author

Kryzek commented Jan 1, 2019

Doesn't crash anymore with that:
Turn off:

  serialport:poller received "readable" +25s
  serialport:bindings read +25s
  serialport:unixRead Starting read +25s
  serialport:unixRead Finished read 8 bytes +1ms
  serialport:main binding.read finished +25s
  cc-znp { sof: 254,
  cc-znp   len: 3,
  cc-znp   type: 'AREQ',
  cc-znp   subsys: 'ZDO',
  cc-znp   cmd: 'srcRtgInd',
  cc-znp   payload: { dstaddr: 57849, relaycount: 0, relaylist: <Buffer > },
  cc-znp   fcs: 154,
  cc-znp   csum: 154 } +25s
  serialport:main _read reading +9ms
  serialport:bindings read +11ms
  serialport:unixRead Starting read +10ms
  cc-znp:AREQ <-- ZDO:srcRtgInd, { dstaddr: 57849, relaycount: 0, relaylist: <Buffer > } +4ms
  zigbee-shepherd:msgHdlr IND <-- ZDO:srcRtgInd +1ms
  serialport:unixRead waiting for readable because of code: EAGAIN +2ms
  serialport:poller Polling for "readable" +14ms
  serialport:poller received "readable" +12ms
  serialport:bindings read +15ms
  serialport:unixRead Starting read +13ms
  serialport:unixRead Finished read 32 bytes +1ms
  serialport:main binding.read finished +17ms
  cc-znp { sof: 254,
  cc-znp   len: 27,
  cc-znp   type: 'AREQ',
  cc-znp   subsys: 'AF',
  cc-znp   cmd: 'incomingMsg',
  cc-znp   payload:
  cc-znp    { groupid: 0,
  cc-znp      clusterid: 6,
  cc-znp      srcaddr: 57849,
  cc-znp      srcendpoint: 1,
  cc-znp      dstendpoint: 1,
  cc-znp      wasbroadcast: 0,
  cc-znp      linkquality: 2,
  cc-znp      securityuse: 0,
  cc-znp      timestamp: 8678694,
  cc-znp      transseqnumber: 0,
  cc-znp      len: 7,
  cc-znp      data: <Buffer 08 b3 0a 00 00 10 00> },
  cc-znp   fcs: 174,
  cc-znp   csum: 174 } +22ms
  serialport:main _read reading +11ms
  serialport:bindings read +12ms
  serialport:unixRead Starting read +12ms
  cc-znp:AREQ <-- AF:incomingMsg, { groupid: 0, clusterid: 6, srcaddr: 57849, srcendpoint: 1, dstendpoint: 1, wasbroadcast: 0, linkquality: 2, securityuse: 0, timestamp: 8678694, transseqnumber: 0, len: 7, data: <Buffer 08 b3 0a 00 00 10 00> } +4ms
  zigbee-shepherd:af dispatchIncomingMsg(): type: incomingMsg, msg: [object Object] +1ms
  zigbee-shepherd:msgHdlr IND <-- AF:incomingMsg, transId: 0 +7ms
  serialport:unixRead waiting for readable because of code: EAGAIN +9ms
  serialport:poller Polling for "readable" +23ms
  zigbee-shepherd:af dispatchIncomingMsg(): type: zclIncomingMsg, msg: [object Object] +2ms
  zigbee2mqtt:debug 1/1/2019, 5:19:24 PM Received zigbee message of type 'attReport' with data '{"cid":"genOnOff","data":{"onOff":0}}' of device 'ZBT-DimmableLight' (0x00158d0001cded1c)
  zigbee2mqtt:warn 1/1/2019, 5:19:24 PM No converter available for '4713407' with cid 'genOnOff', type 'attReport' and data '{"cid":"genOnOff","data":{"onOff":0}}'
  zigbee2mqtt:warn 1/1/2019, 5:19:24 PM Please see: https://koenkk.github.io/zigbee2mqtt/how_tos/how_to_support_new_devices.html.
  zigbee2mqtt:debug 1/1/2019, 5:19:24 PM Received zigbee message of type 'devChange' with data '{"cid":"genOnOff","data":{"onOff":0}}' of device 'ZBT-DimmableLight' (0x00158d0001cded1c)
  zigbee2mqtt:info 1/1/2019, 5:19:24 PM MQTT publish: topic 'zigbee2mqtt/0x00158d0001cded1c', payload '{"state":"OFF","brightness":113}'

Turn on:

  serialport:poller received "readable" +20s
  serialport:bindings read +20s
  serialport:unixRead Starting read +20s
  serialport:unixRead Finished read 8 bytes +0ms
  serialport:main binding.read finished +20s
  cc-znp { sof: 254,
  cc-znp   len: 3,
  cc-znp   type: 'AREQ',
  cc-znp   subsys: 'ZDO',
  cc-znp   cmd: 'srcRtgInd',
  cc-znp   payload: { dstaddr: 57849, relaycount: 0, relaylist: <Buffer > },
  cc-znp   fcs: 154,
  cc-znp   csum: 154 } +20s
  serialport:main _read reading +9ms
  serialport:bindings read +11ms
  serialport:unixRead Starting read +11ms
  cc-znp:AREQ <-- ZDO:srcRtgInd, { dstaddr: 57849, relaycount: 0, relaylist: <Buffer > } +3ms
  zigbee-shepherd:msgHdlr IND <-- ZDO:srcRtgInd +1ms
  serialport:unixRead waiting for readable because of code: EAGAIN +2ms
  serialport:poller Polling for "readable" +14ms
  serialport:poller received "readable" +46ms
  serialport:bindings read +48ms
  serialport:unixRead Starting read +47ms
  serialport:unixRead Finished read 32 bytes +0ms
  serialport:main binding.read finished +51ms
  cc-znp { sof: 254,
  cc-znp   len: 27,
  cc-znp   type: 'AREQ',
  cc-znp   subsys: 'AF',
  cc-znp   cmd: 'incomingMsg',
  cc-znp   payload:
  cc-znp    { groupid: 0,
  cc-znp      clusterid: 6,
  cc-znp      srcaddr: 57849,
  cc-znp      srcendpoint: 1,
  cc-znp      dstendpoint: 1,
  cc-znp      wasbroadcast: 0,
  cc-znp      linkquality: 0,
  cc-znp      securityuse: 0,
  cc-znp      timestamp: 8742207,
  cc-znp      transseqnumber: 0,
  cc-znp      len: 7,
  cc-znp      data: <Buffer 08 8a 0a 00 00 10 01> },
  cc-znp   fcs: 132,
  cc-znp   csum: 132 } +57ms
  serialport:main _read reading +11ms
  serialport:bindings read +13ms
  serialport:unixRead Starting read +12ms
  cc-znp:AREQ <-- AF:incomingMsg, { groupid: 0, clusterid: 6, srcaddr: 57849, srcendpoint: 1, dstendpoint: 1, wasbroadcast: 0, linkquality: 0, securityuse: 0, timestamp: 8742207, transseqnumber: 0, len: 7, data: <Buffer 08 8a 0a 00 00 10 01> } +4ms
  zigbee-shepherd:af dispatchIncomingMsg(): type: incomingMsg, msg: [object Object] +1ms
  zigbee-shepherd:msgHdlr IND <-- AF:incomingMsg, transId: 0 +7ms
  serialport:unixRead waiting for readable because of code: EAGAIN +10ms
  serialport:poller Polling for "readable" +23ms
  zigbee-shepherd:af dispatchIncomingMsg(): type: zclIncomingMsg, msg: [object Object] +1ms
  zigbee2mqtt:debug 1/1/2019, 5:19:44 PM Received zigbee message of type 'attReport' with data '{"cid":"genOnOff","data":{"onOff":1}}' of device 'ZBT-DimmableLight' (0x00158d0001cded1c)
  zigbee2mqtt:warn 1/1/2019, 5:19:44 PM No converter available for '4713407' with cid 'genOnOff', type 'attReport' and data '{"cid":"genOnOff","data":{"onOff":1}}'
  zigbee2mqtt:warn 1/1/2019, 5:19:44 PM Please see: https://koenkk.github.io/zigbee2mqtt/how_tos/how_to_support_new_devices.html.
  zigbee2mqtt:debug 1/1/2019, 5:19:44 PM Received zigbee message of type 'devChange' with data '{"cid":"genOnOff","data":{"onOff":1}}' of device 'ZBT-DimmableLight' (0x00158d0001cded1c)
  zigbee2mqtt:info 1/1/2019, 5:19:44 PM MQTT publish: topic 'zigbee2mqtt/0x00158d0001cded1c', payload '{"state":"ON","brightness":113}'

And state gets updated when using remote. Dim/brightness change from remote doesn't trigger updates.

@Koenkk
Copy link
Owner

Koenkk commented Jan 1, 2019

Great, lets fix the brightness level, please try:

    // Airam
    {
        zigbeeModel: ['ZBT-DimmableLight'],
        model: '4713407',
        vendor: 'Airam',
        description: 'LED OP A60 ZB 9W/827 E27',
        supports: generic.light_onoff_brightness().supports,
        fromZigbee: [fz.light_brightness, fz.light_state, fz.generic_state, fz.ignore_light_brightness_report],
        toZigbee: generic.light_onoff_brightness().toZigbee,
        configure: (ieeeAddr, shepherd, coordinator, callback) => {
            const device = shepherd.find(ieeeAddr, 1);
            const cfgOnOff = {direction: 0, attrId: 0, dataType: 16, minRepIntval: 0, maxRepIntval: 1000, repChange: 0};
            const cfgLevel = {direction: 0, attrId: 0, dataType: 32, minRepIntval: 0, maxRepIntval: 1000, repChange: 0};
            const actions = [
                (cb) => device.bind('genOnOff', coordinator, cb),
                (cb) => device.foundation('genOnOff', 'configReport', [cfgOnOff], foundationCfg, cb),
                (cb) => device.bind('genLevelCtrl', coordinator, cb),
                (cb) => device.foundation('genLevelCtrl', 'configReport', [cfgLevel], foundationCfg, cb),
            ];

            execute(device, actions, callback);
        },
    },

@Kryzek
Copy link
Contributor Author

Kryzek commented Jan 2, 2019

With the configuration above I experience crashing again:

Wed, 02 Jan 2019 13:27:58 GMT cc-znp { sof: 254,
  len: 27,
  type: 'AREQ',
  subsys: 'AF',
  cmd: 'incomingMsg',
  payload:
   { groupid: 0,
     clusterid: 8,
     srcaddr: 57849,
     srcendpoint: 1,
     dstendpoint: 1,
     wasbroadcast: 0,
     linkquality: 31,
     securityuse: 0,
     timestamp: 5494116,
     transseqnumber: 0,
     len: 7,
     data: <Buffer 08 23 0a 00 00 20 71> },
  fcs: 65,
  csum: 65 }
2019-01-02T13:27:58.473Z serialport:main _read reading
2019-01-02T13:27:58.473Z serialport:bindings read
2019-01-02T13:27:58.474Z serialport:unixRead Starting read
Wed, 02 Jan 2019 13:27:58 GMT cc-znp:AREQ <-- AF:incomingMsg, { groupid: 0, clusterid: 8, srcaddr: 57849, srcendpoint: 1, dstendpoint: 1, wasbroadcast: 0, linkquality: 31, securityuse: 0, timestamp: 5494116, transseqnumber: 0, len: 7, data: <Buffer 08 23 0a 00 00 20 71> }
Wed, 02 Jan 2019 13:27:58 GMT zigbee-shepherd:af dispatchIncomingMsg(): type: incomingMsg, msg: [object Object]
Wed, 02 Jan 2019 13:27:58 GMT zigbee-shepherd:msgHdlr IND <-- AF:incomingMsg, transId: 0
2019-01-02T13:27:58.511Z serialport:unixRead Finished read 32 bytes
2019-01-02T13:27:58.511Z serialport:main binding.read finished
Wed, 02 Jan 2019 13:27:58 GMT cc-znp { sof: 254,
  len: 27,
  type: 'AREQ',
  subsys: 'AF',
  cmd: 'incomingMsg',
  payload:
   { groupid: 0,
     clusterid: 8,
     srcaddr: 57849,
     srcendpoint: 1,
     dstendpoint: 1,
     wasbroadcast: 0,
     linkquality: 31,
     securityuse: 0,
     timestamp: 5494188,
     transseqnumber: 0,
     len: 7,
     data: <Buffer 08 4a 0a 00 00 20 71> },
  fcs: 224,
  csum: 224 }
2019-01-02T13:27:58.522Z serialport:main _read reading
2019-01-02T13:27:58.523Z serialport:bindings read
2019-01-02T13:27:58.524Z serialport:unixRead Starting read
Wed, 02 Jan 2019 13:27:58 GMT zigbee-shepherd:af dispatchIncomingMsg(): type: zclIncomingMsg, msg: [object Object]
  zigbee2mqtt:debug 1/2/2019, 3:27:58 PM Received zigbee message of type 'attReport' with data '{"cid":"genLevelCtrl","data":{"currentLevel":113}}' of device 'ZBT-DimmableLight' (0x00158d0001cded1c)
/opt/zigbee2mqtt/lib/extension/deviceReceive.js:56
                return c.cid === cid && c.type === message.type;
                         ^

TypeError: Cannot read property 'cid' of undefined
    at mappedDevice.fromZigbee.filter (/opt/zigbee2mqtt/lib/extension/deviceReceive.js:56:26)
    at Array.filter (<anonymous>)
    at DeviceReceive.onZigbeeMessage (/opt/zigbee2mqtt/lib/extension/deviceReceive.js:54:52)
    at extensions.filter.forEach (/opt/zigbee2mqtt/lib/controller.js:112:31)
    at Array.forEach (<anonymous>)
    at Controller.onZigbeeMessage (/opt/zigbee2mqtt/lib/controller.js:112:14)
    at Zigbee.onMessage (/opt/zigbee2mqtt/lib/zigbee.js:173:18)
    at ZShepherd.emit (events.js:182:13)
    at ZShepherd.<anonymous> (/opt/zigbee2mqtt/node_modules/zigbee-shepherd/lib/shepherd.js:159:14)
    at ZShepherd.emit (events.js:182:13)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! zigbee2mqtt@1.0.1 start: `node index.js`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the zigbee2mqtt@1.0.1 start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

I'm sorry that I'm not experienced (yet) to help myself in this. I greatly appreciate your input :)

@Koenkk
Copy link
Owner

Koenkk commented Jan 2, 2019

Are you on zigbee2mqtt 1.0.1?

@Kryzek
Copy link
Contributor Author

Kryzek commented Jan 2, 2019

Yes. Should be 1.0.1 as is was the current release when I installed.

@Kryzek
Copy link
Contributor Author

Kryzek commented Jan 2, 2019

Just got back home and made sure that version should be on 1.0.1

zigbee2mqtt:info 1/2/2019, 7:41:44 PM Starting zigbee2mqtt version 1.0.1 (commit #9380bbc)
and
zigbee2mqtt:info 1/2/2019, 7:41:45 PM Coordinator firmware version: '20181024'

@Kryzek
Copy link
Contributor Author

Kryzek commented Jan 2, 2019

This is weird. I reverted back to your earlier entry (#175 (comment)) and crashing stopped.
But... now I also see a new device on Zigbee2MQTT!

  zigbee2mqtt:info 1/2/2019, 7:54:24 PM 0x00158d0001cded1c (0x00158d0001cded1c): 4713407 - Airam LED OP A60 ZB 9W/827 E27 (Router)
  zigbee2mqtt:info 1/2/2019, 7:54:24 PM unknown (0x00158d0001b70237): unkown - undefined unknown (EndDevice)
  zigbee2mqtt:info 1/2/2019, 7:54:24 PM Zigbee: disabling joining new devices.

I didn't even try to pair it.

Brightness gets reported back when changed on remote.
But log is getting spammed:

  zigbee2mqtt:warn 1/2/2019, 7:56:23 PM Please see: https://koenkk.github.io/zigbee2mqtt/how_tos/how_to_support_new_devices.html.
  zigbee2mqtt:warn 1/2/2019, 7:56:23 PM No converter available for '4713407' with cid 'genLevelCtrl', type 'attReport' and data '{"cid":"genLevelCtrl","data":{"currentLevel":94}}'
  zigbee2mqtt:warn 1/2/2019, 7:56:23 PM Please see: https://koenkk.github.io/zigbee2mqtt/how_tos/how_to_support_new_devices.html.
  zigbee2mqtt:warn 1/2/2019, 7:56:23 PM No converter available for '4713407' with cid 'genLevelCtrl', type 'attReport' and data '{"cid":"genLevelCtrl","data":{"currentLevel":100}}'
  zigbee2mqtt:warn 1/2/2019, 7:56:23 PM Please see: https://koenkk.github.io/zigbee2mqtt/how_tos/how_to_support_new_devices.html.
  zigbee2mqtt:info 1/2/2019, 7:56:23 PM MQTT publish: topic 'zigbee2mqtt/0x00158d0001cded1c', payload '{"state":"ON","brightness":100}'
  zigbee2mqtt:warn 1/2/2019, 7:56:23 PM No converter available for '4713407' with cid 'genLevelCtrl', type 'attReport' and data '{"cid":"genLevelCtrl","data":{"currentLevel":100}}'
  zigbee2mqtt:warn 1/2/2019, 7:56:23 PM Please see: https://koenkk.github.io/zigbee2mqtt/how_tos/how_to_support_new_devices.html.

In the log there is this message:

zigbee2mqtt:info 1/2/2019, 7:58:53 PM MQTT publish: topic 'zigbee2mqtt/bridge/log', payload '{"type":"devices","message":[{"ieeeAddr":"0x00158d0001cded1c","type":"Router","model":"4713407","friendly_name":"0x00158d0001cded1c"},{"ieeeAddr":"0x00158d0001b70237","type":"EndDevice","model":"ZBT-Remote-EU-DIMV1A2","friendly_name":"0x00158d0001b70237"}]}'

How in earth did the remote (ZBT-Remote-EU-DIMV1A2) that didn't want to pair with Zigbee2MQTT appeared now?!

@Koenkk
Copy link
Owner

Koenkk commented Jan 2, 2019

Thats really strange, could you find out how you did this?

@Kryzek
Copy link
Contributor Author

Kryzek commented Jan 3, 2019

I'll try to reproduce this when I get back from work. What do I need to do to reset whole thing and start from scratch? Should I reflash the USB stick too?

But the steps have been so far:

  1. My initial device entry: Support for: Airam Led OP A60 ZB 9W/827 E27 and Airam CTR.U BX -remote #175 (comment) - which enabled MQTT control. I noticed I could pair the remote only with the bulb and left it paired with the bulb.

  2. Your first version to detect bulb state Support for: Airam Led OP A60 ZB 9W/827 E27 and Airam CTR.U BX -remote #175 (comment) which caused crashing.

  zigbee2mqtt:debug 12/31/2018, 8:58:05 AM Received zigbee message of type 'attReport' with data '{"cid":"genOnOff","data":{"onOff":0}}' of device 'ZBT-DimmableLight' (0x00158d0001cded1c)
/opt/zigbee2mqtt/lib/extension/deviceReceive.js:54
        const converters = mappedDevice.fromZigbee.filter((c) => {
                                                   ^

TypeError: Cannot read property 'filter' of undefined
  1. Support for: Airam Led OP A60 ZB 9W/827 E27 and Airam CTR.U BX -remote #175 (comment) which enabled detection of the on/off state

  2. Support for: Airam Led OP A60 ZB 9W/827 E27 and Airam CTR.U BX -remote #175 (comment) which caused crashing again

Wed, 02 Jan 2019 13:27:58 GMT zigbee-shepherd:af dispatchIncomingMsg(): type: zclIncomingMsg, msg: [object Object]
  zigbee2mqtt:debug 1/2/2019, 3:27:58 PM Received zigbee message of type 'attReport' with data '{"cid":"genLevelCtrl","data":{"currentLevel":113}}' of device 'ZBT-DimmableLight' (0x00158d0001cded1c)
/opt/zigbee2mqtt/lib/extension/deviceReceive.js:56
                return c.cid === cid && c.type === message.type;
                         ^

TypeError: Cannot read property 'cid' of undefined

I also noticed at this point that remote could not control the bulb (I thought it was cause of the eletricity shortages we've had due huge amounts of snow).

  1. I reverted device entry from step 4 to step 3 (to get rid of the crashing).
    I noticed new unknown device at the startup (even if I have even disabled joining new devices...)
  zigbee2mqtt:info 1/2/2019, 7:54:24 PM 0x00158d0001cded1c (0x00158d0001cded1c): 4713407 - Airam LED OP A60 ZB 9W/827 E27 (Router)
  zigbee2mqtt:info 1/2/2019, 7:54:24 PM unknown (0x00158d0001b70237): unkown - undefined unknown (EndDevice)
  zigbee2mqtt:info 1/2/2019, 7:54:24 PM Zigbee: disabling joining new devices.

I couldn't find trace of joining from the logs with

/opt/zigbee2mqtt/data/log $ grep "Device incoming..." * -R

I could turn bulb off/on again with the remote when Zigbee2MQTT is running. Remote does not command the bulb now without Zigbee2MQTT even that I don't see any feedback from the remote on the ZB2M logs.
But the bulb reports brighness levels non-stop (multiple times/second) - spam if you will:

  zigbee2mqtt:warn 1/2/2019, 7:56:23 PM No converter available for '4713407' with cid 'genLevelCtrl', type 'attReport' and data '{"cid":"genLevelCtrl","data":{"currentLevel":100}}'
  zigbee2mqtt:warn 1/2/2019, 7:56:23 PM Please see: https://koenkk.github.io/zigbee2mqtt/how_tos/how_to_support_new_devices.html.

Only way I could think of how the remote got paired would be somekind of "introducing" by the bulb. But is that even possible?

@Koenkk
Copy link
Owner

Koenkk commented Jan 3, 2019

Yes that possible, devices can be paired through a router

@Kryzek
Copy link
Contributor Author

Kryzek commented Jan 3, 2019

So my router (the bulb) was paired with remote and it just told the coordinator that it knows this device and information was passed even though I had no joining permitted?

I was testing (aimlessly mostly) changing values on "fromZigbee:"-line to get rid of the nonstop warn:-message on the log and I noticed that when fz.ignore_light_brightness_report is there I experience crash. So line

        fromZigbee: [fz.light_brightness, fz.light_state, fz.generic_state],

does not crash but it still spams "No converter available".
but version with

        fromZigbee: [fz.light_brightness, fz.light_state, fz.generic_state, fz.ignore_light_brightness_report],

causes the last crash message.

@Kryzek
Copy link
Contributor Author

Kryzek commented Jan 4, 2019

I think I finally figured some parts out on my own.

Now I have following entries:

node_modules/zigbee-shepherd-converters/devices.js

    // Airam
    {
        zigbeeModel: ['ZBT-DimmableLight'],
        model: '4713407',
        vendor: 'Airam',
        description: 'LED OP A60 ZB 9W/827 E27',
        supports: generic.light_onoff_brightness().supports,
        fromZigbee: [fz.airam_state, fz.airam_brightness],
        toZigbee: generic.light_onoff_brightness().toZigbee,
        configure: (ieeeAddr, shepherd, coordinator, callback) => {
            const device = shepherd.find(ieeeAddr, 1);
            const cfgOnOff = {direction: 0, attrId: 0, dataType: 16, minRepIntval: 0, maxRepIntval: 1000, repChange: 0};
            const cfgLevel = {direction: 0, attrId: 0, dataType: 32, minRepIntval: 0, maxRepIntval: 1000, repChange: 0};
            const actions = [
                (cb) => device.bind('genOnOff', coordinator, cb),
                (cb) => device.foundation('genOnOff', 'configReport', [cfgOnOff], foundationCfg, cb),
                (cb) => device.bind('genLevelCtrl', coordinator, cb),
                (cb) => device.foundation('genLevelCtrl', 'configReport', [cfgLevel], foundationCfg, cb),
            ];
            execute(device, actions, callback);
        },
    },

And
node_modules/zigbee-shepherd-converters/converters/fromZigbee.js:

    airam_state: {
        cid: 'genOnOff',
        type: 'attReport',
        convert: (model, msg, publish, options) => {
            return {state: msg.data.data['onOff'] === 1 ? 'ON' : 'OFF'};
        },
    },
    airam_brightness: {
        cid: 'genLevelCtrl',
        type: 'attReport',
        convert: (model, msg, publish, options) => {
            return {
                brightness: msg.data.data['currentLevel']
            };
        },
    },

Currently I do not see any "No converter available for"-entries anywhere :)

However I get totally spammed with (>30 times per second) this kind of information:

1/4/2019, 9:55:57 AM - info: MQTT publish: topic 'zigbee2mqtt/0x00158d0001cded1c', payload '{"state":"OFF","brightness":122,"linkquality":26}'
1/4/2019, 9:55:57 AM - info: MQTT publish: topic 'zigbee2mqtt/0x00158d0001cded1c', payload '{"state":"OFF","brightness":122,"linkquality":23}'
1/4/2019, 9:55:57 AM - info: MQTT publish: topic 'zigbee2mqtt/0x00158d0001cded1c', payload '{"state":"OFF","brightness":122,"linkquality":26}'
1/4/2019, 9:55:57 AM - info: MQTT publish: topic 'zigbee2mqtt/0x00158d0001cded1c', payload '{"state":"OFF","brightness":122,"linkquality":26}'
1/4/2019, 9:55:57 AM - info: MQTT publish: topic 'zigbee2mqtt/0x00158d0001cded1c', payload '{"state":"OFF","brightness":122,"linkquality":26}'

I think it's related to these messages from zigbee:

  cc-znp { sof: 254,
  cc-znp   len: 27,
  cc-znp   type: 'AREQ',
  cc-znp   subsys: 'AF',
  cc-znp   cmd: 'incomingMsg',
  cc-znp   payload:
  cc-znp    { groupid: 0,
  cc-znp      clusterid: 8,
  cc-znp      srcaddr: 57849,
  cc-znp      srcendpoint: 1,
  cc-znp      dstendpoint: 1,
  cc-znp      wasbroadcast: 0,
  cc-znp      linkquality: 18,
  cc-znp      securityuse: 0,
  cc-znp      timestamp: 10361629,
  cc-znp      transseqnumber: 0,
  cc-znp      len: 7,
  cc-znp      data: <Buffer 08 62 0a 00 00 20 7a> },
  cc-znp   fcs: 124,
  cc-znp   csum: 124 } +8ms
  cc-znp { sof: 254,
  cc-znp   len: 27,
  cc-znp   type: 'AREQ',
  cc-znp   subsys: 'AF',
  cc-znp   cmd: 'incomingMsg',
  cc-znp   payload:
  cc-znp    { groupid: 0,
  cc-znp      clusterid: 8,
  cc-znp      srcaddr: 57849,
  cc-znp      srcendpoint: 1,
  cc-znp      dstendpoint: 1,
  cc-znp      wasbroadcast: 0,
  cc-znp      linkquality: 21,
  cc-znp      securityuse: 0,
  cc-znp      timestamp: 10361715,
  cc-znp      transseqnumber: 0,
  cc-znp      len: 7,
  cc-znp      data: <Buffer 08 6b 0a 00 00 20 7a> },
  cc-znp   fcs: 28,
  cc-znp   csum: 28 } +8ms
  cc-znp { sof: 254,
  cc-znp   len: 27,
  cc-znp   type: 'AREQ',
  cc-znp   subsys: 'AF',
  cc-znp   cmd: 'incomingMsg',
  cc-znp   payload:
  cc-znp    { groupid: 0,
  cc-znp      clusterid: 8,
  cc-znp      srcaddr: 57849,
  cc-znp      srcendpoint: 1,
  cc-znp      dstendpoint: 1,
  cc-znp      wasbroadcast: 0,
  cc-znp      linkquality: 23,
  cc-znp      securityuse: 0,
  cc-znp      timestamp: 10361784,
  cc-znp      transseqnumber: 0,
  cc-znp      len: 7,
  cc-znp      data: <Buffer 08 75 0a 00 00 20 7a> },
  cc-znp   fcs: 203,
  cc-znp   csum: 203 } +8ms

I have a feeling that touching "configure" section of bulb defition would help to reduce spamming, but is there documentation for that?

@Koenkk
Copy link
Owner

Koenkk commented Jan 4, 2019

Please change the repchange of cfgLevel to 1

@Kryzek
Copy link
Contributor Author

Kryzek commented Jan 4, 2019

            const cfgLevel = {direction: 0, attrId: 0, dataType: 32, minRepIntval: 0, maxRepIntval: 1000, repChange: 1};

With this I still experience great amount of

  zigbee2mqtt:debug 1/4/2019, 11:10:04 AM Received zigbee message of type 'attReport' with data '{"cid":"genLevelCtrl","data":{"currentLevel":122}}' of device 'ZBT-DimmableLight' (0x00158d0001cded1c)

-messages.

@Kryzek
Copy link
Contributor Author

Kryzek commented Jan 4, 2019

Oh... missed this due spam:

zigbee-shepherd-converters:devices Configured '(cb) => device.bind('genLevelCtrl', coordinator, cb)' with result 'Error: Timed out after 10000 ms'

error: Failed to configure 0x00158d0001cded1c 0x00158d0001cded1c

So it seems configuration did not go through.

@Koenkk
Copy link
Owner

Koenkk commented Jan 4, 2019

Thats because the remote is sleeping, press some buttons while starting to keep it awake

@Kryzek
Copy link
Contributor Author

Kryzek commented Jan 4, 2019

0x00158d0001cded1c is a light bulb, not the remote - should remote be also awake anyway? I'll test that when I'll get back to home (doing this remotely).

@Kryzek
Copy link
Contributor Author

Kryzek commented Jan 4, 2019

Bulb works now :)

1/4/2019, 3:31:59 PM - info: Connecting with device...
1/4/2019, 3:31:59 PM - info: MQTT publish: topic 'zigbee2mqtt/bridge/log', payload '{"type":"pairing","message":"connecting with device"}'
1/4/2019, 3:31:59 PM - warn: Message without device!
1/4/2019, 3:31:59 PM - debug: Received zigbee message of type 'devIncoming' with data '"0x00158d0001cded1c"' of device 'ZBT-DimmableLight' (0x00158d0001cded1c)
1/4/2019, 3:31:59 PM - info: Device incoming...
1/4/2019, 3:31:59 PM - info: MQTT publish: topic 'zigbee2mqtt/bridge/log', payload '{"type":"pairing","message":"device incoming"}'
1/4/2019, 3:31:59 PM - info: New device with address 0x00158d0001cded1c connected!
1/4/2019, 3:31:59 PM - info: MQTT publish: topic 'zigbee2mqtt/bridge/log', payload '{"type":"device_connected","message":"0x00158d0001cded1c"}'
1/4/2019, 3:31:59 PM - debug: Received zigbee message of type 'devStatus' with data '"online"' of device 'ZBT-DimmableLight' (0x00158d0001cded1c)

Remote gets introduced also when paired with bulb:

1/4/2019, 3:33:01 PM - debug: Received zigbee message of type 'devInterview' with data '"0x00158d0001b70237"'
1/4/2019, 3:33:01 PM - info: Connecting with device...
1/4/2019, 3:33:01 PM - info: MQTT publish: topic 'zigbee2mqtt/bridge/log', payload '{"type":"pairing","message":"connecting with device"}'
1/4/2019, 3:33:01 PM - warn: Message without device!
1/4/2019, 3:33:03 PM - debug: Received MQTT message on 'zigbee2mqtt/bridge/config/devices' with data '1546608783005'
...
1/4/2019, 3:33:07 PM - debug: Received zigbee message of type 'devInterview' with data '"0x00158d0001b70237"'
1/4/2019, 3:33:07 PM - info: Connecting with device...
1/4/2019, 3:33:07 PM - info: MQTT publish: topic 'zigbee2mqtt/bridge/log', payload '{"type":"pairing","message":"connecting with device"}'
1/4/2019, 3:33:07 PM - warn: Message without device!
...
1/4/2019, 3:33:36 PM - debug: Received zigbee message of type 'devInterview' with data '"0x00158d0001b70237"'
1/4/2019, 3:33:36 PM - info: Connecting with device...
1/4/2019, 3:33:36 PM - info: MQTT publish: topic 'zigbee2mqtt/bridge/log', payload '{"type":"pairing","message":"connecting with device"}'
1/4/2019, 3:33:36 PM - warn: Message without device!
1/4/2019, 3:33:36 PM - debug: Received zigbee message of type 'devIncoming' with data '"0x00158d0001b70237"' of device 'ZBT-Remote-EU-DIMV1A2' (0x00158d0001b70237)
1/4/2019, 3:33:36 PM - info: Device incoming...
1/4/2019, 3:33:36 PM - info: MQTT publish: topic 'zigbee2mqtt/bridge/log', payload '{"type":"pairing","message":"device incoming"}'
1/4/2019, 3:33:36 PM - info: New device with address 0x00158d0001b70237 connected!
1/4/2019, 3:33:36 PM - info: MQTT publish: topic 'zigbee2mqtt/bridge/log', payload '{"type":"device_connected","message":"0x00158d0001b70237"}'
1/4/2019, 3:33:36 PM - debug: Received zigbee message of type 'devStatus' with data '"online"' of device 'ZBT-Remote-EU-DIMV1A2' (0x00158d0001b70237)

I do not get button presses to ZB2M log still yet. Bulb states get updated nicely.

I'll try to make pull request for this later.

@Koenkk
Copy link
Owner

Koenkk commented Jan 4, 2019

great!

@Kryzek
Copy link
Contributor Author

Kryzek commented Jan 5, 2019

Hopefully this PR is fine: #196 (my first ever, yay!)

@Koenkk
Copy link
Owner

Koenkk commented Jan 6, 2019

Merged, congratulations with your first pr!

@Koenkk Koenkk closed this as completed Jan 6, 2019
qosmio pushed a commit to qosmio/zigbee-herdsman-converters that referenced this issue Dec 25, 2019
xmow49 pushed a commit to xmow49/zigbee-herdsman-converters that referenced this issue Jun 14, 2024
* Don't throw promise.reject() when permit joins fails. But try again.

* Set network paramters according to configuration.yaml

* Speed up command queues

* Retry reset watchdog if it fails once

* Force RaspBee and ConBee to use 16bit NWK addr in data indications

* Fix wrong handling of 64bit src addresses in received data responses

* Remove unnecessary debug output

* Added writeparameter request to permit join request

* Removed unnecessary console.log

* Start on conbee

* Updates.

* conbee -> deconz. Koenkk/zigbee-herdsman#72

* Initial suppport for reading parameters

- Add basic frame parser
- Handle slip protocol and crc calculation
- Add queue for read and write parameters

* Add dummy function DeconzAdapter.supportsLED()

* Start working on write parameters

* supportsLED() returns false

* Implemented getCoordinator()

* Added deCONZ adapter dummy functions

* Implemented getCoordinatorVersion()

* Implemented getNetworkParameters()

* Added constants for APS layer

* Startet APS layer

Added readReceivedStateRequest, deviceStateRequest, deviceStateResponse,
readReceivedDataRequest

* Added APS layer parser functions

parseDeviceStateResponse, parseReadReceivedDataResponse, parseReceivedDataNotification,

* Added parser for APS responses

* Refactored some deCONZ adapter functions

* Added sendZclFrameNetworkAddress, sendZclFrameNetworkAddressWithResponse and sendZclFrameGroup

* Added constants for deCONZ adapter

* Added deCONZ driver functions for sending APS commands

* Added discoverRoute, supportsDiscoverRoute dummy functions

* Implemented NodeDescriptor

* Added constants

* Reworked debug messages and fixed send unnecessary device state requests

* Some smal fixes

* Implemented permit join

* Fixed check DeviceStatus variables

* implemented Active Endpoint request

* Implemented simple descriptor

* Removed reading request_id if data confirm fail

* Fixed reading payload of data indication

* Fix nodedescriptor devicetype

* Added waitFor dummy function

* Implemented lqi()

* Implemented routingTable()

* implemented bind()

* implmented unbind()

* Implemented removeDevice()

* Changes at driver.ts

* Fix for resolve aps request error

* ieeeAddr to String now add '0x' prefix

* Get correct APS data payload

* Fixes for some adapter functions

* Delete old code

* Added constant

* Added support of timeout for aps requests

* Refactored deCONZ adapter functions

* Added constants

* Refactored driver functions and debug logs

* Refactored frameparser debug logs

* Updated deCONZ adapter to newest adapter version

* Added device state intervall wand tweaked watchdog

* Removed unused code

* Removed unused code

* Added received msg event, removed discoverRoute

* Added catch for devicestaterequest

* Handle default response when sending zcl message

* Refactored debug print

* Added /* istanbul ignore file */

* Fixed/ implemented zclFrame.payload to Array (for dim and color commands)

* Implemented waitFor() and some changes for OTA update

* Update deconzAdapter.ts

* Fixed sending manufacturere specific commands

* Added some attributes to zclpayloadToArray conversion needed for e.g. configure reporting

TODO: this has to be reworked completely

* Fixed zclPayload to array function (used by configureReporting)

handle arrays of objects correctly

Co-authored-by: Koen Kanters <koenkanters94@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants