Skip to content

Commit

Permalink
code sync
Browse files Browse the repository at this point in the history
  • Loading branch information
Zehir committed Apr 23, 2024
1 parent de655db commit 7449527
Show file tree
Hide file tree
Showing 107 changed files with 9,648 additions and 840 deletions.
612 changes: 612 additions & 0 deletions devices/bosch/bmct-slz_shutter_light_control2.json

Large diffs are not rendered by default.

475 changes: 475 additions & 0 deletions devices/bosch/room_thermostat2.json

Large diffs are not rendered by default.

445 changes: 445 additions & 0 deletions devices/bosch/room_thermostat2_230V.json

Large diffs are not rendered by default.

43 changes: 40 additions & 3 deletions devices/bosch/thermostat2.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"manufacturername": "BOSCH",
"modelid": "RBSH-TRV0-ZB-EU",
"vendor": "Bosch",
"product": "Thermostat II",
"product": "Thermostat II BTH-RA",
"sleeper": false,
"status": "Gold",
"subdevices": [
Expand Down Expand Up @@ -106,14 +106,43 @@
"write": {
"at": "0x400B",
"cl": "0x0204",
"dt": "0x30",
"dt": "0x20",
"ep": 1,
"eval": "Item.val",
"fn": "zcl:attr",
"mf": "0x1209"
},
"default": false
},
{
"name": "config/externalsensortemp",
"refresh.interval": 360,
"read": {
"at": "0x4040",
"cl": "0x0201",
"ep": 1,
"fn": "zcl:attr",
"mf": "0x1209"
},
"parse": {
"at": "0x4040",
"cl": "0x0201",
"ep": 1,
"eval": "Item.val = Attr.val;",
"fn": "zcl:attr",
"mf": "0x1209"
},
"write": {
"at": "0x4040",
"cl": "0x0201",
"dt": "0x29",
"ep": 1,
"eval": "Item.val",
"fn": "zcl:attr",
"mf": "0x1209"
},
"default": 0
},
{
"name": "config/externalwindowopen",
"refresh.interval": 3660,
Expand Down Expand Up @@ -213,7 +242,15 @@
"name": "config/reachable"
},
{
"name": "config/schedule"
"name": "config/schedule",
"refresh.interval": 3660,
"read": {
"fn": "zcl:cmd",
"ep": "0x01",
"cl": "0x0201",
"cmd": "0x02",
"eval": "'7F01'"
}
},
{
"name": "config/schedule_on",
Expand Down
31 changes: 21 additions & 10 deletions devices/centralite/motion_sensor-a.json
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,7 @@
"cl": "0x0001",
"at": "0x0020"
},
"refresh.interval": 3700,
"default": 0
"refresh.interval": 3700
},
{
"name": "config/checkin",
Expand All @@ -91,10 +90,12 @@
"refresh.interval": 3600
},
{
"name": "config/duration"
"name": "config/duration",
"default": 40
},
{
"name": "config/enrolled"
"name": "config/enrolled",
"default": 1
},
{
"name": "config/on"
Expand Down Expand Up @@ -177,12 +178,10 @@
"cl": "0x0001",
"ep": 255,
"eval": "const vmin = 20; const vmax = 30; var bat = Attr.val; if (bat > vmax) { bat = vmax; } else if (bat < vmin) { bat = vmin; } bat = ((bat - vmin) / (vmax - vmin)) * 100; if (bat > 100) { bat = 100; } else if (bat <= 0) { bat = 1; } Item.val = bat;"
},
"default": 0
}
},
{
"name": "config/offset",
"default": 0
"name": "config/offset"
},
{
"name": "config/on"
Expand All @@ -194,8 +193,7 @@
"name": "state/lastupdated"
},
{
"name": "state/temperature",
"default": 0
"name": "state/temperature"
}
]
}
Expand Down Expand Up @@ -227,6 +225,19 @@
"change": "0x0016"
}
]
},
{
"bind": "unicast",
"src.ep": 1,
"cl": "0x0500",
"report": [
{
"at": "0x0002",
"dt": "0x19",
"min": 1,
"max": 360
}
]
}
],
"uuid": "8480c5c9-bce1-4958-95e9-caef5aff085e",
Expand Down
2 changes: 1 addition & 1 deletion devices/danalock/danalock_v3.json
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@
"parse": {
"cl": "0x0001",
"at": "0x0021",
"eval": "Item.val = Attr.val"
"eval": "Item.val = Attr.val / 2"
},
"read": {
"cl": "0x0001",
Expand Down
24 changes: 15 additions & 9 deletions devices/danfoss/danfoss_errorcode.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,19 @@
var arr = [];
var hex;
let str = Attr.val;
var error = [];

for (var i = 0; i < str.length; i++)
if (Attr.val == 0)
{
hex = str.charCodeAt(i).toString(16);
if (hex.length < 2) { hex = "0" + hex.toUpperCase(); }
arr.push(hex);
error.push("none");
}
else
{
for (i = 0; i < 15; i++)
{
if (Attr.val >> i & 0x01)
{
error.push("E" + (i + 1));
}
}
}

var res = arr.join("");
Item.val = res.toString(16);
var res = error.join(",");
Item.val = res.toString(16);
10 changes: 5 additions & 5 deletions devices/danfoss/danfoss_windowopen_state.js
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
switch (Attr.val) {
case 0:
Item.val = "Quarantine";
Item.val = "quarantine";
break;
case 1:
Item.val = "Closed";
Item.val = "closed";
break;
case 2:
Item.val = "Hold";
Item.val = "hold";
break;
case 3:
Item.val = "Open";
Item.val = "open";
break;
case 4:
Item.val = "Open (external), closed (internal)";
Item.val = "open (external), closed (internal)";
break;
}
32 changes: 27 additions & 5 deletions devices/danfoss/etrv0100_thermostat.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,17 @@
"schema": "devcap1.schema.json",
"manufacturername": [
"Danfoss",
"Danfoss",
"D5X84YU",
"D5X84YU",
"Danfoss"
],
"modelid": [
"eTRV0100",
"eTRV0103"
"eTRV0103",
"eT093WRO",
"eT093WRG",
"TRV001"
],
"vendor": "Danfoss",
"product": "Ally thermostat",
Expand Down Expand Up @@ -181,7 +187,15 @@
},
{
"name": "config/heatsetpoint",
"refresh.interval": 3660
"refresh.interval": 3660,
"write": {
"fn": "zcl:cmd",
"ep": "0x01",
"cl": "0x0201",
"cmd": "0x40",
"eval": "'01' + ('00' + Item.val.toString(16)).slice(-2) + ('00' + Item.val.toString(16)).slice(-4,-2);",
"mf": "0x1246"
}
},
{
"name": "config/loadbalancing",
Expand Down Expand Up @@ -341,7 +355,15 @@
"name": "config/reachable"
},
{
"name": "config/schedule"
"name": "config/schedule",
"refresh.interval": 3660,
"read": {
"fn": "zcl:cmd",
"ep": "0x01",
"cl": "0x0201",
"cmd": "0x02",
"eval": "'7F01'"
}
},
{
"name": "config/schedule_on",
Expand Down Expand Up @@ -382,9 +404,9 @@
"at": "0x4000",
"cl": "0x0B05",
"ep": 1,
"eval": "Item.val = Attr.val;",
"fn": "zcl:attr",
"mf": "0x1246"
"mf": "0x1246",
"script": "danfoss_errorcode.js"
},
"read": {
"at": "0x4000",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,15 @@
{
"schema": "devcap1.schema.json",
"manufacturername": "frient A/S",
"modelid": "HMSZB-110",
"manufacturername": [
"Develco Products A/S",
"Develco Products A/S"
],
"modelid": [
"HMSZB-110",
"HMSZB-120"
],
"vendor": "Develco Products",
"product": "HMSZB-110 temp./hum. sensor",
"product": "Temperature/humidity sensor HMSZB-110/HMSZB-120",
"sleeper": true,
"status": "Gold",
"subdevices": [
Expand Down Expand Up @@ -236,6 +242,6 @@
]
}
],
"uuid": "93c444da-77ac-4f50-be2f-1b25fd92ac53",
"uuid": "62c3a064-7c31-47a8-ab6b-079f6be346e9",
"version_deconz": ">2.19.3"
}
Loading

0 comments on commit 7449527

Please sign in to comment.