dresden-elektronik / deconz-rest-plugin

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

Moes- Smart Water Gas Valve Controller #7759

Closed granadoos closed 3 months ago

granadoos commented 4 months ago

Is there already an existing issue for this?

Product name

Tuya- Smart Water Gas Valve Controller

Manufacturer

Moes

Model identifier

PF-PM02D-TYZ

Device type to add

Other

Node info

image

Endpoints and clusters

image image image image image image image

Basic

image

Further relevant clusters

Power Configuration

On/Off

Level Control

Color Control

Thermostat

Simple Metering

Electrical Measurement

Any other cluster of relevance/interest

granadoos commented 4 months ago

Hello, I added a link to the product in case it is helpful.

https://es.aliexpress.com/item/1005005795326804.html?spm=a2g0o.order_list.order_list_main.26.27e1194dwGjaB5&gatewayAdapt=glo2espç

On the other hand, using the following data I can open/close the valve

Close image

Open image

Thank you so much

granadoos commented 4 months ago

Hello, I have been able to integrate it using the following DDF

{
  "schema": "devcap1.schema.json",
  "manufacturername": "_TZE204_d0ypnbvn",
  "modelid": "TS0601",
  "product": "TS0601",
  "sleeper": false,
  "status": "Draft",
  "path": "/devices/tuya/_TZE204_d0ypnbvn_water_valve",
  "subdevices": [
    {
      "type": "$TYPE_ON_OFF_OUTPUT",
      "restapi": "/lights",
      "uuid": [
        "$address.ext",
        "0x01"
      ],
      "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": "state/alert",
          "default": "none",
          "public": false
        },
        {
          "name": "state/on",
          "parse": {"fn": "tuya", "dpid": 1, "eval": "Item.val = Attr.val;" },
          "write": {"fn": "tuya", "dpid": 1, "dt": "0x10", "eval": "Item.val == 1 ? 1 : 0;"},
          "read": {"fn": "tuya"},
          "refresh.interval": 300
        },
        {
          "name": "state/reachable"
        }
      ]
    }
  ]
}
github-actions[bot] commented 3 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 3 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.