diff --git a/docs/devices/BM1in1.md b/docs/devices/BM1in1.md new file mode 100644 index 00000000..e33a2182 --- /dev/null +++ b/docs/devices/BM1in1.md @@ -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| diff --git a/src/decoder.h b/src/decoder.h index bc3186c9..361a7012 100644 --- a/src/decoder.h +++ b/src/decoder.h @@ -90,6 +90,7 @@ class TheengsDecoder { SHT4X, SCD4X, SMARTDRY, + BM1IN1, BM3IN1, BM4IN1, MS_CDP, diff --git a/src/devices.h b/src/devices.h index a9999491..4ad65c12 100644 --- a/src/devices.h +++ b/src/devices.h @@ -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" @@ -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}, diff --git a/src/devices/BM1IN1_json.h b/src/devices/BM1IN1_json.h new file mode 100644 index 00000000..c0dad761 --- /dev/null +++ b/src/devices/BM1IN1_json.h @@ -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" + } + } +})"""";*/ diff --git a/tests/BLE/test_ble.cpp b/tests/BLE/test_ble.cpp index 11852751..cbbaafe5 100644 --- a/tests/BLE/test_ble.cpp +++ b/tests/BLE/test_ble.cpp @@ -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}", @@ -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"}, @@ -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,