dresden-elektronik / deconz-rest-plugin

deCONZ REST-API plugin to control ZigBee devices
BSD 3-Clause "New" or "Revised" License
1.89k stars 496 forks source link

Tuya Smoke Detector YG400A - DDF needed #7587

Closed Siggi0904 closed 5 months ago

Siggi0904 commented 7 months ago

Is there already an existing issue for this?

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

Smanar commented 7 months ago

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"
    }
  ]
}
Siggi0904 commented 7 months ago

Hi @Smanar, is the modelname correct?

Can I test activate the sirene, like in iobroker?

Great thanks.

Smanar commented 7 months ago
  "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.

Siggi0904 commented 7 months ago

@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

Smanar commented 7 months ago

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

Siggi0904 commented 6 months ago

@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.

Smanar commented 6 months ago

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.

Siggi0904 commented 6 months ago

{ "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

Smanar commented 6 months ago

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.

Siggi0904 commented 6 months ago

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

github-actions[bot] commented 5 months ago

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] commented 5 months ago

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.

BooWseR commented 4 months ago

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.

Smanar commented 4 months ago

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.