Skip to content

Commit

Permalink
Add SOLIS 6 Probes BBQ (#78)
Browse files Browse the repository at this point in the history
  • Loading branch information
1technophile authored Feb 26, 2022
1 parent 66ea526 commit c4056fa
Show file tree
Hide file tree
Showing 6 changed files with 85 additions and 0 deletions.
1 change: 1 addition & 0 deletions docs/.vuepress/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ module.exports = {
'devices/IBT_4XS',
'devices/IBT_6XS',
'devices/IBT_2X',
'devices/SOLIS_6',
'devices/iNode',
'devices/MS_CDP',
'devices/MokoBeacon',
Expand Down
12 changes: 12 additions & 0 deletions docs/devices/SOLIS_6.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# Tenergy SOLIS 6 BBQ

|Model Id|[SOLIS_6](https://github.com/theengs/decoder/blob/development/src/devices/SOLIS_6_json.h)|
|-|-|
|Brand|Ternergy|
|Model|BBQ Temperature sensor|
|Short Description|BBQ Temperature sensor with 6 probes|
|Communication|BLE broadcast|
|Frequency|2.4Ghz|
|Power source|Rechargeable battery, USB|
|Exchanged data|temperature, temperature2, temperature3, temperature4, temperature5, temperature6|
|Encrypted|No|
1 change: 1 addition & 0 deletions src/decoder.h
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ class TheengsDecoder {
BM_V23,
MS_CDP,
GAEN,
SOLIS_6,
BLE_ID_MAX
};

Expand Down
2 changes: 2 additions & 0 deletions src/devices.h
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@
#include "devices/iBeacon_json.h"
#include "devices/iNode_json.h"
#include "devices/BM_V23_json.h"
#include "devices/SOLIS_6_json.h"

const char* _devices[][2] = {
{_HHCCJCY01HHCC_json, _HHCCJCY01HHCC_json_props},
Expand Down Expand Up @@ -96,4 +97,5 @@ const char* _devices[][2] = {
{_BM_V23_json, _BM_V23_json_props},
{_MS_CDP_json, _MS_CDP_json_props},
{_GAEN_json, _GAEN_json_props},
{_SOLIS_6_json, _SOLIS_6_json_props},
};
65 changes: 65 additions & 0 deletions src/devices/SOLIS_6_json.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
const char* _SOLIS_6_json = "{\"brand\":\"Tenergy\",\"model\":\"SOLIS 6 probes\",\"model_id\":\"SOLIS_6\",\"condition\":[\"name\",\"index\",0,\"iBBQ\",\"&\",\"manufacturerdata\",\"=\",44,\"index\",0,\"000000000\"],\"properties\":{\"tempc\":{\"decoder\":[\"value_from_hex_data\",\"manufacturerdata\",20,4,true,false],\"post_proc\":[\"/\",10]},\"tempc2\":{\"decoder\":[\"value_from_hex_data\",\"manufacturerdata\",24,4,true,false],\"post_proc\":[\"/\",10]},\"tempc3\":{\"decoder\":[\"value_from_hex_data\",\"manufacturerdata\",28,4,true,false],\"post_proc\":[\"/\",10]},\"tempc4\":{\"decoder\":[\"value_from_hex_data\",\"manufacturerdata\",32,4,true,false],\"post_proc\":[\"/\",10]},\"tempc5\":{\"decoder\":[\"value_from_hex_data\",\"manufacturerdata\",36,4,true,false],\"post_proc\":[\"/\",10]},\"tempc6\":{\"decoder\":[\"value_from_hex_data\",\"manufacturerdata\",40,4,true,false],\"post_proc\":[\"/\",10]}}}";

/*R""""(
{
"brand":"Tenergy",
"model":"SOLIS 6 Probes",
"model_id":"SOLIS_6",
"condition":["name", "index", 0, "iBBQ","&","manufacturerdata","=", 44, "index", 0, "000000000"],
"properties":{
"tempc":{
"decoder":["value_from_hex_data", "manufacturerdata", 20, 4, true, false],
"post_proc":["/", 10]
},
"tempc2":{
"decoder":["value_from_hex_data", "manufacturerdata", 24, 4, true, false],
"post_proc":["/", 10]
},
"tempc3":{
"decoder":["value_from_hex_data", "manufacturerdata", 28, 4, true, false],
"post_proc":["/", 10]
},
"tempc4":{
"decoder":["value_from_hex_data", "manufacturerdata", 32, 4, true, false],
"post_proc":["/", 10]
},
"tempc5":{
"decoder":["value_from_hex_data", "manufacturerdata", 36, 4, true, false],
"post_proc":["/", 10]
},
"tempc6":{
"decoder":["value_from_hex_data", "manufacturerdata", 40, 4, true, false],
"post_proc":["/", 10]
}
}
})"""";*/
const char* _SOLIS_6_json_props = "{\"properties\":{\"tempc\":{\"unit\":\"°C\",\"name\":\"temperature\"},\"tempc2\":{\"unit\":\"°C\",\"name\":\"temperature\"},\"tempc3\":{\"unit\":\"°C\",\"name\":\"temperature\"},\"tempc4\":{\"unit\":\"°C\",\"name\":\"temperature\"},\"tempc5\":{\"unit\":\"°C\",\"name\":\"temperature\"},\"tempc6\":{\"unit\":\"°C\",\"name\":\"temperature\"}}}";
/*R""""(
{
"properties":{
"tempc":{
"unit":"°C",
"name":"temperature"
},
"tempc2":{
"unit":"°C",
"name":"temperature"
},
"tempc3":{
"unit":"°C",
"name":"temperature"
},
"tempc4":{
"unit":"°C",
"name":"temperature"
},
"tempc5":{
"unit":"°C",
"name":"temperature"
},
"tempc6":{
"unit":"°C",
"name":"temperature"
}
}
})"""";*/
4 changes: 4 additions & 0 deletions tests/BLE/test_ble.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,8 @@ const char* expected_mfg[] = {
"{\"brand\":\"Ruuvi\",\"model\":\"RuuviTag\",\"model_id\":\"RuuviTag_RAWv2\",\"tempc\":-163.835,\"tempf\":-262.903,\"hum\":0,\"pres\":500,\"accx\":-32.767,\"accy\":-32.767,\"accz\":-32.767,\"volt\":1.6,\"tx\":-40,\"mov\":0,\"seq\":0}",
"{\"brand\":\"BlueMaestro\",\"model\":\"TempoDisc\",\"model_id\":\"BM_V23\",\"tempc\":23.9,\"tempf\":75.02,\"dp\":10.8,\"hum\":43.5,\"volt\":2.56}",
"{\"brand\":\"GENERIC\",\"model\":\"MS-CDP\",\"model_id\":\"MS-CDP\",\"device\":\"Windows 10 Desktop\",\"salt\":\"ac6d90ec\",\"hash\":\"0132b3204cd39c7ced3e48436ba15dc6\"}",
"{\"brand\":\"Tenergy\",\"model\":\"SOLIS 6 probes\",\"model_id\":\"SOLIS_6\",\"tempc\":20,\"tempf\":68,\"tempc2\":20,\"tempf2\":68,\"tempc3\":6552.6,\"tempf3\":11826.68,\"tempc4\":6552.6,\"tempf4\":11826.68,\"tempc5\":6552.6,\"tempf5\":11826.68,\"tempc6\":6552.6,\"tempf6\":11826.68}",

};

const char* expected_uuid[] = {
Expand Down Expand Up @@ -183,6 +185,7 @@ const char* test_mfgdata[][3] = {
{"RuuviTag RAWv2", "RuuviTag minimum values", "9904058001000000008001800180010000000000CBB8334C884F"},
{"BM_V23", "V23", "330117560e10177000ef01b3006c0100"},
{"MS-CDP", "Windows 10 Desktop", "060001092002ac6d90ec0132b3204cd39c7ced3e48436ba15dc6314778"},
{"SOLIS_6", "iBBQ", "000000000cb2b71b5b18c800c800f6fff6fff6fff6ff"},
};

TheengsDecoder::BLE_ID_NUM test_mfgdata_id_num[]{
Expand Down Expand Up @@ -210,6 +213,7 @@ TheengsDecoder::BLE_ID_NUM test_mfgdata_id_num[]{
TheengsDecoder::BLE_ID_NUM::RUUVITAG_RAWV2,
TheengsDecoder::BLE_ID_NUM::BM_V23,
TheengsDecoder::BLE_ID_NUM::MS_CDP,
TheengsDecoder::BLE_ID_NUM::SOLIS_6,
};

// uuid test input [test name] [uuid] [data source] [data]
Expand Down

0 comments on commit c4056fa

Please sign in to comment.