-
Notifications
You must be signed in to change notification settings - Fork 48
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ClearGrass/Qingping Barometer Pro CGP23W (#463)
- Loading branch information
Showing
5 changed files
with
75 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
# ClearGrass/Qingping Barometer Pro CGP23W | ||
|
||
|Model Id|[CGP1W](https://github.com/theengs/decoder/blob/development/src/devices/CGP1W_json.h)| | ||
|-|-| | ||
|Brand|ClearGrass/Qingping| | ||
|Model|Barometer Pro| | ||
|Short Description|Rechargeable temperature, humidity and atmospheric pressure sensor| | ||
|Communication|BLE broadcast| | ||
|Frequency|2.4Ghz| | ||
|Power Source|Internal battery/USB-C| | ||
|Exchanged Data|temperature, humidity, atmospheric pressure, battery| | ||
|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 |
---|---|---|
|
@@ -50,6 +50,7 @@ class TheengsDecoder { | |
LYWSD02, | ||
LYWSDCGQ, | ||
CGP1W, | ||
CGP23W, | ||
CGG1_STOCK, | ||
CGG1_ATC1441, | ||
CGG1_PVVX, | ||
|
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,57 @@ | ||
const char* _CGP23W_json = "{\"brand\":\"ClearGrass/Qingping\",\"model\":\"Barometer Pro\",\"model_id\":\"CGP23W\",\"tag\":\"02\",\"condition\":[\"servicedata\",\"=\",42,\"index\",2,\"18\",\"&\",\"uuid\",\"index\",0,\"fdcd\"],\"properties\":{\"tempc\":{\"decoder\":[\"value_from_hex_data\",\"servicedata\",20,4,true,true],\"post_proc\":[\"/\",10]},\"hum\":{\"decoder\":[\"value_from_hex_data\",\"servicedata\",24,4,true,false],\"post_proc\":[\"/\",10]},\"pres\":{\"decoder\":[\"value_from_hex_data\",\"servicedata\",38,4,true,false],\"post_proc\":[\"/\",10]},\"batt\":{\"decoder\":[\"value_from_hex_data\",\"servicedata\",32,2,false,false],\"post_proc\":[\"&\",127]},\"mac\":{\"decoder\":[\"revmac_from_hex_data\",\"servicedata\",4]}}}"; | ||
/*R""""( | ||
{ | ||
"brand":"ClearGrass/Qingping", | ||
"model":"Barometer Pro", | ||
"model_id":"CGP23W", | ||
"tag":"02", | ||
"condition":["servicedata", "=", 42, "index", 2, "18", "&", "uuid", "index", 0, "fdcd"], | ||
"properties":{ | ||
"tempc":{ | ||
"decoder":["value_from_hex_data", "servicedata", 20, 4, true, true], | ||
"post_proc":["/", 10] | ||
}, | ||
"hum":{ | ||
"decoder":["value_from_hex_data", "servicedata", 24, 4, true, false], | ||
"post_proc":["/", 10] | ||
}, | ||
"pres":{ | ||
"decoder":["value_from_hex_data", "servicedata", 38, 4, true, false], | ||
"post_proc":["/", 10] | ||
}, | ||
"batt":{ | ||
"decoder":["value_from_hex_data", "servicedata", 32, 2, false, false], | ||
"post_proc":["&", 127] | ||
}, | ||
"mac":{ | ||
"decoder":["revmac_from_hex_data", "servicedata", 4] | ||
} | ||
} | ||
})"""";*/ | ||
|
||
const char* _CGP23W_json_props = "{\"properties\":{\"pres\":{\"unit\":\"hPa\",\"name\":\"pressure\"},\"tempc\":{\"unit\":\"°C\",\"name\":\"temperature\"},\"hum\":{\"unit\":\"%\",\"name\":\"humidity\"},\"batt\":{\"unit\":\"%\",\"name\":\"battery\"},\"mac\":{\"unit\":\"string\",\"name\":\"MAC address\"}}}"; | ||
/*R""""( | ||
{ | ||
"properties":{ | ||
"pres":{ | ||
"unit":"hPa", | ||
"name":"pressure" | ||
}, | ||
"tempc":{ | ||
"unit":"°C", | ||
"name":"temperature" | ||
}, | ||
"hum":{ | ||
"unit":"%", | ||
"name":"humidity" | ||
}, | ||
"batt":{ | ||
"unit":"%", | ||
"name":"battery" | ||
}, | ||
"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