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

Debug log not showing special characters on new device. #18809

Closed
liquidacid opened this issue Sep 1, 2023 · 2 comments
Closed

Debug log not showing special characters on new device. #18809

liquidacid opened this issue Sep 1, 2023 · 2 comments
Labels
problem Something isn't working stale Stale issues

Comments

@liquidacid
Copy link

What happened?

I was adding a new Ikea device which appears to have a VERY weird model ID which makes it very hard to add a new device.
This was my first addition for new devices. The log of Zigbee2MQTT reported:

TRADFRI bulb GU10 WW 345lm8

So i'd add this device to a new JS file named LED2104R3.js but it was still unrecognized with
zigbeeModel: ['TRADFRI bulb GU10 WW 345lm8'],

After some messing around i found database.db showing:
"modelId":"\u001aTRADFRI bulb GU10 WW 345lm8"

This random square in the ModelID did take some time to find. I could actually add this to the documentation of supporting a new device but maybe it would be better if this modelid is fully shown in the debug log.

What did you expect to happen?

No response

How to reproduce it (minimal and precise)

No response

Zigbee2MQTT version

1.32.2-1

Adapter firmware version

20230507

Adapter

Sonoff Zigbee_3.0_USB_Dongle_Plus

Debug log

No response

@liquidacid liquidacid added the problem Something isn't working label Sep 1, 2023
@lokanidao9991
Copy link

lokanidao9991 commented Sep 5, 2023

I recently encountered the same issue and found a viable solution that could potentially be integrated into future releases of the zigbee-herdsman-converters device list.

To resolve the issue, like you, I incorporated the Unicode character U+001A at the beginning of the "TRADFRI" word in the zigbeeModel line, as demonstrated below:

zigbeeModel: ['\u001ATRADFRI bulb GU10 WW 345lm8'],

Subsequently, I created a new device definition by following the guidelines available on the Zigbee2MQTT support for new devices documentation. Here is how my updated file appears:

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

const definition = {
    zigbeeModel: ['\u001ATRADFRI bulb GU10 WW 345lm8'],
    model: 'LED2005R5',
    vendor: 'Ikea',
    description: 'MasterConnect LEDtube',
    extend: extend.light_onoff_brightness(),
};

module.exports = definition;

I believe this workaround might be a valuable addition to a future release of the zigbee-herdsman-converters device list to prevent similar issues.

@github-actions
Copy link
Contributor

github-actions bot commented Oct 6, 2023

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 7 days

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

No branches or pull requests

2 participants