Skip to content

Conversation

@1tigris1
Copy link
Contributor

Hi, could you please tell me why after the update some devices stopped working correctly, namely… what could be the reason? I had to rewrite the converter.
Here is the corrected converter.

const tuya = require('zigbee-herdsman-converters/lib/tuya');
const utils = require('zigbee-herdsman-converters/lib/utils');
const exposes = require('zigbee-herdsman-converters/lib/exposes');
const e = exposes.presets;
const ea = exposes.access;

module.exports = [
{
fingerprint: tuya.fingerprint('TS011F', ['_TZ3210_6cmeijtd']),

    model: 'A11Z',
    vendor: 'Nous',
    description: 'Smart power strip 3 gang with energy monitoring & countdown',

    endpoint: (device) => {
        return { l1: 1, l2: 2, l3: 3 };
    },

    meta: {
        multiEndpoint: true,
        multiEndpointSkip: ['energy', 'current', 'voltage', 'power'],
    },

    extend: [
        tuya.modernExtend.tuyaOnOff({
            electricalMeasurements: true,
            powerOutageMemory: true,
            onOffCountdown: true,
            indicatorMode: true,
            childLock: true,
            endpoints: ['l1', 'l2', 'l3'],
        }),
        tuya.modernExtend.electricityMeasurementPoll({
            metering: (device) => [100, 160, 192].includes(device.applicationVersion) || ["1.0.5"].includes(device.softwareBuildID),
        }),
    ],

    configure: async (device, coordinatorEndpoint) => {
        await tuya.configureMagicPacket(device, coordinatorEndpoint);
        const endpoint = device.getEndpoint(1);
        

        endpoint.saveClusterAttributeKeyValue('haElectricalMeasurement', {
            acCurrentDivisor: 1000,
            acCurrentMultiplier: 1,
            acVoltageDivisor: 10,
            acVoltageMultiplier: 1,
            acPowerDivisor: 10,
            acPowerMultiplier: 1,
        });
        endpoint.saveClusterAttributeKeyValue('seMetering', {
            divisor: 100,
            multiplier: 1,
        });
        
        utils.attachOutputCluster(device, 'genOta');
        device.save();
    },
},

];

childLock: true,
endpoints: ["l1", "l2", "l3"],
}),
tuya.modernExtend.electricityMeasurementPoll({
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this device really require polling?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Apparently yes, because before this the device switched all three at once when pressing a single button.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it can be solved by just adding tuya.modernExtend.tuyaMagicPacket(), to extend, if it works please update this PR.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hello,
After updating z2m, i remove thé device using force remove then reset the strip and paired it again
After re pairing
{
"current_l1": 143,
"energy_l1": 564,
"last_seen": "2026-02-02T17:55:14.594Z",
"linkquality": 255,
"power_l1": 17,
"state_l1": "ON",
"state_l2": "ON",
"state_l3": "ON",
"voltage_l1": 238
}
In home assistant the following sensors have been created

sensor.triplette_power_l2
sensor.triplette_energy_l
sensor.triplette_current_l3
sensor.triplette_voltage

I also have the 3 switches but when i turned on or off any one of them all three are switched at the same time
Kind regards

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

Successfully merging this pull request may close these issues.

3 participants