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]: Gas sensor (methane) by EKF (TS0601_TZE200_nus5kk3n) #21741

Closed
onmobs opened this issue Mar 10, 2024 · 7 comments
Closed
Labels
new device support New device support request

Comments

@onmobs
Copy link

onmobs commented Mar 10, 2024

Link

https://ekfgroup.com/ru/catalog/products/umnyj-datchik-gaza-zigbee

Database entry

{"id":11,"type":"Router","ieeeAddr":"0x142d41fffe50a2a9","nwkAddr":32885,"manufId":4098,"manufName":"_TZE200_nus5kk3n","powerSource":"Mains (single phase)","modelId":"TS0601","epList":[1],"endpoints":{"1":{"profId":260,"epId":1,"devId":81,"inClusterList":[0,4,5,61184],"outClusterList":[25,10],"clusters":{"genBasic":{"attributes":{"65503":"NG�-\u0012OG�-\u0012qG�-\u0012rG�-\u0012\u0000\u0000\u0000\u0000\u0005\u0000\u0000\u0000\u0000\u0007\u0000\u0000\u0000\u0000\u0012\u0000\u0000\u0000\u0000\u0012","65506":31,"65508":0,"65534":0,"modelId":"TS0601","manufacturerName":"_TZE200_nus5kk3n","powerSource":1,"zclVersion":3,"appVersion":70,"stackVersion":0,"hwVersion":1,"dateCode":""}}},"binds":[],"configuredReportings":[],"meta":{}}},"appVersion":70,"stackVersion":0,"hwVersion":1,"dateCode":"","zclVersion":3,"interviewCompleted":true,"meta":{"configured":-708457359}

Comments

Tuya Gas detector analog, works with tuya gas sensor config that I copied to external converter file. Maybe I did something wrong, it is my first time creating custom converters, but it works - expose "gas" triggers "true" when sensing gas leak.

External definition

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 datapoints
    // it's 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_nus5kk3n',
        },
    ],
        model: 'TS0601_TZE200_nus5kk3n',
        vendor: 'TuYa',
        description: 'Gas sensor',
        fromZigbee: [tuya.fz.datapoints],
        toZigbee: [tuya.tz.datapoints],
        configure: tuya.configureMagicPacket,
        exposes: [e.gas(), tuya.exposes.selfTest(), tuya.exposes.selfTestResult(), tuya.exposes.faultAlarm(), tuya.exposes.silence()],
        meta: {
            tuyaDatapoints: [
                [1, 'gas', tuya.valueConverter.trueFalse0],
                [9, 'self_test_result', tuya.valueConverter.selfTestResult],
                [11, 'fault_alarm', tuya.valueConverter.trueFalse1],
        ],
    },
};

module.exports = definition;
@onmobs onmobs added the new device support New device support request label Mar 10, 2024
@Koenkk
Copy link
Owner

Koenkk commented Mar 10, 2024

Could you try with the following external converter?

@onmobs
Copy link
Author

onmobs commented Mar 10, 2024

I have already tried this converter before, copied it from tuya.ts, only 'gas' and 'self_test_result' (physical button press) exposes are working, maybe 'fault_alarm' too (not sure), other datapoints returns nothing.

Koenkk pushed a commit to Koenkk/zigbee-herdsman-converters that referenced this issue Mar 11, 2024
@Koenkk
Copy link
Owner

Koenkk commented Mar 11, 2024

No problem, I've added your converter.

Changes will be available in the dev branch in a few hours from now.

@onmobs
Copy link
Author

onmobs commented Mar 11, 2024

Thank you.

@onmobs
Copy link
Author

onmobs commented Apr 9, 2024

I updated z2m to 1.36.1 but gas detector still unsupported when I remove external converter and trying to rejoin it.

Koenkk added a commit to Koenkk/zigbee-herdsman-converters that referenced this issue Apr 10, 2024
@Koenkk
Copy link
Owner

Koenkk commented Apr 10, 2024

Found the issue, fixed it!

Changes will be available in the dev branch in a few hours from now.

@onmobs
Copy link
Author

onmobs commented Apr 11, 2024

Thank you, but I`ll wait for stable branch)

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

2 participants