Add support for HM-10

Add support for MI-BLE sensors using HM-10 Bluetooth 4.0 module by Christian Staars (#7683)
This commit is contained in:
Theo Arends 2020-02-07 10:50:06 +01:00
parent 15a9c85319
commit 15df54bb07
6 changed files with 32 additions and 19 deletions

View File

@ -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 SoftwareSerial to CSE7766 driver allowing different GPIOs (#7563)
- Add optional parameter <startcolor> to command ``Scheme <scheme>, <startcolor>`` to control initial start color - Add optional parameter <startcolor> to command ``Scheme <scheme>, <startcolor>`` 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 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 sensors DS18x20 and DHT family 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 MI-BLE sensors using HM-10 Bluetooth 4.0 module by Christian Staars (#7683)

View File

@ -3,10 +3,10 @@
### 8.1.0.6 20200205 ### 8.1.0.6 20200205
- Fix Hass sensor discovery part 1/4 by Federico Leoni (#7582, #7548) - 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 sensors DS18x20 and DHT family 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 commands ``SwitchMode 11`` PushHoldMulti and ``SwitchMode 12`` PushHoldInverted (#7603) - 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 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 ### 8.1.0.5 20200126

View File

@ -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_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_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_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_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) (+ 2.9kb flash, +8 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 (+... code) //#define USE_HM10 // Add support for HM-10 as a BLE-bridge for the LYWSD03 (+5k1 code)
// -- Power monitoring sensors -------------------- // -- Power monitoring sensors --------------------
#define USE_ENERGY_MARGIN_DETECTION // Add support for Energy Margin detection (+1k6 code) #define USE_ENERGY_MARGIN_DETECTION // Add support for Energy Margin detection (+1k6 code)

View File

@ -484,27 +484,33 @@ void GetFeatures(void)
feature5 |= 0x00020000; // xsns_55_hih_series.ino feature5 |= 0x00020000; // xsns_55_hih_series.ino
#endif #endif
#ifdef USE_HPMA #ifdef USE_HPMA
feature5 |= 0x00040000; feature5 |= 0x00040000; // xsns_56_hpma.ino
#endif #endif
#ifdef USE_TSL2591 #ifdef USE_TSL2591
feature5 |= 0x00080000; feature5 |= 0x00080000; // xsns_57_tsl2591.ino
#endif #endif
#ifdef USE_DHT12 #ifdef USE_DHT12
feature5 |= 0x00100000; feature5 |= 0x00100000; // xsns_58_dht12.ino
#endif #endif
#ifdef USE_DS1624 #ifdef USE_DS1624
feature5 |= 0x00200000; feature5 |= 0x00200000; // xsns_59_ds1624.ino
#endif #endif
#ifdef USE_GPS #ifdef USE_GPS
feature5 |= 0x00400000; feature5 |= 0x00400000; // xsns_60_GPS.ino
#endif #endif
#ifdef USE_HOTPLUG #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 #endif
// feature5 |= 0x01000000;
// feature5 |= 0x02000000;
// feature5 |= 0x04000000;
// feature5 |= 0x08000000; // feature5 |= 0x08000000;
// feature5 |= 0x10000000; // feature5 |= 0x10000000;

View File

@ -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_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_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_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_ENERGY_SENSOR // Add energy sensors (-14k code)
#define USE_PZEM004T // Add support for PZEM004T Energy monitor (+2k 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_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_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_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 //#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 #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_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_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_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_ENERGY_SENSOR // Disable energy sensors
#undef USE_PZEM004T // Disable PZEM004T energy sensor #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_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_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_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_ENERGY_SENSOR // Disable energy sensors
#undef USE_PZEM004T // Disable PZEM004T energy sensor #undef USE_PZEM004T // Disable PZEM004T energy sensor

View File

@ -136,7 +136,10 @@ a_setoption = [[
"Enable shutter support", "Enable shutter support",
"Invert PCF8574 ports" "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_SONOFF_SC","USE_SONOFF_RF","USE_SONOFF_L1","USE_EXS_DIMMER",
"USE_ARDUINO_SLAVE","USE_HIH6","USE_HPMA","USE_TSL2591", "USE_ARDUINO_SLAVE","USE_HIH6","USE_HPMA","USE_TSL2591",
"USE_DHT12","USE_DS1624","USE_GPS","USE_HOTPLUG", "USE_DHT12","USE_DS1624","USE_GPS","USE_HOTPLUG",
"","","","", "USE_NRF24","USE_MIBLE","USE_HM10","",
"","","","" "","","",""
]] ]]
@ -224,7 +227,7 @@ else:
obj = json.load(fp) obj = json.load(fp)
def StartDecode(): 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)) # print("Decoding\n{}".format(obj))