Skip to content

Using transition from Home Assistant crashes with "cannot read 'cid' of undefined" #712

Closed
@ash-vd

Description

@ash-vd

When I try to set an Ikea E14 bulb with a transition, zigbee2mqtt crashes. This problem came up after I updated to the latest version (1.0.0)

Reproduce
Send the following command with the homeassistant.turn_on service using Home Assistant:

{
  "entity_id": "light.zigbee_e14_1_light",
  "brightness": 140,
  "transition": 1 
}

Logs

zigbee2mqtt:debug 2018-12-16 15:32:33 Received MQTT message on 'zigbee/zigbee_e14_1/set' with data '{"state": "ON", "transition": 1, "brightness": 140}'
  zigbee2mqtt:debug 2018-12-16 15:32:33 Skipping 'state' because of 'brightness'
  zigbee2mqtt:info 2018-12-16 15:32:33 Zigbee publish to '0x000b57fffed8cd13', genLevelCtrl - moveToLevelWithOnOff - {"level":140,"transtime":10} - {"manufSpec":0,"disDefaultRsp":0} - null
  zigbee2mqtt:info 2018-12-16 15:32:34 MQTT publish: topic 'zigbee/zigbee_e14_1', payload '{"state":"ON"}'
/app/lib/extension/devicePublish.js:163

                            ieeeAddr, getConverted.cid, getConverted.cmd, getConverted.cmdType,

TypeError: Cannot read property 'cid' of undefined
    at queue.push (/app/lib/extension/devicePublish.js:163:52)
    at Queue.start (/app/node_modules/queue/index.js:143:17)
    at Queue.(anonymous function) [as push] (/app/node_modules/queue/index.js:59:12)
    at Timeout.setTimeout [as _onTimeout] (/app/lib/extension/devicePublish.js:161:32)
    at ontimeout (timers.js:498:11)
    at tryOnTimeout (timers.js:323:5)
    at Timer.listOnTimeout (timers.js:290:5)

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] start: `node index.js`
npm ERR! Exit status 1

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!     /root/.npm/_logs/2018-12-16T15_32_34_650Z-debug.log
Using '/app/data' as data directory

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions