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

zigbee2mqtt 1.34.0-1 failed to start after the latest update. #20010

Closed
rugal7699 opened this issue Dec 4, 2023 · 1 comment
Closed

zigbee2mqtt 1.34.0-1 failed to start after the latest update. #20010

rugal7699 opened this issue Dec 4, 2023 · 1 comment
Labels
problem Something isn't working

Comments

@rugal7699
Copy link

What happened?

The add-on itself failed to start with the error below shown in log

/app/node_modules/zigbee-herdsman-converters/index.js:172
if (converter.options) {
^
TypeError: Cannot read properties of undefined (reading 'options')
at Object.addDefinition [as addDeviceDefinition] (/app/node_modules/zigbee-herdsman-converters/index.js:172:23)
at new ExternalConverters (/app/lib/extension/externalConverters.ts:15:17)
at new Controller (/app/lib/controller.ts:84:58)
at start (/app/index.js:106:18)

I have an Aqara roller shade motor external converters. Created according to the content of ZNGZDJ11LM.

const fz = require('zigbee-herdsman-converters/converters/fromZigbee');
const tz = require('zigbee-herdsman-converters/converters/toZigbee');
const ota = require('zigbee-herdsman-converters/lib/ota');
const exposes = require('zigbee-herdsman-converters/lib/exposes');
const e = exposes.presets;
const ea = exposes.access;

const definition = {
    zigbeeModel: ['lumi.curtain.vagl02'],
    model: 'ZNGZDJ16LM',
    description: 'Aqara roller shade motor',
    vendor: 'Aqara',
    whiteLabel: [{vendor: 'Xiaomi', model: 'SRSC-M01'}],
    fromZigbee: [fz.xiaomi_basic, fz.xiaomi_curtain_position, fz.xiaomi_curtain_position_tilt],
    toZigbee: [tz.xiaomi_curtain_position_state, tz.xiaomi_curtain_options],
    exposes: [e.cover_position().setAccess('state', ea.ALL),
        exposes.binary('running', ea.STATE, true, false)
            .withDescription('Whether the motor is moving or not')],
    ota: ota.zigbeeOTA,
    configure: async (device, coordinatorEndpoint, logger) => {
        utils.attachOutputCluster(device, 'genOta');
    },
};

module.exports = definition;

The addon started normally with disabling external converter from 'configuration.yaml' file. But my devices still need converters. What should I do to use these devices in the new version?

What did you expect to happen?

wake up normally. and all zigbee devices working properly as per normal.

How to reproduce it (minimal and precise)

Update z2m to 1.34.0-1

Zigbee2MQTT version

1.34.0-1

Adapter firmware version

20221226

Adapter

zStack3x0

Debug log

/app/node_modules/zigbee-herdsman-converters/index.js:172
if (converter.options) {
^
TypeError: Cannot read properties of undefined (reading 'options')
at Object.addDefinition [as addDeviceDefinition] (/app/node_modules/zigbee-herdsman-converters/index.js:172:23)
at new ExternalConverters (/app/lib/extension/externalConverters.ts:15:17)
at new Controller (/app/lib/controller.ts:84:58)
at start (/app/index.js:106:18)

@rugal7699 rugal7699 added the problem Something isn't working label Dec 4, 2023
@Koenkk
Copy link
Owner

Koenkk commented Dec 4, 2023

One of your external converters is incompatible with the current Z2M version. You should fix your external converter. I improved the logging of this.

Changes will be available in the dev branch in a few hours from now. (https://www.zigbee2mqtt.io/advanced/more/switch-to-dev-branch.html)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
problem Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants