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

Log message on unsupported cid crash #199

Closed
tb-killa opened this issue Jul 16, 2018 · 2 comments
Closed

Log message on unsupported cid crash #199

tb-killa opened this issue Jul 16, 2018 · 2 comments

Comments

@tb-killa
Copy link
Contributor

@Koenkk

                    `type '${message.type}' and message '${JSON.stringify(message)}'`
                                                                ^

TypeError: Converting circular structure to JSON
    at JSON.stringify (<anonymous>)
    at Controller.handleZigbeeMessage (/opt/zigbee2mqtt/lib/controller.js:286:65)
    at Zigbee.handleMessage (/opt/zigbee2mqtt/lib/zigbee.js:157:18)
    at emitOne (events.js:116:13)
    at ZShepherd.emit (events.js:211:7)
    at ZShepherd.<anonymous> (/opt/zigbee2mqtt/node_modules/zigbee-shepherd/lib/shepherd.js:159:14)
    at emitThree (events.js:136:13)
    at ZShepherd.emit (events.js:217:7)
    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:730:12)
@tb-killa
Copy link
Contributor Author

Shouldn´t it be this ?

if (!converters.length) {
            if (cid) {
                logger.warn(
                    `No converter available for '${mappedModel.model}' with cid '${cid}', ` +
                    `type '${message.type}' and message '${JSON.stringify(message.data)}'`
                );
            } else if (cmdId) {
                logger.warn(
                    `No converter available for '${mappedModel.model}' with cmd '${cmdId}' ` +
                    `and message '${JSON.stringify(message.data)}'`
                );
            }

            logger.warn(`Please see: https://github.com/Koenkk/zigbee2mqtt/wiki/How-to-support-new-devices.`);
            return;
        }

@Koenkk
Copy link
Owner

Koenkk commented Jul 18, 2018

Thanks, fixed!

@Koenkk Koenkk closed this as completed Jul 18, 2018
wilmardo pushed a commit to wilmardo/zigbee2mqtt that referenced this issue Sep 26, 2019
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