Power/Energy not available via zigbee2mqtt

I’m using Home Assistant in a VM and the main branch of the Zigbee2MQTT add-on (currently 1.28.0-1). To make the above linked updated file work properly in that setup, I had to adjust the require statement paths slightly by replacing the ../ with zigbee-herdsman-convertors/ like so:

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 globalStore = require('zigbee-herdsman-converters/lib/store');
const reporting = require('zigbee-herdsman-converters/lib/reporting');
const ota = require('zigbee-herdsman-converters/lib/ota');
const utils = require('zigbee-herdsman-converters/lib/utils');

Once done I’m getting power readings in Zigbee2MQTT now. :+1:

My exact steps:

  1. Save the inovelli.js file locally and modify the require statements per above.
  2. Using the File Editor in Home Assistant, upload it to the config/zigbee2mqtt folder.
  3. Edit config/zigbee2mqtt/configuration.yaml and add a line like so:
external_converters:
  - inovelli.js
  1. Restart zigbee2mqtt and you should have the power readings.
3 Likes