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

[New device support]: Tuya _TZE200_qzaing2g TS0601 1 Gang Smart Dimmer #26526

Open
NoahColly opened this issue Feb 27, 2025 · 1 comment
Open
Labels
new device support New device support request

Comments

@NoahColly
Copy link

Link

https://smarthomesmatter.com.au/products/zigbee-touch-dimmer-switch

Database entry

{"id":47,"type":"Router","ieeeAddr":"0xa4c138346c44e3ee","nwkAddr":47295,"manufId":4417,"manufName":"_TZE200_qzaing2g","powerSource":"Mains (single phase)","modelId":"TS0601","epList":[1,242],"endpoints":{"1":{"profId":260,"epId":1,"devId":81,"inClusterList":[4,5,61184,0],"outClusterList":[25,10],"clusters":{"genBasic":{"attributes":{"65503":"�\u0019S/i","65506":53,"65508":0,"stackVersion":0,"dateCode":"","appVersion":65,"modelId":"TS0601","manufacturerName":"_TZE200_qzaing2g","powerSource":1,"zclVersion":3,"hwVersion":1}}},"binds":[],"configuredReportings":[],"meta":{}},"242":{"profId":41440,"epId":242,"devId":97,"inClusterList":[],"outClusterList":[33],"clusters":{},"binds":[],"configuredReportings":[],"meta":{}}},"appVersion":65,"stackVersion":0,"hwVersion":1,"dateCode":"","zclVersion":3,"interviewCompleted":true,"meta":{},"lastSeen":1740634643440}

Zigbee2MQTT version

2.1.1

Comments

Trying to add a new smart dimmer and it looks like its just not supported.
I had a very similar dimmer previously that worked however this new one (leading edge vs trailing edge dimming) doesn't seem to be supported.
I have tried adding my own external definitions but I just cant get it to work. As can see below, I have just copied out the definition that already exists and added the new one to the fingerprint but I just cant seem to make it work.

Image

External definition

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 e = exposes.presets;

const definition = {
{
        fingerprint: tuya.fingerprint("TS0601", [
            "_TZE200_ip2akl4w",
            "_TZE200_1agwnems",
            "_TZE200_la2c2uo9",
            "_TZE200_579lguh2",
            "_TZE200_vucankjx",
            "_TZE200_4mh6tyyo",
            "_TZE204_hlx9tnzb",
            "_TZE204_n9ctkb6j",
            "_TZE204_9qhuzgo0",
            "_TZE200_9cxuhakf",
            "_TZE200_a0syesf5",
            "_TZE200_3p5ydos3",
            "_TZE200_swaamsoy",
            "_TZE200_ojzhk75b",
            "_TZE200_w4cryh2i",
            "_TZE200_dfxkcots",
            "_TZE200_9i9dt8is",
            "_TZE200_ctq0k47x",
            "_TZE200_ebwgzdqq",
            "_TZE204_vevc4c6g",
            "_TZE200_0nauxa0p",
            "_TZE200_ykgar0ow",
            "_TZE200_qzaing2g",
        ]),
        model: "TS0601_dimmer_1_gang_1",
        vendor: "Tuya",
        description: "1 gang smart dimmer",
        fromZigbee: [tuya.fz.datapoints],
        toZigbee: [tuya.tz.datapoints],
        configure: tuya.configureMagicPacket,
        exposes: (device, options) => {
            const exps: Expose[] = [
                tuya.exposes.lightBrightnessWithMinMax(),
                tuya.exposes.countdown(),
                e.power_on_behavior().withAccess(ea.STATE_SET),
            ];

            if (!device || !["_TZE200_ykgar0ow"].includes(device.manufacturerName)) {
                exps.push(tuya.exposes.lightType(), tuya.exposes.backlightModeOffNormalInverted().withAccess(ea.STATE_SET));
            }

            return exps;
        },
        meta: {
            tuyaDatapoints: [
                [1, "state", tuya.valueConverter.onOff, {skip: tuya.skip.stateOnAndBrightnessPresent}],
                [2, "brightness", tuya.valueConverter.scale0_254to0_1000],
                [3, "min_brightness", tuya.valueConverter.scale0_254to0_1000],
                [4, "light_type", tuya.valueConverter.lightType],
                [5, "max_brightness", tuya.valueConverter.scale0_254to0_1000],
                [6, "countdown", tuya.valueConverter.countdown],
                [14, "power_on_behavior", tuya.valueConverter.powerOnBehavior],
                [21, "backlight_mode", tuya.valueConverter.backlightModeOffNormalInverted],
            ],
        },
        whiteLabel: [
            {vendor: "Lerlink", model: "X706U"},
            {vendor: "Moes", model: "ZS-EUD_1gang"},
            {vendor: "Larkkey", model: "ZSTY-SM-1DMZG-EU"},
            {vendor: "Earda", model: "EDM-1ZAA-EU"},
            {vendor: "Earda", model: "EDM-1ZAB-EU"},
            {vendor: "Earda", model: "EDM-1ZBA-EU"},
            {vendor: "Mercator Ikuü", model: "SSWD01"},
            {vendor: "Moes", model: "ZS-USD"},
            {vendor: "Moes", model: "EDM-1ZBB-EU"},
            tuya.whitelabel("Moes", "ZS-SR-EUD-1", "Star ring smart dimmer switch 1 gang", ["_TZE204_hlx9tnzb"]),
            tuya.whitelabel("Moes", "MS-105Z", "Smart Dimmer module", ["_TZE200_la2c2uo9"]),
            tuya.whitelabel("Mercator Ikuü", "SSWM-DIMZ", "Switch Mechanism", ["_TZE200_9cxuhakf"]),
            tuya.whitelabel("Mercator Ikuü", "SSWRM-ZB", "Rotary dimmer mechanism", ["_TZE200_a0syesf5"]),
            tuya.whitelabel("Lonsonho", "EDM-1ZBB-EU", "Smart Dimmer Switch", ["_TZE200_0nauxa0p"]),
            tuya.whitelabel("ION Industries", "ID200W-ZIGB", "LED Zigbee Dimmer", ["_TZE200_ykgar0ow"]),
        ],
    },
};

module.exports = definition;

What does/doesn't work with the external definition?

As mentioned I just cannot seem to get the external definition to work.

I have it located in /homeassistant/zigbee2mqtt/external_converters/tuya_dimmer.js
I cannot see it in the logs and is not reflecting in the front end.

@NoahColly NoahColly added the new device support New device support request label Feb 27, 2025
@Koenkk
Copy link
Owner

Koenkk commented Mar 1, 2025

Could you try to:

  • Stop Z2M
  • Open data/database.db with a text editor and change all occurrences of _TZE200_qzaing2g to _TZE200_a0syesf5
  • Start Z2M and see if the device now works

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
new device support New device support request
Projects
None yet
Development

No branches or pull requests

2 participants