-
Notifications
You must be signed in to change notification settings - Fork 44
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
Showing
6 changed files
with
86 additions
and
0 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
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,12 @@ | ||
# SwitchBot Curtain | ||
|
||
|Model Id|[W070160X](https://github.com/theengs/decoder/blob/development/src/devices/SBCU_json.h)| | ||
|-|-| | ||
|Brand|SwitchBot| | ||
|Model|Curtain| | ||
|Short Description|Curtain motor| | ||
|Communication|BLE broadcast| | ||
|Frequency|2.4Ghz| | ||
|Power source|Rechargeable battery| | ||
|Exchanged data|motion state, position, light level, battery, calibration state| | ||
|Encrypted|No| |
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 |
---|---|---|
|
@@ -81,6 +81,7 @@ class TheengsDecoder { | |
IBT_2X, | ||
RUUVITAG_RAWV1, | ||
RUUVITAG_RAWV2, | ||
SBCU, | ||
SBMT, | ||
SBS1, | ||
BM_V23, | ||
|
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,64 @@ | ||
const char* _SBCU_json = "{\"brand\":\"SwitchBot\",\"model\":\"Curtain\",\"model_id\":\"W070160X\",\"condition\":[\"uuid\",\"index\",0,\"0d00\",\"&\",\"servicedata\",\"=\",10,\"index\",0,\"63\"],\"properties\":{\"motion\":{\"decoder\":[\"bit_static_value\",\"servicedata\",6,3,false,true]},\"position\":{\"condition\":[\"servicedata\",6,\"bit\",3,0],\"decoder\":[\"value_from_hex_data\",\"servicedata\",6,2,false,false]},\"_position\":{\"condition\":[\"servicedata\",6,\"bit\",3,1],\"decoder\":[\"value_from_hex_data\",\"servicedata\",6,2,false,false],\"post_proc\":['-',128]},\"calibrated\":{\"decoder\":[\"bit_static_value\",\"servicedata\",2,2,false,true]},\"lightlevel\":{\"decoder\":[\"value_from_hex_data\",\"servicedata\",8,1,false,false]},\"batt\":{\"condition\":[\"servicedata\",4,\"bit\",3,0],\"decoder\":[\"value_from_hex_data\",\"servicedata\",4,2,false,false]},\"_batt\":{\"condition\":[\"servicedata\",4,\"bit\",3,1],\"decoder\":[\"value_from_hex_data\",\"servicedata\",4,2,false,false],\"post_proc\":[\"-\",128]}}}"; | ||
/*R""""( | ||
{ | ||
"brand":"SwitchBot", | ||
"model":"Curtain", | ||
"model_id":"W070160X", | ||
"condition":["uuid", "index", 0, "0d00", "&", "servicedata", "=", 10, "index", 0, "63"], | ||
"properties":{ | ||
"motion":{ | ||
"decoder":["bit_static_value", "servicedata", 6, 3, false, true] | ||
}, | ||
"position":{ | ||
"condition":["servicedata", 6, "bit", 3, 0], | ||
"decoder":["value_from_hex_data", "servicedata", 6, 2, false, false] | ||
}, | ||
"_position":{ | ||
"condition":["servicedata", 6, "bit", 3, 1], | ||
"decoder":["value_from_hex_data", "servicedata", 6, 2, false, false], | ||
"post_proc":['-', 128] | ||
}, | ||
"calibrated":{ | ||
"decoder":["bit_static_value", "servicedata", 2, 2, false, true] | ||
}, | ||
"lightlevel":{ | ||
"decoder":["value_from_hex_data", "servicedata", 8, 1, false, false] | ||
}, | ||
"batt":{ | ||
"condition":["servicedata", 4, "bit", 3, 0], | ||
"decoder":["value_from_hex_data", "servicedata", 4, 2, false, false] | ||
}, | ||
"_batt":{ | ||
"condition":["servicedata", 4, "bit", 3, 1], | ||
"decoder":["value_from_hex_data", "servicedata", 4, 2, false, false], | ||
"post_proc":["-", 128] | ||
} | ||
} | ||
})"""";*/ | ||
|
||
const char* _SBCU_json_props = "{\"properties\":{\"motion\":{\"unit\":\"status\",\"name\":\"motion\"},\"position\":{\"unit\":\"%\",\"name\":\"position\"},\"calibrated\":{\"unit\":\"status\",\"name\":\"calibrated\"},\"lightlevel\":{\"unit\":\"int\",\"name\":\"light level\"},\"batt\":{\"unit\":\"%\",\"name\":\"battery\"}}}"; | ||
/*R""""( | ||
{ | ||
"properties":{ | ||
"motion":{ | ||
"unit":"status", | ||
"name":"motion" | ||
}, | ||
"position":{ | ||
"unit":"%", | ||
"name":"position" | ||
}, | ||
"calibrated":{ | ||
"unit":"status", | ||
"name":"calibrated" | ||
}, | ||
"lightlevel":{ | ||
"unit":"int", | ||
"name":"light level" | ||
}, | ||
"batt":{ | ||
"unit":"%", | ||
"name":"battery" | ||
} | ||
} | ||
})"""";*/ |
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