From 15df54bb07b379426bd5fd12909d006e1e45f995 Mon Sep 17 00:00:00 2001 From: Theo Arends <11044339+arendst@users.noreply.github.com> Date: Fri, 7 Feb 2020 10:50:06 +0100 Subject: [PATCH] Add support for HM-10 Add support for MI-BLE sensors using HM-10 Bluetooth 4.0 module by Christian Staars (#7683) --- RELEASENOTES.md | 4 ++-- tasmota/CHANGELOG.md | 4 ++-- tasmota/my_user_config.h | 6 +++--- tasmota/support_features.ino | 24 +++++++++++++++--------- tasmota/tasmota_post.h | 4 ++++ tools/decode-status.py | 9 ++++++--- 6 files changed, 32 insertions(+), 19 deletions(-) diff --git a/RELEASENOTES.md b/RELEASENOTES.md index 67bdbfc8f..48c9abc90 100644 --- a/RELEASENOTES.md +++ b/RELEASENOTES.md @@ -92,5 +92,5 @@ The following binary downloads have been compiled with ESP8266/Arduino library c - Add SoftwareSerial to CSE7766 driver allowing different GPIOs (#7563) - Add optional parameter to command ``Scheme , `` to control initial start color - Add rule trigger on one level deeper using syntax with two ``#`` like ``on zigbeereceived#vibration_sensor#aqaracubeside=0 do ...`` -- Add support for sensor DS18x20 on Shelly 1 and Shelly 1PM using Shelly Add-On adapter (#7469) -- Add support for sensor DHT family on Shelly 1 and Shelly 1PM using Shelly Add-On adapter (#7469) +- Add support for sensors DS18x20 and DHT family on Shelly 1 and Shelly 1PM using Shelly Add-On adapter (#7469) +- Add support for MI-BLE sensors using HM-10 Bluetooth 4.0 module by Christian Staars (#7683) diff --git a/tasmota/CHANGELOG.md b/tasmota/CHANGELOG.md index f1706f118..fd14db3d5 100644 --- a/tasmota/CHANGELOG.md +++ b/tasmota/CHANGELOG.md @@ -3,10 +3,10 @@ ### 8.1.0.6 20200205 - Fix Hass sensor discovery part 1/4 by Federico Leoni (#7582, #7548) -- Add support for sensor DS18x20 on Shelly 1 and Shelly 1PM using Shelly Add-On adapter (#7469) -- Add support for sensor DHT family on Shelly 1 and Shelly 1PM using Shelly Add-On adapter (#7469) +- Add support for sensors DS18x20 and DHT family on Shelly 1 and Shelly 1PM using Shelly Add-On adapter (#7469) - Add commands ``SwitchMode 11`` PushHoldMulti and ``SwitchMode 12`` PushHoldInverted (#7603) - Add command ``Buzzer -1`` for infinite mode and command ``Buzzer -2`` for following led mode (#7623) +- Add support for MI-BLE sensors using HM-10 Bluetooth 4.0 module by Christian Staars (#7683) ### 8.1.0.5 20200126 diff --git a/tasmota/my_user_config.h b/tasmota/my_user_config.h index 58bd6e7a5..ab3d55969 100644 --- a/tasmota/my_user_config.h +++ b/tasmota/my_user_config.h @@ -540,9 +540,9 @@ // #define USE_PN532_DATA_RAW // Allow DATA block to be used by non-alpha-numberic data (+ 80 bytes code, 48 bytes ram) //#define USE_RDM6300 // Add support for RDM6300 125kHz RFID Reader (+0k8) //#define USE_IBEACON // Add support for bluetooth LE passive scan of ibeacon devices (uses HM17 module) -//#define USE_GPS // Add support for GPS and NTP Server for becoming Stratus 1 Time Source (+ 3.1kb flash, +132 bytes RAM) -// #define USE_FLOG // Add support for GPS logging in OTA's Flash (Experimental) (+ 2.9kb flash, +8 bytes RAM) -//#define USE_HM10 // Add support for HM-10 as a BLE-bridge for the LYWSD03 (+... code) +//#define USE_GPS // Add support for GPS and NTP Server for becoming Stratus 1 Time Source (+3k1 code, +132 bytes RAM) +// #define USE_FLOG // Add support for GPS logging in OTA's Flash (Experimental) (+2k9 code, +8 bytes RAM) +//#define USE_HM10 // Add support for HM-10 as a BLE-bridge for the LYWSD03 (+5k1 code) // -- Power monitoring sensors -------------------- #define USE_ENERGY_MARGIN_DETECTION // Add support for Energy Margin detection (+1k6 code) diff --git a/tasmota/support_features.ino b/tasmota/support_features.ino index d86bf11bb..376a5a8b2 100644 --- a/tasmota/support_features.ino +++ b/tasmota/support_features.ino @@ -484,27 +484,33 @@ void GetFeatures(void) feature5 |= 0x00020000; // xsns_55_hih_series.ino #endif #ifdef USE_HPMA - feature5 |= 0x00040000; + feature5 |= 0x00040000; // xsns_56_hpma.ino #endif #ifdef USE_TSL2591 - feature5 |= 0x00080000; + feature5 |= 0x00080000; // xsns_57_tsl2591.ino #endif #ifdef USE_DHT12 - feature5 |= 0x00100000; + feature5 |= 0x00100000; // xsns_58_dht12.ino #endif #ifdef USE_DS1624 - feature5 |= 0x00200000; + feature5 |= 0x00200000; // xsns_59_ds1624.ino #endif #ifdef USE_GPS - feature5 |= 0x00400000; + feature5 |= 0x00400000; // xsns_60_GPS.ino #endif #ifdef USE_HOTPLUG - feature5 |= 0x00800000; + feature5 |= 0x00800000; // xdrv_32_hotplug.ino +#endif +#ifdef USE_NRF24 + feature5 |= 0x01000000; // xsns_33_nrf24l01.ino +#endif +#ifdef USE_MIBLE + feature5 |= 0x02000000; // xsns_61_MI_BLE.ino +#endif +#ifdef USE_HM10 + feature5 |= 0x04000000; // xsns_62_MI_HM10.ino #endif -// feature5 |= 0x01000000; -// feature5 |= 0x02000000; -// feature5 |= 0x04000000; // feature5 |= 0x08000000; // feature5 |= 0x10000000; diff --git a/tasmota/tasmota_post.h b/tasmota/tasmota_post.h index bef9c567d..b0ef04b06 100644 --- a/tasmota/tasmota_post.h +++ b/tasmota/tasmota_post.h @@ -185,6 +185,7 @@ extern "C" void custom_crash_callback(struct rst_info * rst_info, uint32_t stack #define USE_RDM6300 // Add support for RDM6300 125kHz RFID Reader (+0k8) #define USE_IBEACON // Add support for bluetooth LE passive scan of ibeacon devices (uses HM17 module) //#define USE_GPS // Add support for GPS and NTP Server for becoming Stratus 1 Time Source (+ 3.1kb flash, +132 bytes RAM) +#define USE_HM10 // Add support for HM-10 as a BLE-bridge for the LYWSD03 (+5k1 code) #define USE_ENERGY_SENSOR // Add energy sensors (-14k code) #define USE_PZEM004T // Add support for PZEM004T Energy monitor (+2k code) @@ -388,6 +389,7 @@ extern "C" void custom_crash_callback(struct rst_info * rst_info, uint32_t stack #undef USE_RDM6300 // Disable support for RDM6300 125kHz RFID Reader (+0k8) #undef USE_IBEACON // Disable support for bluetooth LE passive scan of ibeacon devices (uses HM17 module) #undef USE_GPS // Disable support for GPS and NTP Server for becoming Stratus 1 Time Source (+ 3.1kb flash, +132 bytes RAM) +#undef USE_HM10 // Disable support for HM-10 as a BLE-bridge for the LYWSD03 (+5k1 code) //#define USE_DHT // Add support for DHT11, AM2301 (DHT21, DHT22, AM2302, AM2321) and SI7021 Temperature and Humidity sensor #undef USE_MAX31855 // Disable MAX31855 K-Type thermocouple sensor using softSPI @@ -480,6 +482,7 @@ extern "C" void custom_crash_callback(struct rst_info * rst_info, uint32_t stack #undef USE_RDM6300 // Disable support for RDM6300 125kHz RFID Reader (+0k8) #undef USE_IBEACON // Disable support for bluetooth LE passive scan of ibeacon devices (uses HM17 module) #undef USE_GPS // Disable support for GPS and NTP Server for becoming Stratus 1 Time Source (+ 3.1kb flash, +132 bytes RAM) +#undef USE_HM10 // Disable support for HM-10 as a BLE-bridge for the LYWSD03 (+5k1 code) //#undef USE_ENERGY_SENSOR // Disable energy sensors #undef USE_PZEM004T // Disable PZEM004T energy sensor @@ -593,6 +596,7 @@ extern "C" void custom_crash_callback(struct rst_info * rst_info, uint32_t stack #undef USE_RDM6300 // Disable support for RDM6300 125kHz RFID Reader (+0k8) #undef USE_IBEACON // Disable support for bluetooth LE passive scan of ibeacon devices (uses HM17 module) #undef USE_GPS // Disable support for GPS and NTP Server for becoming Stratus 1 Time Source (+ 3.1kb flash, +132 bytes RAM) +#undef USE_HM10 // Disable support for HM-10 as a BLE-bridge for the LYWSD03 (+5k1 code) #undef USE_ENERGY_SENSOR // Disable energy sensors #undef USE_PZEM004T // Disable PZEM004T energy sensor diff --git a/tools/decode-status.py b/tools/decode-status.py index 01319d9e4..2acee4923 100755 --- a/tools/decode-status.py +++ b/tools/decode-status.py @@ -136,7 +136,10 @@ a_setoption = [[ "Enable shutter support", "Invert PCF8574 ports" ],[ - "","","","", + "Reduced CT range for Alexa", + "Use FriendlyNames instead of ShortAddresses when possible", + "(AWS IoT) publish MQTT state to a device shadow", + "", "","","","", "","","","", "","","","", @@ -189,7 +192,7 @@ a_features = [[ "USE_SONOFF_SC","USE_SONOFF_RF","USE_SONOFF_L1","USE_EXS_DIMMER", "USE_ARDUINO_SLAVE","USE_HIH6","USE_HPMA","USE_TSL2591", "USE_DHT12","USE_DS1624","USE_GPS","USE_HOTPLUG", - "","","","", + "USE_NRF24","USE_MIBLE","USE_HM10","", "","","","" ]] @@ -224,7 +227,7 @@ else: obj = json.load(fp) def StartDecode(): - print ("\n*** decode-status.py v20190819 by Theo Arends and Jacek Ziolkowski ***") + print ("\n*** decode-status.py v20200207 by Theo Arends and Jacek Ziolkowski ***") # print("Decoding\n{}".format(obj))