Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

support LYWSD03-BT-sensor via HM-10(-bridge) #7683

Merged
merged 19 commits into from
Feb 7, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions tasmota/language/bg-BG.h
Original file line number Diff line number Diff line change
Expand Up @@ -635,6 +635,8 @@
#define D_SENSOR_SLAVE_RESET "Slave RST"
#define D_SENSOR_GPS_RX "GPS RX"
#define D_SENSOR_GPS_TX "GPS TX"
#define D_SENSOR_HM10_RX "HM10 RX"
#define D_SENSOR_HM10_TX "HM10 TX"

// Units
#define D_UNIT_AMPERE "A"
Expand Down
2 changes: 2 additions & 0 deletions tasmota/language/cs-CZ.h
Original file line number Diff line number Diff line change
Expand Up @@ -635,6 +635,8 @@
#define D_SENSOR_SLAVE_RESET "Slave RST"
#define D_SENSOR_GPS_RX "GPS RX"
#define D_SENSOR_GPS_TX "GPS TX"
#define D_SENSOR_HM10_RX "HM10 RX"
#define D_SENSOR_HM10_TX "HM10 TX"

// Units
#define D_UNIT_AMPERE "A"
Expand Down
2 changes: 2 additions & 0 deletions tasmota/language/de-DE.h
Original file line number Diff line number Diff line change
Expand Up @@ -635,6 +635,8 @@
#define D_SENSOR_SLAVE_RESET "Slave RST"
#define D_SENSOR_GPS_RX "GPS RX"
#define D_SENSOR_GPS_TX "GPS TX"
#define D_SENSOR_HM10_RX "HM10 RX"
#define D_SENSOR_HM10_TX "HM10 TX"

// Units
#define D_UNIT_AMPERE "A"
Expand Down
2 changes: 2 additions & 0 deletions tasmota/language/el-GR.h
Original file line number Diff line number Diff line change
Expand Up @@ -635,6 +635,8 @@
#define D_SENSOR_SLAVE_RESET "Slave RST"
#define D_SENSOR_GPS_RX "GPS RX"
#define D_SENSOR_GPS_TX "GPS TX"
#define D_SENSOR_HM10_RX "HM10 RX"
#define D_SENSOR_HM10_TX "HM10 TX"

// Units
#define D_UNIT_AMPERE "A"
Expand Down
2 changes: 2 additions & 0 deletions tasmota/language/en-GB.h
Original file line number Diff line number Diff line change
Expand Up @@ -635,6 +635,8 @@
#define D_SENSOR_SLAVE_RESET "Slave RST"
#define D_SENSOR_GPS_RX "GPS RX"
#define D_SENSOR_GPS_TX "GPS TX"
#define D_SENSOR_HM10_RX "HM10 RX"
#define D_SENSOR_HM10_TX "HM10 TX"

// Units
#define D_UNIT_AMPERE "A"
Expand Down
2 changes: 2 additions & 0 deletions tasmota/language/es-ES.h
Original file line number Diff line number Diff line change
Expand Up @@ -635,6 +635,8 @@
#define D_SENSOR_SLAVE_RESET "Slave RST"
#define D_SENSOR_GPS_RX "GPS RX"
#define D_SENSOR_GPS_TX "GPS TX"
#define D_SENSOR_HM10_RX "HM10 RX"
#define D_SENSOR_HM10_TX "HM10 TX"

// Units
#define D_UNIT_AMPERE "A"
Expand Down
2 changes: 2 additions & 0 deletions tasmota/language/fr-FR.h
Original file line number Diff line number Diff line change
Expand Up @@ -635,6 +635,8 @@
#define D_SENSOR_SLAVE_RESET "Esclave Rst"
#define D_SENSOR_GPS_TX "GPS TX"
#define D_SENSOR_GPS_RX "GPS RX"
#define D_SENSOR_HM10_RX "HM10 RX"
#define D_SENSOR_HM10_TX "HM10 TX"

// Units
#define D_UNIT_AMPERE "A"
Expand Down
2 changes: 2 additions & 0 deletions tasmota/language/he-HE.h
Original file line number Diff line number Diff line change
Expand Up @@ -635,6 +635,8 @@
#define D_SENSOR_SLAVE_RESET "Slave RST"
#define D_SENSOR_GPS_RX "GPS RX"
#define D_SENSOR_GPS_TX "GPS TX"
#define D_SENSOR_HM10_RX "HM10 RX"
#define D_SENSOR_HM10_TX "HM10 TX"

// Units
#define D_UNIT_AMPERE "A"
Expand Down
2 changes: 2 additions & 0 deletions tasmota/language/hu-HU.h
Original file line number Diff line number Diff line change
Expand Up @@ -635,6 +635,8 @@
#define D_SENSOR_SLAVE_RESET "Slave RST"
#define D_SENSOR_GPS_RX "GPS RX"
#define D_SENSOR_GPS_TX "GPS TX"
#define D_SENSOR_HM10_RX "HM10 RX"
#define D_SENSOR_HM10_TX "HM10 TX"

// Units
#define D_UNIT_AMPERE "A"
Expand Down
2 changes: 2 additions & 0 deletions tasmota/language/it-IT.h
Original file line number Diff line number Diff line change
Expand Up @@ -635,6 +635,8 @@
#define D_SENSOR_SLAVE_RESET "Slave RST"
#define D_SENSOR_GPS_RX "GPS RX"
#define D_SENSOR_GPS_TX "GPS TX"
#define D_SENSOR_HM10_RX "HM10 RX"
#define D_SENSOR_HM10_TX "HM10 TX"

// Units
#define D_UNIT_AMPERE "A"
Expand Down
2 changes: 2 additions & 0 deletions tasmota/language/ko-KO.h
Original file line number Diff line number Diff line change
Expand Up @@ -635,6 +635,8 @@
#define D_SENSOR_SLAVE_RESET "Slave RST"
#define D_SENSOR_GPS_RX "GPS RX"
#define D_SENSOR_GPS_TX "GPS TX"
#define D_SENSOR_HM10_RX "HM10 RX"
#define D_SENSOR_HM10_TX "HM10 TX"

// Units
#define D_UNIT_AMPERE "A"
Expand Down
2 changes: 2 additions & 0 deletions tasmota/language/nl-NL.h
Original file line number Diff line number Diff line change
Expand Up @@ -635,6 +635,8 @@
#define D_SENSOR_SLAVE_RESET "Slave RST"
#define D_SENSOR_GPS_RX "GPS RX"
#define D_SENSOR_GPS_TX "GPS TX"
#define D_SENSOR_HM10_RX "HM10 RX"
#define D_SENSOR_HM10_TX "HM10 TX"

// Units
#define D_UNIT_AMPERE "A"
Expand Down
2 changes: 2 additions & 0 deletions tasmota/language/pl-PL.h
Original file line number Diff line number Diff line change
Expand Up @@ -635,6 +635,8 @@
#define D_SENSOR_SLAVE_RESET "Slave RST"
#define D_SENSOR_GPS_RX "GPS RX"
#define D_SENSOR_GPS_TX "GPS TX"
#define D_SENSOR_HM10_RX "HM10 RX"
#define D_SENSOR_HM10_TX "HM10 TX"

// Units
#define D_UNIT_AMPERE "A"
Expand Down
2 changes: 2 additions & 0 deletions tasmota/language/pt-BR.h
Original file line number Diff line number Diff line change
Expand Up @@ -635,6 +635,8 @@
#define D_SENSOR_SLAVE_RESET "Slave RST"
#define D_SENSOR_GPS_RX "GPS RX"
#define D_SENSOR_GPS_TX "GPS TX"
#define D_SENSOR_HM10_RX "HM10 RX"
#define D_SENSOR_HM10_TX "HM10 TX"

// Units
#define D_UNIT_AMPERE "A"
Expand Down
2 changes: 2 additions & 0 deletions tasmota/language/pt-PT.h
Original file line number Diff line number Diff line change
Expand Up @@ -635,6 +635,8 @@
#define D_SENSOR_SLAVE_RESET "Slave RST"
#define D_SENSOR_GPS_RX "GPS RX"
#define D_SENSOR_GPS_TX "GPS TX"
#define D_SENSOR_HM10_RX "HM10 RX"
#define D_SENSOR_HM10_TX "HM10 TX"

// Units
#define D_UNIT_AMPERE "A"
Expand Down
2 changes: 2 additions & 0 deletions tasmota/language/ru-RU.h
Original file line number Diff line number Diff line change
Expand Up @@ -635,6 +635,8 @@
#define D_SENSOR_SLAVE_RESET "Slave RST"
#define D_SENSOR_GPS_RX "GPS RX"
#define D_SENSOR_GPS_TX "GPS TX"
#define D_SENSOR_HM10_RX "HM10 RX"
#define D_SENSOR_HM10_TX "HM10 TX"

// Units
#define D_UNIT_AMPERE "А"
Expand Down
2 changes: 2 additions & 0 deletions tasmota/language/sk-SK.h
Original file line number Diff line number Diff line change
Expand Up @@ -635,6 +635,8 @@
#define D_SENSOR_SLAVE_RESET "Slave RST"
#define D_SENSOR_GPS_RX "GPS RX"
#define D_SENSOR_GPS_TX "GPS TX"
#define D_SENSOR_HM10_RX "HM10 RX"
#define D_SENSOR_HM10_TX "HM10 TX"

// Units
#define D_UNIT_AMPERE "A"
Expand Down
2 changes: 2 additions & 0 deletions tasmota/language/sv-SE.h
Original file line number Diff line number Diff line change
Expand Up @@ -635,6 +635,8 @@
#define D_SENSOR_SLAVE_RESET "Slave RST"
#define D_SENSOR_GPS_RX "GPS RX"
#define D_SENSOR_GPS_TX "GPS TX"
#define D_SENSOR_HM10_RX "HM10 RX"
#define D_SENSOR_HM10_TX "HM10 TX"

// Units
#define D_UNIT_AMPERE "A"
Expand Down
2 changes: 2 additions & 0 deletions tasmota/language/tr-TR.h
Original file line number Diff line number Diff line change
Expand Up @@ -635,6 +635,8 @@
#define D_SENSOR_SLAVE_RESET "Slave RST"
#define D_SENSOR_GPS_RX "GPS RX"
#define D_SENSOR_GPS_TX "GPS TX"
#define D_SENSOR_HM10_RX "HM10 RX"
#define D_SENSOR_HM10_TX "HM10 TX"

// Units
#define D_UNIT_AMPERE "A"
Expand Down
2 changes: 2 additions & 0 deletions tasmota/language/uk-UA.h
Original file line number Diff line number Diff line change
Expand Up @@ -635,6 +635,8 @@
#define D_SENSOR_SLAVE_RESET "Slave RST"
#define D_SENSOR_GPS_RX "GPS RX"
#define D_SENSOR_GPS_TX "GPS TX"
#define D_SENSOR_HM10_RX "HM10 RX"
#define D_SENSOR_HM10_TX "HM10 TX"

// Units
#define D_UNIT_AMPERE "А"
Expand Down
2 changes: 2 additions & 0 deletions tasmota/language/zh-CN.h
Original file line number Diff line number Diff line change
Expand Up @@ -635,6 +635,8 @@
#define D_SENSOR_SLAVE_RESET "Slave RST"
#define D_SENSOR_GPS_RX "GPS RX"
#define D_SENSOR_GPS_TX "GPS TX"
#define D_SENSOR_HM10_RX "HM10 RX"
#define D_SENSOR_HM10_TX "HM10 TX"

// Units
#define D_UNIT_AMPERE "安"
Expand Down
2 changes: 2 additions & 0 deletions tasmota/language/zh-TW.h
Original file line number Diff line number Diff line change
Expand Up @@ -635,6 +635,8 @@
#define D_SENSOR_SLAVE_RESET "Slave RST"
#define D_SENSOR_GPS_RX "GPS RX"
#define D_SENSOR_GPS_TX "GPS TX"
#define D_SENSOR_HM10_RX "HM10 RX"
#define D_SENSOR_HM10_TX "HM10 TX"

// Units
#define D_UNIT_AMPERE "安"
Expand Down
1 change: 1 addition & 0 deletions tasmota/my_user_config.h
Original file line number Diff line number Diff line change
Expand Up @@ -542,6 +542,7 @@
//#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)

// -- Power monitoring sensors --------------------
#define USE_ENERGY_MARGIN_DETECTION // Add support for Energy Margin detection (+1k6 code)
Expand Down
7 changes: 7 additions & 0 deletions tasmota/tasmota_template.h
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,8 @@ enum UserSelectablePins {
GPIO_GPS_TX, // GPS serial interface
GPIO_DSB_OUT, // Pseudo Single wire DS18B20 or DS18S20
GPIO_DHT11_OUT, // Pseudo Single wire DHT11, DHT21, DHT22, AM2301, AM2302, AM2321
GPIO_HM10_RX, // HM10-BLE-Mijia-bridge serial interface
GPIO_HM10_TX, // HM10-BLE-Mijia-bridge serial interface
GPIO_SENSOR_END };

// Programmer selectable GPIO functionality
Expand Down Expand Up @@ -300,6 +302,7 @@ const char kSensorNames[] PROGMEM =
D_SENSOR_HPMA_RX "|" D_SENSOR_HPMA_TX "|"
D_SENSOR_GPS_RX "|" D_SENSOR_GPS_TX "|"
D_SENSOR_DS18X20 "o|" D_SENSOR_DHT11 "o|"
D_SENSOR_HM10_RX "|" D_SENSOR_HM10_TX
;

const char kSensorNamesFixed[] PROGMEM =
Expand Down Expand Up @@ -742,6 +745,10 @@ const uint8_t kGpioNiceList[] PROGMEM = {
GPIO_GPS_RX, // GPS serial interface
GPIO_GPS_TX, // GPS serial interface
#endif
#ifdef USE_HM10
GPIO_HM10_RX, // GPS serial interface
GPIO_HM10_TX, // GPS serial interface
#endif

#ifdef USE_MGC3130
GPIO_MGC3130_XFER,
Expand Down
Loading