diff --git a/tasmota/my_user_config.h b/tasmota/my_user_config.h index 6a4f6df4d..38b99d4de 100644 --- a/tasmota/my_user_config.h +++ b/tasmota/my_user_config.h @@ -724,6 +724,7 @@ // -- Serial sensors ------------------------------ //#define USE_MHZ19 // Add support for MH-Z19 CO2 sensor (+2k code) //#define USE_SENSEAIR // Add support for SenseAir K30, K70 and S8 CO2 sensor (+2k3 code) +//#define USE_CM110x // Add support for CM110x CO2 sensors (+2k7code) #define CO2_LOW 800 // Below this CO2 value show green light (needs PWM or WS2812 RG(B) led and enable with SetOption18 1) #define CO2_HIGH 1200 // Above this CO2 value show red light (needs PWM or WS2812 RG(B) led and enable with SetOption18 1) //#define USE_PMS5003 // Add support for PMS5003 and PMS7003 particle concentration sensor (+1k3 code) diff --git a/tasmota/tasmota_configurations_ESP32.h b/tasmota/tasmota_configurations_ESP32.h index bdcfcee65..16c7fc488 100644 --- a/tasmota/tasmota_configurations_ESP32.h +++ b/tasmota/tasmota_configurations_ESP32.h @@ -340,6 +340,7 @@ //#define USE_MHZ19 // Add support for MH-Z19 CO2 sensor (+2k code) //#define USE_SENSEAIR // Add support for SenseAir K30, K70 and S8 CO2 sensor (+2k3 code) +//#define USE_CM110x // Add support for CM110x CO2 sensors (+2k7 code) #ifndef CO2_LOW #define CO2_LOW 800 // Below this CO2 value show green light (needs PWM or WS2812 RG(B) led and enable with SetOption18 1) #endif @@ -476,6 +477,7 @@ #define USE_MHZ19 // Add support for MH-Z19 CO2 sensor (+2k code) #define USE_SENSEAIR // Add support for SenseAir K30, K70 and S8 CO2 sensor (+2k3 code) +#define USE_CM110x // Add support for CM110x CO2 sensors (+2k7 code) #ifndef CO2_LOW #define CO2_LOW 800 // Below this CO2 value show green light (needs PWM or WS2812 RG(B) led and enable with SetOption18 1) #endif diff --git a/tasmota/tasmota_template_legacy.h b/tasmota/tasmota_template_legacy.h index 40b5fd228..31982e511 100644 --- a/tasmota/tasmota_template_legacy.h +++ b/tasmota/tasmota_template_legacy.h @@ -87,8 +87,8 @@ enum LegacyUserSelectablePins { GPI8_LED4_INV, GPI8_MHZ_TXD, // MH-Z19 Serial interface GPI8_MHZ_RXD, // MH-Z19 Serial interface - GPI8_CM11_TXD, // CM110x Serial interface - GPI8_CM11_RXD, // CM110x Serial interface + GPI8_CM11_TXD, // CM110x Serial interface + GPI8_CM11_RXD, // CM110x Serial interface GPI8_PZEM0XX_TX, // PZEM0XX Serial interface GPI8_PZEM004_RX, // PZEM004T Serial interface GPI8_SAIR_TX, // SenseAir Serial interface diff --git a/tasmota/xsns_95_cm110x.ino b/tasmota/xsns_95_cm110x.ino index d7c1e75d4..17c090c10 100644 --- a/tasmota/xsns_95_cm110x.ino +++ b/tasmota/xsns_95_cm110x.ino @@ -215,8 +215,8 @@ void CM11EverySecond(void) while (((millis() - start) < CM1107_READ_TIMEOUT) && (counter < resp_len)) { if (CM11Serial->available() > 0) { cm11_response[counter++] = CM11Serial->read(); - if (counter ==2 && cm11_response[0] == 0x16) { - resp_len = cm11_response[1] +3 ; + if (counter ==2 && cm11_response[0] == 0x16) { //0x16 - first byte in response + resp_len = cm11_response[1] +3 ; // Get expected response len (according protocol desc), +3 - first byte, len and checksum } } else { delay(5);