-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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
Can't add seMetering to Schneider Wiser smart plug #2926
Comments
From the database.db
|
Well the device doesn't support saMetering.instantaneousDemand, it says so in the message UNSUPPORTED_ATTRIBUTE. I might support haElectricalMeasurement.activePower though. {
zigbeeModel: ['SMARTPLUG/1'],
model: 'CCT711119',
vendor: 'Schneider Electric',
description: 'Wiser smart plug',
fromZigbee: [fz.on_off, fz.electrical_measurement, fz.metering, fz.power_on_behavior],
toZigbee: [tz.on_off, tz.power_on_behavior, tz.electrical_measurement_power],
configure: async (device, coordinatorEndpoint, logger) => {
const endpoint = device.getEndpoint(1);
await reporting.bind(endpoint, coordinatorEndpoint, ['genOnOff', 'haElectricalMeasurement', 'seMetering']);
await reporting.onOff(endpoint);
// only activePower seems to be support, although compliance document states otherwise
await endpoint.read('haElectricalMeasurement', ['acPowerMultiplier', 'acPowerDivisor']);
await reporting.activePower(endpoint);
await reporting.readMeteringMultiplierDivisor(endpoint);
await reporting.currentSummDelivered(endpoint, {min: 60, change: 1});
},
exposes: [
e.switch(), e.power().withAccess(ea.STATE_GET), e.energy(),
exposes.enum('power_on_behavior', ea.ALL, ['off', 'previous', 'on'])
.withDescription('Controls the behaviour when the device is powered on'),
],
}, |
Thanks a lot! Seems to work just fine! Will evaluate and then create a PR. |
The Schneider Wiser smart plug is supported as on/off, https://github.com/Koenkk/zigbee-herdsman-converters/blob/master/devices/schneider_electric.js#L129-L142. Am now trying to add support for seMetering (by copy pasteing code from other devices. Don't really know what I am doing.). Any suggestions how to fix this?
Adjusted the code to following, but the metering values are not being updated
The following is being posted to the log:
And this is the error code:
Error Failed to configure 'Lightsonlampor', attempt 3 (Error: ConfigureReporting 0x5c0272fffe537ef8/1 seMetering([{"attribute":"instantaneousDemand","minimumReportInterval":5,"maximumReportInterval":3600,"reportableChange":1}], {"sendWhenActive":false,"timeout":10000,"disableResponse":false,"disableRecovery":false,"disableDefaultResponse":true,"direction":0,"srcEndpoint":null,"reservedBits":0,"manufacturerCode":null,"transactionSequenceNumber":null,"writeUndiv":false}) failed (Status 'UNSUPPORTED_ATTRIBUTE') at Endpoint.checkStatus (/app/node_modules/zigbee-herdsman/src/controller/model/endpoint.ts:293:23) at Endpoint.configureReporting (/app/node_modules/zigbee-herdsman/src/controller/model/endpoint.ts:627:22) at Object.instantaneousDemand (/app/node_modules/zigbee-herdsman-converters/lib/reporting.js:104:9) at Object.configure (/app/dist/util/externally-loaded.js:21:13) at Configure.configure (/app/lib/extension/configure.js:137:13))
The text was updated successfully, but these errors were encountered: