Skip to content

Commit

Permalink
Blue Maestro Temperature (#251)
Browse files Browse the repository at this point in the history
Blue Maestro Temperature, waterproof and non-waterproof red version of the temperature only sensor.
  • Loading branch information
DigiH authored Jan 6, 2023
1 parent 52e4cda commit 5a814de
Show file tree
Hide file tree
Showing 5 changed files with 50 additions and 0 deletions.
12 changes: 12 additions & 0 deletions docs/devices/BM1in1.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# Blue Maestro Tempo Disc Temperature

|Model Id|[TD1in1](https://github.com/theengs/decoder/blob/development/src/devices/BM1IN1_json.h)|
|-|-|
|Brand|BlueMaestro|
|Model|Tempo Disc|
|Short Description|Red temperature sensor, also available as IP67 waterproof|
|Communication|BLE broadcast|
|Frequency|2.4Ghz|
|Power source|CR2032 (IP67 model non-changeable)|
|Exchanged data|temperature, battery|
|Encrypted|No|
1 change: 1 addition & 0 deletions src/decoder.h
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ class TheengsDecoder {
SHT4X,
SCD4X,
SMARTDRY,
BM1IN1,
BM3IN1,
BM4IN1,
MS_CDP,
Expand Down
2 changes: 2 additions & 0 deletions src/devices.h
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@
#include "devices/T301_json.h"
#include "devices/iBeacon_json.h"
#include "devices/iNodeEM_json.h"
#include "devices/BM1IN1_json.h"
#include "devices/BM3IN1_json.h"
#include "devices/BM4IN1_json.h"
#include "devices/BPARASITE_json.h"
Expand Down Expand Up @@ -123,6 +124,7 @@ const char* _devices[][2] = {
{_SHT4X_json, _SHT4X_json_props},
{_SCD4X_json, _SCD4X_json_props},
{_SmartDry_json, _SmartDry_json_props},
{_BM1IN1_json, _BM1IN1_json_props},
{_BM3IN1_json, _BM3IN1_json_props},
{_BM4IN1_json, _BM4IN1_json_props},
{_MS_CDP_json, _MS_CDP_json_props},
Expand Down
32 changes: 32 additions & 0 deletions src/devices/BM1IN1_json.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
const char* _BM1IN1_json = "{\"brand\":\"Blue Maestro\",\"model\":\"Tempo Disc\",\"model_id\":\"TD1in1\",\"condition\":[\"manufacturerdata\",\"index\",4,\"0d\",\"&\",\"manufacturerdata\",\"=\",24,\"index\",0,\"3301\"],\"properties\":{\"tempc\":{\"decoder\":[\"value_from_hex_data\",\"manufacturerdata\",16,4,false,true],\"post_proc\":[\"/\",10]},\"batt\":{\"decoder\":[\"value_from_hex_data\",\"manufacturerdata\",6,2,false,false]}}}";
/*R""""(
{
"brand":"Blue Maestro",
"model":"Tempo Disc",
"model_id":"TD1in1",
"condition":["manufacturerdata", "index", 4, "0d", "&", "manufacturerdata", "=", 24, "index", 0, "3301"],
"properties":{
"tempc":{
"decoder":["value_from_hex_data", "manufacturerdata", 16, 4, false, true],
"post_proc":["/", 10]
},
"batt":{
"decoder":["value_from_hex_data", "manufacturerdata", 6, 2, false, false]
}
}
})"""";*/

const char* _BM1IN1_json_props = "{\"properties\":{\"tempc\":{\"unit\":\"°C\",\"name\":\"temperature\"},\"batt\":{\"unit\":\"%\",\"name\":\"battery\"}}}";
/*R""""(
{
"properties": {
"tempc": {
"unit": "°C",
"name": "temperature"
},
"batt": {
"unit": "%",
"name": "battery"
}
}
})"""";*/
3 changes: 3 additions & 0 deletions tests/BLE/test_ble.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ const char* expected_mfg[] = {
"{\"brand\":\"Blue Maestro\",\"model\":\"Tempo Disc\",\"model_id\":\"TD3in1\",\"tempc\":23.9,\"tempf\":75.02,\"hum\":43.5,\"tempc2_dp\":10.8,\"tempf2_dp\":51.44,\"batt\":86}",
"{\"brand\":\"Blue Maestro\",\"model\":\"Tempo Disc\",\"model_id\":\"TD3in1\",\"tempc\":-16.3,\"tempf\":2.66,\"hum\":78.3,\"tempc2_dp\":-19.2,\"tempf2_dp\":-2.56,\"batt\":67}",
"{\"brand\":\"Blue Maestro\",\"model\":\"Tempo Disc\",\"model_id\":\"TD4in1\",\"tempc\":22.3,\"tempf\":72.14,\"hum\":75.9,\"pres\":1013.5,\"batt\":58}",
"{\"brand\":\"Blue Maestro\",\"model\":\"Tempo Disc\",\"model_id\":\"TD1in1\",\"tempc\":25.2,\"tempf\":77.36,\"batt\":100}",
"{\"brand\":\"GENERIC\",\"model\":\"MS-CDP\",\"model_id\":\"MS-CDP\",\"device\":\"Windows 10 Desktop\",\"salt\":\"ac6d90ec\",\"hash\":\"0132b3204cd39c7ced3e48436ba15dc6\"}",
"{\"brand\":\"Inkbird/Tenergy\",\"model\":\"iBBQ/SOLIS6\",\"model_id\":\"IBT-6XS/SOLIS-6\",\"cidc\":false,\"tempc\":20,\"tempf\":68,\"tempc2\":20,\"tempf2\":68,\"tempc4\":21,\"tempf4\":69.8}",
"{\"brand\":\"GENERIC\",\"model\":\"BM2 Battery Monitor\",\"model_id\":\"BM2\",\"batt\":100}",
Expand Down Expand Up @@ -302,6 +303,7 @@ const char* test_mfgdata[][3] = {
{"BlueMaestro", "TempoDisc 3in1", "330117560e10177000ef01b3006c0100"},
{"BlueMaestro", "TempoDisc 3in1", "330116430e10061eff5d030fff400100"},
{"BlueMaestro", "TempoDisc 4in1", "33011b3a0e10061e00df02f727970100"},
{"BlueMaestro", "TempoDisc 1in1", "33010d6402580ad100fc0100"},
{"MS-CDP", "Windows 10 Desktop", "060001092002ac6d90ec0132b3204cd39c7ced3e48436ba15dc6314778"},
{"SOLIS_6", "iBBQ", "000000000cb2b71b5b18c800c800f6ffd200f6fff6ff"},
{"BM2", "Battery Monitor", "4c000215655f83caae16a10a702e31f30d58dd82f644000064"},
Expand Down Expand Up @@ -387,6 +389,7 @@ TheengsDecoder::BLE_ID_NUM test_mfgdata_id_num[]{
TheengsDecoder::BLE_ID_NUM::BM3IN1,
TheengsDecoder::BLE_ID_NUM::BM3IN1,
TheengsDecoder::BLE_ID_NUM::BM4IN1,
TheengsDecoder::BLE_ID_NUM::BM1IN1,
TheengsDecoder::BLE_ID_NUM::MS_CDP,
TheengsDecoder::BLE_ID_NUM::IBT6XS_SOLIS,
TheengsDecoder::BLE_ID_NUM::BM2,
Expand Down

0 comments on commit 5a814de

Please sign in to comment.