dresden-elektronik / deconz-rest-plugin

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

Add Tuya vibration sensor TZE200_iba1ckek #8035

Open jerrybboy opened 2 days ago

jerrybboy commented 2 days ago

Is there already an existing issue for this?

Product name

zigbee smart vibration sensor

Manufacturer

Tuya

Model identifier

_TZE200_iba1ckek

Device type to add

Sensor

Node info

image

Endpoints and clusters

image

Basic

image

Further relevant clusters

Power Configuration

image

Smanar commented 1 day ago

Hello, totaly random but can you try this DDF

{
  "schema": "devcap1.schema.json",
  "manufacturername": "_TZE200_iba1ckek",
  "modelid": "TS0601",
  "vendor": "tuya",
  "product": "Vibration sensor",
  "status": "Gold",
  "subdevices": [
    {
      "type": "$TYPE_VIBRATION_SENSOR",
      "restapi": "/sensors",
      "uuid": [
        "$address.ext",
        "0x01",
        "0xef00"
      ],
      "items": [
        {
          "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",
          "read": {
            "fn": "none"
          },
          "parse": {
            "dpid": 105,
            "eval": "Item.val = Attr.val;",
            "fn": "tuya"
          },
          "default": 0
        },
        {
          "name": "config/on"
        },
        {
          "name": "config/reachable"
        },
        {
          "name": "state/orientation_x",
          "public": true,
          "parse": {
            "dpid": 101,
            "eval": "Item.val = Attr.val;",
            "fn": "tuya"
          }
        },
        {
          "name": "state/orientation_y",
          "public": true,
          "parse": {
            "dpid": 102,
            "eval": "Item.val = Attr.val;",
            "fn": "tuya"
          }
        },
        {
          "name": "state/orientation_z",
          "public": true,
          "parse": {
            "dpid": 103,
            "eval": "Item.val = Attr.val;",
            "fn": "tuya"
          }
        },
        {
          "name": "state/lastupdated"
        },
        {
          "name": "state/vibration",
          "parse": {
            "dpid": 1,
            "eval": "Item.val = Attr.val;",
            "fn": "tuya"
          }
        }
      ]
    }
  ]
}