deconz-rest-plugin icon indicating copy to clipboard operation
deconz-rest-plugin copied to clipboard

Tuya Smoke Detector YG400A - DDF needed

Open Siggi0904 opened this issue 1 year ago • 10 comments

Is there already an existing issue for this?

  • [X] I have searched the existing issues and there is none for my device

Product name

Tuya Smoke Detector YG400A

Manufacturer

_TZ3210_up3pngle

Model identifier

TS0205

Device type to add

Sensor

Node info

a9dcdc14512e2d90fefb7878157381bf459d2dbc

Endpoints and clusters

4d65cfc4b0b66c788c6fc0b90e74dbca6b3be662

46e5113ef25a090f15d69d977605deb6283a86f7

Basic

7896eaaf2ccd13492a94d1ddc472462ad784cafa

Further relevant clusters

Please cross check to TS0205 in addition a sirene. See too: https://github.com/dresden-elektronik/deconz-rest-plugin/pull/3557 at version 2.6.0 release.

Forum: https://forum.phoscon.de/t/tuya-smoke-detector-yg400a-ddf-needed/4534/16

Siggi0904 avatar Feb 10 '24 12:02 Siggi0904

Hello, can try this DDF

{
  "schema": "devcap1.schema.json",
  "manufacturername": "_TZ3210_up3pngle",
  "modelid": "TS0205",
  "vendor": "Tuya",
  "product": "Smoke Sensor",
  "sleeper": false,
  "status": "Gold",
  "subdevices": [
    {
      "type": "$TYPE_FIRE_SENSOR",
      "restapi": "/sensors",
      "uuid": [
        "$address.ext",
        "0x01",
        "0x0500"
      ],
      "fingerprint": {
        "profile": "0x0104",
        "device": "0x0402",
        "endpoint": "0x01",
        "in": [
          "0x0000",
          "0x0001",
          "0x0500"
        ]
      },
      "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:attr", "ep": 1, "cl": "0x0000", "at": "0x0001", "script": "tuya_swversion.js"},
          "read": {"fn": "zcl:attr", "ep": 1, "cl": "0x0000", "at": "0x0001"}
        },
        {
          "name": "attr/type"
        },
        {
          "name": "attr/uniqueid"
        },
        {
          "name": "config/battery",
          "parse": {
            "at": "0x0021",
            "cl": "0x0001",
            "ep": 1,
            "eval": "Item.val = Attr.val / 2",
            "fn": "zcl:attr"
          }
        },
        {
          "name": "config/enrolled"
        },
        {
          "name": "config/on"
        },
        {
          "name": "config/pending"
        },
        {
          "name": "config/reachable"
        },
        {
          "name": "state/fire"
        },
        {
          "name": "state/lastupdated"
        },
        {
          "name": "state/lowbattery"
        },
        {
          "name": "state/test"
        }
      ]
    }
  ],
  "bindings": [
    {
      "bind": "unicast",
      "src.ep": 1,
      "cl": "0x0001",
      "report": [
        {
          "at": "0x0021",
          "dt": "0x20",
          "min": 600,
          "max": 43200,
          "change": "0x00000001"
        }
      ]
    },
    {
      "bind": "unicast",
      "src.ep": 1,
      "cl": "0x0500"
    }
  ]
}

Smanar avatar Feb 10 '24 13:02 Smanar

Hi @Smanar, is the modelname correct?

Can I test activate the sirene, like in iobroker?

Great thanks.

Siggi0904 avatar Feb 10 '24 14:02 Siggi0904

  "manufacturername": "_TZ3210_up3pngle",
  "modelid": "TS0205",

Yep this is from the capture, so from the device itself, it's tuya, they can write anything on the box as model, even on different hardware. It's for that I m using a generic "product" "product": "Smoke Sensor",

Because in 2 day we can have the VB789512 from Moes that will use the same DDF.

Smanar avatar Feb 10 '24 16:02 Smanar

@Smanar looks good, could be added for next release. I called the json file: _TZ3210_TS0205_YG400A_smoke_sensor.json

In Phoscon App:

grafik

In IOBroker:

grafik

Siggi0904 avatar Feb 11 '24 11:02 Siggi0904

Done https://github.com/dresden-elektronik/deconz-rest-plugin/pull/7593

Smanar avatar Feb 11 '24 14:02 Smanar

@Smanar can you check the ddf file for updating device connection? In phoscon the device is shown with long time away for last updated.

With this value, phoscon shows the device as not reachable after around 1 week.

Siggi0904 avatar Feb 22 '24 16:02 Siggi0904

It's not something normal ? Can you show the device json from for exemple phoscon/help/API Information/sensor ? The battery report need to be enought I think.

Smanar avatar Feb 22 '24 17:02 Smanar

{ "config": { "battery": 100, "on": true, "pending": [], "reachable": true }, "ep": 1, "etag": "2f8975ceabfee16ba425f0623f6cf864", "lastannounced": "2024-02-11T11:41:59Z", "lastseen": "2024-02-22T17:15Z", "manufacturername": "_TZ3210_up3pngle", "modelid": "TS0205", "name": "Rauchmelder Wohnzimmer", "state": { "fire": false, "lastupdated": "2024-02-20T17:10:30.924", "lowbattery": false, "test": false }, "swversion": "1.0.1", "type": "ZHAFire", "uniqueid": "a4:c1:38:a3:67:11:fc:c2-01-0500" }

but phoscon says last seen 2 days ago: grafik

Siggi0904 avatar Feb 22 '24 17:02 Siggi0904

So for me all is fine. "lastseen": "2024-02-22T17:15Z" Not the device fault if you haven't fire in your home and the value have not moved ^^.

Honnestly IDK how work Phoscon for this kind of device.

Smanar avatar Feb 22 '24 20:02 Smanar

okay, will have a look at this device, if it's not reachable.

Siggi0904 avatar Feb 24 '24 11:02 Siggi0904

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[bot] avatar Mar 17 '24 01:03 github-actions[bot]

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.

github-actions[bot] avatar Mar 24 '24 01:03 github-actions[bot]

Hi there, my smoke alarms arrived today. I tried it with this DDF, but unfortunately some values are missing: image { "config": { "battery": 0, "on": true, "pending": [], "reachable": true }, "ep": 1, "etag": "9ca8e8bd66b25e45f614d88eb668322c", "lastannounced": "2024-04-26T19:25:17Z", "lastseen": "2024-04-26T19:24Z", "manufacturername": "_TZ3210_up3pngle", "modelid": "TS0205", "name": "TS0205", "state": { "fire": null, "lastupdated": "none", "lowbattery": null, "test": false }, "type": "ZHAFire", "uniqueid": "a4:c1:38:ca:d8:b9:00:ad-01-0500" }

Can anyone help? Thanks in advance.

BooWseR avatar Apr 26 '24 20:04 BooWseR

I don't see something special for this device, the enrollement have probably failed. Can work after a time, or try to re-include the device.

If you have the GUI, IAS debug can help.

Smanar avatar Apr 27 '24 09:04 Smanar