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

Adding support for ME007-ULS narrow FoV ultrasonic distance sensor #17376

2 changes: 2 additions & 0 deletions tasmota/berry/include/be_gpio_defines.h
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,8 @@ const be_const_member_t lv_gpio_constants[] = {
{ "MCP39F5_RST", (int32_t) GPIO_MCP39F5_RST },
{ "MCP39F5_RX", (int32_t) GPIO_MCP39F5_RX },
{ "MCP39F5_TX", (int32_t) GPIO_MCP39F5_TX },
{ "ME007_RX", (int32_t) GPIO_ME007_RX },
{ "ME007_TRIG", (int32_t) GPIO_ME007_TRIG },
{ "MGC3130_RESET", (int32_t) GPIO_MGC3130_RESET },
{ "MGC3130_XFER", (int32_t) GPIO_MGC3130_XFER },
{ "MHZ_RXD", (int32_t) GPIO_MHZ_RXD },
Expand Down
8 changes: 7 additions & 1 deletion tasmota/include/tasmota_template.h
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,8 @@ enum UserSelectablePins {
GPIO_BP1658CJ_CLK, GPIO_BP1658CJ_DAT,// BP1658CJ
GPIO_DINGTIAN_CLK, GPIO_DINGTIAN_SDI, GPIO_DINGTIAN_Q7, GPIO_DINGTIAN_PL, GPIO_DINGTIAN_RCK, // Dingtian relay board - 595's & 165's pins
GPIO_LD2410_TX, GPIO_LD2410_RX, // HLK-LD2410
GPIO_MBR_TX_ENA, GPIO_NRG_MBS_TX_ENA, // Modbus Bridge Serial Transmit Enable
GPIO_MBR_TX_ENA, GPIO_NRG_MBS_TX_ENA, // Modbus Bridge Serial Transmit Enable
GPIO_ME007_TRIG, GPIO_ME007_RX, // ME007 Serial/Trigger interface
GPIO_SENSOR_END };

// Error as warning to rethink GPIO usage with max 2045
Expand Down Expand Up @@ -453,6 +454,7 @@ const char kSensorNames[] PROGMEM =
D_GPIO_DINGTIAN_CLK "|" D_GPIO_DINGTIAN_SDI "|" D_GPIO_DINGTIAN_Q7 "|" D_GPIO_DINGTIAN_PL "|" D_GPIO_DINGTIAN_RCK "|"
D_SENSOR_LD2410_TX "|" D_SENSOR_LD2410_RX "|"
D_SENSOR_MBR_TX_ENA "|" D_SENSOR_NRG_MBS_TX_ENA "|"
D_SENSOR_ME007_TRIG "|" D_SENSOR_ME007_RX "|"
;

const char kSensorNamesFixed[] PROGMEM =
Expand Down Expand Up @@ -773,6 +775,10 @@ const uint16_t kGpioNiceList[] PROGMEM = {
AGPIO(GPIO_SR04_TRIG), // SR04 Tri/TXgger pin
AGPIO(GPIO_SR04_ECHO), // SR04 Ech/RXo pin
#endif
#ifdef USE_ME007
AGPIO(GPIO_ME007_TRIG), // ME007 Trigger pin (xsns_23_me007.ino)
AGPIO(GPIO_ME007_RX), // ME007 Rx pin (xsns_23_me007.ino)
#endif
#ifdef USE_TM1638
AGPIO(GPIO_TM1638CLK), // TM1638 Clock
AGPIO(GPIO_TM1638DIO), // TM1638 Data I/O
Expand Down
2 changes: 2 additions & 0 deletions tasmota/language/af_AF.h
Original file line number Diff line number Diff line change
Expand Up @@ -915,6 +915,8 @@
#define D_SENSOR_CM11_TX "CM110x TX"
#define D_SENSOR_CM11_RX "CM110x RX"
#define D_SENSOR_FLOWRATEMETER "Flowrate"
#define D_SENSOR_ME007_TRIG "ME007 Tri"
#define D_SENSOR_ME007_RX "ME007 Rx"

// Units
#define D_UNIT_AMPERE "A"
Expand Down
2 changes: 2 additions & 0 deletions tasmota/language/bg_BG.h
Original file line number Diff line number Diff line change
Expand Up @@ -915,6 +915,8 @@
#define D_SENSOR_CM11_TX "CM110x TX"
#define D_SENSOR_CM11_RX "CM110x RX"
#define D_SENSOR_FLOWRATEMETER "Дебитомер"
#define D_SENSOR_ME007_TRIG "ME007 Tri"
#define D_SENSOR_ME007_RX "ME007 Rx"

// Units
#define D_UNIT_AMPERE "A"
Expand Down
2 changes: 2 additions & 0 deletions tasmota/language/ca_AD.h
Original file line number Diff line number Diff line change
Expand Up @@ -915,6 +915,8 @@
#define D_SENSOR_CM11_TX "CM110x TX"
#define D_SENSOR_CM11_RX "CM110x RX"
#define D_SENSOR_FLOWRATEMETER "Cabal"
#define D_SENSOR_ME007_TRIG "ME007 Tri"
#define D_SENSOR_ME007_RX "ME007 Rx"

// 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 @@ -915,6 +915,8 @@
#define D_SENSOR_CM11_TX "CM110x TX"
#define D_SENSOR_CM11_RX "CM110x RX"
#define D_SENSOR_FLOWRATEMETER "Flowrate"
#define D_SENSOR_ME007_TRIG "ME007 Tri"
#define D_SENSOR_ME007_RX "ME007 Rx"

// 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 @@ -915,6 +915,8 @@
#define D_SENSOR_CM11_TX "CM110x TX"
#define D_SENSOR_CM11_RX "CM110x RX"
#define D_SENSOR_FLOWRATEMETER "Flowrate"
#define D_SENSOR_ME007_TRIG "ME007 Tri"
#define D_SENSOR_ME007_RX "ME007 Rx"

// 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 @@ -915,6 +915,8 @@
#define D_SENSOR_CM11_TX "CM110x TX"
#define D_SENSOR_CM11_RX "CM110x RX"
#define D_SENSOR_FLOWRATEMETER "Flowrate"
#define D_SENSOR_ME007_TRIG "ME007 Tri"
#define D_SENSOR_ME007_RX "ME007 Rx"

// 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 @@ -915,6 +915,8 @@
#define D_SENSOR_CM11_TX "CM110x TX"
#define D_SENSOR_CM11_RX "CM110x RX"
#define D_SENSOR_FLOWRATEMETER "Flowrate"
#define D_SENSOR_ME007_TRIG "ME007 Tri"
#define D_SENSOR_ME007_RX "ME007 Rx"

// 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 @@ -915,6 +915,8 @@
#define D_SENSOR_CM11_TX "CM110x TX"
#define D_SENSOR_CM11_RX "CM110x RX"
#define D_SENSOR_FLOWRATEMETER "Flowrate"
#define D_SENSOR_ME007_TRIG "ME007 Tri"
#define D_SENSOR_ME007_RX "ME007 Rx"

// 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 @@ -915,6 +915,8 @@
#define D_SENSOR_CM11_TX "CM110x TX"
#define D_SENSOR_CM11_RX "CM110x RX"
#define D_SENSOR_FLOWRATEMETER "Flowrate"
#define D_SENSOR_ME007_TRIG "ME007 Tri"
#define D_SENSOR_ME007_RX "ME007 Rx"

// Units
#define D_UNIT_AMPERE "A"
Expand Down
2 changes: 2 additions & 0 deletions tasmota/language/fy_NL.h
Original file line number Diff line number Diff line change
Expand Up @@ -915,6 +915,8 @@
#define D_SENSOR_CM11_TX "CM110x TX"
#define D_SENSOR_CM11_RX "CM110x RX"
#define D_SENSOR_FLOWRATEMETER "Flowrate"
#define D_SENSOR_ME007_TRIG "ME007 Tri"
#define D_SENSOR_ME007_RX "ME007 Rx"

// 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 @@ -915,6 +915,8 @@
#define D_SENSOR_CM11_TX "CM110x TX"
#define D_SENSOR_CM11_RX "CM110x RX"
#define D_SENSOR_FLOWRATEMETER "Flowrate"
#define D_SENSOR_ME007_TRIG "ME007 Tri"
#define D_SENSOR_ME007_RX "ME007 Rx"

// 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 @@ -915,6 +915,8 @@
#define D_SENSOR_CM11_TX "CM110x TX"
#define D_SENSOR_CM11_RX "CM110x RX"
#define D_SENSOR_FLOWRATEMETER "Flowrate"
#define D_SENSOR_ME007_TRIG "ME007 Tri"
#define D_SENSOR_ME007_RX "ME007 Rx"

// 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 @@ -915,6 +915,8 @@
#define D_SENSOR_CM11_TX "CM110x - TX"
#define D_SENSOR_CM11_RX "CM110x - RX"
#define D_SENSOR_FLOWRATEMETER "Portata"
#define D_SENSOR_ME007_TRIG "ME007 Tri"
#define D_SENSOR_ME007_RX "ME007 Rx"

// 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 @@ -915,6 +915,8 @@
#define D_SENSOR_CM11_TX "CM110x TX"
#define D_SENSOR_CM11_RX "CM110x RX"
#define D_SENSOR_FLOWRATEMETER "Flowrate"
#define D_SENSOR_ME007_TRIG "ME007 Tri"
#define D_SENSOR_ME007_RX "ME007 Rx"

// 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 @@ -915,6 +915,8 @@
#define D_SENSOR_CM11_TX "CM110x TX"
#define D_SENSOR_CM11_RX "CM110x RX"
#define D_SENSOR_FLOWRATEMETER "Flowrate"
#define D_SENSOR_ME007_TRIG "ME007 Tri"
#define D_SENSOR_ME007_RX "ME007 Rx"

// 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 @@ -915,6 +915,8 @@
#define D_SENSOR_CM11_TX "CM110x TX"
#define D_SENSOR_CM11_RX "CM110x RX"
#define D_SENSOR_FLOWRATEMETER "Flowrate"
#define D_SENSOR_ME007_TRIG "ME007 Tri"
#define D_SENSOR_ME007_RX "ME007 Rx"

// 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 @@ -915,6 +915,8 @@
#define D_SENSOR_CM11_TX "CM110x TX"
#define D_SENSOR_CM11_RX "CM110x RX"
#define D_SENSOR_FLOWRATEMETER "Flowrate"
#define D_SENSOR_ME007_TRIG "ME007 Tri"
#define D_SENSOR_ME007_RX "ME007 Rx"

// 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 @@ -915,6 +915,8 @@
#define D_SENSOR_CM11_TX "CM110x TX"
#define D_SENSOR_CM11_RX "CM110x RX"
#define D_SENSOR_FLOWRATEMETER "Flowrate"
#define D_SENSOR_ME007_TRIG "ME007 Tri"
#define D_SENSOR_ME007_RX "ME007 Rx"

// Units
#define D_UNIT_AMPERE "A"
Expand Down
2 changes: 2 additions & 0 deletions tasmota/language/ro_RO.h
Original file line number Diff line number Diff line change
Expand Up @@ -915,6 +915,8 @@
#define D_SENSOR_CM11_TX "CM110x TX"
#define D_SENSOR_CM11_RX "CM110x RX"
#define D_SENSOR_FLOWRATEMETER "Flowrate"
#define D_SENSOR_ME007_TRIG "ME007 Tri"
#define D_SENSOR_ME007_RX "ME007 Rx"

// 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 @@ -915,6 +915,8 @@
#define D_SENSOR_CM11_TX "CM110x TX"
#define D_SENSOR_CM11_RX "CM110x RX"
#define D_SENSOR_FLOWRATEMETER "Flowrate"
#define D_SENSOR_ME007_TRIG "ME007 Tri"
#define D_SENSOR_ME007_RX "ME007 Rx"

// 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 @@ -915,6 +915,8 @@
#define D_SENSOR_CM11_TX "CM110x TX"
#define D_SENSOR_CM11_RX "CM110x RX"
#define D_SENSOR_FLOWRATEMETER "Flowrate"
#define D_SENSOR_ME007_TRIG "ME007 Tri"
#define D_SENSOR_ME007_RX "ME007 Rx"

// 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 @@ -915,6 +915,8 @@
#define D_SENSOR_CM11_TX "CM110x TX"
#define D_SENSOR_CM11_RX "CM110x RX"
#define D_SENSOR_FLOWRATEMETER "Flowrate"
#define D_SENSOR_ME007_TRIG "ME007 Tri"
#define D_SENSOR_ME007_RX "ME007 Rx"

// 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 @@ -915,6 +915,8 @@
#define D_SENSOR_CM11_TX "CM110x TX"
#define D_SENSOR_CM11_RX "CM110x RX"
#define D_SENSOR_FLOWRATEMETER "Flowrate"
#define D_SENSOR_ME007_TRIG "ME007 Tri"
#define D_SENSOR_ME007_RX "ME007 Rx"

// 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 @@ -915,6 +915,8 @@
#define D_SENSOR_CM11_TX "CM110x TX"
#define D_SENSOR_CM11_RX "CM110x RX"
#define D_SENSOR_FLOWRATEMETER "Flowrate"
#define D_SENSOR_ME007_TRIG "ME007 Tri"
#define D_SENSOR_ME007_RX "ME007 Rx"

// Units
#define D_UNIT_AMPERE "А"
Expand Down
2 changes: 2 additions & 0 deletions tasmota/language/vi_VN.h
Original file line number Diff line number Diff line change
Expand Up @@ -915,6 +915,8 @@
#define D_SENSOR_CM11_TX "CM110x TX"
#define D_SENSOR_CM11_RX "CM110x RX"
#define D_SENSOR_FLOWRATEMETER "Flowrate"
#define D_SENSOR_ME007_TRIG "ME007 Tri"
#define D_SENSOR_ME007_RX "ME007 Rx"

// Units
#define D_UNIT_AMPERE "A"
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 @@ -915,6 +915,8 @@
#define D_SENSOR_CM11_TX "CM110x TX"
#define D_SENSOR_CM11_RX "CM110x RX"
#define D_SENSOR_FLOWRATEMETER "Flowrate"
#define D_SENSOR_ME007_TRIG "ME007 Tri"
#define D_SENSOR_ME007_RX "ME007 Rx"

// Units
#define D_UNIT_AMPERE "A"
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 @@ -915,6 +915,8 @@
#define D_SENSOR_CM11_TX "CM110x TX"
#define D_SENSOR_CM11_RX "CM110x RX"
#define D_SENSOR_FLOWRATEMETER "Flowrate"
#define D_SENSOR_ME007_TRIG "ME007 Tri"
#define D_SENSOR_ME007_RX "ME007 Rx"

// Units
#define D_UNIT_AMPERE "安培"
Expand Down
7 changes: 5 additions & 2 deletions tasmota/my_user_config.h
Original file line number Diff line number Diff line change
Expand Up @@ -782,8 +782,11 @@
//#define USE_NOVA_SDS // Add support for SDS011 and SDS021 particle concentration sensor (+1k5 code)
#define STARTING_OFFSET 30 // Turn on NovaSDS XX-seconds before tele_period is reached
//#define USE_HPMA // Add support for Honeywell HPMA115S0 particle concentration sensor (+1k4)
//#define USE_SR04 // Add support for HC-SR04 ultrasonic devices (+1k code)
#define SR04_MAX_SENSOR_DISTANCE 500 // Set sensor max detection distance
#define USE_SR04 // Add support for HC-SR04 ultrasonic devices (+1k code)
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As the current binaries are reaching max size pls disable both USE_SR04 (as was the case) and USE_ME007.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, done!

#define SR04_MAX_SENSOR_DISTANCE 500 // Set sensor max detection distance
#define USE_ME007 // Add support for ME007 ultrasonic devices (+???k code)
#define ME007_MAX_SENSOR_DISTANCE 800 // Set sensor max detection distance
#define ME007_ENABLE_MEDIAN_FILTER // Enables that distance measurements are filtered with an median filter of length 5
//#define USE_DYP // Add support for DYP ME-007 ultrasonic distance sensor, serial port version (+0k5 code)
#define USE_SERIAL_BRIDGE // Add support for software Serial Bridge (+2k code)
// #define SERIAL_BRIDGE_BUFFER_SIZE 256 // Serial Bridge receive buffer size (Default ESP8266 = 256, ESP32 = 800)
Expand Down
4 changes: 3 additions & 1 deletion tasmota/tasmota_support/support_features.ino
Original file line number Diff line number Diff line change
Expand Up @@ -858,7 +858,9 @@ void ResponseAppendFeatures(void)
#ifdef USE_LD2410
feature9 |= 0x00000400; // xsns_102_ld2410.ino
#endif
// feature9 |= 0x00000800;
#ifdef USE_ME007
feature9 |= 0x00000800; // xsns_23_me007.ino
#endif

// feature9 |= 0x00001000;
// feature9 |= 0x00002000;
Expand Down
Loading