Koenkk / zigbee2mqtt

Zigbee 🐝 to MQTT bridge 🌉, get rid of your proprietary Zigbee bridges 🔨
https://www.zigbee2mqtt.io
GNU General Public License v3.0
12.17k stars 1.68k forks source link

[New device support]: Add support to BSEED EU Wall Sockets #24766

Open albpara opened 6 days ago

albpara commented 6 days ago

Link

https://www.bseed.com/en-es/products/bseed-zigbee-eu-wall-sockets-power-outlets-with-energy-monitoring-kids-protection

There is another version with USB ports, the only noticeable difference is the manufName which is _TZ3000_5ct6e7ye in that case. I can open another issue for this product if needed.

Database entry

{
    "id": 42,
    "type": "Router",
    "ieeeAddr": "0xa4c13893a6691c9e",
    "nwkAddr": 40787,
    "manufId": 4417,
    "manufName": "_TZ3000_b28wrpvx",
    "powerSource": "Mains (single phase)",
    "modelId": "TS011F",
    "epList": [
        1,
        242
    ],
    "endpoints": {
        "1": {
            "profId": 260,
            "epId": 1,
            "devId": 266,
            "inClusterList": [
                3,
                4,
                5,
                6,
                1794,
                2820,
                57344,
                57345,
                0
            ],
            "outClusterList": [
                25,
                10
            ],
            "clusters": {
                "genBasic": {
                    "attributes": {
                        "65503": "���.\u0012",
                        "65506": 54,
                        "65508": 0,
                        "65534": 0,
                        "stackVersion": 0,
                        "dateCode": "",
                        "manufacturerName": "_TZ3000_b28wrpvx",
                        "zclVersion": 3,
                        "appVersion": 77,
                        "modelId": "TS011F",
                        "powerSource": 1
                    }
                },
                "haElectricalMeasurement": {
                    "attributes": {
                        "acCurrentDivisor": 1000,
                        "acCurrentMultiplier": 1,
                        "rmsVoltage": 231,
                        "rmsCurrent": 0,
                        "activePower": 0
                    }
                },
                "seMetering": {
                    "attributes": {
                        "divisor": 100,
                        "multiplier": 1,
                        "currentSummDelivered": 13
                    }
                },
                "genOnOff": {
                    "attributes": {
                        "32768": 0,
                        "onOff": 1,
                        "onTime": 0,
                        "offWaitTime": 0,
                        "tuyaBacklightMode": 1,
                        "moesStartUpOnOff": 1,
                        "tuyaBacklightSwitch": 1
                    }
                },
                "manuSpecificTuya_3": {
                    "attributes": {
                        "53248": 1,
                        "53249": 0,
                        "53250": 2890015,
                        "53251": 122,
                        "53252": 10522,
                        "53253": 1245,
                        "powerOnBehavior": 1,
                        "switchType": 0
                    }
                }
            },
            "binds": [
                {
                    "cluster": 6,
                    "type": "endpoint",
                    "deviceIeeeAddress": "0x00212effff075f68",
                    "endpointID": 1
                },
                {
                    "cluster": 2820,
                    "type": "endpoint",
                    "deviceIeeeAddress": "0x00212effff075f68",
                    "endpointID": 1
                },
                {
                    "cluster": 1794,
                    "type": "endpoint",
                    "deviceIeeeAddress": "0x00212effff075f68",
                    "endpointID": 1
                }
            ],
            "configuredReportings": [
                {
                    "cluster": 2820,
                    "attrId": 1285,
                    "minRepIntval": 5,
                    "maxRepIntval": 3600,
                    "repChange": 5
                },
                {
                    "cluster": 2820,
                    "attrId": 1288,
                    "minRepIntval": 5,
                    "maxRepIntval": 3600,
                    "repChange": 50
                },
                {
                    "cluster": 2820,
                    "attrId": 1291,
                    "minRepIntval": 5,
                    "maxRepIntval": 3600,
                    "repChange": 10
                },
                {
                    "cluster": 1794,
                    "attrId": 0,
                    "minRepIntval": 5,
                    "maxRepIntval": 3600,
                    "repChange": 257
                }
            ],
            "meta": {}
        },
        "242": {
            "profId": 41440,
            "epId": 242,
            "devId": 97,
            "inClusterList": [],
            "outClusterList": [
                33
            ],
            "clusters": {},
            "binds": [],
            "configuredReportings": [],
            "meta": {}
        }
    },
    "appVersion": 77,
    "stackVersion": 0,
    "hwVersion": 1,
    "dateCode": "",
    "zclVersion": 3,
    "interviewCompleted": true,
    "meta": {
        "configured": 332242049
    },
    "lastSeen": 1731578706353
}

Zigbee2MQTT version

1.41.0

Comments

Tried to follow the steps to add support myself but since the plug looks like a rebrand of an already existing model, I not entirely sure if support should be added with a new fingerprint instead.

External definition

const {onOff, electricityMeter} = require('zigbee-herdsman-converters/lib/modernExtend');

const definition = {
    zigbeeModel: ['TS011F'],
    model: 'TS011F',
    vendor: '_TZ3000_b28wrpvx',
    description: 'Automatically generated definition',
    extend: [onOff({"powerOnBehavior":false}), electricityMeter()],
    meta: {},
};

module.exports = definition;

What does/doesn't work with the external definition?

Device works, it is detected as TS011F but current an voltage values seems to be not properly handled when they are 0.

When is not in use, power is correctly reported but current and voltage are not sometimes when values are 0 (but are shown correctly in z2mqtt)

How appears in HA:

image

How appears in z2mqtt:

image

Additionally, looks like power consumption values are not accurate, for a 1200W device y got in 3 different plugs 2800W, 1600W and 1150W (current and voltage values are correct). I know that this can be solved by calibrating the device from z2mqtt but looks like a little bit too much of deviation.

The readings in the chart were done with a vacuum cleaner, but got similar results with a 60W incandescent bulb.

Some history charts from HA:

image
albpara commented 6 days ago

Added database entry and details about another version of the plug with USB ports