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

external converter does not work #2376

Open
John-Rookie opened this issue Feb 13, 2025 · 5 comments
Open

external converter does not work #2376

John-Rookie opened this issue Feb 13, 2025 · 5 comments

Comments

@John-Rookie
Copy link

describe the problem in Detail. What do you expect to happen ? What does happen ?

My converter, which I have running under HA zigbee2mqtt, still reports the device as not supported under iobroker.zigbee. What is the error?

const herdsman = require('zigbee-herdsman');
const reporting = require('zigbee-herdsman-converters/lib/reporting');
const fz = { ...require("zigbee-herdsman-converters/converters/fromZigbee"), legacy: require("zigbee-herdsman-converters/lib/legacy").fromZigbee};
const tz = require("zigbee-herdsman-converters/converters/toZigbee");
const exposes = require("zigbee-herdsman-converters/lib/exposes");
const e = exposes.presets;
const ea = exposes.access;

const definition = {
zigbeeModel: ['WSS-4E_00.00.03.08TC'],
model: 'WSS-4E_00.00.03.08TC',
vendor: 'ClimaxTechnology',
description: "Wall switch with 4 buttons",
fromZigbee: [fz.command_recall, fz.battery],
toZigbee: [],
exposes: [e.battery_low(), e.action(['recall_1', 'recall_2', 'recall_3', 'recall_4'])],
configure: async (device, coordinatorEndpoint, logger) => {
const endpoint = device.getEndpoint(1);
await reporting.bind(endpoint, coordinatorEndpoint, ['genOnOff', 'genScenes', 'genPowerCfg']);
},
};

module.exports = definition;

Adapter version

13.7.4.4

Coordinator firmware version

FW 7.2.x.x

Coordinator

SONOFF_Zigbee_3.0_USB_Dongle_Plus_V2

Setup

Raspberry Pi 4B

Protocol of the error (as text, encapsulated in multiline code tags <>). Separate different occurrances into clearly split log sections

No response

@asgothian
Copy link
Collaborator

Please read the log of the startup of the system. There should be an indication why the converter is not loaded.

A.

@John-Rookie
Copy link
Author

I'm so stupid. I could have thought of that myself.

External converter /opt/iobroker/iobroker-data/zigbee_0/lupus_WSS.js contains an unsupported reference to '/lib/legacy' - external converter not loaded.

The syntax is probably wrong but what do I have to change?

const fz = { ...require("zigbee-herdsman-converters/converters/fromZigbee"), legacy: require("zigbee-herdsman-converters/lib/legacy").fromZigbee};

...this works in z2m

J.R.

@John-Rookie
Copy link
Author

OK. I don't think I need Legacy. But now I'm getting these warnings.

| warn | ELEVATED I2: value generated '10' from device 00124b001ff634dc for 'Link quality'
| warn | ELEVATED I1: message received '{"linkquality":10}' from device 00124b001ff634dc type 'WSS-4E_00.00.03.08TC'
| warn | ELEVATED I2: value generated 'true' from device 00124b001ff634dc for 'Available'
| warn | ELEVATED I1: message received '{"available":true}' from device 00124b001ff634dc type 'WSS-4E_00.00.03.08TC'

And at the touch of a button, for example:

| warn | ELEVATED I2: value generated 'true' from device 00124b001ff634dc for 'recall_4'
| warn | ELEVATED I1: message received '{"action":"recall_4"}' from device 00124b001ff634dc type 'WSS-4E_00.00.03.08TC'
| warn | ELEVATED I2: value generated '184' from device 00124b001ff634dc for 'Link quality'
| warn | ELEVATED I1: message received '{"linkquality":184}' from device 00124b001ff634dc type 'WSS-4E_00.00.03.08TC'
| warn | ELEVATED I0: Zigbee Event of Type commandRecall from device "0x00124b001ff634dc", incoming event: {"type":"commandRecall","device":"0x00124b001ff634dc","endpoint":1,"data":{"groupid":4,"sceneid":4},"linkquality":184,"groupID":0,"cluster":"genScenes"}

J.R.

@asgothian
Copy link
Collaborator

check the state zigbee.0.info.debugmessages. You seem to have added part of the IEEE of the device (00124b001ff634dc) there. Remove it, and those warnings are gone.

A.

@John-Rookie
Copy link
Author

This is true........

Thanks J.R.

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