zigbee2mqtt icon indicating copy to clipboard operation
zigbee2mqtt copied to clipboard

[New device support]: BSEED Curtain module not supported _TZE284_uqfph8ah

Open theedge1 opened this issue 1 year ago β€’ 16 comments

Link

https://es.aliexpress.com/item/1005006195478013.html?spm=a2g0o.order_list.order_list_main.73.699a194dMDDBGe&gatewayAdapt=glo2esp

Database entry

{"id":75,"type":"Router","ieeeAddr":"0xa4c1382e3eb19383","nwkAddr":65051,"manufId":4417,"manufName":"_TZE284_uqfph8ah","powerSource":"Mains (single phase)","modelId":"TS0601","epList":[1,242],"endpoints":{"1":{"profId":260,"epId":1,"devId":81,"inClusterList":[4,5,61184,0,60672],"outClusterList":[25,10],"clusters":{"genBasic":{"attributes":{"stackVersion":0,"dateCode":""}}},"binds":[],"configuredReportings":[],"meta":{}},"242":{"profId":41440,"epId":242,"devId":97,"inClusterList":[],"outClusterList":[33],"clusters":{},"binds":[],"configuredReportings":[],"meta":{}}},"appVersion":78,"stackVersion":0,"hwVersion":1,"dateCode":"","zclVersion":3,"interviewCompleted":true,"interviewState":"SUCCESSFUL","meta":{},"lastSeen":1750666982710}

Zigbee2MQTT version

2.4.0-dev commit: 15f3eaf9

Comments

Hi could you please help to provide support for this device, after pairing it says Not Supported.

Thanks and regards

External definition

export default {
    zigbeeModel: ['TS0601'],
    model: 'TS0601',
    vendor: '_TZE284_uqfph8ah',
    description: 'Automatically generated definition',
    extend: [],
    meta: {},
};

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

Only exposes Linkquality

theedge1 avatar Jun 23 '25 08:06 theedge1

I have the same issue. I hope it will be added soon. I find it in device : https://www.zigbee2mqtt.io/devices/BSEED_TS0601_cover.html but IDK if we can use something manualy

aureliensas avatar Jun 30 '25 21:06 aureliensas

Could you try to:

  • Stop Z2M
  • Open data/database.db with a text editor and change all occurrences of _TZE284_uqfph8ah to _TZE284_udank5zs
  • Start Z2M and see if the device now works

Koenkk avatar Jul 01 '25 17:07 Koenkk

Hi,

Inspired by the BSEED example in bseed.ts, I wrote the following external converter for the _TZE284_uqfph8ah :

import * as fz from 'zigbee-herdsman-converters/converters/fromZigbee';
import * as tz from 'zigbee-herdsman-converters/converters/toZigbee';
import * as exposes from 'zigbee-herdsman-converters/lib/exposes';
import * as legacy from 'zigbee-herdsman-converters/lib/legacy';
import * as tuya from 'zigbee-herdsman-converters/lib/tuya';

const e = exposes.presets;
const ea = exposes.access;

export const definitions: DefinitionWithExtend[] = [
    {
        fingerprint: tuya.fingerprint("TS0601", ["_TZE284_uqfph8ah"]),
        model: "BSEED_TS0601_cover_new",
        vendor: "BSEED",
        description: "Zigbee curtain switch",
        fromZigbee: [legacy.fz.tuya_cover],
        toZigbee: [legacy.tz.tuya_cover_control],
        exposes: [e.cover_position().setAccess("position", ea.STATE_SET)],
    },
];

With this configuration, I’m able to control open and close commands successfully.

Regarding Koenkk's message

Could you try to:

  • Stop Z2M
  • Open data/database.db with a text editor and change all occurrences of _TZE284_uqfph8ah to _TZE284_udank5zs
  • Start Z2M and see if the device now works

Since the devices' code seem similar, I think it should work.

However, I couldn't find any way to trigger or perform calibration (e.g., setting top/bottom limits) ... (So unfortunately, the curtain stops or opens at random positions πŸ˜• I guess it's related to the lack of calibration or incorrect handling of position values.)

seanchenxi avatar Jul 01 '25 19:07 seanchenxi

Could you try to:

  • Stop Z2M
  • Open data/database.db with a text editor and change all occurrences of _TZE284_uqfph8ah to _TZE284_udank5zs
  • Start Z2M and see if the device now works

thanks so much @Koenkk ! that's work but : it is recognized as https://www.zigbee2mqtt.io/devices/TS0601_cover_1.html#tuya-ts0601_cover_1 instead that : https://www.zigbee2mqtt.io/devices/BSEED_TS0601_cover.html

@seanchenxi I'd like to try your method, but I don't know how to put your code in zigbee2mqtt.

I don't know how to calibrate it! when I open or close it, it only works for about ten seconds, and that's not enough!

aureliensas avatar Jul 02 '25 16:07 aureliensas

Can you try using _TZE200_yenbr4om instead of _TZE284_udank5zs? Calibration is not supported for that device, not sure how that can be done.

Koenkk avatar Jul 02 '25 19:07 Koenkk

Can you try using _TZE200_yenbr4om instead of _TZE284_udank5zs? Calibration is not supported for that device, not sure how that can be done.

thanks @Koenkk it's now the good product but lik you said no calibration 😫

Image

aureliensas avatar Jul 02 '25 20:07 aureliensas

I added the device, hopefully somebody figures out the calibration later.

Changes will be available in the dev branch in a few hours from now and in the next release which is every 1st of the month.

Koenkk avatar Jul 04 '25 11:07 Koenkk

Hello, my device is a Zemismart 4 Gang switch running under : _TZE204_wwaeqnrf , that is already supported and working perfectly in Zigbee2Mqtt but now they Updated their Chips and the other 4 Gang Switches have a new ID, its the same device but new hardware or something. This is the Unsuporrted id: _TZE284_y4jqpry8 . What can i do, btw i do not know or understand how to use converters to make it work myself so, i would be very gratefull.

XGCTHX9 avatar Aug 07 '25 20:08 XGCTHX9

Image

Since the last update, the switch is perfectly recognized, but unfortunately impossible to calibrate.

I added the device, hopefully somebody figures out the calibration later.

Changes will be available in the dev branch in a few hours from now and in the next release which is every 1st of the month.

aureliensas avatar Aug 08 '25 15:08 aureliensas

Image Since the last update, the switch is perfectly recognized, but unfortunately impossible to calibrate.

I added the device, hopefully somebody figures out the calibration later. Changes will be available in the dev branch in a few hours from now and in the next release which is every 1st of the month.

hi @aureliensas sorry for this late response, i was on holidays. yes, after last updatem the switch is perfectly recognized, but still no calibraiton.

But I got calibration working via the External converters method (https://www.zigbee2mqtt.io/advanced/more/external_converters.html). Sharing my code below β€” I might submit a PR later with proper codes when I have more time. Hopefully it’s helpful :

import * as tz from 'zigbee-herdsman-converters/converters/toZigbee';
import * as exposes from 'zigbee-herdsman-converters/lib/exposes';
import * as legacy from 'zigbee-herdsman-converters/lib/legacy';
import * as tuya from 'zigbee-herdsman-converters/lib/tuya';

const e = exposes.presets;
const ea = exposes.access;

const dataTypes = {
    raw: 0, // [ bytes ]
    bool: 1, // [0/1]
    value: 2, // [ 4 byte value ]
    string: 3, // [ N byte string ]
    enum: 4, // [ 0-255 ]
    bitmap: 5, // [ 1,2,4 bytes ] as bits
};

function convertDecimalValueTo4ByteHexArray(value) {
    const hexValue = Number(value).toString(16).padStart(8, "0");
    const chunk1 = hexValue.substring(0, 2);
    const chunk2 = hexValue.substring(2, 4);
    const chunk3 = hexValue.substring(4, 6);
    const chunk4 = hexValue.substring(6);
    return [chunk1, chunk2, chunk3, chunk4].map((hexVal) => Number.parseInt(hexVal, 16));
}

var gSec;
// biome-ignore lint/suspicious/noExplicitAny: ignored using `--suppress`
async function sendDataPoints(entity, dpValues, cmd = "dataRequest", seq = undefined) {
    if (seq === undefined) {
        if (gSec === undefined) {
            gSec = 0;
        } else {
            gSec++;
            gSec %= 0xffff;
        }
        // biome-ignore lint/style/noParameterAssign: ignored using `--suppress`
        seq = gSec;
    }

    await entity.command(
        "manuSpecificTuya",
        cmd || "dataRequest",
        {
            seq,
            dpValues,
        },
        {disableDefaultResponse: true},
    );
    return seq;
}

function dpValueFromEnum(dp, value) {
    return {dp, datatype: dataTypes.enum, data: [value]};
}

function dpValueFromIntValue(dp, value) {
    return {dp, datatype: dataTypes.value, data: convertDecimalValueTo4ByteHexArray(value)};
}


export default {
    // Since a lot of Tuya devices use the same modelID, but use different datapoints
    // it's necessary to provide a fingerprint instead of a zigbeeModel
    fingerprint: tuya.fingerprint("TS0601", ["_TZE284_uqfph8ah"]), 
    model: "BSEED_TS0601_cover_new",
    vendor: "BSEED",
    description: "Zigbee curtain switch",
    fromZigbee: [legacy.fz.tuya_cover],
    toZigbee: [
        legacy.tz.tuya_cover_control, 
        {
            key: ["accurate_calibration_1", "quick_Calibration_1"],
            options: [],
            convertSet: async (entity, key, value, meta) => {
                if (key === "accurate_calibration_1") {
                    // 0: start, 1: end
                    value = value.toLowerCase();
                    switch (value) {
                        case "start":
                            await sendDataPoints(entity, [dpValueFromEnum(3, 0)]);
                            break;
                        case "end":
                            await sendDataPoints(entity, [dpValueFromEnum(3, 1)]);
                            break;
                        default:
                            throw new Error("Tuya_cover_control: Invalid command received");
                    }
                } else if (key === "quick_Calibration_1") {
                    if (value >= 1 && value <= 120) {
                        await sendDataPoints(entity, [dpValueFromIntValue(10, value)]);
                    } else {
                        throw new Error("Tuya_cover_control: Quick_Calibration time is out of range");
                    }
                }
            },
        }
    ],
    exposes: [
        e.cover_position().setAccess("position", ea.STATE_SET),
        e.enum("accurate_calibration_1", ea.ALL, ["start", "end"]),
        e.numeric("quick_Calibration_1", ea.ALL).withValueMin(1).withValueMax(120).withUnit("s"),
    ],
};

create a file at data/external_converters/my-first-converter.mjs with above codes , and then restart your zigbee2mqtt

seanchenxi avatar Aug 10 '25 22:08 seanchenxi

Sorry, does anyone know if there is already a solution to the calibration problem?

Vicentegru avatar Aug 27 '25 10:08 Vicentegru

I'm working on Jeedom. The inclusion is OK but there is still no command for its calibration. So I temporarily installed a Zigbee gateway allowing me to see this equipment under smartdevice. Then I changed the rise time value from 10s to 20s. Then I disconnected the gateway. Now the shutter goes up and down to the original stops.

gpenot avatar Sep 03 '25 12:09 gpenot

I have the same issue. I also brought some of these devices and it is not only calibration, that is not working. BUT: I bought the same device a couple of months back from the same store and the old one works! This is how the old (WORKING) one is paired: Model: TS130F Manufacturer: _TZ3000_vsj5o7dm Manufacturer name: Tuya

See the old one and the exposed data. Does that help in any way to get the new ones working? New ones have these parameters: Model: TS0601 Manufacturer: _TZE284_uqfph8ah Manufacurer Name: BSEED

Image

thogens avatar Sep 14 '25 13:09 thogens

All: I found a workaround for calibration and posted it here: https://github.com/Koenkk/zigbee2mqtt/issues/28625#issuecomment-3290740393

thogens avatar Sep 15 '25 12:09 thogens

This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 7 days

github-actions[bot] avatar Nov 15 '25 00:11 github-actions[bot]

Image Since the last update, the switch is perfectly recognized, but unfortunately impossible to calibrate. > I added the device, hopefully somebody figures out the calibration later. > Changes will be available in the [dev branch](https://www.zigbee2mqtt.io/advanced/more/switch-to-dev-branch.html) in a few hours from now and in the next release which is every 1st of the month.

hi @aureliensas sorry for this late response, i was on holidays. yes, after last updatem the switch is perfectly recognized, but still no calibraiton.

But I got calibration working via the External converters method (https://www.zigbee2mqtt.io/advanced/more/external_converters.html). Sharing my code below β€” I might submit a PR later with proper codes when I have more time. Hopefully it’s helpful :

import * as tz from 'zigbee-herdsman-converters/converters/toZigbee';
import * as exposes from 'zigbee-herdsman-converters/lib/exposes';
import * as legacy from 'zigbee-herdsman-converters/lib/legacy';
import * as tuya from 'zigbee-herdsman-converters/lib/tuya';

const e = exposes.presets;
const ea = exposes.access;

const dataTypes = {
    raw: 0, // [ bytes ]
    bool: 1, // [0/1]
    value: 2, // [ 4 byte value ]
    string: 3, // [ N byte string ]
    enum: 4, // [ 0-255 ]
    bitmap: 5, // [ 1,2,4 bytes ] as bits
};

function convertDecimalValueTo4ByteHexArray(value) {
    const hexValue = Number(value).toString(16).padStart(8, "0");
    const chunk1 = hexValue.substring(0, 2);
    const chunk2 = hexValue.substring(2, 4);
    const chunk3 = hexValue.substring(4, 6);
    const chunk4 = hexValue.substring(6);
    return [chunk1, chunk2, chunk3, chunk4].map((hexVal) => Number.parseInt(hexVal, 16));
}

var gSec;
// biome-ignore lint/suspicious/noExplicitAny: ignored using `--suppress`
async function sendDataPoints(entity, dpValues, cmd = "dataRequest", seq = undefined) {
    if (seq === undefined) {
        if (gSec === undefined) {
            gSec = 0;
        } else {
            gSec++;
            gSec %= 0xffff;
        }
        // biome-ignore lint/style/noParameterAssign: ignored using `--suppress`
        seq = gSec;
    }

    await entity.command(
        "manuSpecificTuya",
        cmd || "dataRequest",
        {
            seq,
            dpValues,
        },
        {disableDefaultResponse: true},
    );
    return seq;
}

function dpValueFromEnum(dp, value) {
    return {dp, datatype: dataTypes.enum, data: [value]};
}

function dpValueFromIntValue(dp, value) {
    return {dp, datatype: dataTypes.value, data: convertDecimalValueTo4ByteHexArray(value)};
}


export default {
    // Since a lot of Tuya devices use the same modelID, but use different datapoints
    // it's necessary to provide a fingerprint instead of a zigbeeModel
    fingerprint: tuya.fingerprint("TS0601", ["_TZE284_uqfph8ah"]), 
    model: "BSEED_TS0601_cover_new",
    vendor: "BSEED",
    description: "Zigbee curtain switch",
    fromZigbee: [legacy.fz.tuya_cover],
    toZigbee: [
        legacy.tz.tuya_cover_control, 
        {
            key: ["accurate_calibration_1", "quick_Calibration_1"],
            options: [],
            convertSet: async (entity, key, value, meta) => {
                if (key === "accurate_calibration_1") {
                    // 0: start, 1: end
                    value = value.toLowerCase();
                    switch (value) {
                        case "start":
                            await sendDataPoints(entity, [dpValueFromEnum(3, 0)]);
                            break;
                        case "end":
                            await sendDataPoints(entity, [dpValueFromEnum(3, 1)]);
                            break;
                        default:
                            throw new Error("Tuya_cover_control: Invalid command received");
                    }
                } else if (key === "quick_Calibration_1") {
                    if (value >= 1 && value <= 120) {
                        await sendDataPoints(entity, [dpValueFromIntValue(10, value)]);
                    } else {
                        throw new Error("Tuya_cover_control: Quick_Calibration time is out of range");
                    }
                }
            },
        }
    ],
    exposes: [
        e.cover_position().setAccess("position", ea.STATE_SET),
        e.enum("accurate_calibration_1", ea.ALL, ["start", "end"]),
        e.numeric("quick_Calibration_1", ea.ALL).withValueMin(1).withValueMax(120).withUnit("s"),
    ],
};

create a file at data/external_converters/my-first-converter.mjs with above codes , and then restart your zigbee2mqtt

I was able to implement your code and the new options are showing up, but it seems that no matter which value I set, it does not override the internal β€˜x-seconds-to-open’ rule. I get the following error when I try to set the value for Quick Calibration to 20s:

[2.12.2025, 15:21:41] frontend:api: Sending {"topic":"0xa4c138041f354dac/set","payload":{"quick_Calibration_1":20}}

[2.12.2025, 15:21:41] frontend:api: Sending {"topic":"0xa4c138041f354dac/get","payload":{"quick_Calibration_1":""}}

[2.12.2025, 15:21:41] z2m: No converter available for 'get' 'quick_Calibration_1' ()

Any idea what could be wrong?

Image

icecyper avatar Dec 02 '25 14:12 icecyper