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

Issue with device matching #26437

Open
MakorKa opened this issue Feb 19, 2025 · 1 comment
Open

Issue with device matching #26437

MakorKa opened this issue Feb 19, 2025 · 1 comment
Labels
problem Something isn't working

Comments

@MakorKa
Copy link

MakorKa commented Feb 19, 2025

What happened?

I bought new Tuya Zigbee Wall Socket, that identified as TS011F, manufacturer _TZ3000_qlmnxmac

It was added to fingerprints for TS011F_2_gang_wall, that didnt have power metering.
But, there is https://www.zigbee2mqtt.io/devices/MG-AUZG01.html that has exectly same behavior ( and same look except other socket type ). _TZ3000_dd8wwzcy is same as _TZ3000_qlmnxmac except euro socket.

What did you expect to happen?

Expected that device is identified correctly and have power details.

How to reproduce it (minimal and precise)

I spent all day to make convertor, that mostly match MG-AUZG01

My working code is:

const m = require('zigbee-herdsman-converters/lib/modernExtend');
const tuya = require('zigbee-herdsman-converters/lib/tuya');
const exposes = require('zigbee-herdsman-converters/lib/exposes');
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 reporting = require('zigbee-herdsman-converters/lib/reporting');

const NS = 'zhc:tuya';
const { tuyaMagicPacket } = tuya.modernExtend;
const e = exposes.presets;
const ea = exposes.access;

const definition = {
    fingerprint: [{ modelID: 'TS011F', manufacturerName: '_TZ3000_qlmnxmac' }],
    model: 'TS011F_2_gang_wall',
    vendor: 'Tuya',
    ota: true, //ota.zigbeeOTA,
    description: '2 gang socket with power monitoring',
    configure: async (device, coordinatorEndpoint) => {
        await tuya.configureMagicPacket(device, coordinatorEndpoint);
        const endpoint = device.getEndpoint(1);
        endpoint.saveClusterAttributeKeyValue('haElectricalMeasurement', {acCurrentDivisor: 1000, acCurrentMultiplier: 1, acPowerDivisor: 1, acPowerMultiplier: 1});
        endpoint.saveClusterAttributeKeyValue('seMetering', {divisor: 100, multiplier: 1});
        
        await reporting.bind(endpoint, coordinatorEndpoint, ['genOnOff', 'haElectricalMeasurement', 'seMetering']);
        await reporting.rmsVoltage(endpoint, {change: 1});
        await reporting.rmsCurrent(endpoint, {change: 50});
        await reporting.activePower(endpoint, {change: 10});
        await reporting.currentSummDelivered(endpoint);
        
        device.save();
    },
    extend: [
        tuyaMagicPacket(),
        /*m.deviceEndpoints({
            endpoints: { 'l1': 1, 'l2': 2 },
            multiEndpointSkip: ['current', 'voltage', 'power', 'energy'],
        }),*/
        tuya.modernExtend.tuyaOnOff({
            backlightModeLowMediumHigh: true, 
            childLock: true, 
            endpoints: ['l1', 'l2'], 
            electricalMeasurements: true
        }),
        //m.electricityMeter(),
        //m.identify(),
    ],
    endpoint: (device) => {
        return {l1: 1, l2: 2};
    },
};

module.exports = definition;

Zigbee2MQTT version

2.1.1

Adapter firmware version

7.4.5

Adapter

SONOFF Zigbee Dongle-E

Setup

Add-On

Debug log

No response

@MakorKa MakorKa added the problem Something isn't working label Feb 19, 2025
@MakorKa
Copy link
Author

MakorKa commented Feb 19, 2025

Image

Image of the device

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

1 participant