Skip to content

Commit

Permalink
Update sample DDF
Browse files Browse the repository at this point in the history
  • Loading branch information
Zehir committed Sep 30, 2023
1 parent b090dbb commit 506fb48
Show file tree
Hide file tree
Showing 253 changed files with 4,422 additions and 2,293 deletions.
22 changes: 16 additions & 6 deletions devices/generic/constants.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"schema": "constants2.schema.json",

"schema": "constants1.schema.json",
"manufacturers": {
"$MF_AQARA": "Aqara",
"$MF_BOSCH": "Bosch",
"$MF_IKEA": "IKEA of Sweden",
"$MF_LUMI": "LUMI",
Expand All @@ -9,24 +10,31 @@
"$MF_SAMJIN": "Samjin",
"$MF_SIGNIFY": "Signify Netherlands B.V.",
"$MF_TUYA": "Tuyatec",
"$MF_XIAOMI": "XIAOMI",

"$MF_XIAOMI": "XIAOMI"
},
"device-types": {
"$TYPE_AIR_PURIFIER": "ZHAAirPurifier",
"$TYPE_AIR_QUALITY_SENSOR": "ZHAAirQuality",
"$TYPE_CARBONDIOXIDE_SENSOR": "ZHACarbonDioxide",
"$TYPE_CARBONMONOXIDE_SENSOR": "ZHACarbonMonoxide",
"$TYPE_FORMALDEHYDE_SENSOR": "ZHAFormaldehyde",
"$TYPE_PARTICULATEMATTER_SENSOR": "ZHAParticulateMatter",
"$TYPE_ALARM_SENSOR": "ZHAAlarm",
"$TYPE_ANCILLARY_CONTROL": "ZHAAncillaryControl",
"$TYPE_BATTERY_SENSOR": "ZHABattery",
"$TYPE_COLOR_DIMMABLE_LIGHT": "Color dimmable light",
"$TYPE_COLOR_LIGHT": "Color light",
"$TYPE_COLOR_TEMPERATURE_LIGHT": "Color temperature light",
"$TYPE_CONSUMPTION_SENSOR": "ZHAConsumption",
"$TYPE_DIMMABLE_LIGHT": "Dimmable light",
"$TYPE_DIMMABLE_PLUGIN_UNIT": "Dimmable plug-in unit",
"$TYPE_DIMMER_SWITCH": "Dimmer switch",
"$TYPE_DOOR_LOCK_CONTROLLER": "Door lock controller",
"$TYPE_DOOR_LOCK": "Door Lock",
"$TYPE_DOOR_LOCK_CONTROLLER": "Door lock controller",
"$TYPE_DOOR_LOCK_SENSOR": "ZHADoorLock",
"$TYPE_EXTENDED_COLOR_LIGHT": "Extended color light",
"$TYPE_FIRE_SENSOR": "ZHAFire",
"$TYPE_HUMIDITY_SENSOR": "ZHAHumidity",
"$TYPE_LEVEL_CONTROL_SWITCH": "Level control switch",
"$TYPE_LIGHT_LEVEL_SENSOR": "ZHALightLevel",
"$TYPE_MOISTURE_SENSOR": "ZHAMoisture",
"$TYPE_ON_OFF_LIGHT": "On/Off light",
Expand All @@ -45,9 +53,11 @@
"$TYPE_SWITCH": "ZHASwitch",
"$TYPE_TEMPERATURE_SENSOR": "ZHATemperature",
"$TYPE_THERMOSTAT": "ZHAThermostat",
"$TYPE_TIME": "ZHATime",
"$TYPE_VIBRATION_SENSOR": "ZHAVibration",
"$TYPE_WARNING_DEVICE": "Warning device",
"$TYPE_WATER_LEAK_SENSOR": "ZHAWater",
"$TYPE_WINDOW_COVERING_DEVICE": "Window covering device",
"$TYPE_ZGP_SWITCH": "ZGPSwitch"
}
}
18 changes: 9 additions & 9 deletions devices/generic/items/attr_id_item.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"schema": "resourceitem1.schema.json",
"id": "attr/id",
"datatype": "String",
"access": "R",
"public": true,
"implicit": true,
"managed": true,
"description": "Identifier of the resource, unique within an endpoint."
}
"schema": "resourceitem1.schema.json",
"id": "attr/id",
"datatype": "String",
"access": "R",
"public": true,
"implicit": true,
"managed": true,
"description": "Identifier of the resource, unique within an endpoint."
}
18 changes: 9 additions & 9 deletions devices/generic/items/attr_lastannounced_item.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"schema": "resourceitem1.schema.json",
"id": "attr/lastannounced",
"datatype": "ISO 8601 timestamp",
"access": "R",
"public": true,
"implicit" : true,
"managed": true,
"description": "Timestamp of the last power-cyle or rejoin."
}
"schema": "resourceitem1.schema.json",
"id": "attr/lastannounced",
"datatype": "ISO 8601 timestamp",
"access": "R",
"public": true,
"implicit": true,
"managed": true,
"description": "Timestamp of the last power-cyle or rejoin."
}
18 changes: 9 additions & 9 deletions devices/generic/items/attr_lastseen_item.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"schema": "resourceitem1.schema.json",
"id": "attr/lastseen",
"datatype": "ISO 8601 timestamp",
"access": "R",
"public": true,
"implicit" : true,
"managed": true,
"description": "Timestamp of the last communication."
}
"schema": "resourceitem1.schema.json",
"id": "attr/lastseen",
"datatype": "ISO 8601 timestamp",
"access": "R",
"public": true,
"implicit": true,
"managed": true,
"description": "Timestamp of the last communication."
}
14 changes: 7 additions & 7 deletions devices/generic/items/attr_manufacturername_item.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"schema": "resourceitem1.schema.json",
"id": "attr/manufacturername",
"datatype": "String",
"access": "R",
"public": true,
"implicit" : true,
"description": "Manufacturer name of the device."
"schema": "resourceitem1.schema.json",
"id": "attr/manufacturername",
"datatype": "String",
"access": "R",
"public": true,
"implicit": true,
"description": "Manufacturer name of the device."
}
14 changes: 7 additions & 7 deletions devices/generic/items/attr_mode_item.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"schema": "resourceitem1.schema.json",
"id": "attr/mode",
"datatype": "UInt32",
"access": "RW",
"public": true,
"description": "Operational mode."
}
"schema": "resourceitem1.schema.json",
"id": "attr/mode",
"datatype": "UInt32",
"access": "RW",
"public": true,
"description": "Operational mode."
}
14 changes: 7 additions & 7 deletions devices/generic/items/attr_modelid_item.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"schema": "resourceitem1.schema.json",
"id": "attr/modelid",
"datatype": "String",
"access": "R",
"public": true,
"implicit" : true,
"description": "Model identifier of the device."
"schema": "resourceitem1.schema.json",
"id": "attr/modelid",
"datatype": "String",
"access": "R",
"public": true,
"implicit": true,
"description": "Model identifier of the device."
}
18 changes: 9 additions & 9 deletions devices/generic/items/attr_name_item.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"schema": "resourceitem1.schema.json",
"id": "attr/name",
"datatype": "String",
"access": "RW",
"public": true,
"implicit" : true,
"managed": true,
"description": "Name of the resource."
}
"schema": "resourceitem1.schema.json",
"id": "attr/name",
"datatype": "String",
"access": "RW",
"public": true,
"implicit": true,
"managed": true,
"description": "Name of the resource."
}
12 changes: 6 additions & 6 deletions devices/generic/items/attr_poweronct_item.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"schema": "resourceitem1.schema.json",
"id": "attr/poweronct",
"datatype": "UInt16",
"access": "RW",
"public": true,
"description": "Ct value set when powered on."
"schema": "resourceitem1.schema.json",
"id": "attr/poweronct",
"datatype": "UInt16",
"access": "RW",
"public": true,
"description": "Ct value set when powered on."
}
12 changes: 6 additions & 6 deletions devices/generic/items/attr_poweronlevel_item.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"schema": "resourceitem1.schema.json",
"id": "attr/poweronlevel",
"datatype": "UInt8",
"access": "RW",
"public": true,
"description": "Brightness set when powered on."
"schema": "resourceitem1.schema.json",
"id": "attr/poweronlevel",
"datatype": "UInt8",
"access": "RW",
"public": true,
"description": "Brightness set when powered on."
}
12 changes: 6 additions & 6 deletions devices/generic/items/attr_powerup_item.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"schema": "resourceitem1.schema.json",
"id": "attr/powerup",
"datatype": "UInt32",
"access": "RW",
"public": true,
"description": "Powerup mode of a device."
"schema": "resourceitem1.schema.json",
"id": "attr/powerup",
"datatype": "UInt32",
"access": "RW",
"public": true,
"description": "Powerup mode of a device."
}
38 changes: 23 additions & 15 deletions devices/generic/items/attr_productid_item.json
Original file line number Diff line number Diff line change
@@ -1,16 +1,24 @@
{
"schema": "resourceitem1.schema.json",
"id": "attr/productid",
"datatype": "String",
"access": "R",
"public": true,
"description": "Product identifier of the device.",
"parse": {
"fn": "zcl", "ep": "0x0b", "cl": "0x0000", "mf": "0x100b", "at": "0x0040",
"eval": "Item.val = Attr.val"
},
"read": {
"fn": "zcl", "ep": "0x0b", "cl": "0x0000", "mf": "0x100b", "at": "0x0040"
},
"refresh.interval": 86400
}
"schema": "resourceitem1.schema.json",
"id": "attr/productid",
"datatype": "String",
"access": "R",
"public": true,
"description": "Product identifier of the device.",
"parse": {
"fn": "zcl",
"ep": "0x0b",
"cl": "0x0000",
"mf": "0x100b",
"at": "0x0040",
"eval": "Item.val = Attr.val"
},
"read": {
"fn": "zcl",
"ep": "0x0b",
"cl": "0x0000",
"mf": "0x100b",
"at": "0x0040"
},
"refresh.interval": 86400
}
36 changes: 22 additions & 14 deletions devices/generic/items/attr_swconfigid_item.json
Original file line number Diff line number Diff line change
@@ -1,16 +1,24 @@
{
"schema": "resourceitem1.schema.json",
"id": "attr/swconfigid",
"datatype": "String",
"access": "R",
"public": true,
"description": "Software config identifier of the device.",
"parse": {
"fn": "zcl", "ep": "0x0b", "cl": "0x0000", "mf": "0x100b", "at": "0x0041",
"eval": "Item.val = ('00000000' + Attr.val.toString(16)).slice(-8).toUpperCase()"
},
"read": {
"fn": "zcl", "ep": "0x0b", "cl": "0x0000", "mf": "0x100b", "at": "0x0041"
},
"refresh.interval": 86400
"schema": "resourceitem1.schema.json",
"id": "attr/swconfigid",
"datatype": "String",
"access": "R",
"public": true,
"description": "Software config identifier of the device.",
"parse": {
"fn": "zcl",
"ep": "0x0b",
"cl": "0x0000",
"mf": "0x100b",
"at": "0x0041",
"eval": "Item.val = ('00000000' + Attr.val.toString(16)).slice(-8).toUpperCase()"
},
"read": {
"fn": "zcl",
"ep": "0x0b",
"cl": "0x0000",
"mf": "0x100b",
"at": "0x0041"
},
"refresh.interval": 86400
}
9 changes: 9 additions & 0 deletions devices/generic/items/attr_swversion_bis_item.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"schema": "resourceitem1.schema.json",
"id": "attr/swversion_bis",
"datatype": "String",
"access": "R",
"public": true,
"implicit": true,
"description": "Firmware version of the device."
}
33 changes: 22 additions & 11 deletions devices/generic/items/attr_swversion_item.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,23 @@
{
"schema": "resourceitem1.schema.json",
"id": "attr/swversion",
"datatype": "String",
"access": "R",
"public": true,
"implicit" : true,
"description": "Firmware version of the device.",
"parse": {"fn": "zcl", "ep": 255, "cl": "0x0000", "at": "0x4000", "eval": "Item.val = Attr.val"},
"read": {"fn": "zcl", "ep": 0, "cl": "0x0000", "at": "0x4000"},
"refresh.interval": 86400
}
"schema": "resourceitem1.schema.json",
"id": "attr/swversion",
"datatype": "String",
"access": "R",
"public": true,
"implicit": true,
"description": "Firmware version of the device.",
"parse": {
"fn": "zcl",
"ep": 255,
"cl": "0x0000",
"at": "0x4000",
"eval": "Item.val = Attr.val"
},
"read": {
"fn": "zcl",
"ep": 0,
"cl": "0x0000",
"at": "0x4000"
},
"refresh.interval": 86400
}
18 changes: 9 additions & 9 deletions devices/generic/items/attr_type_item.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"schema": "resourceitem1.schema.json",
"id": "attr/type",
"datatype": "String",
"access": "R",
"public": true,
"implicit" : true,
"managed": true,
"description": "Type of the resource."
}
"schema": "resourceitem1.schema.json",
"id": "attr/type",
"datatype": "String",
"access": "R",
"public": true,
"implicit": true,
"managed": true,
"description": "Type of the resource."
}
Loading

0 comments on commit 506fb48

Please sign in to comment.