Skip to content

Commit

Permalink
DDF for Nedis smoke sensor (_TYZB01_wqcac7lo) (#7815)
Browse files Browse the repository at this point in the history
  • Loading branch information
Smanar authored Aug 7, 2024
1 parent 610f9ce commit ef1b3ba
Show file tree
Hide file tree
Showing 2 changed files with 118 additions and 0 deletions.
116 changes: 116 additions & 0 deletions devices/nedis/nedis_zbds10wt.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,116 @@
{
"schema": "devcap1.schema.json",
"manufacturername": "_TYZB01_wqcac7lo",
"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"
}
]
}
2 changes: 2 additions & 0 deletions devices/nedis/tuya_swversion.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
var v = Attr.val;
Item.val = String((v & 192) >> 6) + '.' + String((v & 48) >> 4) + '.' + String(v & 15);

0 comments on commit ef1b3ba

Please sign in to comment.