Skip to content

Commit

Permalink
Change name to TRV06, added lock/unlock command and lock status. Remo…
Browse files Browse the repository at this point in the history
…ve a force value line of code for testing.
  • Loading branch information
www-data committed Nov 4, 2023
1 parent 76cd120 commit c0fd591
Show file tree
Hide file tree
Showing 3 changed files with 66 additions and 25 deletions.
7 changes: 3 additions & 4 deletions core/class/AbeilleCmdProcess.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -5124,8 +5124,9 @@ function processCmd($Command) {
$fcf = "11"; // Frame Control Field
$sqn = $this->genSqn();
$cmdId = "00"; // TY_DATA_REQUEST, 0x00, The gateway sends data to the Zigbee module.
// cmdLog2('debug', $addr, ' BEN: '.json_encode($Command) );
cmdLog2('debug', $addr, ' BEN: '.json_encode($Command) );
$dp = tuyaCmd2Dp($Command);
cmdLog2('debug', $addr, ' BEN: '.json_encode($dp) );
if ($dp === false) {
return;
}
Expand All @@ -5141,9 +5142,7 @@ function processCmd($Command) {
$dpId = $dp['id'];
$dpLen = sprintf("%04X", $dpLen);

$dpId = "04"; $dpType= "02"; $dpData = $dp['data'];

cmdLog2('debug', $addr, ' '.$Command['cmd'].': tSqn='.$tSqn.', dpId='.$dpId.', dpType='.$dpType.', dpData='.$dpData);
cmdLog2('debug', $addr, ' BEN: '.$Command['cmd'].': tSqn='.$tSqn.', dpId='.$dpId.', dpType='.$dpType.', dpData='.$dpData);
$data2 = $fcf.$sqn.$cmdId.$tSqn.$dpId.$dpType.$dpLen.$dpData;
}
$dataLen2 = sprintf("%02X", strlen($data2) / 2);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,27 +2,32 @@
"TS0601__TZE200_p3dbf6qs": {
"manufacturer": "_TZE200_p3dbf6qs",
"model": "TS0601",
"type": "Thermostatic head",
"type": "TRV06 Thermostatic head",
"genericType": "Thermostat",
"timeout": "60",
"category": {
"heating": "1"
},
"configuration": {
"icon": "KETOTEK-ThermostaticHead",
"icon": "TRV06-ThermostaticHead",
"mainEP": "01",
"batteryType": "2x1.5 AA"
},
"commands": {
"Groups": {
"use": "Group-Membership"
},
"Battery percent": {
"use": "inf_zbAttr-0001-BatteryPercent"
},
"Local temp": {
"use": "inf_zbAttr-0402-MeasuredValue",
"genericType": "THERMOSTAT_TEMPERATURE",
"isVisible": 1
},
"Chauffage": {
"use": "inf_generic-NumericBadge",
"logicalId": "01-chauffage",
"minValue": 0,
"maxValue": 1,
"unit": "",
"isVisible": 1,
"nextLine": "after"
},
Expand All @@ -36,25 +41,60 @@
"isVisible": 1,
"nextLine": "after"
},
"ECO mode": {

"Mode": {
"use": "inf_generic-NumericBadge",
"logicalId": "01-Mode",
"isVisible": 1,
"nextLine": "after"
},
"Auto": {
"use": "act_tuyaEF00-SetValue",
"params": "dpId=6A&data=1",
"params": "dpId=02&data=00",
"genericType": "THERMOSTAT_SET_MODE",
"isVisible": 0
"isVisible": 1
},
"ECO temp": {
"use": "inf_zbAttr-0402-MeasuredValue",
"logicalId": "01-ECO-temp",
"isVisible": 0
"Heat": {
"use": "act_tuyaEF00-SetValue",
"params": "dpId=02&data=01",
"genericType": "THERMOSTAT_SET_MODE",
"isVisible": 1
},
"OFF": {
"use": "act_tuyaEF00-SetValue",
"params": "dpId=02&data=02",
"genericType": "THERMOSTAT_SET_MODE",
"isVisible": 1,
"nextLine": "after"
},

"Locked": {
"use": "inf_generic-NumericBadge",
"logicalId": "01-Lock",
"isVisible": 1,
"nextLine": "after"
},
"Lock": {
"use": "act_tuyaEF00-SetBool",
"params": "dpId=07&data=01",
"isVisible": 1
},
"UnLock": {
"use": "act_tuyaEF00-SetBool",
"params": "dpId=07&data=00",
"isVisible": 1,
"nextLine": "after"
},


"Set ECO temp": {
"use": "act_tuyaEF00-Set-Setpoint",
"params": "dpId=6B",
"isVisible": 0,
"nextLine": "after"
},
"Window-Detection": {
"use": "attr-Door-Status",
"use": "inf_Door-Status",
"logicalId": "01-windowDetectionStatus",
"nextLine": "after",
"invertBinary": 0,
Expand All @@ -68,18 +108,15 @@
"maxValue": 100,
"unit": "%",
"isVisible": 0
},
"Chauffage": {
"use": "inf_generic-NumericBadge",
"logicalId": "01-chauffage",
"minValue": 0,
"maxValue": 1,
"unit": "",
"isVisible": 1
}
},
"tuyaEF00": {
"fromDevice": {
"02": {
"function": "rcvThermostat-Mode",
"info": "01-Mode",
"comment": "Mode"
},
"03": {
"function": "rcvValue0Is1",
"info": "01-chauffage",
Expand All @@ -95,6 +132,11 @@
"div": 10,
"info": "0402-01-0000"
},
"07": {
"function": "rcvValue",
"info": "01-Lock",
"comment": "Kid Lock Status"
},
"09": {
"function": "rcvValue",
"info": "01-windowDetectionStatus"
Expand Down
File renamed without changes

0 comments on commit c0fd591

Please sign in to comment.