Zigbee double socket picked up as single socket in Zigbee2MQTT

I’m putting this here in case anyone else has a similar issue. I fixed this using information found in these forums and using perplexity.

In my case i purchased a
Melery UK Zigbee Smart Wall Socket Tuya Power Monitor Outlet the model was listed as WS013-Zigbee.

I run HAOS and have Z2M (Zigbee2MQTT) loaded as an add on.

Before i continue, i knew this model was not listed as a supported Z2M device.

Anyway, when it arrived, it did pair with Z"M, however it ws identified as a TS011F_plug_1, which is a single outlet device. I found i could only control the left hand socket via Z2M.

Anyway the solution, which sounded scary at first, is to create an external convertor. Perplexity gave me this as a suitable external convertor.

export default {
zigbeeModel: [‘TS011F’],
model: ‘TS011F_plug_1’,
vendor: ‘_TZ3210_bep7ccew’,
description: ‘Dual outlet with power monitoring’,
extend: [
m.deviceEndpoints({ endpoints: { left: 1, right: 2 } }), // :one:
m.onOff({
powerOnBehavior: false,
endpointNames: [‘left’, ‘right’] // :two:
}),
m.electricityMeter()
],
meta: {
multiEndpoint: true,
multiEndpointSkip: [‘current’, ‘voltage’, ‘power’, ‘energy’] // :three:
},
};

The next bits are specific to using HAOS and Z2M as an addon, this was based on a topic from Arnen, Z2MQTT External converter - Configuration / Zigbee - Home Assistant Community

You will need SSH and file editor add on installed. (credit to Arnen for this bit).

  • open Terminal
    • cd homeassistant/
    • cd zigbee2mqtt/
    • mkdir external_converters
    • cd external_converters
    • touch convertor.js
  • open File editor
    • paste your convertor code
    • save your convertor code

I then restated Z2M and ran another interview. It now exposes both the left and right hand states.

One thing to note, i don’t have any other TS011F_plug_1 devices except for another Melery one. I i did have other devices this may have impacted them, and the solution is to target the IEEE Address instead of the model (i believe)

Great work, now create a PR in the zigbee-herdsman-convertors GitHub :wink: