Smart plug with energy monitoring (Bouffalolab chipset)

I bought a cheap smart plug with energy monitoring (Amazon.com). After lots of searcing, it appears to be using a SoC in the bl702 series. Using Zigbee2Mqtt I have it added and configured. It supports on/off (reporting and commands), but I can’t figure out how to get power monitoring working. I’ve cobbled something together from a number of examples to try to make it work. It exposes the energy sensors, but it doesn’t report any data. Is there any other thing I can try?

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;

// https://github.com/Koenkk/zigbee-herdsman-converters/issues/1681
const definition = {
    zigbeeModel: ['Bouffalolab'], // The model ID from: Device with modelID 'lumi.sens' is not supported.
    model: 'CL-001', // Vendor model number, look on the device for a model number
    vendor: 'Bouffalolab', // Vendor of the device (only used for documentation and startup logging)
    description: 'Smart plug', // Description of the device, copy from vendor site. (only used for documentation and startup logging)
    fromZigbee: [
        fz.on_off,
        fz.ignore_basic_report,
        fz.power_on_behavior,
        fz.electrical_measurement,
        fz.metering
    ],
    toZigbee: [tz.on_off],
    exposes: [
        e.switch(),
        e.power(),
        e.current(),
        e.voltage(),
        e.energy()
    ],
    configure: async (device, coordinatorEndpoint, logger) => {
        let endpoint = device.getEndpoint(1);
        await reporting.bind(endpoint, coordinatorEndpoint, [
            'genOnOff',
            //'haElectricalMeasurement',
            'seMetering'
        ]);
        await reporting.onOff(endpoint);
        //await reporting.readEletricalMeasurementMultiplierDivisors(endpoint);
        await reporting.activePower(endpoint);
        await reporting.rmsCurrent(endpoint);
        await reporting.rmsVoltage(endpoint);
        await reporting.readMeteringMultiplierDivisor(endpoint);
        await reporting.currentSummDelivered(endpoint);
        await reporting.instantaneousDemand(endpoint);
    },
    endpoint: (device) => {
        return {default: 1};
    },
};

module.exports = definition;

// MQTT publish: topic 'zigbee2mqtt/bridge/event', payload '{"data":{"friendly_name":"0x7cb94c6187a30000","ieee_address":"0x7cb94c6187a30000"},"type":"device_announce"}'

// Zigbee2MQTT:info  2022-05-26 20:43:51: Successfully interviewed '0x7cb94c6187a30000', device has successfully been paired

// Zigbee2MQTT:warn  2022-05-26 20:43:51: Device '0x7cb94c6187a30000' with Zigbee model 'Bouffalolab' and manufacturer name 'Bouffalolab'

// Zigbee2MQTT:info  2022-05-26 20:43:51: MQTT publish: topic 'zigbee2mqtt/bridge/event', payload '{"data":{"definition":null,"friendly_name":"0x7cb94c6187a30000","ieee_address":"0x7cb94c6187a30000","status":"successful","supported":false},"type":"device_interview"}'
1 Like

i bought a few of those to extend out my zigbee network… same issue… they work well… but no energy monitoring… using a combee II default … kinda new to HA… still learning the things…lol

Well that’s not what I wanted to hear! It’s my first foray into ZigBee so I was hoping I’m just missing something.

Try here, more chance on success :

I bought Bouffalolab RMC002 switches … and this weekend ALL of them got knocked off the network. When they work, they work great, but I noticed that they just hang. Has anyone idenfied any specific incompatiblities with these outlets. Seems odd only this one brand would all hand at the same time.