Skip to content

Commit f02de4b

Browse files
authored
Govee H5055 adjustments (#615)
1 parent 4be656c commit f02de4b

2 files changed

Lines changed: 14 additions & 2 deletions

File tree

src/devices/H5055_json.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
const char* _H5055_json = "{\"brand\":\"Govee\",\"model\":\"Bluetooth BBQ Thermometer\",\"model_id\":\"H5055\",\"tag\":\"0301\",\"condition\":[\"manufacturerdata\",\">=\",41,\"index\",12,\"06\",\"|\",\"manufacturerdata\",\">=\",41,\"index\",12,\"20\",\"&\",\"manufacturerdata\",\"index\",26,\"06\",\"|\",\"manufacturerdata\",\">=\",41,\"index\",26,\"20\",\"&\",\"manufacturerdata\",\"index\",40,\"0\"],\"properties\":{\"tempc1\":{\"condition\":[\"manufacturerdata\",14,\"!\",\"ffff\",\"&\",\"manufacturerdata\",10,\"bit\",3,0,\"&\",\"manufacturerdata\",10,\"bit\",2,0],\"decoder\":[\"value_from_hex_data\",\"manufacturerdata\",14,4,true,false]},\"tempc2\":{\"condition\":[\"manufacturerdata\",28,\"!\",\"ffff\",\"&\",\"manufacturerdata\",10,\"bit\",3,0,\"&\",\"manufacturerdata\",10,\"bit\",2,0],\"decoder\":[\"value_from_hex_data\",\"manufacturerdata\",28,4,true,false]},\"tempc3\":{\"condition\":[\"manufacturerdata\",14,\"!\",\"ffff\",\"&\",\"manufacturerdata\",10,\"bit\",3,0,\"&\",\"manufacturerdata\",10,\"bit\",2,1],\"decoder\":[\"value_from_hex_data\",\"manufacturerdata\",14,4,true,false]},\"tempc4\":{\"condition\":[\"manufacturerdata\",28,\"!\",\"ffff\",\"&\",\"manufacturerdata\",10,\"bit\",3,0,\"&\",\"manufacturerdata\",10,\"bit\",2,1],\"decoder\":[\"value_from_hex_data\",\"manufacturerdata\",28,4,true,false]},\"tempc5\":{\"condition\":[\"manufacturerdata\",14,\"!\",\"ffff\",\"&\",\"manufacturerdata\",10,\"bit\",3,1,\"&\",\"manufacturerdata\",10,\"bit\",2,0],\"decoder\":[\"value_from_hex_data\",\"manufacturerdata\",14,4,true,false]},\"tempc6\":{\"condition\":[\"manufacturerdata\",28,\"!\",\"ffff\",\"&\",\"manufacturerdata\",10,\"bit\",3,1,\"&\",\"manufacturerdata\",10,\"bit\",2,0],\"decoder\":[\"value_from_hex_data\",\"manufacturerdata\",28,4,true,false]},\"batt\":{\"decoder\":[\"value_from_hex_data\",\"manufacturerdata\",8,2,false]}}}";
1+
const char* _H5055_json = "{\"brand\":\"Govee\",\"model\":\"Bluetooth BBQ Thermometer\",\"model_id\":\"H5055\",\"tag\":\"0301\",\"condition\":[\"manufacturerdata\",\"index\",12,\"06\",\"|\",\"manufacturerdata\",\"index\",12,\"20\",\"|\",\"manufacturerdata\",\"index\",12,\"22\",\"&\",\"manufacturerdata\",\"=\",44,\"index\",40,\"0000\",\"|\",\"manufacturerdata\",\"=\",41,\"index\",40,\"0\"],\"properties\":{\"tempc1\":{\"condition\":[\"manufacturerdata\",14,\"!\",\"ffff\",\"&\",\"manufacturerdata\",10,\"bit\",3,0,\"&\",\"manufacturerdata\",10,\"bit\",2,0],\"decoder\":[\"value_from_hex_data\",\"manufacturerdata\",14,4,true,false]},\"tempc2\":{\"condition\":[\"manufacturerdata\",28,\"!\",\"ffff\",\"&\",\"manufacturerdata\",10,\"bit\",3,0,\"&\",\"manufacturerdata\",10,\"bit\",2,0],\"decoder\":[\"value_from_hex_data\",\"manufacturerdata\",28,4,true,false]},\"tempc3\":{\"condition\":[\"manufacturerdata\",14,\"!\",\"ffff\",\"&\",\"manufacturerdata\",10,\"bit\",3,0,\"&\",\"manufacturerdata\",10,\"bit\",2,1],\"decoder\":[\"value_from_hex_data\",\"manufacturerdata\",14,4,true,false]},\"tempc4\":{\"condition\":[\"manufacturerdata\",28,\"!\",\"ffff\",\"&\",\"manufacturerdata\",10,\"bit\",3,0,\"&\",\"manufacturerdata\",10,\"bit\",2,1],\"decoder\":[\"value_from_hex_data\",\"manufacturerdata\",28,4,true,false]},\"tempc5\":{\"condition\":[\"manufacturerdata\",14,\"!\",\"ffff\",\"&\",\"manufacturerdata\",10,\"bit\",3,1,\"&\",\"manufacturerdata\",10,\"bit\",2,0],\"decoder\":[\"value_from_hex_data\",\"manufacturerdata\",14,4,true,false]},\"tempc6\":{\"condition\":[\"manufacturerdata\",28,\"!\",\"ffff\",\"&\",\"manufacturerdata\",10,\"bit\",3,1,\"&\",\"manufacturerdata\",10,\"bit\",2,0],\"decoder\":[\"value_from_hex_data\",\"manufacturerdata\",28,4,true,false]},\"batt\":{\"decoder\":[\"value_from_hex_data\",\"manufacturerdata\",8,2,false]}}}";
22
/*R""""(
33
{
44
"brand":"Govee",
55
"model":"Bluetooth BBQ Thermometer",
66
"model_id":"H5055",
77
"tag":"0301",
8-
"condition":["manufacturerdata", ">=", 41, "index", 12, "06", "|", "manufacturerdata", ">=", 41, "index", 12, "20", "&", "manufacturerdata", "index", 26, "06", "|", "manufacturerdata", ">=", 41, "index", 26, "20", "&", "manufacturerdata", "index", 40, "0"],
8+
"condition":["manufacturerdata", "index", 12, "06", "|", "manufacturerdata", "index", 12, "20", "|", "manufacturerdata", "index", 12, "22", "&", "manufacturerdata", "=", 44, "index", 40, "0000", "|", "manufacturerdata", "=", 41, "index", 40, "0"],
99
"properties":{
1010
"tempc1":{
1111
"condition":["manufacturerdata", 14, "!", "ffff", "&", "manufacturerdata", 10, "bit", 3, 0, "&", "manufacturerdata", 10, "bit", 2, 0],

tests/BLE/test_ble.cpp

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -199,6 +199,10 @@ const char* expected_mfg[] = {
199199
"{\"brand\":\"SensorPush\",\"model\":\"HTP.xw\",\"model_id\":\"SPHTP\",\"type\":\"THBX\",\"cidc\":false,\"track\":true,\"tempc\":22.6625,\"tempf\":72.7925,\"hum\":46.0683703,\"pres\":989.6546067}",
200200
"{\"brand\":\"SensorPush\",\"model\":\"HTP.xw\",\"model_id\":\"SPHTP\",\"type\":\"THBX\",\"cidc\":false,\"track\":true,\"tempc\":21.165,\"tempf\":70.097,\"hum\":39.0133495,\"pres\":999.6239012}",
201201
"{\"brand\":\"SensorPush\",\"model\":\"HT.w\",\"model_id\":\"SPHT\",\"type\":\"THB\",\"cidc\":false,\"track\":true,\"tempc\":27.69,\"tempf\":81.842,\"hum\":36.53352559}",
202+
"{\"brand\":\"Govee\",\"model\":\"Bluetooth BBQ Thermometer\",\"model_id\":\"H5055\",\"type\":\"BBQ\",\"cidc\":false,\"tempc1\":20,\"tempf1\":68,\"tempc2\":22,\"tempf2\":71.6,\"batt\":100}",
203+
"{\"brand\":\"Govee\",\"model\":\"Bluetooth BBQ Thermometer\",\"model_id\":\"H5055\",\"type\":\"BBQ\",\"cidc\":false,\"tempc5\":21,\"tempf5\":69.8,\"tempc6\":21,\"tempf6\":69.8,\"batt\":100}",
204+
"{\"brand\":\"Govee\",\"model\":\"Bluetooth BBQ Thermometer\",\"model_id\":\"H5055\",\"type\":\"BBQ\",\"cidc\":false,\"tempc3\":23,\"tempf3\":73.4,\"tempc4\":21,\"tempf4\":69.8,\"batt\":100}",
205+
"{\"brand\":\"Govee\",\"model\":\"Bluetooth BBQ Thermometer\",\"model_id\":\"H5055\",\"type\":\"BBQ\",\"cidc\":false,\"tempc1\":26,\"tempf1\":78.8,\"tempc2\":22,\"tempf2\":71.6,\"batt\":100}",
202206
};
203207

204208
const char* expected_name_uuid_mfgsvcdata[] = {
@@ -739,6 +743,10 @@ const char* test_mfgdata[][3] = {
739743
{"SensorPush", "", "0089e456bea6b4"},
740744
{"SensorPush", "", "0011ef464343b7"},
741745
{"SensorPush", "", "04E9187D39"},
746+
{"H5055", "GVH5055", "d596c100643f201400ffff3100221600ffff3f000000"},
747+
{"H5055", "GVH5055", "d596c100648f221500ffff3f00221500ffff3f000000"},
748+
{"H5055", "GVH5055", "d596c1006441221700ffff3f00221500ffff3f000000"},
749+
{"H5055", "GVH5055", "d596c1006401201a00ffff3100221600ffff3f000000"},
742750
};
743751

744752
TheengsDecoder::BLE_ID_NUM test_mfgdata_id_num[]{
@@ -921,6 +929,10 @@ TheengsDecoder::BLE_ID_NUM test_mfgdata_id_num[]{
921929
TheengsDecoder::BLE_ID_NUM::SPHTP,
922930
TheengsDecoder::BLE_ID_NUM::SPHTP,
923931
TheengsDecoder::BLE_ID_NUM::SPHT,
932+
TheengsDecoder::BLE_ID_NUM::H5055,
933+
TheengsDecoder::BLE_ID_NUM::H5055,
934+
TheengsDecoder::BLE_ID_NUM::H5055,
935+
TheengsDecoder::BLE_ID_NUM::H5055,
924936
};
925937

926938
// uuid test input [test name] [device name] [uuid] [manufacturer data] [service data]

0 commit comments

Comments
 (0)