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 request - TS0601 / TZE200_locansqn #6972

Closed
Gorole opened this issue May 14, 2023 · 19 comments
Closed

New device request - TS0601 / TZE200_locansqn #6972

Gorole opened this issue May 14, 2023 · 19 comments

Comments

@Gorole
Copy link

Gorole commented May 14, 2023

Hi,
i buy this thermomether on Aliexpress :-)

but deconz is not supported :-(

  • Product name: Tuya TH01Z-WHITE/BLACK
  • Manufacturer: _TZE200_locansqn
  • Model identifier: TS0601
  • Device type :
    • Thermostat

thermo
Screenshot of the Groups cluster
thermo7
Screenshot of the Scenes cluster
thermo8
Screenshot of the Tuya specific cluster
thermo6
Screenshot of the Basic cluster
thermo4
Screenshot of the Node Info Panel
thermo3
Screenshot of the OTAU cluster
thermo5
Screenshot of the Time cluster
thermo9

thermo1
thermo2

@Mimiix
Copy link
Collaborator

Mimiix commented May 14, 2023

Hi, can you please add all screenshots ?

@Gorole
Copy link
Author

Gorole commented May 15, 2023

Done

@Mimiix
Copy link
Collaborator

Mimiix commented May 15, 2023

Great :)

@BabaIsYou
Copy link
Contributor

BabaIsYou commented May 15, 2023

Can you try this DDF ?

{
  "schema": "devcap1.schema.json",
  "manufacturername": ["_TZE200_locansqn","_TZE200_lve3dvpy","_TZE200_c7emyjom"],
  "modelid": ["TS0601","TS0601","TS0601"],
  "product": "Tuya temp and humidity sensor with clock",
  "sleeper": true,
  "status": "Gold",
  "subdevices": [
    {
      "type": "$TYPE_HUMIDITY_SENSOR",
      "restapi": "/sensors",
      "uuid": [
        "$address.ext",
        "0x01",
        "0x0405"
      ],
      "items": [
        {
          "name": "attr/id"
        },
        {
          "name": "attr/lastannounced"
        },
        {
          "name": "attr/lastseen"
        },
        {
          "name": "attr/manufacturername"
        },
        {
          "name": "attr/modelid"
        },
        {
          "name": "attr/name"
        },
        {
          "name": "attr/swversion",                   
          "parse": {"fn": "zcl", "ep": 1, "cl": "0x0000", "at": "0x0001", "script": "tuya_swversion.js"},
          "read": {"fn": "zcl", "ep": 1, "cl": "0x0000", "at": "0x0001"}
        },
        {
          "name": "attr/type"
        },
        {
          "name": "attr/uniqueid"
        },
        {
          "name": "config/offset",
          "default": 0
        },
        {
          "name": "config/on"
        },
        {
          "name": "config/reachable"
        },
        {
          "name": "state/humidity",
          "parse": {"fn": "tuya", "dpid": 2, "eval": "Item.val = 10 * Attr.val;" },
          "read": {"fn": "tuya"},
          "default": 0
        },
        {
          "name": "config/battery",
          "parse": {"fn": "tuya", "dpid": 4, "eval": "Item.val = Attr.val;" },
          "read": {"fn": "none"},
          "default": 0
        },
        {
          "name": "state/lastupdated"
        }
      ]
    },
    {
      "type": "$TYPE_TEMPERATURE_SENSOR",
      "restapi": "/sensors",
      "uuid": [
        "$address.ext",
        "0x01",
        "0x0402"
      ],
      "items": [
        {
          "name": "attr/id"
        },
        {
          "name": "attr/lastannounced"
        },
        {
          "name": "attr/lastseen"
        },
        {
          "name": "attr/manufacturername"
        },
        {
          "name": "attr/modelid"
        },
        {
          "name": "attr/name"
        },
        {
          "name": "attr/swversion",                   
          "parse": {"fn": "zcl", "ep": 1, "cl": "0x0000", "at": "0x0001", "script": "tuya_swversion.js"},
          "read": {"fn": "zcl", "ep": 1, "cl": "0x0000", "at": "0x0001"}
        },
        {
          "name": "attr/type"
        },
        {
          "name": "attr/uniqueid"
        },
        {
          "name": "config/offset",
          "default": 0
        },
        {
          "name": "config/battery",
          "parse": {"fn": "tuya", "dpid": 4, "eval": "Item.val = Attr.val;" },
          "read": {"fn": "none"},
          "default": 0
        },
        {
          "name": "config/on"
        },
        {
          "name": "config/reachable"
        },
        {
          "name": "state/lastupdated"
        },
        {
          "name": "state/temperature",
          "parse": {"fn": "tuya", "dpid": 1, "eval": "Item.val = 10 * Attr.val;" },
          "read": {"fn": "none"},
          "default": 0
        }
      ]
    }
  ]
}

Could get/configure other informations using other dpip but will see furthermore if we could use them in REST-APi

TempUnitConvert: 9 (1 celsius, 2 fahrenheit),
AlarmTempMax: 10,
AlarmTempMin: 11,
AlarmHumiMax: 12,
AlarmHumiMin: 13,
TempAlarmStatus: 14 (1 'canceled', 2 'lower_alarm', 3 'upper_alarm')
HumiAlarm: 15, (1 'canceled', 2 'lower_alarm', 3 'upper_alarm')
TempSensitivity: 19,
ReportInterval: 17 (minutes, between 5 and 60)

@Gorole
Copy link
Author

Gorole commented May 17, 2023

Iam running on HAOS.
I dont know how i edit DDF... :-(

@BabaIsYou
Copy link
Contributor

May be you could find some information here : #6666 (comment)

@Gorole
Copy link
Author

Gorole commented May 23, 2023

It's much better.
The device already has the correct name, but unfortunately it does not send values.
temperature
temperature_HA

@BabaIsYou
Copy link
Contributor

Do you see something special in log ?

@github-actions
Copy link
Contributor

As there has not been any response in 21 days, this issue has been automatically marked as stale. At OP: Please either close this issue or keep it active It will be closed in 7 days if no further activity occurs.

@github-actions github-actions bot added the stale label Jun 15, 2023
@Gorole
Copy link
Author

Gorole commented Jun 18, 2023

Do you see something special in log ?

Whitch log do you mean?
Snímek obrazovky 2023-06-18 182552

@github-actions github-actions bot removed the stale label Jun 19, 2023
@mkress
Copy link

mkress commented Jun 28, 2023

@mkress
Copy link

mkress commented Jun 28, 2023

adding the manufacturername _TZE200_locansqn to the ddf file /usr/share/deCONZ/devices/tuya/_TZE200_TS0601_humidity_temp.json helped

temperature and humidity are now there - EDIT: battery is after some time also showing up.
I'm currently not sure if updates are working... - EDIT - update is also working

"manufacturername": ["_TZE200_locansqn","_TZE200_bjawzodf"...

api/... /sensors now returns:

"43": {
"config": {
"battery": 100,
"offset": 0,
"on": true,
"reachable": true
},
"etag": "39c19665be98752cac49f560e695a78f",
"lastannounced": "2023-06-28T19:50:22Z",
"lastseen": "2023-06-28T20:00Z",
"manufacturername": "_TZE200_locansqn",
"modelid": "TS0601",
"name": "Humidity 43",
"state": {
"humidity": 4100,
"lastupdated": "2023-06-28T20:00:30.573"
},
"swversion": "1.0.8",
"type": "ZHAHumidity",
"uniqueid": "a4:c1:38:1c:1a:a7:1f:cf-01-0405"
},
"44": {
"config": {
"battery": 100,
"offset": 0,
"on": true,
"reachable": true
},
"etag": "5bfbc09a5ac91010d4a4b76ee6ab30da",
"lastannounced": "2023-06-28T19:50:22Z",
"lastseen": "2023-06-28T20:00Z",
"manufacturername": "_TZE200_locansqn",
"modelid": "TS0601",
"name": "Temperature 44",
"state": {
"lastupdated": "2023-06-28T20:00:30.445",
"temperature": 2520
},
"swversion": "1.0.8",
"type": "ZHATemperature",
"uniqueid": "a4:c1:38:1c:1a:a7:1f:cf-01-0402"
}

@github-actions
Copy link
Contributor

As there has not been any response in 21 days, this issue has been automatically marked as stale. At OP: Please either close this issue or keep it active It will be closed in 7 days if no further activity occurs.

@github-actions github-actions bot added the stale label Jul 20, 2023
@github-actions
Copy link
Contributor

As there has not been any response in 28 days, this issue will be closed. @ OP: If this issue is solved post what fixed it for you. If it is not solved, request to get this opened again.

@azlux
Copy link

azlux commented Aug 12, 2023

On my side, I've got the same device, but the humidity was reported as 5.5% instead of 55%.

So I've modify the json with :

        {
          "name": "state/humidity",
          "parse": {"fn": "tuya", "dpid": 2, "eval": "Item.val = 100 * Attr.val;" },
          "read": {"fn": "tuya"},
          "default": 0
        },

Not sure if it's the good way (first time I modify deconz config).
Thank for the hardware and tools btw, it's amazing.
Azlux

@BabaIsYou
Copy link
Contributor

Where did you get this 5.5% ? Not thru Rest-Api surely !

@BabaIsYou
Copy link
Contributor

BabaIsYou commented Aug 12, 2023 via email

@azlux
Copy link

azlux commented Oct 31, 2023

My current file is :

{
  "schema": "devcap1.schema.json",
  "manufacturername": [
    "_TZE200_locansqn",
    "_TZE200_lve3dvpy",
    "_TZE200_c7emyjom"
  ],
  "modelid": [
    "TS0601",
    "TS0601",
    "TS0601"
  ],
  "vendor": "Tuya",
  "product": "Tuya temp and humidity sensor with clock",
  "sleeper": true,
  "status": "Gold",
  "subdevices": [
    {
      "type": "$TYPE_HUMIDITY_SENSOR",
      "restapi": "/sensors",
      "uuid": [
        "$address.ext",
        "0x01",
        "0x0405"
      ],
      "items": [
        {
          "name": "attr/id"
        },
        {
          "name": "attr/lastannounced"
        },
        {
          "name": "attr/lastseen"
        },
        {
          "name": "attr/manufacturername"
        },
        {
          "name": "attr/modelid"
        },
        {
          "name": "attr/name"
        },
        {
          "name": "attr/swversion"
        },
        {
          "name": "attr/type"
        },
        {
          "name": "attr/uniqueid"
        },
        {
          "name": "config/battery",
          "read": {
            "fn": "none"
          },
          "parse": {
            "dpid": 4,
            "eval": "Item.val = Attr.val;",
            "fn": "tuya"
          },
          "default": 0
        },
        {
          "name": "config/offset",
          "default": 0
        },
        {
          "name": "config/on"
        },
        {
          "name": "config/reachable"
        },
        {
          "name": "state/humidity",
          "read": {
            "fn": "tuya"
          },
          "parse": {
            "dpid": 2,
            "eval": "Item.val = 100 * Attr.val;",
            "fn": "tuya"
          },
          "default": 0
        },
        {
          "name": "state/lastupdated"
        }
      ]
    },
    {
      "type": "$TYPE_TEMPERATURE_SENSOR",
      "restapi": "/sensors",
      "uuid": [
        "$address.ext",
        "0x01",
        "0x0402"
      ],
      "items": [
        {
          "name": "attr/id"
        },
        {
          "name": "attr/lastannounced"
        },
        {
          "name": "attr/lastseen"
        },
        {
          "name": "attr/manufacturername"
        },
        {
          "name": "attr/modelid"
        },
        {
          "name": "attr/name"
        },
        {
          "name": "attr/swversion"
        },
        {
          "name": "attr/type"
        },
        {
          "name": "attr/uniqueid"
        },
        {
          "name": "config/battery",
          "read": {
            "fn": "none"
          },
          "parse": {
            "dpid": 4,
            "eval": "Item.val = Attr.val;",
            "fn": "tuya"
          },
          "default": 0
        },
        {
          "name": "config/offset",
          "default": 0
        },
        {
          "name": "config/on"
        },
        {
          "name": "config/reachable"
        },
        {
          "name": "config/sensitivity",
          "description": "Report temperature sensibility (from 1 to 10), in *10 value (6 for 0.6 precision). Default 6",
          "range": [1, 10],
          "parse": {
            "dpid": 19,
            "eval": "Item.val = Attr.val;",
            "fn": "tuya"
          },
          "read": {
            "fn": "none"
          },
          "write": {
            "dpid": 19,
            "eval": "Item.val / 10;",
            "fn": "tuya"
          },
          "default": 0
        },
        {
          "name": "state/lastupdated"
        },
        {
          "name": "state/temperature",
          "read": {
            "fn": "none"
          },
          "parse": {
            "dpid": 1,
            "eval": "Item.val = 10 * Attr.val;",
            "fn": "tuya"
          },
          "default": 0
        }
      ]
    }
  ]
}

I didn't find a good doc about the read/write config, not sure if I've read it well.

To config my sensitivity, I use the API:

curl -X GET -H "Content-Type: application/json" "http://127.0.0.1:70/api/<API-KEY>/sensors/" | jq

-> search for the ID of your sensor

curl -X PUT -H "Content-Type: application/json" "http://127.0.0.1:70/api/<API-KEY>/sensors/<SENSOR-ID>/config" --data '{"sensitivity": 1}'

-> confirmation with :

curl -X GET -H "Content-Type: application/json" "http://127.0.0.1:70/api/<API-KEY>/sensors/<SENSOR-ID>/" | jq

That is the max I can do, I don't know how to get this value spawn on home-assistant (for my case)

Where did you get this 5.5% ? Not thru Rest-Api surely !

@BabaIsYou I divide by /100 on my home-assistant. Deconz was giving me 500 instead of 5000

@Gorole
Copy link
Author

Gorole commented Feb 9, 2024

Thank for your replies :-)
My DDF is :

{
  "schema": "devcap1.schema.json",
  "manufacturername": ["_TZE200_locansqn","_TZE200_lve3dvpy","_TZE200_c7emyjom"],
  "modelid": ["TS0601","TS0601","TS0601"],
  "product": "Tuya temp and humidity sensor with clock",
  "sleeper": true,
  "status": "Gold",
  "subdevices": [
    {
      "type": "$TYPE_HUMIDITY_SENSOR",
      "restapi": "/sensors",
      "uuid": [
        "$address.ext",
        "0x01",
        "0x0405"
      ],
      "items": [
        {
          "name": "attr/id"
        },
        {
          "name": "attr/lastannounced"
        },
        {
          "name": "attr/lastseen"
        },
        {
          "name": "attr/manufacturername"
        },
        {
          "name": "attr/modelid"
        },
        {
          "name": "attr/name"
        },
        {
          "name": "attr/swversion",                   
          "parse": {"fn": "zcl", "ep": 1, "cl": "0x0000", "at": "0x0001", "script": "tuya_swversion.js"},
          "read": {"fn": "zcl", "ep": 1, "cl": "0x0000", "at": "0x0001"}
        },
        {
          "name": "attr/type"
        },
        {
          "name": "attr/uniqueid"
        },
        {
          "name": "config/offset",
          "default": 0
        },
        {
          "name": "config/on"
        },
        {
          "name": "config/reachable"
        },
        {
          "name": "state/humidity",
          "parse": {"fn": "tuya", "dpid": 2, "eval": "Item.val = 100 * Attr.val;" },
          "read": {"fn": "tuya"},
          "default": 0
        },
        {
          "name": "config/battery",
          "parse": {"fn": "tuya", "dpid": 4, "eval": "Item.val = Attr.val;" },
          "read": {"fn": "none"},
          "default": 0
        },
        {
          "name": "state/lastupdated"
        }
      ]
    },
    {
      "type": "$TYPE_TEMPERATURE_SENSOR",
      "restapi": "/sensors",
      "uuid": [
        "$address.ext",
        "0x01",
        "0x0402"
      ],
      "items": [
        {
          "name": "attr/id"
        },
        {
          "name": "attr/lastannounced"
        },
        {
          "name": "attr/lastseen"
        },
        {
          "name": "attr/manufacturername"
        },
        {
          "name": "attr/modelid"
        },
        {
          "name": "attr/name"
        },
        {
          "name": "attr/swversion",                   
          "parse": {"fn": "zcl", "ep": 1, "cl": "0x0000", "at": "0x0001", "script": "tuya_swversion.js"},
          "read": {"fn": "zcl", "ep": 1, "cl": "0x0000", "at": "0x0001"}
        },
        {
          "name": "attr/type"
        },
        {
          "name": "attr/uniqueid"
        },
        {
          "name": "config/offset",
          "default": 0
        },
        {
          "name": "config/battery",
          "parse": {"fn": "tuya", "dpid": 4, "eval": "Item.val = Attr.val;" },
          "read": {"fn": "none"},
          "default": 0
        },
        {
          "name": "config/on"
        },
        {
          "name": "config/reachable"
        },
        {
          "name": "state/lastupdated"
        },
        {
          "name": "state/temperature",
          "parse": {"fn": "tuya", "dpid": 1, "eval": "Item.val = 10 * Attr.val;" },
          "read": {"fn": "none"},
          "default": 0
        }
      ]
    }
  ]
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants