-
Notifications
You must be signed in to change notification settings - Fork 43
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
058684c
commit 2f97fda
Showing
8 changed files
with
87 additions
and
5 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 |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# ShellyBLU Button1 | ||
|
||
|Model Id|[SBBT-002C](https://github.com/theengs/decoder/blob/development/src/devices/SBBT_002C_json.h)| | ||
|-|-| | ||
|Brand|Shelly| | ||
|Model|ShellyBLU Button1| | ||
|Short Description|Button| | ||
|Communication|BLE broadcast| | ||
|Frequency|2.4Ghz| | ||
|Power source|CR2032| | ||
|Exchanged data|button press type, battery, packet ID| | ||
|Encrypted|No| | ||
|
||
The button press type is encoded as: | ||
|
||
* 1 - Press | ||
* 2 - Double press | ||
* 3 - Triple press | ||
* 4 - Long press |
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 |
---|---|---|
|
@@ -125,6 +125,7 @@ class TheengsDecoder { | |
APPLE_CONT, | ||
APPLE_CONTAT, | ||
SERVICE_DATA, | ||
SBBT_002C, | ||
BLE_ID_MAX | ||
}; | ||
|
||
|
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,42 @@ | ||
const char* _SBBT_002C_json = "{\"brand\":\"Shelly\",\"model\":\"ShellyBLU Button1\",\"model_id\":\"SBBT-002C\",\"tag\":\"1104\",\"condition\":[\"uuid\",\"index\",0,\"fcd2\",\"&\",\"servicedata\",\"=\",14,\"index\",0,\"40\",\"&\",\"name\",\"index\",0,\"SBBT-002C\"],\"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]},\"press\":{\"condition\":[\"servicedata\",10,\"3a\"],\"decoder\":[\"value_from_hex_data\",\"servicedata\",12,2,false,false]}}}"; | ||
/*R""""( | ||
{ | ||
"brand":"Shelly", | ||
"model":"ShellyBLU Button1", | ||
"model_id":"SBBT-002C", | ||
"tag":"1104", | ||
"condition":["uuid", "index", 0, "fcd2", "&", "servicedata", "=", 14, "index", 0, "40", "&", "name", "index", 0, "SBBT-002C"], | ||
"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] | ||
}, | ||
"press":{ | ||
"condition":["servicedata", 10, "3a"], | ||
"decoder":["value_from_hex_data", "servicedata", 12, 2, false, false] | ||
} | ||
} | ||
})"""";*/ | ||
|
||
const char* _SBBT_002C_json_props = "{\"properties\":{\"packet\":{\"unit\":\"int\",\"name\":\"packet id\"},\"batt\":{\"unit\":\"%\",\"name\":\"battery\"},\"press\":{\"unit\":\"int\",\"name\":\"press type\"}}}"; | ||
/*R""""( | ||
{ | ||
"properties":{ | ||
"packet":{ | ||
"unit":"int", | ||
"name":"packet id" | ||
}, | ||
"batt":{ | ||
"unit":"%", | ||
"name":"battery" | ||
}, | ||
"press":{ | ||
"unit":"int", | ||
"name":"press type" | ||
} | ||
} | ||
})"""";*/ |
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