-
Notifications
You must be signed in to change notification settings - Fork 46
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ShellyBLU H&T SBHT-003C decoder (#554)
* ShellyBLU H&T SBHT-003C decoder * Button Hold to int 11, also for SBBT-002C * SBHT_003C encrypted decoder added
- Loading branch information
Showing
8 changed files
with
184 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,3 +18,4 @@ The button press type is encoded as: | |
* 2 - Double click | ||
* 3 - Triple click | ||
* 9 - Long press | ||
* 11 - Button hold |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# ShellyBLU H&T | ||
|
||
|Model Id|[SBHT-003C](https://github.com/theengs/decoder/blob/development/src/devices/SBHT_003C_json.h)| | ||
|-|-| | ||
|Brand|Shelly| | ||
|Model|ShellyBLU H&T| | ||
|Short Description|Humidity and temperature sensor| | ||
|Communication|BLE broadcast| | ||
|Frequency|2.4Ghz| | ||
|Power Source|CR2032| | ||
|Exchanged Data|temperature, humidity, button press type, battery, packet ID| | ||
|Encrypted|Yes/No - Optional| | ||
|
||
The button press type is encoded as: | ||
|
||
* 1 - Single short click | ||
* 11 - Button hold |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
const char* _SBHT_003C_ENCR_json = "{\"brand\":\"Shelly\",\"model\":\"ShellyBLU H&T encrypted\",\"model_id\":\"SBHT-003C_ENCR\",\"tag\":\"010602\",\"condition\":[\"servicedata\",\"=\",36,\"index\",0,\"45\",\"|\",\"servicedata\",\"=\",40,\"index\",0,\"45\",\"&\",\"uuid\",\"index\",0,\"fcd2\",\"&\",\"name\",\"index\",0,\"SBHT-003C\"],\"properties\":{\"cipher\":{\"condition\":[\"servicedata\",\"=\",36],\"decoder\":[\"string_from_hex_data\",\"servicedata\",2,18]},\"_cipher\":{\"condition\":[\"servicedata\",\"=\",40],\"decoder\":[\"string_from_hex_data\",\"servicedata\",2,22]},\"ctr\":{\"condition\":[\"servicedata\",\"=\",36],\"decoder\":[\"string_from_hex_data\",\"servicedata\",20,8]},\"_ctr\":{\"condition\":[\"servicedata\",\"=\",40],\"decoder\":[\"string_from_hex_data\",\"servicedata\",24,8]},\"mic\":{\"condition\":[\"servicedata\",\"=\",36],\"decoder\":[\"string_from_hex_data\",\"servicedata\",28,8]},\"_mic\":{\"condition\":[\"servicedata\",\"=\",40],\"decoder\":[\"string_from_hex_data\",\"servicedata\",32,8]},\"mac\":{\"condition\":[\"manufacturerdata\",\"=\",30],\"decoder\":[\"revmac_from_hex_data\",\"manufacturerdata\",18]}}}"; | ||
/*R""""( | ||
{ | ||
"brand":"Shelly", | ||
"model":"ShellyBLU H&T encrypted", | ||
"model_id":"SBHT-003C_ENCR", | ||
"tag":"010602", | ||
"condition":["servicedata", "=", 36, "index", 0, "45", "|", "servicedata", "=", 40, "index", 0, "45", "&", "uuid", "index", 0, "fcd2", "&", "name", "index", 0, "SBHT-003C"], | ||
"properties":{ | ||
"cipher":{ | ||
"condition":["servicedata", "=", 36], | ||
"decoder":["string_from_hex_data", "servicedata", 2, 18] | ||
}, | ||
"_cipher":{ | ||
"condition":["servicedata", "=", 40], | ||
"decoder":["string_from_hex_data", "servicedata", 2, 22] | ||
}, | ||
"ctr":{ | ||
"condition":["servicedata", "=", 36], | ||
"decoder":["string_from_hex_data", "servicedata", 20, 8] | ||
}, | ||
"_ctr":{ | ||
"condition":["servicedata", "=", 40], | ||
"decoder":["string_from_hex_data", "servicedata", 24, 8] | ||
}, | ||
"mic":{ | ||
"condition":["servicedata", "=", 36], | ||
"decoder":["string_from_hex_data", "servicedata", 28, 8] | ||
}, | ||
"_mic":{ | ||
"condition":["servicedata", "=", 40], | ||
"decoder":["string_from_hex_data", "servicedata", 32, 8] | ||
}, | ||
"mac":{ | ||
"condition":["manufacturerdata", "=", 30], | ||
"decoder":["revmac_from_hex_data", "manufacturerdata", 18] | ||
} | ||
} | ||
})"""";*/ | ||
|
||
const char* _SBHT_003C_ENCR_json_props = "{\"properties\":{\"cipher\":{\"unit\":\"hex\",\"name\":\"ciphertext\"},\"ctr\":{\"unit\":\"hex\",\"name\":\"counter\"},\"mic\":{\"unit\":\"hex\",\"name\":\"message integrity check\"},\"mac\":{\"unit\":\"string\",\"name\":\"MAC address\"}}}"; | ||
/*R""""( | ||
{ | ||
"properties":{ | ||
"cipher":{ | ||
"unit":"hex", | ||
"name":"ciphertext" | ||
}, | ||
"ctr":{ | ||
"unit":"hex", | ||
"name":"counter" | ||
}, | ||
"mic":{ | ||
"unit":"hex", | ||
"name":"message integrity check" | ||
}, | ||
"mac":{ | ||
"unit":"string", | ||
"name":"MAC address" | ||
} | ||
} | ||
})"""";*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
const char* _SBHT_003C_json = "{\"brand\":\"Shelly\",\"model\":\"ShellyBLU H&T\",\"model_id\":\"SBHT-003C\",\"tag\":\"0106\",\"condition\":[\"servicedata\",\"=\",20,\"index\",0,\"44\",\"|\",\"servicedata\",\"=\",24,\"index\",0,\"44\",\"&\",\"uuid\",\"index\",0,\"fcd2\",\"&\",\"name\",\"index\",0,\"SBHT-003C\"],\"properties\":{\"packet\":{\"condition\":[\"servicedata\",2,\"00\"],\"decoder\":[\"value_from_hex_data\",\"servicedata\",4,2,false,false]},\"batt\":{\"condition\":[\"servicedata\",6,\"01\"],\"decoder\":[\"value_from_hex_data\",\"servicedata\",8,2,false,false]},\"hum\":{\"condition\":[\"servicedata\",10,\"2e\"],\"decoder\":[\"value_from_hex_data\",\"servicedata\",12,2,false,false]},\"button\":{\"condition\":[\"servicedata\",14,\"3a\"],\"decoder\":[\"string_from_hex_data\",\"servicedata\",16,2],\"lookup\":[\"01\",1,\"fe\",11]},\"tempc\":{\"condition\":[\"servicedata\",14,\"45\"],\"decoder\":[\"value_from_hex_data\",\"servicedata\",16,4,true,false],\"post_proc\":[\"/\",10]},\"_tempc\":{\"condition\":[\"servicedata\",18,\"45\"],\"decoder\":[\"value_from_hex_data\",\"servicedata\",20,4,true,false],\"post_proc\":[\"/\",10]},\"mac\":{\"condition\":[\"manufacturerdata\",\"=\",30],\"decoder\":[\"revmac_from_hex_data\",\"manufacturerdata\",18]}}}"; | ||
/*R""""( | ||
{ | ||
"brand":"Shelly", | ||
"model":"ShellyBLU H&T", | ||
"model_id":"SBHT-003C", | ||
"tag":"0106", | ||
"condition":["servicedata", "=", 20, "index", 0, "44", "|", "servicedata", "=", 24, "index", 0, "44", "&", "uuid", "index", 0, "fcd2", "&", "name", "index", 0, "SBHT-003C"], | ||
"properties":{ | ||
"packet":{ | ||
"condition":["servicedata", 2, "00"], | ||
"decoder":["value_from_hex_data", "servicedata", 4, 2, false, false] | ||
}, | ||
"batt":{ | ||
"condition":["servicedata", 6, "01"], | ||
"decoder":["value_from_hex_data", "servicedata", 8, 2, false, false] | ||
}, | ||
"hum":{ | ||
"condition":["servicedata", 10, "2e"], | ||
"decoder":["value_from_hex_data", "servicedata", 12, 2, false, false] | ||
}, | ||
"button":{ | ||
"condition":["servicedata", 14, "3a"], | ||
"decoder":["string_from_hex_data", "servicedata", 16, 2], | ||
"lookup":["01", 1, | ||
"fe", 11] | ||
}, | ||
"tempc":{ | ||
"condition":["servicedata", 14, "45"], | ||
"decoder":["value_from_hex_data", "servicedata", 16, 4, true, false], | ||
"post_proc":["/", 10] | ||
}, | ||
"_tempc":{ | ||
"condition":["servicedata", 18, "45"], | ||
"decoder":["value_from_hex_data", "servicedata", 20, 4, true, false], | ||
"post_proc":["/", 10] | ||
}, | ||
"mac":{ | ||
"condition":["manufacturerdata", "=", 30], | ||
"decoder":["revmac_from_hex_data", "manufacturerdata", 18] | ||
} | ||
} | ||
})"""";*/ | ||
|
||
const char* _SBHT_003C_json_props = "{\"properties\":{\"packet\":{\"unit\":\"int\",\"name\":\"packet id\"},\"batt\":{\"unit\":\"%\",\"name\":\"battery\"},\"hum\":{\"unit\":\"%\",\"name\":\"humidity\"},\"button\":{\"unit\":\"int\",\"name\":\"button press type\"},\"tempc\":{\"unit\":\"°C\",\"name\":\"temperature\"},\"mac\":{\"unit\":\"string\",\"name\":\"MAC address\"}}}"; | ||
/*R""""( | ||
{ | ||
"properties":{ | ||
"packet":{ | ||
"unit":"int", | ||
"name":"packet id" | ||
}, | ||
"batt":{ | ||
"unit":"%", | ||
"name":"battery" | ||
}, | ||
"hum":{ | ||
"unit":"%", | ||
"name":"humidity" | ||
}, | ||
"button":{ | ||
"unit":"int", | ||
"name":"button press type" | ||
}, | ||
"tempc":{ | ||
"unit":"°C", | ||
"name":"temperature" | ||
}, | ||
"mac":{ | ||
"unit":"string", | ||
"name":"MAC address" | ||
} | ||
} | ||
})"""";*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters