Skip to content

Commit

Permalink
Add support for Niko Smart plug with earthing pin 552-80699 (#2082)
Browse files Browse the repository at this point in the history
* Add support for Niko Smart plug with earthing pin

Although the compliance document for the 552-80699 looks nearly identical to 170-33505 (suspicious) and claims rmsVoltage/rmsCurrent is supported, we get UNSUPPORTED_ATTRIBUTE while trying to setup reporting or reading the  linked attributes in readEletricalMeasurementMultiplierDivisors.

seMetering also cleans support for a few properties, but same story there, although currentSummDelivered did seem to take a reporting config. It never reported anything for me.

Just configuring activePower seperately does seem to yield a somewhat correct power reading. My 1000lm Tradfri bulb reads 13 watt, behind a Ubisys S1 it reads 12-13 watt depending on the device. So it looks to be within expected variance and I believe the readings are good.

* Niko 552-80699 supports power on state

* Also add support for energy, took a while to figure out

Didn't seem to report at all without change: 1, but was rather spammy so also set min to 1 minute.
  • Loading branch information
sjorge authored Jan 16, 2021
1 parent f5c5cf8 commit 1c8da8b
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions devices.js
Original file line number Diff line number Diff line change
Expand Up @@ -14879,6 +14879,29 @@ const devices = [
},
exposes: [e.switch(), e.power(), e.current(), e.voltage()],
},
{
zigbeeModel: ['Smart plug Zigbee PE'],
model: '552-80699',
vendor: 'Niko',
description: 'Smart plug with earthing pin',
fromZigbee: [fz.on_off, fz.electrical_measurement, fz.metering],
toZigbee: [tz.on_off, tz.power_on_behavior],
meta: {configureKey: 1},
configure: async (device, coordinatorEndpoint, logger) => {
const endpoint = device.getEndpoint(1);
await reporting.bind(endpoint, coordinatorEndpoint, ['genOnOff', 'haElectricalMeasurement', 'seMetering']);
// 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(), e.energy(),
exposes.enum('power_on_behavior', exposes.access.STATE_SET, ['off', 'previous', 'on'])
.withDescription('Controls the behaviour when the device is powered on'),
],
},

// QMotion products - http://www.qmotionshades.com/
{
Expand Down

0 comments on commit 1c8da8b

Please sign in to comment.