Giter Site home page Giter Site logo

Comments (33)

Kryzek avatar Kryzek commented on August 20, 2024

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.

from zigbee-herdsman-converters.

Koenkk avatar Koenkk commented on August 20, 2024

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

from zigbee-herdsman-converters.

Kryzek avatar Kryzek commented on August 20, 2024

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?

from zigbee-herdsman-converters.

Koenkk avatar Koenkk commented on August 20, 2024

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

from zigbee-herdsman-converters.

Kryzek avatar Kryzek commented on August 20, 2024

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

from zigbee-herdsman-converters.

Koenkk avatar Koenkk commented on August 20, 2024

Is 0x00158d0001cded1c the address of your bulb?

from zigbee-herdsman-converters.

Kryzek avatar Kryzek commented on August 20, 2024

Bulb is 0x00158d0001cded1c

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

from zigbee-herdsman-converters.

Kryzek avatar Kryzek commented on August 20, 2024

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.

from zigbee-herdsman-converters.

Koenkk avatar Koenkk commented on August 20, 2024

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?

from zigbee-herdsman-converters.

Kryzek avatar Kryzek commented on August 20, 2024

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! [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.

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 [email protected]
3 info using [email protected]
4 verbose run-script [ 'prestart', 'start', 'poststart' ]
5 info lifecycle [email protected]~prestart: [email protected]
6 info lifecycle [email protected]~start: [email protected]
7 verbose lifecycle [email protected]~start: unsafe-perm in lifecycle true
8 verbose lifecycle [email protected]~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 [email protected]~start: CWD: /opt/zigbee2mqtt
10 silly lifecycle [email protected]~start: Args: [ '-c', 'node index.js' ]
11 silly lifecycle [email protected]~start: Returned: code: 1  signal: null
12 info lifecycle [email protected]~start: Failed to exec start script
13 verbose stack Error: [email protected] 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 [email protected]
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 [email protected] start: `node index.js`
22 error Exit status 1
23 error Failed at the [email protected] start script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 1, true ]

from zigbee-herdsman-converters.

Kryzek avatar Kryzek commented on August 20, 2024

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! [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.

from zigbee-herdsman-converters.

Koenkk avatar Koenkk commented on August 20, 2024

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);
        },
    },

from zigbee-herdsman-converters.

Kryzek avatar Kryzek commented on August 20, 2024

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.

from zigbee-herdsman-converters.

Koenkk avatar Koenkk commented on August 20, 2024

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);
        },
    },

from zigbee-herdsman-converters.

Kryzek avatar Kryzek commented on August 20, 2024

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! [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.

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

from zigbee-herdsman-converters.

Koenkk avatar Koenkk commented on August 20, 2024

Are you on zigbee2mqtt 1.0.1?

from zigbee-herdsman-converters.

Kryzek avatar Kryzek commented on August 20, 2024

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

from zigbee-herdsman-converters.

Kryzek avatar Kryzek commented on August 20, 2024

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'

from zigbee-herdsman-converters.

Kryzek avatar Kryzek commented on August 20, 2024

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?!

from zigbee-herdsman-converters.

Koenkk avatar Koenkk commented on August 20, 2024

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

from zigbee-herdsman-converters.

Kryzek avatar Kryzek commented on August 20, 2024

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: #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 #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. #175 (comment) which enabled detection of the on/off state

  2. #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?

from zigbee-herdsman-converters.

Koenkk avatar Koenkk commented on August 20, 2024

Yes that possible, devices can be paired through a router

from zigbee-herdsman-converters.

Kryzek avatar Kryzek commented on August 20, 2024

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.

from zigbee-herdsman-converters.

Kryzek avatar Kryzek commented on August 20, 2024

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?

from zigbee-herdsman-converters.

Koenkk avatar Koenkk commented on August 20, 2024

Please change the repchange of cfgLevel to 1

from zigbee-herdsman-converters.

Kryzek avatar Kryzek commented on August 20, 2024
            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.

from zigbee-herdsman-converters.

Kryzek avatar Kryzek commented on August 20, 2024

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.

from zigbee-herdsman-converters.

Koenkk avatar Koenkk commented on August 20, 2024

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

from zigbee-herdsman-converters.

Kryzek avatar Kryzek commented on August 20, 2024

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

from zigbee-herdsman-converters.

Kryzek avatar Kryzek commented on August 20, 2024

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.

from zigbee-herdsman-converters.

Koenkk avatar Koenkk commented on August 20, 2024

great!

from zigbee-herdsman-converters.

Kryzek avatar Kryzek commented on August 20, 2024

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

from zigbee-herdsman-converters.

Koenkk avatar Koenkk commented on August 20, 2024

Merged, congratulations with your first pr!

from zigbee-herdsman-converters.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.