dresden-elektronik / deconz-rest-plugin

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

Neo Siren Alarm - NAS-AB02 #6112

Closed gmitch64 closed 1 year ago

gmitch64 commented 2 years ago

Device

Screenshots

Basic

image

Identify

Alarms

Device Temperature

Groups

image image

Scenes

image image image

On/Off

Level Control

Color Control

Simple Metering

Diagnostics

Other clusters that are not mentioned above

image image

JonLaliberte commented 2 years ago

Looks similar to this one, where modifying the DDF may work. But I'm entirely out of my element here.

Smanar commented 2 years ago

I don't think. It miss the cluster list, but from the capture I think this device use the tuya cluster instead of classic cluster. For siren we use state/alert and this field is not compatible yet with tuya cluster (if we want to use DDF)

github-actions[bot] commented 2 years 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 2 years 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.

gmitch64 commented 2 years ago

Can we have this reopened please?

mateuszroth commented 2 years ago

@Smanar same issue here. Seems like the options are not writable, can't turn on the siren at all. Let me know how can I help.

image image

In HA: Failed to call service switch/turn_on. /lights/8 resource, /lights/8, not available

Smanar commented 2 years ago

I haven't the cluster list (the blue number when you select the second circle in the node title) But from I remember this device use the tuya cluster, and it s not yet possible to use state/alert for DDF (with the tuya cluster)

mateuszroth commented 2 years ago

@Smanar there is the list, Tuya is on the list:

image

Do you know how many weeks/months will last until use of state/alert for DDF with tuya cluster is possible?

Smanar commented 2 years ago

Here you have a PR to use them for a TRV https://github.com/dresden-elektronik/deconz-rest-plugin/pull/6054 And I don't want to start to do same for other item before this one will be finished.

github-actions[bot] commented 2 years 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 2 years 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.

JonLaliberte commented 2 years ago

Device still isn’t supported. Should be left open.

github-actions[bot] commented 1 year 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.

gmitch64 commented 1 year ago

Any update on this? I'd like to keep it open please.

github-actions[bot] commented 1 year 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 1 year 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.

Spyder2005 commented 1 year ago

Can we open the topic again. I am trying to integrate exactly this sensor and unfortunately it is not working. It would be great if someone here could take care of it. Thank you!

Mimiix commented 1 year ago

Sure. Did you try to make a DDF already ?

Spyder2005 commented 1 year ago

Unfortunately, I am completely new to the world of DDF, or to put it better. I have only been involved with deconz/phoscon for a few days. Is there a tutorial on how I can provide you with a DDF?

Spyder2005 commented 1 year ago

@Mimiix : Sorry stupid question, but you don't mean just save as in the DDF editor? The json file looks relatively empty and contains hardly any entries.

Smanar commented 1 year ago

I think you can have return with DDF, but you will be not able to trigger the siren.

Spyder2005 commented 1 year ago

Isn't that the main task of a siren? I have tried something with DDF, but unfortunately the device cannot be controlled. Is there anything else needed for the siren to be added and supported?

Smanar commented 1 year ago

Isn't that the main task of a siren?

Yes it is ^^ But I know some device where the siren work only if the device detect something, you have setting but can't trigger the siren.

For this one the problem is from deconz, it's possible to trigger the siren (there is some working clone already in the code), but it's not yet possible with DDF.

github-actions[bot] commented 1 year 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 1 year 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.

kulmegil commented 1 year ago

Bump I have one so I'm joining the waiting queue... this needs to be reopened

gmitch64 commented 1 year ago

I obviously have one, so I'm still here too :)

github-actions[bot] commented 1 year 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.

gmitch64 commented 1 year ago

Bump to keep this issue open.

github-actions[bot] commented 1 year 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.

gmitch64 commented 1 year ago

Can we keep this open please.

LukeDefeo commented 1 year ago

Plus one from me, let me know if I can help in any way.

github-actions[bot] commented 1 year 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.

gmitch64 commented 1 year ago

Please keep open

BabaIsYou commented 1 year ago

Well, I don't know if what I propose has sense but will try to gain a minimum of control on this device, even if not completely attach in legacy code.

I based my detection for tuya DPIDs on https://github.com/blakadder/zigbee/blob/6e80b114b0e21779b531450532709d4d566ca30a/_zigbee/Neo_NAS-AB02B2.md?plain=1#L8 and https://github.com/zigpy/zha-device-handlers/blob/db3288dd0387331178b6b7d02a5558424aee6124/zhaquirks/tuya/ts0601_siren.py#L358

As we don't have a volume or melody attribute, I "reuse" for that purpose, respectively, controlsequence and mode. I know that it's not the best way but that's to test for the moment.

Don't really know if it's also clear to have a /light and a /sensor ... wil se later.

If someone wnat to test this DDF :

{
    "schema": "devcap1.schema.json",
    "manufacturername": [
        "_TZE200_t1blo2bj",
        "_TZE204_t1blo2bj"
    ],
    "modelid": [
        "TS0601",
        "TS0601"
    ],
    "product": "Neo Smart siren",
    "sleeper": true,
    "status": "Silver",
    "subdevices": [{
            "type": "$TYPE_WARNING_DEVICE",
            "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"
                },
                {
                    "name": "state/reachable"
                }
            ]
        },
        {
            "type": "ZHAAlarm",
            "restapi": "/sensors",
            "uuid": [
                "$address.ext",
                "0x01",
                "0x0500"
            ],
            "fingerprint": {
                "profile": "0x0104",
                "device": "0x0403",
                "endpoint": "0x01",
                "in": [
                    "0x0000",
                    "0x0004",
                    "0x0005",
                    "0xEF00"
                ]
            },
            "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/enrolled",
                    "public": false
                },
                {
                    "name": "config/on",
                    "description": "On/Off Alarm",
                    "write": {
                        "dpid": 13,
                        "dt": "0x10",
                        "eval": "Item.val == 1 ? 1 : 0;",
                        "fn": "tuya"
                    },
                    "parse": {
                        "dpid": 13,
                        "eval": "Item.val == 1 ? 0 : 1;",
                        "fn": "tuya"
                    },
                    "default": 0
                },
                {
                    "name": "config/pending"
                },
                {
                    "name": "config/reachable"
                },
                {
                    "name": "state/alarm"
                },
                {
                    "name": "config/battery",
                    "parse": {
                        "fn": "tuya",
                        "dpid": 15,
                        "eval": "Item.val = Attr.val;"
                    },
                    "read": {
                        "fn": "none"
                    },
                    "default": 0
                },
                {
                    "name": "config/duration",
                    "description": "Alarm duration in seconds",
                    "write": {
                        "dpid": 7,
                        "dt": "0x2b",
                        "eval": "Attr.val = Item.val;",
                        "fn": "tuya"
                    },
                    "parse": {
                        "dpid": 7,
                        "eval": "Item.val = Attr.val;",
                        "fn": "tuya"
                    }
                },
                {
                    "name": "config/mode",
                    "description": "Melody used by siren (between 1 to 18)",
                    "range": [0, 18],
                    "write": {
                        "dpid": 21,
                        "dt": "0x30",
                        "eval": "Attr.val = Item.val;",
                        "fn": "tuya"
                    },
                    "parse": {
                        "dpid": 21,
                        "eval": "Item.val = Attr.val;",
                        "fn": "tuya"
                    }
                },
                {
                    "name": "config/controlsequence",
                    "description": "Volume of the siren, 0:low, 1:medium, 2:High",
                    "range": [0, 2],
                    "write": {
                        "dpid": 5,
                        "dt": "0x30",
                        "eval": "Attr.val = Item.val;",
                        "fn": "tuya"
                    },
                    "parse": {
                        "dpid": 5,
                        "eval": "Item.val = Attr.val;",
                        "fn": "tuya"
                    }
                },
                {
                    "name": "state/lastupdated"
                }
            ]
        }
    ],
    "bindings": [{
        "bind": "unicast",
        "src.ep": 1,
        "cl": "0xEF00"
    }]
}

May be logic for config/on has to be inversed, and may be binding is not necessary.

github-actions[bot] commented 1 year 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.

BabaIsYou commented 1 year ago

I was wrong, there are a config/volume and a config/melody items ! For sure I'll make a different DDF in the future ;-)

github-actions[bot] commented 1 year 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.

mateuszroth commented 1 year ago

bump

mateuszroth commented 1 year ago

@BabaIsYou noob question but how to change the melody and duration from Deconz UI or by API call?

What to edit in the below DDF so the endpoint /api/xxx/sensors/5c:xxx-0500/config won't return "description": "parameter, duration, not available", "type": 6:

{
  "schema": "devcap1.schema.json",
  "manufacturername": "_TZE200_d0yu2xgi",
  "modelid": "TS0601",
  "product": "NAS-AB02B0 Siren",
  "sleeper": false,
  "status": "Draft",
  "subdevices": [
    {
      "type": "$TYPE_TEMPERATURE_SENSOR",
      "restapi": "/sensors",
      "uuid": [
        "$address.ext",
        "0x01",
        "0x0402"
      ],
      "fingerprint": {
        "profile": "0x0104",
        "device": "0x0051",
        "endpoint": "0x01",
        "in": [
          "0xEF00",
          "0x0402",
          "0x0000"
        ]
      },
      "items": [
        {
          "name": "attr/id"
        },
        {
          "name": "attr/lastannounced"
        },
        {
          "name": "attr/lastseen"
        },
        {
          "name": "attr/manufacturername"
        },
        {
          "name": "attr/modelid"
        },
        {
          "name": "attr/name"
        },
        {
          "name": "attr/productid",
          "public": false
        },
        {
          "name": "attr/swversion"
        },
        {
          "name": "attr/type"
        },
        {
          "name": "attr/uniqueid"
        },
        {
          "name": "config/offset",
          "description": "Relative offset to the main measured value.",
          "default": 0
        },
        {
          "name": "config/on"
        },
        {
          "name": "config/reachable"
        },
        {
          "name": "state/lastupdated"
        },
        {
          "name": "state/temperature",
          "description": "The current temperature in °C × 100.",
          "default": 0
        }
      ]
    },
    {
      "type": "$TYPE_HUMIDITY_SENSOR",
      "restapi": "/sensors",
      "uuid": [
        "$address.ext",
        "0x01",
        "0x0405"
      ],
      "fingerprint": {
        "profile": "0x0104",
        "device": "0x0051",
        "endpoint": "0x01",
        "in": [
          "0xEF00",
          "0x0405",
          "0x0000"
        ]
      },
      "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/offset",
          "description": "Relative offset to the main measured value.",
          "default": 0
        },
        {
          "name": "config/on"
        },
        {
          "name": "config/reachable"
        },
        {
          "name": "state/humidity",
          "description": "The current relative humidity in percent.",
          "default": 0
        },
        {
          "name": "state/lastupdated"
        }
      ]
    },
    {
      "type": "ZHAAlarm",
      "restapi": "/sensors",
      "uuid": [
        "$address.ext",
        "0x01",
        "0x0500"
      ],
      "fingerprint": {
        "profile": "0x0104",
        "device": "0x0051",
        "endpoint": "0x01",
        "in": [
          "0xEF00",
          "0x0004",
          "0x0005",
          "0x0000"
        ]
      },
      "items": [
        {
          "name": "attr/id"
        },
        {
          "name": "attr/lastannounced"
        },
        {
          "name": "attr/lastseen"
        },
        {
          "name": "attr/manufacturername"
        },
        {
          "name": "attr/modelid"
        },
        {
          "name": "attr/name"
        },
        {
          "name": "attr/productid",
          "public": false
        },
        {
          "name": "attr/swversion"
        },
        {
          "name": "attr/type"
        },
        {
          "name": "attr/uniqueid"
        },
        {
          "name": "config/duration",
          "default": 1800,
          "write": {
        "dpid": 7,
        "dt": "0x2b",
        "eval": "Attr.val = Item.val;",
        "fn": "tuya"
      },
          "parse": {
        "dpid": 7,
        "eval": "Item.val = Attr.val;",
        "fn": "tuya"
      }
        },
        {
          "name": "config/enrolled",
          "description": "State of IAS enrollment process."
        },
        {
          "name": "config/humiditymaxthreshold"
        },
        {
          "name": "config/humidityminthreshold"
        },
        {
          "name": "config/melody"
        },
        {
          "name": "config/on"
        },
        {
          "name": "config/pending",
          "description": "Pending tasks to configure the device."
        },
        {
          "name": "config/preset",
          "description": "Sets the operating mode for Tuya thermostats."
        },
        {
          "name": "config/reachable"
        },
        {
          "name": "config/temperaturemaxthreshold"
        },
        {
          "name": "config/temperatureminthreshold"
        },
        {
          "name": "config/volume"
        },
        {
          "name": "state/alarm",
          "description": "True when an alarm is detected."
        },
        {
          "name": "state/lastupdated"
        }
      ]
    }
  ],
  "bindings": [
    {
      "bind": "unicast",
      "src.ep": 1,
      "dst.ep": 1,
      "cl": "0xEF00"
    }
  ]
}
Smanar commented 1 year ago

I think the easier is using the API, you can use for exemple Curl

curl -H 'Content-Type: application/json' -X PUT -d '{"duration": 900}' http://IP:PORT/api/API_KEY/sensors/ID/config

Or a REST client https://dresden-elektronik.github.io/deconz-rest-doc/getting_started/

And BTW melody and volume are now ready to be used in DDF, so there is probably a better DDF ATM.

BabaIsYou commented 1 year ago

Most part of your modified DDF won't work because don't relay on Tuya cluster, or make reference to sensors (temp and hum) that are non existent on this device AFAIK !

So begin by this DDF, with same disclaimer that I made above :

{
    "schema": "devcap1.schema.json",
    "manufacturername": [
        "_TZE200_t1blo2bj",
        "_TZE204_t1blo2bj"
    ],
    "modelid": [
        "TS0601",
        "TS0601"
    ],
    "product": "Neo Smart siren",
    "sleeper": true,
    "status": "Gold",
    "subdevices": [{
            "type": "$TYPE_WARNING_DEVICE",
            "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"
                },
                {
                    "name": "state/reachable"
                }
            ]
        },
        {
            "type": "ZHAAlarm",
            "restapi": "/sensors",
            "uuid": [
                "$address.ext",
                "0x01",
                "0x0500"
            ],
            "fingerprint": {
                "profile": "0x0104",
                "device": "0x0403",
                "endpoint": "0x01",
                "in": [
                    "0x0000",
                    "0x0004",
                    "0x0005",
                    "0xEF00"
                ]
            },
            "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/enrolled",
                    "public": false
                },
                {
                    "name": "config/on",
                    "description": "On/Off Alarm",
                    "write": {
                        "dpid": 13,
                        "dt": "0x10",
                        "eval": "Item.val == 1 ? 1 : 0;",
                        "fn": "tuya"
                    },
                    "parse": {
                        "dpid": 13,
                        "eval": "Item.val == 1 ? 0 : 1;",
                        "fn": "tuya"
                    },
                    "default": 0
                },
                {
                    "name": "config/pending"
                },
                {
                    "name": "config/reachable"
                },
                {
                    "name": "state/alarm"
                },
                {
                    "name": "config/battery",
                    "parse": {
                        "fn": "tuya",
                        "dpid": 15,
                        "eval": "Item.val = Attr.val;"
                    },
                    "read": {
                        "fn": "tuya"
                    },
                    "default": 0
                },
                {
                    "name": "config/duration",
                    "description": "Alarm duration in seconds",
                    "write": {
                        "dpid": 7,
                        "dt": "0x2b",
                        "eval": "Attr.val = Item.val;",
                        "fn": "tuya"
                    },
                    "parse": {
                        "dpid": 7,
                        "eval": "Item.val = Attr.val;",
                        "fn": "tuya"
                    }
                },
                {
                    "name": "config/melody",
                    "description": "Melody used by siren (between 1 to 18)",
                    "range": [0, 18],
                    "write": {
                        "dpid": 21,
                        "dt": "0x30",
                        "eval": "Attr.val = Item.val;",
                        "fn": "tuya"
                    },
                    "parse": {
                        "dpid": 21,
                        "eval": "Item.val = Attr.val;",
                        "fn": "tuya"
                    }
                },
                {
                    "name": "config/volume",
                    "description": "Volume of the siren, 0:low, 1:medium, 2:High",
                    "range": [0, 2],
                    "write": {
                        "dpid": 5,
                        "dt": "0x30",
                        "eval": "Attr.val = Item.val;",
                        "fn": "tuya"
                    },
                    "parse": {
                        "dpid": 5,
                        "eval": "Item.val = Attr.val;",
                        "fn": "tuya"
                    }
                },
                {
                    "name": "state/lastupdated"
                }
            ]
        }
    ],
    "bindings": [{
        "bind": "unicast",
        "src.ep": 1,
        "cl": "0xEF00"
    }]
}

What to edit in the below DDF so the endpoint /api/xxx/sensors/5c:xxx-0500/config won't return "description": "parameter, duration, not available", "type": 6:

Your syntax is invalid (id seems wrong) , Please read carefully https://dresden-elektronik.github.io/deconz-rest-doc/endpoints/sensors/

github-actions[bot] commented 1 year 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 1 year 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.

theflyer08 commented 1 year ago

I tried the DDF from @BabaIsYou. It did not work for me. I have the Neo "_TZE204_t1blo2bj", "TS0601". The sirene has been recognized as light. But it does nothing. Even via IoBroker deconz-Adapter.

Reopen please

str31ok commented 1 year ago

Any updates?

BabaIsYou commented 1 year ago

How does the device appears from REST-API point of view ?

theflyer08 commented 1 year ago

How can I get the rest API appearance on a headless Linux system?

BabaIsYou commented 1 year ago

Using Phoscon help/API nformation ? Should see one light and one alarm sensor d'or this device.

theflyer08 commented 1 year ago

In Phoscon it looks like this:

181513745-9c64434d-c843-41f6-96c4-fda1894eedce

In IOBroker I see the device in objects. However, I can't control the device by setting the values.