Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[New device support]: support of Zemismart ZM25RZ01 roller shade driver _TZE200_bv1jcqqu #17979

Closed
tekman54190 opened this issue Jun 10, 2023 · 6 comments
Labels
new device support New device support request

Comments

@tekman54190
Copy link

Link

https://fr.aliexpress.com/i/1005004544783621.html?gatewayAdapt=glo2fra

Database entry

{"id":97,"type":"EndDevice","ieeeAddr":"0x70ac08fffe4a3b9e","nwkAddr":28228,"manufId":4098,"manufName":"_TZE200_bv1jcqqu","powerSource":"Battery","modelId":"TS0601","epList":[1],"endpoints":{"1":{"profId":260,"epId":1,"devId":81,"inClusterList":[0,4,5,61184],"outClusterList":[25,10],"clusters":{"genBasic":{"attributes":{"65503":";\u001c\u0017,\u0012<\u001c\u0017,\u0012","65506":31,"65508":0,"modelId":"TS0601","manufacturerName":"_TZE200_bv1jcqqu","stackVersion":0,"dateCode":"","appVersion":68}}},"binds":[],"configuredReportings":[],"meta":{}}},"appVersion":68,"stackVersion":0,"hwVersion":1,"dateCode":"","zclVersion":3,"interviewCompleted":true,"meta":{},"lastSeen":1686393261900,"defaultSendRequestWhen":"immediate"}

Comments

Hi guys,

I tried to create the external converter for my new Zemismart roller shade driver _TZE200_bv1jcqqu without luck for the moment...
I tried to use how to but I'm a bit lost, can someone help me?

Thanks ;)

External converter

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;

const definition = {
    zigbeeModel: ['TS0601'], // The model ID from: Device with modelID 'lumi.sens' is not supported.
    model: 'ZM25RZ01/TS0601', // Vendor model number, look on the device for a model number
    vendor: 'Zemismart', // Vendor of the device (only used for documentation and startup logging)
    description: '', // Description of the device, copy from vendor site. (only used for documentation and startup loggin$
    fromZigbee: [], // We will add this later
    toZigbee: [], // Should be empty, unless device can be controlled (e.g. lights, switches).
//    exposes: [e.battery(), e.position(),], // Defines what this device exposes, used for e.g. Home Assistant discovery $
    exposes: [e.battery(), e.position()],
};

Supported color modes

No response

Color temperature range

No response

@tekman54190 tekman54190 added the new device support New device support request label Jun 10, 2023
@burnsie-la
Copy link

burnsie-la commented Jun 18, 2023

I believe this external converter should work, as the _TZE200_bv1jcqqu seems to be the same blind motor as the _TZE200_7eue9vhc

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;
const tuya = require("zigbee-herdsman-converters/lib/tuya");

const definition = {
    // Since a lot of Tuya devices use the same modelID, but use different data points
    // it's usually necessary to provide a fingerprint instead of a zigbeeModel
    fingerprint: [
        {
            // The model ID from: Device with modelID 'TS0601' is not supported
            // You may need to add \u0000 at the end of the name in some cases
            modelID: 'TS0601',
            // The manufacturer name from: Device with modelID 'TS0601' is not supported.
            manufacturerName: '_TZE200_bv1jcqqu'
        },
    ],
    model: 'ZM25RX-08/30',
    vendor: 'Zemismart',
    description: 'Tubular Motor',
    fromZigbee: [fz.tuya_cover, fz.ignore_basic_report],
    toZigbee: [tz.tuya_cover_control, tz.tuya_cover_options, tz.tuya_data_point_test],
    exposes: [e.cover_position().setAccess('position', ea.STATE_SET)],
};

module.exports = definition;

Unfortunately I'm not currently able to test it due to a bug in Zigbee2MQTT with Tuya converters

@tekman54190
Copy link
Author

tekman54190 commented Jun 18, 2023

Hi,

Thanks for helping.
I've an issue after using your file, during service restart I've errors preventing to start the daemon:

`Jun 18 18:58:22 assel-rpi-domotique systemd[1]: Started zigbee2mqtt.

Jun 18 18:58:24 assel-rpi-domotique npm[23594]: > zigbee2mqtt@1.31.2 start

Jun 18 18:58:24 assel-rpi-domotique npm[23594]: > node index.js

Jun 18 18:58:29 assel-rpi-domotique npm[23594]: /opt/zigbee2mqtt/node_modules/zigbee-herdsman-converters/index.js:79

Jun 18 18:58:29 assel-rpi-domotique npm[23594]: if (converter.options) {

Jun 18 18:58:29 assel-rpi-domotique npm[23594]: ^

Jun 18 18:58:29 assel-rpi-domotique npm[23594]: TypeError: Cannot read properties of undefined (reading 'options')

Jun 18 18:58:29 assel-rpi-domotique npm[23594]: at Object.addDefinition [as addDeviceDefinition]
(/opt/zigbee2mqtt/node_modules/zigbee-herdsman-converters/index.js:79:23)

Jun 18 18:58:29 assel-rpi-domotique npm[23594]: at new ExternalConverters (/opt/zigbee2mqtt/lib/extension/externalConverters.ts:15:17)

Jun 18 18:58:29 assel-rpi-domotique npm[23594]: at new Controller (/opt/zigbee2mqtt/lib/controller.ts:84:58)

Jun 18 18:58:29 assel-rpi-domotique npm[23594]: at start (/opt/zigbee2mqtt/index.js:106:18)

Jun 18 18:58:29 assel-rpi-domotique systemd[1]: zigbee2mqtt.service: Main process exited, code=exited, status=1/FAILURE

Jun 18 18:58:29 assel-rpi-domotique systemd[1]: zigbee2mqtt.service: Failed with result 'exit-code'.`

Any idea?

Thanks ;)

@GvdbW
Copy link

GvdbW commented Jun 26, 2023

I have the same issue. I tried the fix in #17863 but it still crashes.

ps: I actually found a solution. I had to change
fz.tuya_cover tz.tuya_cover_control tz.tuya_cover_options
to
legacy.fromZigbee.tuya_cover legacy.toZigbee.tuya_cover_control legacy.toZigbee.tuya_cover_options

@tekman54190
Copy link
Author

Perfect it's working now.

For those who are looking for the converter, here it is:

`const legacy = require('zigbee-herdsman-converters/lib/legacy');
const fz = {...require('zigbee-herdsman-converters/converters/fromZigbee'), legacy: require('zigbee-herdsman-converters/lib/legacy').fromZigbee};
const tz = {...require('zigbee-herdsman-converters/converters/toZigbee'), legacy: require('zigbee-herdsman-converters/lib/legacy').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;
const tuya = require("zigbee-herdsman-converters/lib/tuya");

const definition = {
fingerprint: [
{
modelID: 'TS0601',
manufacturerName: '_TZE200_bv1jcqqu'
},
],
model: 'ZM25RX-08/30',
vendor: 'Zemismart',
description: 'Tubular Motor',
fromZigbee: [legacy.fromZigbee.tuya_cover],
toZigbee: [legacy.toZigbee.tuya_cover_control, legacy.toZigbee.tuya_cover_options],
exposes: [e.cover_position().setAccess('position', ea.STATE_SET)],
};

module.exports = definition;`

@tekman54190
Copy link
Author

Converter created, shade driver working now

Koenkk added a commit to Koenkk/zigbee-herdsman-converters that referenced this issue Jun 27, 2023
@Koenkk
Copy link
Owner

Koenkk commented Jun 27, 2023

@tekman54190 thanks, added!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
new device support New device support request
Projects
None yet
Development

No branches or pull requests

4 participants