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]: #20235

Closed
maltbit opened this issue Dec 16, 2023 · 1 comment
Closed

[New device support]: #20235

maltbit opened this issue Dec 16, 2023 · 1 comment
Labels
new device support New device support request

Comments

@maltbit
Copy link

maltbit commented Dec 16, 2023

Link

https://www.amazon.de/dp/B0BWJHHK89?ref=ppx_yo2ov_dt_b_product_details&th=1

Database entry

{"id":17,"type":"EndDevice","ieeeAddr":"0xa4c1384ce5516233","nwkAddr":39948,"manufId":4417,"manufName":"_TZE204_yjjdcqsq","powerSource":"Battery","modelId":"TS0601","epList":[1],"endpoints":{"1":{"profId":260,"epId":1,"devId":81,"inClusterList":[4,5,61184,0],"outClusterList":[25,10],"clusters":{"genBasic":{"attributes":{"65503":"\u0000\u0000\u0000\u0000\u0011","65506":56,"65508":0,"65534":0,"appVersion":73,"modelId":"TS0601","manufacturerName":"_TZE204_yjjdcqsq","powerSource":3,"zclVersion":3,"stackVersion":0,"hwVersion":1,"dateCode":""}}},"binds":[],"configuredReportings":[],"meta":{}}},"appVersion":73,"stackVersion":0,"hwVersion":1,"dateCode":"","zclVersion":3,"interviewCompleted":true,"meta":{"configured":1335756102},"lastSeen":1702719845647,"defaultSendRequestWhen":"immediate"}

Comments

This device is not supported using zigbee2mqtt version 1.34.0 commit 56589dc.
It seems to be a clone of TuYa ZTH01 which is already supported by Zigbee2MQTT.
I managed to get it supported by adding an additional manufacturer fingerprint in the tuya.js file in
directory /opt/zigbee2mqtt/node_modules/zigbee-herdsman-converters/devices .
Could you please officially integrate this device into zigbee2mqtt?
Thank you.
tuya_modified_zth01.tar.gz

External converter

extract of /opt/zigbee2mqtt/node_modules/zigbee-herdsman-converters/devices/tuya.js with modification - making this device supported (entries '_TZE204_yjjdcqsq' added):

{
        fingerprint: tuya.fingerprint('TS0601', ['_TZE200_yjjdcqsq', '_TZE200_9yapgbuv', '_TZE204_upagmta9', '_TZE200_cirvgep4', '_TZE200_upagmta9', '_TZE204_yjjdcqsq']),
        model: 'TS0601_temperature_humidity_sensor_2',
        vendor: 'TuYa',
        description: 'Temperature and humidity sensor',
        fromZigbee: [tuya.fz.datapoints],
        toZigbee: [tuya.tz.datapoints],
        onEvent: tuya.onEvent({ queryOnDeviceAnnounce: true }),
        configure: async (device, coordinatorEndpoint, logger) => {
            await tuya.configureMagicPacket(device, coordinatorEndpoint, logger);
            // Required to get the device to start reporting
            await device.getEndpoint(1).command('manuSpecificTuya', 'dataQuery', {});
        },
        exposes: [e.temperature(), e.humidity(), tuya.exposes.batteryState(), tuya.exposes.temperatureUnit()],
        meta: {
            tuyaDatapoints: [
                [1, 'temperature', tuya.valueConverter.divideBy10],
                [2, 'humidity', tuya.valueConverter.raw],
                [3, 'battery_state', tuya.valueConverter.batteryState],
                [9, 'temperature_unit', tuya.valueConverter.temperatureUnitEnum],
            ],
        },
        whiteLabel: [
            tuya.whitelabel('TuYa', 'ZTH01', 'Temperature and humidity sensor', ['_TZE200_yjjdcqsq']),
            tuya.whitelabel('TuYa', 'ZTH02', 'Temperature and humidity sensor', ['_TZE200_9yapgbuv']),
            tuya.whitelabel('TuYa', 'ZTH05', 'Temperature and humidity sensor', ['_TZE204_upagmta9', '_TZE200_upagmta9']),
            tuya.whitelabel('TuYa', 'ZTH08-E', 'Temperature and humidity sensor', ['_TZE200_cirvgep4']),
            tuya.whitelabel('TuYa', 'ZTH01', 'Temperature and humidity sensor', ['_TZE0204_yjjdcqsq']),
        ],
    },

Supported color modes

No response

Color temperature range

No response

@maltbit maltbit added the new device support New device support request label Dec 16, 2023
Koenkk added a commit to Koenkk/zigbee-herdsman-converters that referenced this issue Dec 17, 2023
@Koenkk
Copy link
Owner

Koenkk commented Dec 17, 2023

done!

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

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