Skip to content

Commit

Permalink
IBT2X(S) fix (#110)
Browse files Browse the repository at this point in the history
  • Loading branch information
DigiH authored May 7, 2022
1 parent 38b18ac commit 849d688
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 6 deletions.
6 changes: 3 additions & 3 deletions docs/devices/IBT_2X.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
# Inkbird 2X BBQ
# Inkbird 2X(S) BBQ

|Model Id|[IBT_2X](https://github.com/theengs/decoder/blob/development/src/devices/IBS_2X_json.h)|
|Model Id|[IBT_2X(S)](https://github.com/theengs/decoder/blob/development/src/devices/IBT_2X_json.h)|
|-|-|
|Brand|Inkbird|
|Model|BBQ Temperature sensor|
|Short Description|BBQ Temperature sensor with 2 probes|
|Communication|BLE broadcast|
|Frequency|2.4Ghz|
|Power source|Rechargeable battery, USB|
|Power source|2 AAA (Rechargeable battery, USB)|
|Exchanged data|temperature, temperature2|
|Encrypted|No|
2 changes: 1 addition & 1 deletion docs/devices/IBT_4XS.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Inkbird 4XS BBQ

|Model Id|[IBT_4XS](https://github.com/theengs/decoder/blob/development/src/devices/IBS_4XS_json.h)|
|Model Id|[IBT_4XS](https://github.com/theengs/decoder/blob/development/src/devices/IBT_4XS_json.h)|
|-|-|
|Brand|Inkbird|
|Model|BBQ Temperature sensor|
Expand Down
4 changes: 2 additions & 2 deletions src/devices/IBT_2X_json.h
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
const char* _IBT_2X_json = "{\"brand\":\"Inkbird\",\"model\":\"iBBQ\",\"model_id\":\"IBT-2X\",\"condition\":[\"name\",\"index\",0,\"iBBQ\",\"&\",\"manufacturerdata\",\"=\",28,\"index\",0,\"00000000\"],\"properties\":{\"tempc\":{\"condition\":[\"manufacturerdata\",20,\"!\",\"f6ff\"],\"decoder\":[\"value_from_hex_data\",\"manufacturerdata\",20,4,true,false],\"post_proc\":[\"/\",10]},\"tempc2\":{\"condition\":[\"manufacturerdata\",24,\"!\",\"f6ff\"],\"decoder\":[\"value_from_hex_data\",\"manufacturerdata\",24,4,true,false],\"post_proc\":[\"/\",10]}}}";
const char* _IBT_2X_json = "{\"brand\":\"Inkbird\",\"model\":\"iBBQ\",\"model_id\":\"IBT-2X\",\"condition\":[\"name\",\"index\",0,\"iBBQ\",\"|\",\"name\",\"index\",0,\"xBBQ\",\"&\",\"manufacturerdata\",\"=\",28,\"index\",2,\"000000\"],\"properties\":{\"tempc\":{\"condition\":[\"manufacturerdata\",20,\"!\",\"f6ff\"],\"decoder\":[\"value_from_hex_data\",\"manufacturerdata\",20,4,true,false],\"post_proc\":[\"/\",10]},\"tempc2\":{\"condition\":[\"manufacturerdata\",24,\"!\",\"f6ff\"],\"decoder\":[\"value_from_hex_data\",\"manufacturerdata\",24,4,true,false],\"post_proc\":[\"/\",10]}}}";
/*R""""(
{
"brand":"Inkbird",
"model":"iBBQ",
"model_id":"IBT-2X",
"condition":["name", "index", 0, "iBBQ","&","manufacturerdata", "=", 28, "index", 0, "00000000"],
"condition":["name", "index", 0, "iBBQ", "|", "name", "index", 0, "xBBQ", "&","manufacturerdata", "=", 28, "index", 2, "000000"],
"properties":{
"tempc":{
"condition":["manufacturerdata", 20, "!", "f6ff"],
Expand Down
3 changes: 3 additions & 0 deletions tests/BLE/test_ble.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ const char* expected_mfg[] = {
"{\"brand\":\"Inkbird\",\"model\":\"iBBQ\",\"model_id\":\"IBT-2X\",\"tempc2\":65,\"tempf2\":149}",
"{\"brand\":\"Inkbird\",\"model\":\"iBBQ\",\"model_id\":\"IBT-2X\",\"tempc\":22,\"tempf\":71.6,\"tempc2\":21,\"tempf2\":69.8}",
"{\"brand\":\"Inkbird\",\"model\":\"iBBQ\",\"model_id\":\"IBT-2X\",\"tempc2\":58,\"tempf2\":136.4}",
"{\"brand\":\"Inkbird\",\"model\":\"iBBQ\",\"model_id\":\"IBT-2X\",\"tempc\":22,\"tempf\":71.6,\"tempc2\":20.7,\"tempf2\":69.26}",
"{\"brand\":\"Inkbird/Tenergy\",\"model\":\"iBBQ/SOLIS6\",\"model_id\":\"IBT-6XS/SOLIS-6\",\"tempc\":21,\"tempf\":69.8,\"tempc2\":20,\"tempf2\":68,\"tempc4\":21,\"tempf4\":69.8}",
"{\"brand\":\"Ruuvi\",\"model\":\"RuuviTag\",\"model_id\":\"RuuviTag_RAWv1\",\"hum\":20.5,\"tempc\":26.3,\"tempf\":79.34,\"pres\":1027.66,\"accx\":-1,\"accy\":-1.726,\"accz\":0.714,\"volt\":2.899}",
"{\"brand\":\"Ruuvi\",\"model\":\"RuuviTag\",\"model_id\":\"RuuviTag_RAWv1\",\"hum\":127.5,\"tempc\":127.99,\"tempf\":262.382,\"pres\":1155.35,\"accx\":32.767,\"accy\":32.767,\"accz\":32.767,\"volt\":65.535}",
Expand Down Expand Up @@ -222,6 +223,7 @@ const char* test_mfgdata[][3] = {
{"IBT-2X", "iBBQ", "00000000fc45c30c458ef6ff8a02"},
{"IBT-2X", "iBBQ", "00000000fc45c30d38a8dc00d200"},
{"IBT-2X", "iBBQ", "00000000fc45c30d38a8f6ff4402"},
{"IBT-2XS", "xBBQ", "01000000fc45c30d38a8dc00cf00"},
{"IBT-6XS", "iBBQ", "000000003403de2745cdd200c800f6ffd200f6fff6ff"},
{"RuuviTag RAWv1", "RuuviTag", "990403291A1ECE1EFC18F94202CA0B53"},
{"RuuviTag RAWv1", "RuuviTag maximum values", "990403FF7F63FFFF7FFF7FFF7FFFFFFF"},
Expand Down Expand Up @@ -259,6 +261,7 @@ TheengsDecoder::BLE_ID_NUM test_mfgdata_id_num[]{
TheengsDecoder::BLE_ID_NUM::IBT_2X,
TheengsDecoder::BLE_ID_NUM::IBT_2X,
TheengsDecoder::BLE_ID_NUM::IBT_2X,
TheengsDecoder::BLE_ID_NUM::IBT_2X,
TheengsDecoder::BLE_ID_NUM::IBT6XS_SOLIS,
TheengsDecoder::BLE_ID_NUM::RUUVITAG_RAWV1,
TheengsDecoder::BLE_ID_NUM::RUUVITAG_RAWV1,
Expand Down

0 comments on commit 849d688

Please sign in to comment.