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

Adds metering to Schneider wiser wall plug #2941

Merged
merged 1 commit into from
Aug 23, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 11 additions & 4 deletions devices/schneider_electric.js
Original file line number Diff line number Diff line change
Expand Up @@ -131,13 +131,20 @@ module.exports = [
model: 'CCT711119',
vendor: 'Schneider Electric',
description: 'Wiser smart plug',
fromZigbee: [fz.on_off],
toZigbee: [tz.on_off],
exposes: [e.switch()],
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],
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')],
configure: async (device, coordinatorEndpoint, logger) => {
const endpoint = device.getEndpoint(1);
await reporting.bind(endpoint, coordinatorEndpoint, ['genOnOff']);
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});
},
},
{
Expand Down