Closed jjwork closed 2 years ago
Could you check if this issue has been fixed with the following external converter:
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 e = exposes.presets;
const ea = exposes.access;
const definition = {
zigbeeModel: ['SZ-ESW01-AU'],
model: 'SZ-ESW01-AU',
vendor: 'Sercomm',
description: 'Telstra smart plug',
exposes: [e.switch(), e.power(), e.energy()],
fromZigbee: [fz.on_off, fz.metering],
toZigbee: [tz.on_off],
configure: async (device, coordinatorEndpoint, logger) => {
const endpoint = device.getEndpoint(1);
await reporting.bind(endpoint, coordinatorEndpoint, ['genOnOff', 'seMetering']);
await reporting.onOff(endpoint);
await reporting.instantaneousDemand(endpoint);
await reporting.currentSummDelivered(endpoint);
endpoint.saveClusterAttributeKeyValue('seMetering', {divisor: 1000000, multiplier: 1});
},
};
module.exports = definition;
configuration.yaml
as ext_converter.js
configuration.yaml
:
external_converters:
- ext_converter.js
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 7 days
Hi Koenkk
I followed above instructions and can confirm the energy is being reported:
Could you please help to modify the converter to read • Amps/Current • Voltage ?
Cheers
@AlexPotterOnGit under the clusters tab, does this device show support for haElectricalMeasurement
cluster? If yes try with the following converter:
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 e = exposes.presets;
const ea = exposes.access;
const definition = {
zigbeeModel: ['SZ-ESW01-AU'],
model: 'SZ-ESW01-AU',
vendor: 'Sercomm',
description: 'Telstra smart plug',
exposes: [e.switch(), e.power(), e.energy(), e.current(), e.voltage()],
fromZigbee: [fz.on_off, fz.metering, fz.electrical_measurement],
toZigbee: [tz.on_off],
configure: async (device, coordinatorEndpoint, logger) => {
const endpoint = device.getEndpoint(1);
await reporting.bind(endpoint, coordinatorEndpoint, ['genOnOff', 'seMetering', 'haElectricalMeasurement']);
await reporting.onOff(endpoint);
await reporting.instantaneousDemand(endpoint);
await reporting.currentSummDelivered(endpoint);
endpoint.saveClusterAttributeKeyValue('seMetering', {divisor: 1000000, multiplier: 1});
await reporting.readEletricalMeasurementMultiplierDivisors(endpoint);
await reporting.rmsVoltage(endpoint);
await reporting.rmsCurrent(endpoint);
},
};
module.exports = definition;
It does:
I updated the converted and it expose everything now:
Thank you very much @Koenkk, really appreciated. Alex.
Integrated the changes (so it will be included out-of-the-box in the next release)
And another thank you to Koenkk !
This is working perfectly for me now - thank you !
What happened?
I'd like to get the energy reading please from this device into Home Assistant. It is not showing up as a sensor in the new 'Energy Monitoring' feature of HASS. The HASS doco suggests the energy data provided by the device is not in a format that HASS can accept.
What did you expect to happen?
The device's energy reading to be in a format that HASS can then use in its energy monitoring.
How to reproduce it (minimal and precise)
In Home Assistant.
Go to Configuration => Dashboards => Energy => Individual Devices => add a device
The Sercom device does not appear as an item to add
Zigbee2MQTT version
1.23.0
Adapter firmware version
20211217
Adapter
Tubez CC2652P2 Based Zigbee to PoE Coordinator
Debug log
No response