Koenkk / zigbee2mqtt

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

[New device support]: Tuya CO2 Sensor TS0601_TZE204_ogkdpgy2 #23569

Open Yoo-Yohan opened 2 months ago

Yoo-Yohan commented 2 months ago

Link

https://aliexpress.com/item/1005005185654474.html?

Database entry

{"id":51,"type":"Router","ieeeAddr":"0xa4c13865459668c9","nwkAddr":62024,"manufId":4417,"manufName":"_TZE204_ogkdpgy2","powerSource":"Mains (single phase)","modelId":"TS0601","epList":[1,242],"endpoints":{"1":{"profId":260,"epId":1,"devId":81,"inClusterList":[4,5,61184,0],"outClusterList":[25,10],"clusters":{"genBasic":{"attributes":{"modelId":"TS0601","manufacturerName":"_TZE204_ogkdpgy2","powerSource":1,"zclVersion":3,"appVersion":74,"stackVersion":0,"hwVersion":1,"dateCode":""}}},"binds":[],"configuredReportings":[],"meta":{}},"242":{"profId":41440,"epId":242,"devId":97,"inClusterList":[],"outClusterList":[33],"clusters":{},"binds":[],"configuredReportings":[],"meta":{}}},"appVersion":74,"stackVersion":0,"hwVersion":1,"dateCode":"","zclVersion":3,"interviewCompleted":true,"meta":{},"lastSeen":1723176996867}

Comments

20240809_133719

External definition

const definition = {
    zigbeeModel: ['TS0601'],
    model: 'TS0601',
    vendor: '_TZE204_ogkdpgy2',
    description: 'Automatically generated definition',
    extend: [],
    meta: {},
};

module.exports = definition;
nmaster2042 commented 1 month ago

I'm wondering if this new version suffers the zigbee network flood bug, like previous one, any update on this ?

Yoo-Yohan commented 1 month ago

I'm wondering if this new version suffers the zigbee network flood bug, like previous one, any update on this ?

This also seems to have same problem, too short reporting cycle, milliseconds

rokiden commented 1 month ago

I have fixed flood bug of this device with custom firmware.

nmaster2042 commented 1 month ago

Very interesting. Thanks you for this nice dev.

Le sam. 7 sept. 2024, 13:24, Denis Kazimirov @.***> a écrit :

I have fixed flood bug of this device with custom firmware https://github.com/rokiden/Tuya_CO2_STC8/blob/tuya_co2/user/README.md.

— Reply to this email directly, view it on GitHub https://github.com/Koenkk/zigbee2mqtt/issues/23569#issuecomment-2335157385, or unsubscribe https://github.com/notifications/unsubscribe-auth/AFNR5KDOGPZTICXK7VGQKSTZVLO53AVCNFSM6AAAAABMHXM66WVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGMZVGE2TOMZYGU . You are receiving this because you commented.Message ID: @.***>

Lurker00 commented 2 weeks ago

I have a round version

PNG picture ![Tuya_CO2_Alarm](https://github.com/user-attachments/assets/176fb415-7f64-45d3-af9e-8439de3d8be0)

which works with the following external definition:

TS0601_CO2_Alarm.js ```javascript 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 modernExtend = require('zigbee-herdsman-converters/lib/modernExtend'); 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: '_TZE204_ogkdpgy2', }, ], model: 'TS0601_co2_sensor', vendor: 'Tuya', description: 'Tuya Zigbee CO2 Sensor', fromZigbee: [tuya.fz.datapoints], toZigbee: [tuya.tz.datapoints], onEvent: tuya.onEventSetTime, configure: tuya.configureMagicPacket, exposes: [ e.co2(), // <- added the co2 expose ], meta: { // All datapoints go in here tuyaDatapoints: [ [2, 'co2', tuya.valueConverter.raw], ], }, }; module.exports = definition; ```

According to Zigbee2MQTT logs, it sends data once per second, just like presence & illuminance sensors (_TZE204_e5m9c5hl and _TZE200_kb5noeto) which are supported.

So why not to add support for this sensor as well?