-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
TS011F socket with Power metering #8836
Comments
After few more hours playing with it, i have this converter. 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; And now it returns {
"backlight_mode": "high",
"child_lock": "UNLOCK",
"current": 6.3,
"energy": 0.52,
"linkquality": 208,
"power": 1493,
"power_on_behavior": "previous",
"power_on_behavior_l1": "previous",
"state": "ON",
"state_l1": "ON",
"state_l2": "ON",
"update": {
"installed_version": 192,
"latest_version": 192,
"state": "idle"
},
"voltage": 231
} But i have power_on_behavior_l1 that is not expected. |
This device is already in a converter by fingerprint here There's also a 2 gang socket with power monitoring (and USB ports) here
|
@AlexanderLeporiday later yesterday i found that model TS011F_2_gang_wall for _TZ3000_qlmnxmac is not correctly added. It is same as
only difference is that MG-AUZG01 is AU socket, _TZ3000_qlmnxmac is EU socket. |
Is your device MakeGood branded? |
I get one Tuya SOcket with power metering, that has missing data about Power.
After few tries, i was able to write new converter.
Now it expose
But i still have few issues and didnt know how to fix them.
First is energy: 43 should be too high, maybe 0.43 is correct. How to add divider?
Second - OTA now lost
And third:
How to fix this and make device fully functional?
The text was updated successfully, but these errors were encountered: