Tuya _TZE200_v1jqz5cy Zigbee Chlorine Meter

Hi,

Can someone help me how to receive data from this Zigbee Chlorine Meter?

Tips

deCONZ Info:

image


DDF Info:

image

Thanks in advance

Sure you can take exemple on this one https://github.com/dresden-elektronik/deconz-rest-plugin/blob/master/devices/tuya/_TZE200_dwcarsat_air_sensor.json

Unfortunately, the PR to support raw value was refused (and it seem your values are raw), so you probably do something like


{
  "schema": "devcap1.schema.json",
  "manufacturername": "_TZE200_v1jqz5cy",
  "modelid": "TS0601",
  "vendor": "Tuya",
  "product": "Zigbee Chlorine Meter",
  "sleeper": true,
  "status": "Gold",
  "subdevices": [
    {
      "type": "$TYPE_CHLORINE_SENSOR",
      "restapi": "/sensors",
      "uuid": [
        "$address.ext",
        "0x01",
        "0x041a"
      ],
      "items": [
        {
          "name": "attr/id"
        },
        {
          "name": "attr/lastannounced"
        },
        {
          "name": "attr/lastseen"
        },
        {
          "name": "attr/manufacturername"
        },
        {
          "name": "attr/modelid"
        },
        {
          "name": "attr/name"
        },
        {
          "name": "attr/type"
        },
        {
          "name": "attr/uniqueid"
        },
        {
          "name": "config/on"
        },
        {
          "name": "config/reachable"
        },
        {
          "name": "state/measured_value",
          "read": {
            "fn": "none"
          },
          "parse": {
            "dpid": 102,
            "eval": "Item.val = (ZclFrame.at(3) << 32) | (ZclFrame.at(2) << 16) | (ZclFrame.at(1) << 8) | ZclFrame.at(0);",
            "fn": "tuya"
          },
          "default": 0
        },
        {
          "name": "state/lastupdated"
        }
      ]
    }
  ]
}

And as there is no sensor for Clorine et, you need too add the file clorine_sensor.json in devices\generic\subdevices\

{
    "schema": "subdevice1.schema.json",
    "type": "$TYPE_CHLORINE_SENSOR",
    "name": "ZHAClorine",
    "restapi": "/sensors",
    "order": 20,
    "uuid": ["$address.ext", "0x01", "0x041A"],
    "items": [
        "config/on",
        "config/reachable",
        "state/measured_value",
        "cap/measured_value/min",
        "cap/measured_value/max",
        "cap/measured_value/unit",
        "cap/measured_value/dimension",
        "state/lastupdated"
    ]
}

Hi @Smanar ,

Always on the lookout Thanks to respond so fast :slight_smile:

I create the DDF like you describe but now how can I see in Phoscon or in deCONZ to see value from the Chlorine Meter?

{
  "schema": "devcap1.schema.json",
  "manufacturername": "_TZE200_v1jqz5cy",
  "modelid": "TS0601",
  "vendor": "Tuya",
  "product": "Zigbee Chlorine Meter",
  "sleeper": true,
  "status": "Gold",
  "path": "/devices/ts0601.json",
  "subdevices": [
    {
      "type": "$TYPE_CHLORINE_SENSOR",
      "restapi": "/sensors",
      "uuid": [
        "$address.ext",
        "0x01",
        "0x041a"
      ],
      "items": [
        {
          "name": "attr/id"
        },
        {
          "name": "attr/lastannounced"
        },
        {
          "name": "attr/lastseen"
        },
        {
          "name": "attr/manufacturername"
        },
        {
          "name": "attr/modelid"
        },
        {
          "name": "attr/name"
        },
        {
          "name": "attr/type"
        },
        {
          "name": "attr/uniqueid"
        },
        {
          "name": "config/on"
        },
        {
          "name": "config/reachable"
        },
        {
          "name": "state/measured_value",
          "read": {
            "fn": "none"
          },
          "parse": {
            "dpid": 102,
            "eval": "Item.val = (ZclFrame.at(3) << 32) | (ZclFrame.at(2) << 16) | (ZclFrame.at(1) << 8) | ZclFrame.at(0);",
            "fn": "tuya"
          },
          "default": 0
        },
        {
          "name": "state/lastupdated"
        }
      ]
    }
  ]
}

What about the other value do you check this help

1: TDS
2: temperature
101: ORP
102: CL
7: Battery Percentage
105: backlight Value
10: ph Value
11: EC Value
108: EC Max Value
109: EC Min Value
110: ORP max
111: ORP min
112: CL Max Value
113: CL Min Value
114: PH??
115: EC??
116: ORP??
117: Salt

I see this one on the API:

image

Wich one deconz version have you ?
You need to use a recent one for the “new item creation” feature. On last one with the clorine_sensor.json file, it make deconz able to create the state/measured_value, and ATM this field is missing on your json

but now how can I see in Phoscon or in deCONZ to see value from the Chlorine Meter?

On phoscon, will be impossible, on deconz too, it’s tuya, but you can make like you have done, check direclty in the API using phoscon/help/API Information (or use a third app)

temperature/battery will be easy, already in item list.
Need to do same for EC and salt, but make first chlorine working.

Can you please open a GitHub issue?

Just take care about having the H for cHlorine everywhere :wink:

2 Likes

I will open soon a Github Issue. I have access I just want finish my DDF before.

1 Like

Here the GitHub issue link:Solar / Floating Water Quality Tester · Issue #7215 · dresden-elektronik/deconz-rest-plugin · GitHub