Skip to content

[New device support]: Tuya soil moisture sensor (SGS01Z variant) #32331

Description

@MiyHun

Link

https://fr.aliexpress.com/item/1005007443398328.html?spm=a2g0o.order_list.order_list_main.17.5e965e5bUB5RTD&gatewayAdapt=glo2fra

Database entry

{"id":33,"type":"EndDevice","ieeeAddr":"0xa4c1385b9c49596b","nwkAddr":47274,"manufId":4417,"manufName":"_TZE2841000000_tgrzpqf4","powerSource":"Battery","modelId":"TS0601","epList":[1],"endpoints":{"1":{"profId":260,"epId":1,"devId":81,"inClusterList":[0,57344,60672,1,4,5,3,61184],"outClusterList":[10,25],"clusters":{"genBasic":{"attributes":{"modelId":"TS0601","manufacturerName":"_TZE2841000000_tgrzpqf4","powerSource":3,"zclVersion":3,"appVersion":105,"stackVersion":1,"hwVersion":1}},"genPowerCfg":{"attributes":{"batteryPercentageRemaining":200}}},"binds":[{"cluster":1,"type":"endpoint","deviceIeeeAddress":"0x00124b0026b73a6a","endpointID":1}],"configuredReportings":[{"cluster":1,"attrId":33,"minRepIntval":3600,"maxRepIntval":65000,"repChange":10}],"meta":{}}},"appVersion":105,"stackVersion":1,"hwVersion":1,"zclVersion":3,"interviewCompleted":true,"interviewState":"SUCCESSFUL","meta":{"configured":"0.0.0"},"lastSeen":1781699338215}

Zigbee2MQTT version

2.12.0

External definition

import * as exposes from "zigbee-herdsman-converters/lib/exposes";
import * as tuya from "zigbee-herdsman-converters/lib/tuya";

const e = exposes.presets;

export default {
    fingerprint: tuya.fingerprint("TS0601", ["_TZE2841000000_tgrzpqf4"]),
    model: "TS0601_soil_tgrzpqf4",
    vendor: "Tuya",
    description: "Soil sensor (variant _TZE2841000000_tgrzpqf4)",
    extend: [tuya.modernExtend.tuyaBase({dp: true})],
    exposes: [
        e.temperature(),
        e.soil_moisture(),
        tuya.exposes.temperatureUnit(),
        e.battery(),
        tuya.exposes.batteryState(),
    ],
    meta: {
        tuyaDatapoints: [
            [3, "soil_moisture", tuya.valueConverter.raw],
            [5, "temperature", tuya.valueConverter.divideBy10],
            [9, "temperature_unit", tuya.valueConverter.temperatureUnit],
            [14, "battery_state", tuya.valueConverter.batteryState],
            [15, "battery", tuya.valueConverter.raw],
        ],
    },
};

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

Everything works with this external converter: the device reports temperature,
soil_moisture and battery correctly. It behaves identically to the existing
TS0601_soil_3 definition. Could you add manufacturerName _TZE2841000000_tgrzpqf4
to that definition's fingerprint list? Same fix as PR #11813 which added
_TZE284_tgrzpqf4.

Image

Notes

I have two units, both report this exact manufacturerName
(_TZE2841000000_tgrzpqf4), which is malformed compared to the usual
_TZE284_xxxxxxxx form.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions