From 2e77ed056009eb25e82874985dd6ad5261605971 Mon Sep 17 00:00:00 2001 From: SteWers Date: Wed, 5 Jan 2022 21:04:20 +0100 Subject: [PATCH 1/6] SolaxX1 RTS #1 --- tasmota/my_user_config.h | 4 ++-- tasmota/tasmota_template.h | 5 +++-- tasmota/tasmota_template_legacy.h | 2 ++ 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/tasmota/my_user_config.h b/tasmota/my_user_config.h index 1cf048513..7fadf4b9e 100644 --- a/tasmota/my_user_config.h +++ b/tasmota/my_user_config.h @@ -788,9 +788,9 @@ #define DDS2382_SPEED 9600 // Hiking DDS2382 Modbus RS485 serial speed (default: 9600 baud) //#define USE_DDSU666 // Add support for Chint DDSU666 Modbus energy monitor (+0k6 code) #define DDSU666_SPEED 9600 // Chint DDSU666 Modbus RS485 serial speed (default: 9600 baud) -//#define USE_SOLAX_X1 // Add support for Solax X1 series Modbus log info (+3k1 code) +#define USE_SOLAX_X1 // Add support for Solax X1 series Modbus log info (+3k1 code) #define SOLAXX1_SPEED 9600 // Solax X1 Modbus RS485 serial speed (default: 9600 baud) - #define SOLAXX1_PV2 // Solax X1 using second PV +// #define SOLAXX1_PV2 // Solax X1 using second PV //#define USE_LE01MR // Add support for F&F LE-01MR Modbus energy monitor (+1k code) #define LE01MR_SPEED 9600 // LE-01MR modbus baudrate (default: 9600) #define LE01MR_ADDR 1 // LE-01MR modbus address (default: 0x01) diff --git a/tasmota/tasmota_template.h b/tasmota/tasmota_template.h index 2430cdf40..b961de31e 100644 --- a/tasmota/tasmota_template.h +++ b/tasmota/tasmota_template.h @@ -74,7 +74,7 @@ enum UserSelectablePins { GPIO_SSPI_MAX31865_CS1, // MAX31865 Chip Select GPIO_HRE_CLOCK, GPIO_HRE_DATA, // HR-E Water Meter GPIO_ADE7953_IRQ, // ADE7953 IRQ - GPIO_SOLAXX1_TX, GPIO_SOLAXX1_RX, // Solax Inverter Serial interface + GPIO_SOLAXX1_TX, GPIO_SOLAXX1_RX, GPIO_SOLAXX1_RTS, // Solax Inverter Serial interface GPIO_ZIGBEE_TX, GPIO_ZIGBEE_RX, // Zigbee Serial interface GPIO_RDM6300_RX, // RDM6300 RX GPIO_IBEACON_TX, GPIO_IBEACON_RX, // HM17 IBEACON Serial interface @@ -275,7 +275,7 @@ const char kSensorNames[] PROGMEM = D_SENSOR_MAX31865_CS "|" D_SENSOR_HRE_CLOCK "|" D_SENSOR_HRE_DATA "|" D_SENSOR_ADE7953_IRQ "|" - D_SENSOR_SOLAXX1_TX "|" D_SENSOR_SOLAXX1_RX "|" + D_SENSOR_SOLAXX1_TX "|" D_SENSOR_SOLAXX1_RX "|" D_SENSOR_SOLAXX1_RTS "|" D_SENSOR_ZIGBEE_TXD "|" D_SENSOR_ZIGBEE_RXD "|" D_SENSOR_RDM6300_RX "|" D_SENSOR_IBEACON_TX "|" D_SENSOR_IBEACON_RX "|" @@ -711,6 +711,7 @@ const uint16_t kGpioNiceList[] PROGMEM = { #ifdef USE_SOLAX_X1 AGPIO(GPIO_SOLAXX1_TX), // Solax Inverter tx pin AGPIO(GPIO_SOLAXX1_RX), // Solax Inverter rx pin + AGPIO(GPIO_SOLAXX1_RTS), // Solax Inverter RTS pin #endif // USE_SOLAX_X1 #ifdef USE_LE01MR AGPIO(GPIO_LE01MR_TX), // F7F LE-01MR energy meter tx pin diff --git a/tasmota/tasmota_template_legacy.h b/tasmota/tasmota_template_legacy.h index 4583a9783..af9afd3f1 100644 --- a/tasmota/tasmota_template_legacy.h +++ b/tasmota/tasmota_template_legacy.h @@ -190,6 +190,7 @@ enum LegacyUserSelectablePins { GPI8_OLED_RESET, // OLED Display Reset GPI8_SOLAXX1_TX, // Solax Inverter tx pin GPI8_SOLAXX1_RX, // Solax Inverter rx pin + GPI8_SOLAXX1_RTS, // Solax Inverter RTS pin GPI8_ZIGBEE_TX, // Zigbee Serial interface GPI8_ZIGBEE_RX, // Zigbee Serial interface GPI8_RDM6300_RX, // RDM6300 RX @@ -420,6 +421,7 @@ const uint16_t kGpioConvert[] PROGMEM = { AGPIO(GPIO_OLED_RESET), // OLED Display Reset AGPIO(GPIO_SOLAXX1_TX), // Solax Inverter tx pin AGPIO(GPIO_SOLAXX1_RX), // Solax Inverter rx pin + AGPIO(GPIO_SOLAXX1_RTS), // Solax Inverter RTS pin AGPIO(GPIO_ZIGBEE_TX), // Zigbee Serial interface AGPIO(GPIO_ZIGBEE_RX), // Zigbee Serial interface AGPIO(GPIO_RDM6300_RX), From 32cc20219a283e34cb86a617879ef056975505ca Mon Sep 17 00:00:00 2001 From: SteWers Date: Thu, 6 Jan 2022 09:52:27 +0100 Subject: [PATCH 2/6] [Solax X1] RTS support and offline status --- tasmota/language/af_AF.h | 1 + tasmota/language/bg_BG.h | 1 + tasmota/language/cs_CZ.h | 1 + tasmota/language/de_DE.h | 1 + tasmota/language/el_GR.h | 1 + tasmota/language/en_GB.h | 1 + tasmota/language/es_ES.h | 1 + tasmota/language/fr_FR.h | 3 ++- tasmota/language/fy_NL.h | 1 + tasmota/language/he_HE.h | 1 + tasmota/language/hu_HU.h | 1 + tasmota/language/it_IT.h | 1 + tasmota/language/ko_KO.h | 1 + tasmota/language/nl_NL.h | 1 + tasmota/language/pl_PL.h | 1 + tasmota/language/pt_BR.h | 1 + tasmota/language/pt_PT.h | 1 + tasmota/language/ro_RO.h | 1 + tasmota/language/ru_RU.h | 1 + tasmota/language/sk_SK.h | 1 + tasmota/language/sv_SE.h | 1 + tasmota/language/tr_TR.h | 1 + tasmota/language/uk_UA.h | 1 + tasmota/language/vi_VN.h | 1 + tasmota/language/zh_CN.h | 1 + tasmota/language/zh_TW.h | 1 + tasmota/xnrg_12_solaxX1.ino | 21 +++++++++++++++++---- 27 files changed, 44 insertions(+), 5 deletions(-) diff --git a/tasmota/language/af_AF.h b/tasmota/language/af_AF.h index b9e290410..271d10364 100644 --- a/tasmota/language/af_AF.h +++ b/tasmota/language/af_AF.h @@ -737,6 +737,7 @@ #define D_SENSOR_ZIGBEE_RST "Zigbee Rst" #define D_SENSOR_SOLAXX1_TX "SolaxX1 Tx" #define D_SENSOR_SOLAXX1_RX "SolaxX1 Rx" +#define D_SENSOR_SOLAXX1_RTS "SolaxX1 RTS" #define D_SENSOR_IBEACON_TX "iBeacon TX" #define D_SENSOR_IBEACON_RX "iBeacon RX" #define D_SENSOR_RDM6300_RX "RDM6300 RX" diff --git a/tasmota/language/bg_BG.h b/tasmota/language/bg_BG.h index fac7105f1..eabffd0e4 100644 --- a/tasmota/language/bg_BG.h +++ b/tasmota/language/bg_BG.h @@ -737,6 +737,7 @@ #define D_SENSOR_ZIGBEE_RST "Zigbee Rst" #define D_SENSOR_SOLAXX1_TX "SolaxX1 Tx" #define D_SENSOR_SOLAXX1_RX "SolaxX1 Rx" +#define D_SENSOR_SOLAXX1_RTS "SolaxX1 RTS" #define D_SENSOR_IBEACON_TX "iBeacon TX" #define D_SENSOR_IBEACON_RX "iBeacon RX" #define D_SENSOR_RDM6300_RX "RDM6300 RX" diff --git a/tasmota/language/cs_CZ.h b/tasmota/language/cs_CZ.h index a297d5f0f..93652d39f 100644 --- a/tasmota/language/cs_CZ.h +++ b/tasmota/language/cs_CZ.h @@ -737,6 +737,7 @@ #define D_SENSOR_ZIGBEE_RST "Zigbee Rst" #define D_SENSOR_SOLAXX1_TX "SolaxX1 Tx" #define D_SENSOR_SOLAXX1_RX "SolaxX1 Rx" +#define D_SENSOR_SOLAXX1_RTS "SolaxX1 RTS" #define D_SENSOR_IBEACON_TX "iBeacon TX" #define D_SENSOR_IBEACON_RX "iBeacon RX" #define D_SENSOR_RDM6300_RX "RDM6300 RX" diff --git a/tasmota/language/de_DE.h b/tasmota/language/de_DE.h index e801818df..0b2715b37 100644 --- a/tasmota/language/de_DE.h +++ b/tasmota/language/de_DE.h @@ -737,6 +737,7 @@ #define D_SENSOR_ZIGBEE_RST "Zigbee Rst" #define D_SENSOR_SOLAXX1_TX "SolaxX1 Tx" #define D_SENSOR_SOLAXX1_RX "SolaxX1 Rx" +#define D_SENSOR_SOLAXX1_RTS "SolaxX1 RTS" #define D_SENSOR_IBEACON_TX "iBeacon TX" #define D_SENSOR_IBEACON_RX "iBeacon RX" #define D_SENSOR_RDM6300_RX "RDM6300 RX" diff --git a/tasmota/language/el_GR.h b/tasmota/language/el_GR.h index b777c0965..3476240ff 100644 --- a/tasmota/language/el_GR.h +++ b/tasmota/language/el_GR.h @@ -737,6 +737,7 @@ #define D_SENSOR_ZIGBEE_RST "Zigbee Rst" #define D_SENSOR_SOLAXX1_TX "SolaxX1 Tx" #define D_SENSOR_SOLAXX1_RX "SolaxX1 Rx" +#define D_SENSOR_SOLAXX1_RTS "SolaxX1 RTS" #define D_SENSOR_IBEACON_TX "iBeacon TX" #define D_SENSOR_IBEACON_RX "iBeacon RX" #define D_SENSOR_RDM6300_RX "RDM6300 RX" diff --git a/tasmota/language/en_GB.h b/tasmota/language/en_GB.h index 128e1c3bf..ee76acf3e 100644 --- a/tasmota/language/en_GB.h +++ b/tasmota/language/en_GB.h @@ -737,6 +737,7 @@ #define D_SENSOR_ZIGBEE_RST "Zigbee Rst" #define D_SENSOR_SOLAXX1_TX "SolaxX1 Tx" #define D_SENSOR_SOLAXX1_RX "SolaxX1 Rx" +#define D_SENSOR_SOLAXX1_RTS "SolaxX1 RTS" #define D_SENSOR_IBEACON_TX "iBeacon TX" #define D_SENSOR_IBEACON_RX "iBeacon RX" #define D_SENSOR_RDM6300_RX "RDM6300 RX" diff --git a/tasmota/language/es_ES.h b/tasmota/language/es_ES.h index f88f62cdb..25d0cd09b 100644 --- a/tasmota/language/es_ES.h +++ b/tasmota/language/es_ES.h @@ -737,6 +737,7 @@ #define D_SENSOR_ZIGBEE_RST "Zigbee Rst" #define D_SENSOR_SOLAXX1_TX "SolaxX1 Tx" #define D_SENSOR_SOLAXX1_RX "SolaxX1 Rx" +#define D_SENSOR_SOLAXX1_RTS "SolaxX1 RTS" #define D_SENSOR_IBEACON_TX "iBeacon TX" #define D_SENSOR_IBEACON_RX "iBeacon RX" #define D_SENSOR_RDM6300_RX "RDM6300 RX" diff --git a/tasmota/language/fr_FR.h b/tasmota/language/fr_FR.h index 01ae71a67..22ad7d585 100644 --- a/tasmota/language/fr_FR.h +++ b/tasmota/language/fr_FR.h @@ -736,7 +736,8 @@ #define D_SENSOR_ZIGBEE_RXD "ZigBee RX" #define D_SENSOR_ZIGBEE_RST "ZigBee RST" #define D_SENSOR_SOLAXX1_TX "SolaxX1 TX" -#define D_SENSOR_SOLAXX1_RX "SolaxX1 RX" +#define D_SENSOR_SOLAXX1_RX "SolaxX1 Rx" +#define D_SENSOR_SOLAXX1_RTS "SolaxX1 RTS" #define D_SENSOR_IBEACON_TX "iBeacon TX" #define D_SENSOR_IBEACON_RX "iBeacon RX" #define D_SENSOR_RDM6300_RX "RDM6300 RX" diff --git a/tasmota/language/fy_NL.h b/tasmota/language/fy_NL.h index 0adcef573..7cb38ceef 100644 --- a/tasmota/language/fy_NL.h +++ b/tasmota/language/fy_NL.h @@ -737,6 +737,7 @@ #define D_SENSOR_ZIGBEE_RST "Zigbee Rst" #define D_SENSOR_SOLAXX1_TX "SolaxX1 Tx" #define D_SENSOR_SOLAXX1_RX "SolaxX1 Rx" +#define D_SENSOR_SOLAXX1_RTS "SolaxX1 RTS" #define D_SENSOR_IBEACON_TX "iBeacon TX" #define D_SENSOR_IBEACON_RX "iBeacon RX" #define D_SENSOR_RDM6300_RX "RDM6300 RX" diff --git a/tasmota/language/he_HE.h b/tasmota/language/he_HE.h index d00bac271..678eaf46b 100644 --- a/tasmota/language/he_HE.h +++ b/tasmota/language/he_HE.h @@ -737,6 +737,7 @@ #define D_SENSOR_ZIGBEE_RST "Zigbee Rst" #define D_SENSOR_SOLAXX1_TX "SolaxX1 Tx" #define D_SENSOR_SOLAXX1_RX "SolaxX1 Rx" +#define D_SENSOR_SOLAXX1_RTS "SolaxX1 RTS" #define D_SENSOR_IBEACON_TX "iBeacon TX" #define D_SENSOR_IBEACON_RX "iBeacon RX" #define D_SENSOR_RDM6300_RX "RDM6300 RX" diff --git a/tasmota/language/hu_HU.h b/tasmota/language/hu_HU.h index 85db8bbce..a59516ad1 100644 --- a/tasmota/language/hu_HU.h +++ b/tasmota/language/hu_HU.h @@ -737,6 +737,7 @@ #define D_SENSOR_ZIGBEE_RST "Zigbee Rst" #define D_SENSOR_SOLAXX1_TX "SolaxX1 Tx" #define D_SENSOR_SOLAXX1_RX "SolaxX1 Rx" +#define D_SENSOR_SOLAXX1_RTS "SolaxX1 RTS" #define D_SENSOR_IBEACON_TX "iBeacon TX" #define D_SENSOR_IBEACON_RX "iBeacon RX" #define D_SENSOR_RDM6300_RX "RDM6300 RX" diff --git a/tasmota/language/it_IT.h b/tasmota/language/it_IT.h index 9fcb4b292..247478aaf 100644 --- a/tasmota/language/it_IT.h +++ b/tasmota/language/it_IT.h @@ -735,6 +735,7 @@ #define D_SENSOR_ZIGBEE_RST "Zigbee - RESET" #define D_SENSOR_SOLAXX1_TX "SolaxX1 - TX" #define D_SENSOR_SOLAXX1_RX "SolaxX1 - RX" +#define D_SENSOR_SOLAXX1_RTS "SolaxX1 - RTS" #define D_SENSOR_IBEACON_TX "iBeacon - TX" #define D_SENSOR_IBEACON_RX "iBeacon - RX" #define D_SENSOR_RDM6300_RX "RDM6300 - RX" diff --git a/tasmota/language/ko_KO.h b/tasmota/language/ko_KO.h index 365480ef5..aa70e5be2 100644 --- a/tasmota/language/ko_KO.h +++ b/tasmota/language/ko_KO.h @@ -737,6 +737,7 @@ #define D_SENSOR_ZIGBEE_RST "Zigbee Rst" #define D_SENSOR_SOLAXX1_TX "SolaxX1 Tx" #define D_SENSOR_SOLAXX1_RX "SolaxX1 Rx" +#define D_SENSOR_SOLAXX1_RTS "SolaxX1 RTS" #define D_SENSOR_IBEACON_TX "iBeacon TX" #define D_SENSOR_IBEACON_RX "iBeacon RX" #define D_SENSOR_RDM6300_RX "RDM6300 RX" diff --git a/tasmota/language/nl_NL.h b/tasmota/language/nl_NL.h index 991187eb4..b721251f7 100644 --- a/tasmota/language/nl_NL.h +++ b/tasmota/language/nl_NL.h @@ -737,6 +737,7 @@ #define D_SENSOR_ZIGBEE_RST "Zigbee Rst" #define D_SENSOR_SOLAXX1_TX "SolaxX1 Tx" #define D_SENSOR_SOLAXX1_RX "SolaxX1 Rx" +#define D_SENSOR_SOLAXX1_RTS "SolaxX1 RTS" #define D_SENSOR_IBEACON_TX "iBeacon TX" #define D_SENSOR_IBEACON_RX "iBeacon RX" #define D_SENSOR_RDM6300_RX "RDM6300 RX" diff --git a/tasmota/language/pl_PL.h b/tasmota/language/pl_PL.h index 770606fd8..a9794adad 100644 --- a/tasmota/language/pl_PL.h +++ b/tasmota/language/pl_PL.h @@ -737,6 +737,7 @@ #define D_SENSOR_ZIGBEE_RST "Zigbee Rst" #define D_SENSOR_SOLAXX1_TX "SolaxX1 Tx" #define D_SENSOR_SOLAXX1_RX "SolaxX1 Rx" +#define D_SENSOR_SOLAXX1_RTS "SolaxX1 RTS" #define D_SENSOR_IBEACON_TX "iBeacon TX" #define D_SENSOR_IBEACON_RX "iBeacon RX" #define D_SENSOR_RDM6300_RX "RDM6300 RX" diff --git a/tasmota/language/pt_BR.h b/tasmota/language/pt_BR.h index bb039ff4d..ab86c23a3 100644 --- a/tasmota/language/pt_BR.h +++ b/tasmota/language/pt_BR.h @@ -737,6 +737,7 @@ #define D_SENSOR_ZIGBEE_RST "Zigbee Rst" #define D_SENSOR_SOLAXX1_TX "SolaxX1 Tx" #define D_SENSOR_SOLAXX1_RX "SolaxX1 Rx" +#define D_SENSOR_SOLAXX1_RTS "SolaxX1 RTS" #define D_SENSOR_IBEACON_TX "iBeacon TX" #define D_SENSOR_IBEACON_RX "iBeacon RX" #define D_SENSOR_RDM6300_RX "RDM6300 RX" diff --git a/tasmota/language/pt_PT.h b/tasmota/language/pt_PT.h index 89da9f494..c0556a582 100644 --- a/tasmota/language/pt_PT.h +++ b/tasmota/language/pt_PT.h @@ -737,6 +737,7 @@ #define D_SENSOR_ZIGBEE_RST "Zigbee Rst" #define D_SENSOR_SOLAXX1_TX "SolaxX1 Tx" #define D_SENSOR_SOLAXX1_RX "SolaxX1 Rx" +#define D_SENSOR_SOLAXX1_RTS "SolaxX1 RTS" #define D_SENSOR_IBEACON_TX "iBeacon TX" #define D_SENSOR_IBEACON_RX "iBeacon RX" #define D_SENSOR_RDM6300_RX "RDM6300 RX" diff --git a/tasmota/language/ro_RO.h b/tasmota/language/ro_RO.h index 16e8f042b..2aea98777 100644 --- a/tasmota/language/ro_RO.h +++ b/tasmota/language/ro_RO.h @@ -737,6 +737,7 @@ #define D_SENSOR_ZIGBEE_RST "Zigbee Rst" #define D_SENSOR_SOLAXX1_TX "SolaxX1 Tx" #define D_SENSOR_SOLAXX1_RX "SolaxX1 Rx" +#define D_SENSOR_SOLAXX1_RTS "SolaxX1 RTS" #define D_SENSOR_IBEACON_TX "iBeacon TX" #define D_SENSOR_IBEACON_RX "iBeacon RX" #define D_SENSOR_RDM6300_RX "RDM6300 RX" diff --git a/tasmota/language/ru_RU.h b/tasmota/language/ru_RU.h index 56233f278..44b4cda04 100644 --- a/tasmota/language/ru_RU.h +++ b/tasmota/language/ru_RU.h @@ -737,6 +737,7 @@ #define D_SENSOR_ZIGBEE_RST "Zigbee Rst" #define D_SENSOR_SOLAXX1_TX "SolaxX1 Tx" #define D_SENSOR_SOLAXX1_RX "SolaxX1 Rx" +#define D_SENSOR_SOLAXX1_RTS "SolaxX1 RTS" #define D_SENSOR_IBEACON_TX "iBeacon TX" #define D_SENSOR_IBEACON_RX "iBeacon RX" #define D_SENSOR_RDM6300_RX "RDM6300 RX" diff --git a/tasmota/language/sk_SK.h b/tasmota/language/sk_SK.h index b3a1098e5..93b2f989e 100644 --- a/tasmota/language/sk_SK.h +++ b/tasmota/language/sk_SK.h @@ -737,6 +737,7 @@ #define D_SENSOR_ZIGBEE_RST "Zigbee Rst" #define D_SENSOR_SOLAXX1_TX "SolaxX1 Tx" #define D_SENSOR_SOLAXX1_RX "SolaxX1 Rx" +#define D_SENSOR_SOLAXX1_RTS "SolaxX1 RTS" #define D_SENSOR_IBEACON_TX "iBeacon TX" #define D_SENSOR_IBEACON_RX "iBeacon RX" #define D_SENSOR_RDM6300_RX "RDM6300 RX" diff --git a/tasmota/language/sv_SE.h b/tasmota/language/sv_SE.h index aaf32fbde..8e28f96c5 100644 --- a/tasmota/language/sv_SE.h +++ b/tasmota/language/sv_SE.h @@ -737,6 +737,7 @@ #define D_SENSOR_ZIGBEE_RST "Zigbee Rst" #define D_SENSOR_SOLAXX1_TX "SolaxX1 Tx" #define D_SENSOR_SOLAXX1_RX "SolaxX1 Rx" +#define D_SENSOR_SOLAXX1_RTS "SolaxX1 RTS" #define D_SENSOR_IBEACON_TX "iBeacon TX" #define D_SENSOR_IBEACON_RX "iBeacon RX" #define D_SENSOR_RDM6300_RX "RDM6300 RX" diff --git a/tasmota/language/tr_TR.h b/tasmota/language/tr_TR.h index b9b2b7256..aae233362 100644 --- a/tasmota/language/tr_TR.h +++ b/tasmota/language/tr_TR.h @@ -737,6 +737,7 @@ #define D_SENSOR_ZIGBEE_RST "Zigbee Rst" #define D_SENSOR_SOLAXX1_TX "SolaxX1 Tx" #define D_SENSOR_SOLAXX1_RX "SolaxX1 Rx" +#define D_SENSOR_SOLAXX1_RTS "SolaxX1 RTS" #define D_SENSOR_IBEACON_TX "iBeacon TX" #define D_SENSOR_IBEACON_RX "iBeacon RX" #define D_SENSOR_RDM6300_RX "RDM6300 RX" diff --git a/tasmota/language/uk_UA.h b/tasmota/language/uk_UA.h index c404a9643..6a6d3d4cd 100644 --- a/tasmota/language/uk_UA.h +++ b/tasmota/language/uk_UA.h @@ -737,6 +737,7 @@ #define D_SENSOR_ZIGBEE_RST "Zigbee Rst" #define D_SENSOR_SOLAXX1_TX "SolaxX1 Tx" #define D_SENSOR_SOLAXX1_RX "SolaxX1 Rx" +#define D_SENSOR_SOLAXX1_RTS "SolaxX1 RTS" #define D_SENSOR_IBEACON_TX "iBeacon TX" #define D_SENSOR_IBEACON_RX "iBeacon RX" #define D_SENSOR_RDM6300_RX "RDM6300 RX" diff --git a/tasmota/language/vi_VN.h b/tasmota/language/vi_VN.h index 3bc724566..551307049 100644 --- a/tasmota/language/vi_VN.h +++ b/tasmota/language/vi_VN.h @@ -737,6 +737,7 @@ #define D_SENSOR_ZIGBEE_RST "Zigbee Rst" #define D_SENSOR_SOLAXX1_TX "SolaxX1 Tx" #define D_SENSOR_SOLAXX1_RX "SolaxX1 Rx" +#define D_SENSOR_SOLAXX1_RTS "SolaxX1 RTS" #define D_SENSOR_IBEACON_TX "iBeacon TX" #define D_SENSOR_IBEACON_RX "iBeacon RX" #define D_SENSOR_RDM6300_RX "RDM6300 RX" diff --git a/tasmota/language/zh_CN.h b/tasmota/language/zh_CN.h index d2d9f0d97..40120a356 100644 --- a/tasmota/language/zh_CN.h +++ b/tasmota/language/zh_CN.h @@ -737,6 +737,7 @@ #define D_SENSOR_ZIGBEE_RST "Zigbee Rst" #define D_SENSOR_SOLAXX1_TX "SolaxX1 Tx" #define D_SENSOR_SOLAXX1_RX "SolaxX1 Rx" +#define D_SENSOR_SOLAXX1_RTS "SolaxX1 RTS" #define D_SENSOR_IBEACON_TX "iBeacon TX" #define D_SENSOR_IBEACON_RX "iBeacon RX" #define D_SENSOR_RDM6300_RX "RDM6300 RX" diff --git a/tasmota/language/zh_TW.h b/tasmota/language/zh_TW.h index 39f468e0b..89368d38e 100644 --- a/tasmota/language/zh_TW.h +++ b/tasmota/language/zh_TW.h @@ -737,6 +737,7 @@ #define D_SENSOR_ZIGBEE_RST "Zigbee Rst" #define D_SENSOR_SOLAXX1_TX "SolaxX1 Tx" #define D_SENSOR_SOLAXX1_RX "SolaxX1 Rx" +#define D_SENSOR_SOLAXX1_RTS "SolaxX1 RTS" #define D_SENSOR_IBEACON_TX "iBeacon TX" #define D_SENSOR_IBEACON_RX "iBeacon RX" #define D_SENSOR_RDM6300_RX "RDM6300 RX" diff --git a/tasmota/xnrg_12_solaxX1.ino b/tasmota/xnrg_12_solaxX1.ino index 3ee4c9f47..7637ac6cc 100644 --- a/tasmota/xnrg_12_solaxX1.ino +++ b/tasmota/xnrg_12_solaxX1.ino @@ -83,7 +83,7 @@ union { }; } ErrCode; -const char kSolaxMode[] PROGMEM = D_WAITING "|" D_CHECKING "|" D_WORKING "|" D_FAILURE; +const char kSolaxMode[] PROGMEM = D_WAITING "|" D_CHECKING "|" D_WORKING "|" D_FAILURE "|" D_OFF; const char kSolaxError[] PROGMEM = D_SOLAX_ERROR_0 "|" D_SOLAX_ERROR_1 "|" D_SOLAX_ERROR_2 "|" D_SOLAX_ERROR_3 "|" D_SOLAX_ERROR_4 "|" D_SOLAX_ERROR_5 "|" @@ -155,10 +155,19 @@ void solaxX1_RS485Send(uint16_t msgLen) solaxX1Serial->read(); } + if (PinUsed(GPIO_SOLAXX1_RTS)) { + AddLog(LOG_LEVEL_DEBUG, PSTR("SX1: RTS-high")); + digitalWrite(Pin(GPIO_SOLAXX1_RTS), HIGH); + } solaxX1Serial->flush(); solaxX1Serial->write(message, msgLen); solaxX1Serial->write(highByte(crc)); solaxX1Serial->write(lowByte(crc)); + solaxX1Serial->flush(); + if (PinUsed(GPIO_SOLAXX1_RTS)) { + digitalWrite(Pin(GPIO_SOLAXX1_RTS), LOW); + } + AddLogBuffer(LOG_LEVEL_DEBUG_MORE, message, msgLen); } @@ -363,8 +372,8 @@ void solaxX1250MSecond(void) // Every 250 milliseconds Energy.data_valid[0] = ENERGY_WATCHDOG; solaxX1.temperature = solaxX1.dc1_voltage = solaxX1.dc2_voltage = solaxX1.dc1_current = solaxX1.dc2_current = solaxX1.dc1_power = 0; - solaxX1.dc2_power = solaxX1.status = Energy.current[0] = Energy.voltage[0] = Energy.frequency[0] = Energy.active_power[0] = 0; - //solaxX1.energy_today = solaxX1.runtime_total = 0; + solaxX1.dc2_power = Energy.current[0] = Energy.voltage[0] = Energy.frequency[0] = Energy.active_power[0] = 0; + solaxX1.status = 4; // off(line) } else { if (protocolStatus.queryOfflineSend) { protocolStatus.status = 0b00001000; // queryOffline @@ -380,7 +389,8 @@ void solaxX1250MSecond(void) // Every 250 milliseconds void solaxX1SnsInit(void) { AddLog(LOG_LEVEL_DEBUG, PSTR("SX1: Solax X1 Inverter Init")); - DEBUG_SENSOR_LOG(PSTR("SX1: RX pin: %d, TX pin: %d"), Pin(GPIO_SOLAXX1_RX), Pin(GPIO_SOLAXX1_TX)); + AddLog(LOG_LEVEL_DEBUG, PSTR("SX1: RX-pin: %d, TX-pin: %d, RTS-pin: %d"), Pin(GPIO_SOLAXX1_RX), Pin(GPIO_SOLAXX1_TX), Pin(GPIO_SOLAXX1_RTS)); +// DEBUG_SENSOR_LOG(PSTR("SX1: RX pin: %d, TX pin: %d"), Pin(GPIO_SOLAXX1_RX), Pin(GPIO_SOLAXX1_TX)); protocolStatus.status = 0b00100000; // hasAddress solaxX1Serial = new TasmotaSerial(Pin(GPIO_SOLAXX1_RX), Pin(GPIO_SOLAXX1_TX), 1); @@ -389,6 +399,9 @@ void solaxX1SnsInit(void) } else { TasmotaGlobal.energy_driver = ENERGY_NONE; } + if (PinUsed(GPIO_SOLAXX1_RTS)) { + pinMode(Pin(GPIO_SOLAXX1_RTS), OUTPUT); + } } void solaxX1DrvInit(void) From aa7750997a8ea7cb51f0c0f863bc6f0b75425b42 Mon Sep 17 00:00:00 2001 From: SteWers Date: Thu, 6 Jan 2022 10:08:44 +0100 Subject: [PATCH 3/6] RTS support and offline status (Fix#1) --- tasmota/language/fr_FR.h | 2 +- tasmota/xnrg_12_solaxX1.ino | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/tasmota/language/fr_FR.h b/tasmota/language/fr_FR.h index 22ad7d585..e14c37c41 100644 --- a/tasmota/language/fr_FR.h +++ b/tasmota/language/fr_FR.h @@ -736,7 +736,7 @@ #define D_SENSOR_ZIGBEE_RXD "ZigBee RX" #define D_SENSOR_ZIGBEE_RST "ZigBee RST" #define D_SENSOR_SOLAXX1_TX "SolaxX1 TX" -#define D_SENSOR_SOLAXX1_RX "SolaxX1 Rx" +#define D_SENSOR_SOLAXX1_RX "SolaxX1 RX" #define D_SENSOR_SOLAXX1_RTS "SolaxX1 RTS" #define D_SENSOR_IBEACON_TX "iBeacon TX" #define D_SENSOR_IBEACON_RX "iBeacon RX" diff --git a/tasmota/xnrg_12_solaxX1.ino b/tasmota/xnrg_12_solaxX1.ino index 7637ac6cc..534de4e47 100644 --- a/tasmota/xnrg_12_solaxX1.ino +++ b/tasmota/xnrg_12_solaxX1.ino @@ -156,7 +156,6 @@ void solaxX1_RS485Send(uint16_t msgLen) } if (PinUsed(GPIO_SOLAXX1_RTS)) { - AddLog(LOG_LEVEL_DEBUG, PSTR("SX1: RTS-high")); digitalWrite(Pin(GPIO_SOLAXX1_RTS), HIGH); } solaxX1Serial->flush(); From 0ef2aeaeba2040d8eef40a55c78954963963e032 Mon Sep 17 00:00:00 2001 From: SteWers Date: Thu, 6 Jan 2022 10:24:47 +0100 Subject: [PATCH 4/6] Revert my_user_config.h --- tasmota/my_user_config.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tasmota/my_user_config.h b/tasmota/my_user_config.h index 7fadf4b9e..2abd67f60 100644 --- a/tasmota/my_user_config.h +++ b/tasmota/my_user_config.h @@ -788,9 +788,9 @@ #define DDS2382_SPEED 9600 // Hiking DDS2382 Modbus RS485 serial speed (default: 9600 baud) //#define USE_DDSU666 // Add support for Chint DDSU666 Modbus energy monitor (+0k6 code) #define DDSU666_SPEED 9600 // Chint DDSU666 Modbus RS485 serial speed (default: 9600 baud) -#define USE_SOLAX_X1 // Add support for Solax X1 series Modbus log info (+3k1 code) +// #define USE_SOLAX_X1 // Add support for Solax X1 series Modbus log info (+3k1 code) #define SOLAXX1_SPEED 9600 // Solax X1 Modbus RS485 serial speed (default: 9600 baud) -// #define SOLAXX1_PV2 // Solax X1 using second PV + #define SOLAXX1_PV2 // Solax X1 using second PV //#define USE_LE01MR // Add support for F&F LE-01MR Modbus energy monitor (+1k code) #define LE01MR_SPEED 9600 // LE-01MR modbus baudrate (default: 9600) #define LE01MR_ADDR 1 // LE-01MR modbus address (default: 0x01) From 34112c833a9f5c840137a5d4008968af3186f464 Mon Sep 17 00:00:00 2001 From: SteWers <42718143+SteWers@users.noreply.github.com> Date: Thu, 6 Jan 2022 10:33:45 +0100 Subject: [PATCH 5/6] Update my_user_config.h --- tasmota/my_user_config.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tasmota/my_user_config.h b/tasmota/my_user_config.h index 2abd67f60..1cf048513 100644 --- a/tasmota/my_user_config.h +++ b/tasmota/my_user_config.h @@ -788,7 +788,7 @@ #define DDS2382_SPEED 9600 // Hiking DDS2382 Modbus RS485 serial speed (default: 9600 baud) //#define USE_DDSU666 // Add support for Chint DDSU666 Modbus energy monitor (+0k6 code) #define DDSU666_SPEED 9600 // Chint DDSU666 Modbus RS485 serial speed (default: 9600 baud) -// #define USE_SOLAX_X1 // Add support for Solax X1 series Modbus log info (+3k1 code) +//#define USE_SOLAX_X1 // Add support for Solax X1 series Modbus log info (+3k1 code) #define SOLAXX1_SPEED 9600 // Solax X1 Modbus RS485 serial speed (default: 9600 baud) #define SOLAXX1_PV2 // Solax X1 using second PV //#define USE_LE01MR // Add support for F&F LE-01MR Modbus energy monitor (+1k code) From d88110e6862562ec5b9eb2a12dc87b2fd28ceb81 Mon Sep 17 00:00:00 2001 From: SteWers Date: Thu, 6 Jan 2022 19:11:44 +0100 Subject: [PATCH 6/6] Rework for PR #14305 - removed all changes in tasmota_template_legacy.h - moved new GPIO at the end of the list in tasmota_template.h - removed unnecessary "flush" in xnrg_12_solaxX1.ino --- tasmota/tasmota_template.h | 7 ++++--- tasmota/tasmota_template_legacy.h | 2 -- tasmota/xnrg_12_solaxX1.ino | 1 - 3 files changed, 4 insertions(+), 6 deletions(-) diff --git a/tasmota/tasmota_template.h b/tasmota/tasmota_template.h index b961de31e..26b6970c0 100644 --- a/tasmota/tasmota_template.h +++ b/tasmota/tasmota_template.h @@ -74,7 +74,7 @@ enum UserSelectablePins { GPIO_SSPI_MAX31865_CS1, // MAX31865 Chip Select GPIO_HRE_CLOCK, GPIO_HRE_DATA, // HR-E Water Meter GPIO_ADE7953_IRQ, // ADE7953 IRQ - GPIO_SOLAXX1_TX, GPIO_SOLAXX1_RX, GPIO_SOLAXX1_RTS, // Solax Inverter Serial interface + GPIO_SOLAXX1_TX, GPIO_SOLAXX1_RX, // Solax Inverter Serial interface GPIO_ZIGBEE_TX, GPIO_ZIGBEE_RX, // Zigbee Serial interface GPIO_RDM6300_RX, // RDM6300 RX GPIO_IBEACON_TX, GPIO_IBEACON_RX, // HM17 IBEACON Serial interface @@ -177,6 +177,7 @@ enum UserSelectablePins { GPIO_HM330X_SET, // HM330X SET pin (sleep when low) GPIO_HEARTBEAT, GPIO_HEARTBEAT_INV, GPIO_SHIFT595_SRCLK, GPIO_SHIFT595_RCLK, GPIO_SHIFT595_OE, GPIO_SHIFT595_SER, // 74x595 Shift register + GPIO_SOLAXX1_RTS, // Solax Inverter Serial interface GPIO_SENSOR_END }; enum ProgramSelectablePins { @@ -275,7 +276,7 @@ const char kSensorNames[] PROGMEM = D_SENSOR_MAX31865_CS "|" D_SENSOR_HRE_CLOCK "|" D_SENSOR_HRE_DATA "|" D_SENSOR_ADE7953_IRQ "|" - D_SENSOR_SOLAXX1_TX "|" D_SENSOR_SOLAXX1_RX "|" D_SENSOR_SOLAXX1_RTS "|" + D_SENSOR_SOLAXX1_TX "|" D_SENSOR_SOLAXX1_RX "|" D_SENSOR_ZIGBEE_TXD "|" D_SENSOR_ZIGBEE_RXD "|" D_SENSOR_RDM6300_RX "|" D_SENSOR_IBEACON_TX "|" D_SENSOR_IBEACON_RX "|" @@ -373,8 +374,8 @@ const char kSensorNames[] PROGMEM = D_SENSOR_BL0942_RX "|" D_SENSOR_HM330X_SET "|" D_SENSOR_HEARTBEAT "|" D_SENSOR_HEARTBEAT "_i|" - D_GPIO_SHIFT595_SRCLK "|" D_GPIO_SHIFT595_RCLK "|" D_GPIO_SHIFT595_OE "|" D_GPIO_SHIFT595_SER "|" + D_SENSOR_SOLAXX1_RTS "|" ; const char kSensorNamesFixed[] PROGMEM = diff --git a/tasmota/tasmota_template_legacy.h b/tasmota/tasmota_template_legacy.h index af9afd3f1..4583a9783 100644 --- a/tasmota/tasmota_template_legacy.h +++ b/tasmota/tasmota_template_legacy.h @@ -190,7 +190,6 @@ enum LegacyUserSelectablePins { GPI8_OLED_RESET, // OLED Display Reset GPI8_SOLAXX1_TX, // Solax Inverter tx pin GPI8_SOLAXX1_RX, // Solax Inverter rx pin - GPI8_SOLAXX1_RTS, // Solax Inverter RTS pin GPI8_ZIGBEE_TX, // Zigbee Serial interface GPI8_ZIGBEE_RX, // Zigbee Serial interface GPI8_RDM6300_RX, // RDM6300 RX @@ -421,7 +420,6 @@ const uint16_t kGpioConvert[] PROGMEM = { AGPIO(GPIO_OLED_RESET), // OLED Display Reset AGPIO(GPIO_SOLAXX1_TX), // Solax Inverter tx pin AGPIO(GPIO_SOLAXX1_RX), // Solax Inverter rx pin - AGPIO(GPIO_SOLAXX1_RTS), // Solax Inverter RTS pin AGPIO(GPIO_ZIGBEE_TX), // Zigbee Serial interface AGPIO(GPIO_ZIGBEE_RX), // Zigbee Serial interface AGPIO(GPIO_RDM6300_RX), diff --git a/tasmota/xnrg_12_solaxX1.ino b/tasmota/xnrg_12_solaxX1.ino index 534de4e47..696b02757 100644 --- a/tasmota/xnrg_12_solaxX1.ino +++ b/tasmota/xnrg_12_solaxX1.ino @@ -162,7 +162,6 @@ void solaxX1_RS485Send(uint16_t msgLen) solaxX1Serial->write(message, msgLen); solaxX1Serial->write(highByte(crc)); solaxX1Serial->write(lowByte(crc)); - solaxX1Serial->flush(); if (PinUsed(GPIO_SOLAXX1_RTS)) { digitalWrite(Pin(GPIO_SOLAXX1_RTS), LOW); }