I’m sorry, I don’t know what else to tell you. It’s been 2 years since I had to mess around with this plug, so I don’t remember if I had to change anything else. I also haven’t yet updated Z2M to v2, so it’s entirely possible this is a bug which was introduced recently.
All I can say is that mine is recognised as _TZ3000_typdpbpg and is the UK version. Maybe check if your model is actually listed in the tuya folder for the converters in Z2M github?
These are my reporting intervals. Further below is the initial converter I had used to help Koenkk debug the 0 reporting values. You will need to add/replace with your model in rows 22 & 49. Note that this converter is from 2023 and that requirements for custom converters have changed since then.
Try playing around wiht that - hopefully that will help you fix the issue.
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 fzLocal = {
TS011F_electrical_measurement: {
...fz.electrical_measurement,
convert: (model, msg, publish, options, meta) => {
const result = fz.electrical_measurement.convert(model, msg, publish, options, meta);
const lookup = {power: 'activePower', current: 'rmsCurrent', voltage: 'rmsVoltage'};
// Wait 5 seconds before reporting a 0 value as this could be an invalid measurement.
// https://github.com/Koenkk/zigbee2mqtt/issues/16709#issuecomment-1509599046
if (result && ['_TZ3000_gvn91tmx', '_TZ3000_amdymr7l', '_TZ3000_typdpbpg', '_TZ3000_hdopuwv6'].includes(meta.device.manufacturerName)) {
for (const key of ['power', 'current', 'voltage']) {
if (key in result) {
const value = result[key];
clearTimeout(globalStore.getValue(msg.endpoint, key));
if (value === 0) {
const configuredReporting = msg.endpoint.configuredReportings.find((c) =>
c.cluster.name === 'haElectricalMeasurement' && c.attribute.name === lookup[key]);
const time = ((configuredReporting ? configuredReporting.minimumReportInterval : 5) * 2) + 1;
console.log('NEXT 0 publish time', time);
globalStore.putValue(msg.endpoint, key, setTimeout(() => publish({[key]: value}), time * 1000));
delete result[key];
}
}
}
}
return result;
},
},
}
const definition = {
// Note: below you will find the TS011F_plug_2 and TS011F_plug_3. These are identified via a fingerprint and
// thus preferred above the TS011F_plug_1 if the fingerprint matches
fingerprint: [
{
modelID: 'TS011F',
manufacturerName: '_TZ3000_typdpbpg',
},
],
zigbeeModel: ['TS011F'],
model: 'TS011F_plug_1',
description: 'Smart plug (with power monitoringj)',
vendor: 'TuYa',
whiteLabel: [{vendor: 'LELLKI', model: 'TS011F_plug'}, {vendor: 'NEO', model: 'NAS-WR01B'},
{vendor: 'BlitzWolf', model: 'BW-SHP15'}, {vendor: 'Nous', model: 'A1Z'}, {vendor: 'BlitzWolf', model: 'BW-SHP13'},
{vendor: 'MatSee Plus', model: 'PJ-ZSW01'}, {vendor: 'MODEMIX', model: 'MOD037'}, {vendor: 'MODEMIX', model: 'MOD048'},
{vendor: 'Coswall', model: 'CS-AJ-DE2U-ZG-11'}, {vendor: 'Aubess', model: 'TS011F_plug_1'}, {vendor: 'Immax', model: '07752L'},
tuya.whitelabel('NOUS', 'A1Z', 'Smart plug (with power monitoring)', ['_TZ3000_2putqrmw']),
],
ota: ota.zigbeeOTA,
extend: tuya.extend.switch({
electricalMeasurements: true, electricalMeasurementsFzConverter: fzLocal.TS011F_electrical_measurement,
powerOutageMemory: true, indicatorMode: true, childLock: true}),
configure: async (device, coordinatorEndpoint, logger) => {
await tuya.configureMagicPacket(device, coordinatorEndpoint, logger);
const endpoint = device.getEndpoint(1);
await reporting.bind(endpoint, coordinatorEndpoint, ['genOnOff', 'haElectricalMeasurement', 'seMetering']);
await reporting.rmsVoltage(endpoint, {change: 5});
await reporting.rmsCurrent(endpoint, {change: 5});
await reporting.activePower(endpoint, {change: 10});
await reporting.currentSummDelivered(endpoint);
endpoint.saveClusterAttributeKeyValue('haElectricalMeasurement', {acCurrentDivisor: 1000, acCurrentMultiplier: 1});
endpoint.saveClusterAttributeKeyValue('seMetering', {divisor: 100, multiplier: 1});
device.save();
},
};
module.exports = definition;