diff --git a/sonoff/i18n.h b/sonoff/i18n.h index bda21077d..1af9cd9c6 100644 --- a/sonoff/i18n.h +++ b/sonoff/i18n.h @@ -165,6 +165,17 @@ #define D_JSON_WRONG_PARAMETERS "Wrong parameters" #define D_JSON_YESTERDAY "Yesterday" #define D_JSON_ZERO_POINT_CALIBRATION "Zero Point Calibration" +#ifdef USE_SOLAX_X1 +#define D_JSON_RUNTIME "Runtime" +#define D_JSON_PV1_VOLTAGE "Pv1Voltage" +#define D_JSON_PV1_CURRENT "Pv1Current" +#define D_JSON_PV1_POWER "Pv1Power" +#define D_JSON_PV2_VOLTAGE "Pv2Voltage" +#define D_JSON_PV2_CURRENT "Pv2Current" +#define D_JSON_PV2_POWER "Pv2Power" +#define D_JSON_SOLAR_POWER "SolarPower" +#define D_JSON_STATUS "Status" +#endif #define D_RSLT_ENERGY "ENERGY" #define D_RSLT_HASS_STATE "HASS_STATE" diff --git a/sonoff/language/bg-BG.h b/sonoff/language/bg-BG.h index 0de0d4438..c38fbe5b7 100644 --- a/sonoff/language/bg-BG.h +++ b/sonoff/language/bg-BG.h @@ -588,6 +588,8 @@ #define D_SENSOR_ADE7953_IRQ "ADE7953 IRQ" #define D_SENSOR_BUZZER "Buzzer" #define D_SENSOR_OLED_RESET "OLED Reset" +#define D_SENSOR_SOLAXX1_TX "SOLAXX1 Tx" +#define D_SENSOR_SOLAXX1_RX "SOLAXX1 Rx" // Units #define D_UNIT_AMPERE "A" @@ -658,4 +660,34 @@ #define D_UNIT_KWARH "kVArh" #define D_UNIT_ANGLE "°" +#ifdef USE_SOLAX_X1 +//SOLAXX1 +#define D_PV1_VOLTAGE "PV1 Voltage" +#define D_PV1_CURRENT "PV1 Current" +#define D_PV1_POWER "PV1 Power" +#define D_PV2_VOLTAGE "PV2 Voltage" +#define D_PV2_CURRENT "PV2 Current" +#define D_PV2_POWER "PV2 Power" +#define D_SOLAR_POWER "Solar Power" +#define D_INVERTER_POWER "Inverter Power" +#define D_WORKTIME "Uptime" +#define D_STATUS "Status" +#define D_UNIT_TEMPERATURE "°C" + +#define D_WAITING "Waiting" +#define D_CHECKING "Checking" +#define D_WORKING "Working" +#define D_FAILURE "Failure" + +#define D_SOLAX_ERROR_0 "No Error Code" +#define D_SOLAX_ERROR_1 "Grid Lost Fault" +#define D_SOLAX_ERROR_2 "Grid Voltage Fault" +#define D_SOLAX_ERROR_3 "Grid Frequency Fault" +#define D_SOLAX_ERROR_4 "Pv Voltage Fault" +#define D_SOLAX_ERROR_5 "Isolation Fault" +#define D_SOLAX_ERROR_6 "Over Temperature Fault" +#define D_SOLAX_ERROR_7 "Fan Fault" +#define D_SOLAX_ERROR_8 "Other Device Fault" +#endif + #endif // _LANGUAGE_BG_BG_H_ diff --git a/sonoff/language/cs-CZ.h b/sonoff/language/cs-CZ.h index 4d7533a34..03be8295e 100644 --- a/sonoff/language/cs-CZ.h +++ b/sonoff/language/cs-CZ.h @@ -587,6 +587,8 @@ #define D_SENSOR_ADE7953_IRQ "ADE7953 IRQ" #define D_SENSOR_BUZZER "Buzzer" #define D_SENSOR_OLED_RESET "OLED Reset" +#define D_SENSOR_SOLAXX1_TX "SOLAXX1 Tx" +#define D_SENSOR_SOLAXX1_RX "SOLAXX1 Rx" // Units #define D_UNIT_AMPERE "A" @@ -657,4 +659,34 @@ #define D_UNIT_KWARH "kVArh" #define D_UNIT_ANGLE "Deg" +#ifdef USE_SOLAX_X1 +//SOLAXX1 +#define D_PV1_VOLTAGE "PV1 Voltage" +#define D_PV1_CURRENT "PV1 Current" +#define D_PV1_POWER "PV1 Power" +#define D_PV2_VOLTAGE "PV2 Voltage" +#define D_PV2_CURRENT "PV2 Current" +#define D_PV2_POWER "PV2 Power" +#define D_SOLAR_POWER "Solar Power" +#define D_INVERTER_POWER "Inverter Power" +#define D_WORKTIME "Uptime" +#define D_STATUS "Status" +#define D_UNIT_TEMPERATURE "°C" + +#define D_WAITING "Waiting" +#define D_CHECKING "Checking" +#define D_WORKING "Working" +#define D_FAILURE "Failure" + +#define D_SOLAX_ERROR_0 "No Error Code" +#define D_SOLAX_ERROR_1 "Grid Lost Fault" +#define D_SOLAX_ERROR_2 "Grid Voltage Fault" +#define D_SOLAX_ERROR_3 "Grid Frequency Fault" +#define D_SOLAX_ERROR_4 "Pv Voltage Fault" +#define D_SOLAX_ERROR_5 "Isolation Fault" +#define D_SOLAX_ERROR_6 "Over Temperature Fault" +#define D_SOLAX_ERROR_7 "Fan Fault" +#define D_SOLAX_ERROR_8 "Other Device Fault" +#endif + #endif // _LANGUAGE_CS_CZ_H_ diff --git a/sonoff/language/de-DE.h b/sonoff/language/de-DE.h index 154c9b98a..200c31356 100644 --- a/sonoff/language/de-DE.h +++ b/sonoff/language/de-DE.h @@ -587,6 +587,8 @@ #define D_SENSOR_ADE7953_IRQ "ADE7953 IRQ" #define D_SENSOR_BUZZER "Buzzer" #define D_SENSOR_OLED_RESET "OLED Reset" +#define D_SENSOR_SOLAXX1_TX "SOLAXX1 Tx" +#define D_SENSOR_SOLAXX1_RX "SOLAXX1 Rx" // Units #define D_UNIT_AMPERE "A" @@ -657,4 +659,34 @@ #define D_UNIT_KWARH "kVArh" #define D_UNIT_ANGLE "Grad" +#ifdef USE_SOLAX_X1 +//SOLAXX1 +#define D_PV1_VOLTAGE "PV1 Voltage" +#define D_PV1_CURRENT "PV1 Current" +#define D_PV1_POWER "PV1 Power" +#define D_PV2_VOLTAGE "PV2 Voltage" +#define D_PV2_CURRENT "PV2 Current" +#define D_PV2_POWER "PV2 Power" +#define D_SOLAR_POWER "Solar Power" +#define D_INVERTER_POWER "Inverter Power" +#define D_WORKTIME "Uptime" +#define D_STATUS "Status" +#define D_UNIT_TEMPERATURE "°C" + +#define D_WAITING "Waiting" +#define D_CHECKING "Checking" +#define D_WORKING "Working" +#define D_FAILURE "Failure" + +#define D_SOLAX_ERROR_0 "No Error Code" +#define D_SOLAX_ERROR_1 "Grid Lost Fault" +#define D_SOLAX_ERROR_2 "Grid Voltage Fault" +#define D_SOLAX_ERROR_3 "Grid Frequency Fault" +#define D_SOLAX_ERROR_4 "Pv Voltage Fault" +#define D_SOLAX_ERROR_5 "Isolation Fault" +#define D_SOLAX_ERROR_6 "Over Temperature Fault" +#define D_SOLAX_ERROR_7 "Fan Fault" +#define D_SOLAX_ERROR_8 "Other Device Fault" +#endif + #endif // _LANGUAGE_DE_DE_H_ diff --git a/sonoff/language/el-GR.h b/sonoff/language/el-GR.h index 1b576d726..eadd3ab4e 100644 --- a/sonoff/language/el-GR.h +++ b/sonoff/language/el-GR.h @@ -587,6 +587,8 @@ #define D_SENSOR_ADE7953_IRQ "ADE7953 IRQ" #define D_SENSOR_BUZZER "Buzzer" #define D_SENSOR_OLED_RESET "OLED Reset" +#define D_SENSOR_SOLAXX1_TX "SOLAXX1 Tx" +#define D_SENSOR_SOLAXX1_RX "SOLAXX1 Rx" // Units #define D_UNIT_AMPERE "A" @@ -657,4 +659,34 @@ #define D_UNIT_KWARH "kVArh" #define D_UNIT_ANGLE "Deg" +#ifdef USE_SOLAX_X1 +//SOLAXX1 +#define D_PV1_VOLTAGE "PV1 Voltage" +#define D_PV1_CURRENT "PV1 Current" +#define D_PV1_POWER "PV1 Power" +#define D_PV2_VOLTAGE "PV2 Voltage" +#define D_PV2_CURRENT "PV2 Current" +#define D_PV2_POWER "PV2 Power" +#define D_SOLAR_POWER "Solar Power" +#define D_INVERTER_POWER "Inverter Power" +#define D_WORKTIME "Uptime" +#define D_STATUS "Status" +#define D_UNIT_TEMPERATURE "°C" + +#define D_WAITING "Waiting" +#define D_CHECKING "Checking" +#define D_WORKING "Working" +#define D_FAILURE "Failure" + +#define D_SOLAX_ERROR_0 "No Error Code" +#define D_SOLAX_ERROR_1 "Grid Lost Fault" +#define D_SOLAX_ERROR_2 "Grid Voltage Fault" +#define D_SOLAX_ERROR_3 "Grid Frequency Fault" +#define D_SOLAX_ERROR_4 "Pv Voltage Fault" +#define D_SOLAX_ERROR_5 "Isolation Fault" +#define D_SOLAX_ERROR_6 "Over Temperature Fault" +#define D_SOLAX_ERROR_7 "Fan Fault" +#define D_SOLAX_ERROR_8 "Other Device Fault" +#endif + #endif // _LANGUAGE_EL_GR_H_ diff --git a/sonoff/language/en-GB.h b/sonoff/language/en-GB.h index 9863c11c4..3aa8ba400 100644 --- a/sonoff/language/en-GB.h +++ b/sonoff/language/en-GB.h @@ -587,6 +587,8 @@ #define D_SENSOR_ADE7953_IRQ "ADE7953 IRQ" #define D_SENSOR_BUZZER "Buzzer" #define D_SENSOR_OLED_RESET "OLED Reset" +#define D_SENSOR_SOLAXX1_TX "SOLAXX1 Tx" +#define D_SENSOR_SOLAXX1_RX "SOLAXX1 Rx" // Units #define D_UNIT_AMPERE "A" @@ -657,4 +659,34 @@ #define D_UNIT_KWARH "kVArh" #define D_UNIT_ANGLE "Deg" +#ifdef USE_SOLAX_X1 +//SOLAXX1 +#define D_PV1_VOLTAGE "PV1 Voltage" +#define D_PV1_CURRENT "PV1 Current" +#define D_PV1_POWER "PV1 Power" +#define D_PV2_VOLTAGE "PV2 Voltage" +#define D_PV2_CURRENT "PV2 Current" +#define D_PV2_POWER "PV2 Power" +#define D_SOLAR_POWER "Solar Power" +#define D_INVERTER_POWER "Inverter Power" +#define D_WORKTIME "Uptime" +#define D_STATUS "Status" +#define D_UNIT_TEMPERATURE "°C" + +#define D_WAITING "Waiting" +#define D_CHECKING "Checking" +#define D_WORKING "Working" +#define D_FAILURE "Failure" + +#define D_SOLAX_ERROR_0 "No Error Code" +#define D_SOLAX_ERROR_1 "Grid Lost Fault" +#define D_SOLAX_ERROR_2 "Grid Voltage Fault" +#define D_SOLAX_ERROR_3 "Grid Frequency Fault" +#define D_SOLAX_ERROR_4 "Pv Voltage Fault" +#define D_SOLAX_ERROR_5 "Isolation Fault" +#define D_SOLAX_ERROR_6 "Over Temperature Fault" +#define D_SOLAX_ERROR_7 "Fan Fault" +#define D_SOLAX_ERROR_8 "Other Device Fault" +#endif + #endif // _LANGUAGE_EN_GB_H_ diff --git a/sonoff/language/es-ES.h b/sonoff/language/es-ES.h index fc4d9726e..242309ce1 100644 --- a/sonoff/language/es-ES.h +++ b/sonoff/language/es-ES.h @@ -587,6 +587,8 @@ #define D_SENSOR_ADE7953_IRQ "ADE7953 IRQ" #define D_SENSOR_BUZZER "Buzzer" #define D_SENSOR_OLED_RESET "OLED Reset" +#define D_SENSOR_SOLAXX1_TX "SOLAXX1 Tx" +#define D_SENSOR_SOLAXX1_RX "SOLAXX1 Rx" // Units #define D_UNIT_AMPERE "A" @@ -657,4 +659,34 @@ #define D_UNIT_KWARH "kVArH" #define D_UNIT_ANGLE "Grados" +#ifdef USE_SOLAX_X1 +//SOLAXX1 +#define D_PV1_VOLTAGE "Voltaje PV1" +#define D_PV1_CURRENT "Intensidad PV1" +#define D_PV1_POWER "Potencia PV1" +#define D_PV2_VOLTAGE "Voltaje PV2" +#define D_PV2_CURRENT "Intensidad PV2" +#define D_PV2_POWER "Potencia PV2" +#define D_SOLAR_POWER "Potencia Solar" +#define D_INVERTER_POWER "Potencia Inverter" +#define D_WORKTIME "Horas en funcionamiento" +#define D_STATUS "Estado" +#define D_UNIT_TEMPERATURE "°C" + +#define D_WAITING "Esperando" +#define D_CHECKING "Comprobando" +#define D_WORKING "Funcionando" +#define D_FAILURE "Fallo" + +#define D_SOLAX_ERROR_0 "Sin fallos" +#define D_SOLAX_ERROR_1 "Red Eléctrica Caída" +#define D_SOLAX_ERROR_2 "Fallo en Voltaje de Red" +#define D_SOLAX_ERROR_3 "Fallo en Frecuencia de Red" +#define D_SOLAX_ERROR_4 "Fallo en Voltaje de Paneles" +#define D_SOLAX_ERROR_5 "Fallo de Aislación" +#define D_SOLAX_ERROR_6 "Fallo por Sobretemperatura" +#define D_SOLAX_ERROR_7 "Fallo de Ventilador" +#define D_SOLAX_ERROR_8 "Fallo en Otro Sistema" +#endif + #endif // _LANGUAGE_ES_ES_H_ diff --git a/sonoff/language/fr-FR.h b/sonoff/language/fr-FR.h index c087795f3..185f851b1 100644 --- a/sonoff/language/fr-FR.h +++ b/sonoff/language/fr-FR.h @@ -587,6 +587,8 @@ #define D_SENSOR_ADE7953_IRQ "ADE7953 IRQ" #define D_SENSOR_BUZZER "Buzzer" #define D_SENSOR_OLED_RESET "OLED Reset" +#define D_SENSOR_SOLAXX1_TX "SOLAXX1 Tx" +#define D_SENSOR_SOLAXX1_RX "SOLAXX1 Rx" // Units #define D_UNIT_AMPERE "A" @@ -657,4 +659,34 @@ #define D_UNIT_KWARH "kVArh" #define D_UNIT_ANGLE "°" +#ifdef USE_SOLAX_X1 +//SOLAXX1 +#define D_PV1_VOLTAGE "PV1 Voltage" +#define D_PV1_CURRENT "PV1 Current" +#define D_PV1_POWER "PV1 Power" +#define D_PV2_VOLTAGE "PV2 Voltage" +#define D_PV2_CURRENT "PV2 Current" +#define D_PV2_POWER "PV2 Power" +#define D_SOLAR_POWER "Solar Power" +#define D_INVERTER_POWER "Inverter Power" +#define D_WORKTIME "Uptime" +#define D_STATUS "Status" +#define D_UNIT_TEMPERATURE "°C" + +#define D_WAITING "Waiting" +#define D_CHECKING "Checking" +#define D_WORKING "Working" +#define D_FAILURE "Failure" + +#define D_SOLAX_ERROR_0 "No Error Code" +#define D_SOLAX_ERROR_1 "Grid Lost Fault" +#define D_SOLAX_ERROR_2 "Grid Voltage Fault" +#define D_SOLAX_ERROR_3 "Grid Frequency Fault" +#define D_SOLAX_ERROR_4 "Pv Voltage Fault" +#define D_SOLAX_ERROR_5 "Isolation Fault" +#define D_SOLAX_ERROR_6 "Over Temperature Fault" +#define D_SOLAX_ERROR_7 "Fan Fault" +#define D_SOLAX_ERROR_8 "Other Device Fault" +#endif + #endif // _LANGUAGE_FR_FR_H_ diff --git a/sonoff/language/he-HE.h b/sonoff/language/he-HE.h index 2cfee8a4b..f99025fee 100644 --- a/sonoff/language/he-HE.h +++ b/sonoff/language/he-HE.h @@ -587,6 +587,8 @@ #define D_SENSOR_ADE7953_IRQ "ADE7953 IRQ" #define D_SENSOR_BUZZER "Buzzer" #define D_SENSOR_OLED_RESET "OLED Reset" +#define D_SENSOR_SOLAXX1_TX "SOLAXX1 Tx" +#define D_SENSOR_SOLAXX1_RX "SOLAXX1 Rx" // Units #define D_UNIT_AMPERE "A" @@ -657,4 +659,34 @@ #define D_UNIT_KWARH "kVArh" #define D_UNIT_ANGLE "Deg" +#ifdef USE_SOLAX_X1 +//SOLAXX1 +#define D_PV1_VOLTAGE "PV1 Voltage" +#define D_PV1_CURRENT "PV1 Current" +#define D_PV1_POWER "PV1 Power" +#define D_PV2_VOLTAGE "PV2 Voltage" +#define D_PV2_CURRENT "PV2 Current" +#define D_PV2_POWER "PV2 Power" +#define D_SOLAR_POWER "Solar Power" +#define D_INVERTER_POWER "Inverter Power" +#define D_WORKTIME "Uptime" +#define D_STATUS "Status" +#define D_UNIT_TEMPERATURE "°C" + +#define D_WAITING "Waiting" +#define D_CHECKING "Checking" +#define D_WORKING "Working" +#define D_FAILURE "Failure" + +#define D_SOLAX_ERROR_0 "No Error Code" +#define D_SOLAX_ERROR_1 "Grid Lost Fault" +#define D_SOLAX_ERROR_2 "Grid Voltage Fault" +#define D_SOLAX_ERROR_3 "Grid Frequency Fault" +#define D_SOLAX_ERROR_4 "Pv Voltage Fault" +#define D_SOLAX_ERROR_5 "Isolation Fault" +#define D_SOLAX_ERROR_6 "Over Temperature Fault" +#define D_SOLAX_ERROR_7 "Fan Fault" +#define D_SOLAX_ERROR_8 "Other Device Fault" +#endif + #endif // _LANGUAGE_HE_HE_H_ diff --git a/sonoff/language/hu-HU.h b/sonoff/language/hu-HU.h index 6d2675978..e94e9c45e 100644 --- a/sonoff/language/hu-HU.h +++ b/sonoff/language/hu-HU.h @@ -587,6 +587,8 @@ #define D_SENSOR_ADE7953_IRQ "ADE7953 IRQ" #define D_SENSOR_BUZZER "Buzzer" #define D_SENSOR_OLED_RESET "OLED Reset" +#define D_SENSOR_SOLAXX1_TX "SOLAXX1 Tx" +#define D_SENSOR_SOLAXX1_RX "SOLAXX1 Rx" // Units #define D_UNIT_AMPERE "A" @@ -657,4 +659,34 @@ #define D_UNIT_KWARH "kVArh" #define D_UNIT_ANGLE "fok" +#ifdef USE_SOLAX_X1 +//SOLAXX1 +#define D_PV1_VOLTAGE "PV1 Voltage" +#define D_PV1_CURRENT "PV1 Current" +#define D_PV1_POWER "PV1 Power" +#define D_PV2_VOLTAGE "PV2 Voltage" +#define D_PV2_CURRENT "PV2 Current" +#define D_PV2_POWER "PV2 Power" +#define D_SOLAR_POWER "Solar Power" +#define D_INVERTER_POWER "Inverter Power" +#define D_WORKTIME "Uptime" +#define D_STATUS "Status" +#define D_UNIT_TEMPERATURE "°C" + +#define D_WAITING "Waiting" +#define D_CHECKING "Checking" +#define D_WORKING "Working" +#define D_FAILURE "Failure" + +#define D_SOLAX_ERROR_0 "No Error Code" +#define D_SOLAX_ERROR_1 "Grid Lost Fault" +#define D_SOLAX_ERROR_2 "Grid Voltage Fault" +#define D_SOLAX_ERROR_3 "Grid Frequency Fault" +#define D_SOLAX_ERROR_4 "Pv Voltage Fault" +#define D_SOLAX_ERROR_5 "Isolation Fault" +#define D_SOLAX_ERROR_6 "Over Temperature Fault" +#define D_SOLAX_ERROR_7 "Fan Fault" +#define D_SOLAX_ERROR_8 "Other Device Fault" +#endif + #endif // _LANGUAGE_HU_HU_H_ diff --git a/sonoff/language/it-IT.h b/sonoff/language/it-IT.h index 39e70bd85..ce960a434 100644 --- a/sonoff/language/it-IT.h +++ b/sonoff/language/it-IT.h @@ -587,6 +587,8 @@ #define D_SENSOR_ADE7953_IRQ "ADE7953 IRQ" #define D_SENSOR_BUZZER "Buzzer" #define D_SENSOR_OLED_RESET "OLED Reset" +#define D_SENSOR_SOLAXX1_TX "SOLAXX1 Tx" +#define D_SENSOR_SOLAXX1_RX "SOLAXX1 Rx" // Units #define D_UNIT_AMPERE "A" @@ -657,4 +659,34 @@ #define D_UNIT_KWARH "kVArh" #define D_UNIT_ANGLE "°" +#ifdef USE_SOLAX_X1 +//SOLAXX1 +#define D_PV1_VOLTAGE "PV1 Voltage" +#define D_PV1_CURRENT "PV1 Current" +#define D_PV1_POWER "PV1 Power" +#define D_PV2_VOLTAGE "PV2 Voltage" +#define D_PV2_CURRENT "PV2 Current" +#define D_PV2_POWER "PV2 Power" +#define D_SOLAR_POWER "Solar Power" +#define D_INVERTER_POWER "Inverter Power" +#define D_WORKTIME "Uptime" +#define D_STATUS "Status" +#define D_UNIT_TEMPERATURE "°C" + +#define D_WAITING "Waiting" +#define D_CHECKING "Checking" +#define D_WORKING "Working" +#define D_FAILURE "Failure" + +#define D_SOLAX_ERROR_0 "No Error Code" +#define D_SOLAX_ERROR_1 "Grid Lost Fault" +#define D_SOLAX_ERROR_2 "Grid Voltage Fault" +#define D_SOLAX_ERROR_3 "Grid Frequency Fault" +#define D_SOLAX_ERROR_4 "Pv Voltage Fault" +#define D_SOLAX_ERROR_5 "Isolation Fault" +#define D_SOLAX_ERROR_6 "Over Temperature Fault" +#define D_SOLAX_ERROR_7 "Fan Fault" +#define D_SOLAX_ERROR_8 "Other Device Fault" +#endif + #endif // _LANGUAGE_IT_IT_H_ diff --git a/sonoff/language/ko-KO.h b/sonoff/language/ko-KO.h index 7e6577e22..26c8aa199 100644 --- a/sonoff/language/ko-KO.h +++ b/sonoff/language/ko-KO.h @@ -587,6 +587,8 @@ #define D_SENSOR_ADE7953_IRQ "ADE7953 IRQ" #define D_SENSOR_BUZZER "Buzzer" #define D_SENSOR_OLED_RESET "OLED Reset" +#define D_SENSOR_SOLAXX1_TX "SOLAXX1 Tx" +#define D_SENSOR_SOLAXX1_RX "SOLAXX1 Rx" // Units #define D_UNIT_AMPERE "A" @@ -657,4 +659,34 @@ #define D_UNIT_KWARH "kVArh" #define D_UNIT_ANGLE "Deg" +#ifdef USE_SOLAX_X1 +//SOLAXX1 +#define D_PV1_VOLTAGE "PV1 Voltage" +#define D_PV1_CURRENT "PV1 Current" +#define D_PV1_POWER "PV1 Power" +#define D_PV2_VOLTAGE "PV2 Voltage" +#define D_PV2_CURRENT "PV2 Current" +#define D_PV2_POWER "PV2 Power" +#define D_SOLAR_POWER "Solar Power" +#define D_INVERTER_POWER "Inverter Power" +#define D_WORKTIME "Uptime" +#define D_STATUS "Status" +#define D_UNIT_TEMPERATURE "°C" + +#define D_WAITING "Waiting" +#define D_CHECKING "Checking" +#define D_WORKING "Working" +#define D_FAILURE "Failure" + +#define D_SOLAX_ERROR_0 "No Error Code" +#define D_SOLAX_ERROR_1 "Grid Lost Fault" +#define D_SOLAX_ERROR_2 "Grid Voltage Fault" +#define D_SOLAX_ERROR_3 "Grid Frequency Fault" +#define D_SOLAX_ERROR_4 "Pv Voltage Fault" +#define D_SOLAX_ERROR_5 "Isolation Fault" +#define D_SOLAX_ERROR_6 "Over Temperature Fault" +#define D_SOLAX_ERROR_7 "Fan Fault" +#define D_SOLAX_ERROR_8 "Other Device Fault" +#endif + #endif // _LANGUAGE_KO_KO_H_ diff --git a/sonoff/language/nl-NL.h b/sonoff/language/nl-NL.h index 5260dba3a..e1133f8c1 100644 --- a/sonoff/language/nl-NL.h +++ b/sonoff/language/nl-NL.h @@ -657,4 +657,34 @@ #define D_UNIT_KWARH "kVArh" #define D_UNIT_ANGLE "Deg" +#ifdef USE_SOLAX_X1 +//SOLAXX1 +#define D_PV1_VOLTAGE "PV1 Voltage" +#define D_PV1_CURRENT "PV1 Current" +#define D_PV1_POWER "PV1 Power" +#define D_PV2_VOLTAGE "PV2 Voltage" +#define D_PV2_CURRENT "PV2 Current" +#define D_PV2_POWER "PV2 Power" +#define D_SOLAR_POWER "Solar Power" +#define D_INVERTER_POWER "Inverter Power" +#define D_WORKTIME "Uptime" +#define D_STATUS "Status" +#define D_UNIT_TEMPERATURE "°C" + +#define D_WAITING "Waiting" +#define D_CHECKING "Checking" +#define D_WORKING "Working" +#define D_FAILURE "Failure" + +#define D_SOLAX_ERROR_0 "No Error Code" +#define D_SOLAX_ERROR_1 "Grid Lost Fault" +#define D_SOLAX_ERROR_2 "Grid Voltage Fault" +#define D_SOLAX_ERROR_3 "Grid Frequency Fault" +#define D_SOLAX_ERROR_4 "Pv Voltage Fault" +#define D_SOLAX_ERROR_5 "Isolation Fault" +#define D_SOLAX_ERROR_6 "Over Temperature Fault" +#define D_SOLAX_ERROR_7 "Fan Fault" +#define D_SOLAX_ERROR_8 "Other Device Fault" +#endif + #endif // _LANGUAGE_NL_NL_H_ diff --git a/sonoff/language/pl-PL.h b/sonoff/language/pl-PL.h index fbdf457d8..9822ace8b 100644 --- a/sonoff/language/pl-PL.h +++ b/sonoff/language/pl-PL.h @@ -587,6 +587,8 @@ #define D_SENSOR_ADE7953_IRQ "ADE7953 IRQ" #define D_SENSOR_BUZZER "Buzzer" #define D_SENSOR_OLED_RESET "OLED Reset" +#define D_SENSOR_SOLAXX1_TX "SOLAXX1 Tx" +#define D_SENSOR_SOLAXX1_RX "SOLAXX1 Rx" // Units #define D_UNIT_AMPERE "A" @@ -657,4 +659,34 @@ #define D_UNIT_KWARH "kVArh" #define D_UNIT_ANGLE "Deg" +#ifdef USE_SOLAX_X1 +//SOLAXX1 +#define D_PV1_VOLTAGE "PV1 Voltage" +#define D_PV1_CURRENT "PV1 Current" +#define D_PV1_POWER "PV1 Power" +#define D_PV2_VOLTAGE "PV2 Voltage" +#define D_PV2_CURRENT "PV2 Current" +#define D_PV2_POWER "PV2 Power" +#define D_SOLAR_POWER "Solar Power" +#define D_INVERTER_POWER "Inverter Power" +#define D_WORKTIME "Uptime" +#define D_STATUS "Status" +#define D_UNIT_TEMPERATURE "°C" + +#define D_WAITING "Waiting" +#define D_CHECKING "Checking" +#define D_WORKING "Working" +#define D_FAILURE "Failure" + +#define D_SOLAX_ERROR_0 "No Error Code" +#define D_SOLAX_ERROR_1 "Grid Lost Fault" +#define D_SOLAX_ERROR_2 "Grid Voltage Fault" +#define D_SOLAX_ERROR_3 "Grid Frequency Fault" +#define D_SOLAX_ERROR_4 "Pv Voltage Fault" +#define D_SOLAX_ERROR_5 "Isolation Fault" +#define D_SOLAX_ERROR_6 "Over Temperature Fault" +#define D_SOLAX_ERROR_7 "Fan Fault" +#define D_SOLAX_ERROR_8 "Other Device Fault" +#endif + #endif // _LANGUAGE_PL_PL_D_H_ diff --git a/sonoff/language/pt-BR.h b/sonoff/language/pt-BR.h index e24f63c27..05ffc6a43 100644 --- a/sonoff/language/pt-BR.h +++ b/sonoff/language/pt-BR.h @@ -587,6 +587,8 @@ #define D_SENSOR_ADE7953_IRQ "ADE7953 IRQ" #define D_SENSOR_BUZZER "Buzzer" #define D_SENSOR_OLED_RESET "OLED Reset" +#define D_SENSOR_SOLAXX1_TX "SOLAXX1 Tx" +#define D_SENSOR_SOLAXX1_RX "SOLAXX1 Rx" // Units #define D_UNIT_AMPERE "A" @@ -657,4 +659,34 @@ #define D_UNIT_KWARH "kVArh" #define D_UNIT_ANGLE "Deg" +#ifdef USE_SOLAX_X1 +//SOLAXX1 +#define D_PV1_VOLTAGE "PV1 Voltage" +#define D_PV1_CURRENT "PV1 Current" +#define D_PV1_POWER "PV1 Power" +#define D_PV2_VOLTAGE "PV2 Voltage" +#define D_PV2_CURRENT "PV2 Current" +#define D_PV2_POWER "PV2 Power" +#define D_SOLAR_POWER "Solar Power" +#define D_INVERTER_POWER "Inverter Power" +#define D_WORKTIME "Uptime" +#define D_STATUS "Status" +#define D_UNIT_TEMPERATURE "°C" + +#define D_WAITING "Waiting" +#define D_CHECKING "Checking" +#define D_WORKING "Working" +#define D_FAILURE "Failure" + +#define D_SOLAX_ERROR_0 "No Error Code" +#define D_SOLAX_ERROR_1 "Grid Lost Fault" +#define D_SOLAX_ERROR_2 "Grid Voltage Fault" +#define D_SOLAX_ERROR_3 "Grid Frequency Fault" +#define D_SOLAX_ERROR_4 "Pv Voltage Fault" +#define D_SOLAX_ERROR_5 "Isolation Fault" +#define D_SOLAX_ERROR_6 "Over Temperature Fault" +#define D_SOLAX_ERROR_7 "Fan Fault" +#define D_SOLAX_ERROR_8 "Other Device Fault" +#endif + #endif // _LANGUAGE_PT_BR_H_ diff --git a/sonoff/language/pt-PT.h b/sonoff/language/pt-PT.h index 1449e5c34..56623d542 100644 --- a/sonoff/language/pt-PT.h +++ b/sonoff/language/pt-PT.h @@ -587,6 +587,8 @@ #define D_SENSOR_ADE7953_IRQ "ADE7953 IRQ" #define D_SENSOR_BUZZER "Buzzer" #define D_SENSOR_OLED_RESET "OLED Reset" +#define D_SENSOR_SOLAXX1_TX "SOLAXX1 Tx" +#define D_SENSOR_SOLAXX1_RX "SOLAXX1 Rx" // Units #define D_UNIT_AMPERE "A" @@ -657,4 +659,34 @@ #define D_UNIT_KWARH "kVArh" #define D_UNIT_ANGLE "Deg" +#ifdef USE_SOLAX_X1 +//SOLAXX1 +#define D_PV1_VOLTAGE "PV1 Voltage" +#define D_PV1_CURRENT "PV1 Current" +#define D_PV1_POWER "PV1 Power" +#define D_PV2_VOLTAGE "PV2 Voltage" +#define D_PV2_CURRENT "PV2 Current" +#define D_PV2_POWER "PV2 Power" +#define D_SOLAR_POWER "Solar Power" +#define D_INVERTER_POWER "Inverter Power" +#define D_WORKTIME "Uptime" +#define D_STATUS "Status" +#define D_UNIT_TEMPERATURE "°C" + +#define D_WAITING "Waiting" +#define D_CHECKING "Checking" +#define D_WORKING "Working" +#define D_FAILURE "Failure" + +#define D_SOLAX_ERROR_0 "No Error Code" +#define D_SOLAX_ERROR_1 "Grid Lost Fault" +#define D_SOLAX_ERROR_2 "Grid Voltage Fault" +#define D_SOLAX_ERROR_3 "Grid Frequency Fault" +#define D_SOLAX_ERROR_4 "Pv Voltage Fault" +#define D_SOLAX_ERROR_5 "Isolation Fault" +#define D_SOLAX_ERROR_6 "Over Temperature Fault" +#define D_SOLAX_ERROR_7 "Fan Fault" +#define D_SOLAX_ERROR_8 "Other Device Fault" +#endif + #endif // _LANGUAGE_PT_PT_H_ diff --git a/sonoff/language/ru-RU.h b/sonoff/language/ru-RU.h index 5691f8117..c8bd87b72 100644 --- a/sonoff/language/ru-RU.h +++ b/sonoff/language/ru-RU.h @@ -587,6 +587,8 @@ #define D_SENSOR_ADE7953_IRQ "ADE7953 IRQ" #define D_SENSOR_BUZZER "Buzzer" #define D_SENSOR_OLED_RESET "OLED Reset" +#define D_SENSOR_SOLAXX1_TX "SOLAXX1 Tx" +#define D_SENSOR_SOLAXX1_RX "SOLAXX1 Rx" // Units #define D_UNIT_AMPERE "А" @@ -657,4 +659,34 @@ #define D_UNIT_KWARH "kVArh" #define D_UNIT_ANGLE "Град" +#ifdef USE_SOLAX_X1 +//SOLAXX1 +#define D_PV1_VOLTAGE "PV1 Voltage" +#define D_PV1_CURRENT "PV1 Current" +#define D_PV1_POWER "PV1 Power" +#define D_PV2_VOLTAGE "PV2 Voltage" +#define D_PV2_CURRENT "PV2 Current" +#define D_PV2_POWER "PV2 Power" +#define D_SOLAR_POWER "Solar Power" +#define D_INVERTER_POWER "Inverter Power" +#define D_WORKTIME "Uptime" +#define D_STATUS "Status" +#define D_UNIT_TEMPERATURE "°C" + +#define D_WAITING "Waiting" +#define D_CHECKING "Checking" +#define D_WORKING "Working" +#define D_FAILURE "Failure" + +#define D_SOLAX_ERROR_0 "No Error Code" +#define D_SOLAX_ERROR_1 "Grid Lost Fault" +#define D_SOLAX_ERROR_2 "Grid Voltage Fault" +#define D_SOLAX_ERROR_3 "Grid Frequency Fault" +#define D_SOLAX_ERROR_4 "Pv Voltage Fault" +#define D_SOLAX_ERROR_5 "Isolation Fault" +#define D_SOLAX_ERROR_6 "Over Temperature Fault" +#define D_SOLAX_ERROR_7 "Fan Fault" +#define D_SOLAX_ERROR_8 "Other Device Fault" +#endif + #endif // _LANGUAGE_RU_RU_H_ diff --git a/sonoff/language/sk-SK.h b/sonoff/language/sk-SK.h index 205dd6f71..214f3765e 100644 --- a/sonoff/language/sk-SK.h +++ b/sonoff/language/sk-SK.h @@ -587,6 +587,8 @@ #define D_SENSOR_ADE7953_IRQ "ADE7953 IRQ" #define D_SENSOR_BUZZER "Buzzer" #define D_SENSOR_OLED_RESET "OLED Reset" +#define D_SENSOR_SOLAXX1_TX "SOLAXX1 Tx" +#define D_SENSOR_SOLAXX1_RX "SOLAXX1 Rx" // Units #define D_UNIT_AMPERE "A" @@ -657,4 +659,34 @@ #define D_UNIT_KWARH "kVArh" #define D_UNIT_ANGLE "Deg" +#ifdef USE_SOLAX_X1 +//SOLAXX1 +#define D_PV1_VOLTAGE "PV1 Voltage" +#define D_PV1_CURRENT "PV1 Current" +#define D_PV1_POWER "PV1 Power" +#define D_PV2_VOLTAGE "PV2 Voltage" +#define D_PV2_CURRENT "PV2 Current" +#define D_PV2_POWER "PV2 Power" +#define D_SOLAR_POWER "Solar Power" +#define D_INVERTER_POWER "Inverter Power" +#define D_WORKTIME "Uptime" +#define D_STATUS "Status" +#define D_UNIT_TEMPERATURE "°C" + +#define D_WAITING "Waiting" +#define D_CHECKING "Checking" +#define D_WORKING "Working" +#define D_FAILURE "Failure" + +#define D_SOLAX_ERROR_0 "No Error Code" +#define D_SOLAX_ERROR_1 "Grid Lost Fault" +#define D_SOLAX_ERROR_2 "Grid Voltage Fault" +#define D_SOLAX_ERROR_3 "Grid Frequency Fault" +#define D_SOLAX_ERROR_4 "Pv Voltage Fault" +#define D_SOLAX_ERROR_5 "Isolation Fault" +#define D_SOLAX_ERROR_6 "Over Temperature Fault" +#define D_SOLAX_ERROR_7 "Fan Fault" +#define D_SOLAX_ERROR_8 "Other Device Fault" +#endif + #endif // _LANGUAGE_SK_SK_H_ diff --git a/sonoff/language/sv-SE.h b/sonoff/language/sv-SE.h index 7f7ec4b02..a098aac8d 100644 --- a/sonoff/language/sv-SE.h +++ b/sonoff/language/sv-SE.h @@ -587,6 +587,8 @@ #define D_SENSOR_ADE7953_IRQ "ADE7953 IRQ" #define D_SENSOR_BUZZER "Buzzer" #define D_SENSOR_OLED_RESET "OLED Reset" +#define D_SENSOR_SOLAXX1_TX "SOLAXX1 Tx" +#define D_SENSOR_SOLAXX1_RX "SOLAXX1 Rx" // Units #define D_UNIT_AMPERE "A" @@ -657,4 +659,34 @@ #define D_UNIT_KWARH "kVArh" #define D_UNIT_ANGLE "Deg" +#ifdef USE_SOLAX_X1 +//SOLAXX1 +#define D_PV1_VOLTAGE "PV1 Voltage" +#define D_PV1_CURRENT "PV1 Current" +#define D_PV1_POWER "PV1 Power" +#define D_PV2_VOLTAGE "PV2 Voltage" +#define D_PV2_CURRENT "PV2 Current" +#define D_PV2_POWER "PV2 Power" +#define D_SOLAR_POWER "Solar Power" +#define D_INVERTER_POWER "Inverter Power" +#define D_WORKTIME "Uptime" +#define D_STATUS "Status" +#define D_UNIT_TEMPERATURE "°C" + +#define D_WAITING "Waiting" +#define D_CHECKING "Checking" +#define D_WORKING "Working" +#define D_FAILURE "Failure" + +#define D_SOLAX_ERROR_0 "No Error Code" +#define D_SOLAX_ERROR_1 "Grid Lost Fault" +#define D_SOLAX_ERROR_2 "Grid Voltage Fault" +#define D_SOLAX_ERROR_3 "Grid Frequency Fault" +#define D_SOLAX_ERROR_4 "Pv Voltage Fault" +#define D_SOLAX_ERROR_5 "Isolation Fault" +#define D_SOLAX_ERROR_6 "Over Temperature Fault" +#define D_SOLAX_ERROR_7 "Fan Fault" +#define D_SOLAX_ERROR_8 "Other Device Fault" +#endif + #endif // _LANGUAGE_SV_SE_H_ diff --git a/sonoff/language/tr-TR.h b/sonoff/language/tr-TR.h index 2069bef61..f5ccd75ee 100755 --- a/sonoff/language/tr-TR.h +++ b/sonoff/language/tr-TR.h @@ -587,6 +587,8 @@ #define D_SENSOR_ADE7953_IRQ "ADE7953 IRQ" #define D_SENSOR_BUZZER "Buzzer" #define D_SENSOR_OLED_RESET "OLED Reset" +#define D_SENSOR_SOLAXX1_TX "SOLAXX1 Tx" +#define D_SENSOR_SOLAXX1_RX "SOLAXX1 Rx" // Units #define D_UNIT_AMPERE "A" @@ -657,4 +659,34 @@ #define D_UNIT_KWARH "kVArh" #define D_UNIT_ANGLE "Deg" +#ifdef USE_SOLAX_X1 +//SOLAXX1 +#define D_PV1_VOLTAGE "PV1 Voltage" +#define D_PV1_CURRENT "PV1 Current" +#define D_PV1_POWER "PV1 Power" +#define D_PV2_VOLTAGE "PV2 Voltage" +#define D_PV2_CURRENT "PV2 Current" +#define D_PV2_POWER "PV2 Power" +#define D_SOLAR_POWER "Solar Power" +#define D_INVERTER_POWER "Inverter Power" +#define D_WORKTIME "Uptime" +#define D_STATUS "Status" +#define D_UNIT_TEMPERATURE "°C" + +#define D_WAITING "Waiting" +#define D_CHECKING "Checking" +#define D_WORKING "Working" +#define D_FAILURE "Failure" + +#define D_SOLAX_ERROR_0 "No Error Code" +#define D_SOLAX_ERROR_1 "Grid Lost Fault" +#define D_SOLAX_ERROR_2 "Grid Voltage Fault" +#define D_SOLAX_ERROR_3 "Grid Frequency Fault" +#define D_SOLAX_ERROR_4 "Pv Voltage Fault" +#define D_SOLAX_ERROR_5 "Isolation Fault" +#define D_SOLAX_ERROR_6 "Over Temperature Fault" +#define D_SOLAX_ERROR_7 "Fan Fault" +#define D_SOLAX_ERROR_8 "Other Device Fault" +#endif + #endif // _LANGUAGE_TR_TR_H_ diff --git a/sonoff/language/uk-UK.h b/sonoff/language/uk-UK.h index 2b6c11606..b2e9f4f3e 100644 --- a/sonoff/language/uk-UK.h +++ b/sonoff/language/uk-UK.h @@ -657,4 +657,34 @@ #define D_UNIT_KWARH "кВАр/г" #define D_UNIT_ANGLE "Град" +#ifdef USE_SOLAX_X1 +//SOLAXX1 +#define D_PV1_VOLTAGE "PV1 Voltage" +#define D_PV1_CURRENT "PV1 Current" +#define D_PV1_POWER "PV1 Power" +#define D_PV2_VOLTAGE "PV2 Voltage" +#define D_PV2_CURRENT "PV2 Current" +#define D_PV2_POWER "PV2 Power" +#define D_SOLAR_POWER "Solar Power" +#define D_INVERTER_POWER "Inverter Power" +#define D_WORKTIME "Uptime" +#define D_STATUS "Status" +#define D_UNIT_TEMPERATURE "°C" + +#define D_WAITING "Waiting" +#define D_CHECKING "Checking" +#define D_WORKING "Working" +#define D_FAILURE "Failure" + +#define D_SOLAX_ERROR_0 "No Error Code" +#define D_SOLAX_ERROR_1 "Grid Lost Fault" +#define D_SOLAX_ERROR_2 "Grid Voltage Fault" +#define D_SOLAX_ERROR_3 "Grid Frequency Fault" +#define D_SOLAX_ERROR_4 "Pv Voltage Fault" +#define D_SOLAX_ERROR_5 "Isolation Fault" +#define D_SOLAX_ERROR_6 "Over Temperature Fault" +#define D_SOLAX_ERROR_7 "Fan Fault" +#define D_SOLAX_ERROR_8 "Other Device Fault" +#endif + #endif // _LANGUAGE_UK_UK_H_ diff --git a/sonoff/language/zh-CN.h b/sonoff/language/zh-CN.h index 55c37ea08..b8f457760 100644 --- a/sonoff/language/zh-CN.h +++ b/sonoff/language/zh-CN.h @@ -587,6 +587,8 @@ #define D_SENSOR_ADE7953_IRQ "ADE7953 IRQ" #define D_SENSOR_BUZZER "Buzzer" #define D_SENSOR_OLED_RESET "OLED Reset" +#define D_SENSOR_SOLAXX1_TX "SOLAXX1 Tx" +#define D_SENSOR_SOLAXX1_RX "SOLAXX1 Rx" // Units #define D_UNIT_AMPERE "安" @@ -657,4 +659,34 @@ #define D_UNIT_KWARH "千乏时" #define D_UNIT_ANGLE "度" +#ifdef USE_SOLAX_X1 +//SOLAXX1 +#define D_PV1_VOLTAGE "PV1 Voltage" +#define D_PV1_CURRENT "PV1 Current" +#define D_PV1_POWER "PV1 Power" +#define D_PV2_VOLTAGE "PV2 Voltage" +#define D_PV2_CURRENT "PV2 Current" +#define D_PV2_POWER "PV2 Power" +#define D_SOLAR_POWER "Solar Power" +#define D_INVERTER_POWER "Inverter Power" +#define D_WORKTIME "Uptime" +#define D_STATUS "Status" +#define D_UNIT_TEMPERATURE "°C" + +#define D_WAITING "Waiting" +#define D_CHECKING "Checking" +#define D_WORKING "Working" +#define D_FAILURE "Failure" + +#define D_SOLAX_ERROR_0 "No Error Code" +#define D_SOLAX_ERROR_1 "Grid Lost Fault" +#define D_SOLAX_ERROR_2 "Grid Voltage Fault" +#define D_SOLAX_ERROR_3 "Grid Frequency Fault" +#define D_SOLAX_ERROR_4 "Pv Voltage Fault" +#define D_SOLAX_ERROR_5 "Isolation Fault" +#define D_SOLAX_ERROR_6 "Over Temperature Fault" +#define D_SOLAX_ERROR_7 "Fan Fault" +#define D_SOLAX_ERROR_8 "Other Device Fault" +#endif + #endif // _LANGUAGE_ZH_CN_H_ diff --git a/sonoff/language/zh-TW.h b/sonoff/language/zh-TW.h index 52ea31d7a..5ec64b626 100644 --- a/sonoff/language/zh-TW.h +++ b/sonoff/language/zh-TW.h @@ -587,6 +587,8 @@ #define D_SENSOR_ADE7953_IRQ "ADE7953 IRQ" #define D_SENSOR_BUZZER "Buzzer" #define D_SENSOR_OLED_RESET "OLED Reset" +#define D_SENSOR_SOLAXX1_TX "SOLAXX1 Tx" +#define D_SENSOR_SOLAXX1_RX "SOLAXX1 Rx" // Units #define D_UNIT_AMPERE "安" @@ -657,4 +659,34 @@ #define D_UNIT_KWARH "kVArh" #define D_UNIT_ANGLE "Deg" +#ifdef USE_SOLAX_X1 +//SOLAXX1 +#define D_PV1_VOLTAGE "PV1 Voltage" +#define D_PV1_CURRENT "PV1 Current" +#define D_PV1_POWER "PV1 Power" +#define D_PV2_VOLTAGE "PV2 Voltage" +#define D_PV2_CURRENT "PV2 Current" +#define D_PV2_POWER "PV2 Power" +#define D_SOLAR_POWER "Solar Power" +#define D_INVERTER_POWER "Inverter Power" +#define D_WORKTIME "Uptime" +#define D_STATUS "Status" +#define D_UNIT_TEMPERATURE "°C" + +#define D_WAITING "Waiting" +#define D_CHECKING "Checking" +#define D_WORKING "Working" +#define D_FAILURE "Failure" + +#define D_SOLAX_ERROR_0 "No Error Code" +#define D_SOLAX_ERROR_1 "Grid Lost Fault" +#define D_SOLAX_ERROR_2 "Grid Voltage Fault" +#define D_SOLAX_ERROR_3 "Grid Frequency Fault" +#define D_SOLAX_ERROR_4 "Pv Voltage Fault" +#define D_SOLAX_ERROR_5 "Isolation Fault" +#define D_SOLAX_ERROR_6 "Over Temperature Fault" +#define D_SOLAX_ERROR_7 "Fan Fault" +#define D_SOLAX_ERROR_8 "Other Device Fault" +#endif + #endif // _LANGUAGE_ZH_TW_H_ diff --git a/sonoff/sonoff_post.h b/sonoff/sonoff_post.h index d2f0c7ea4..9af8198ed 100644 --- a/sonoff/sonoff_post.h +++ b/sonoff/sonoff_post.h @@ -177,6 +177,7 @@ void KNX_CB_Action(message_t const &msg, void *arg); #define USE_ALECTO_V2 // Add support for decoding Alecto V2 sensors like ACH2010, WS3000 and DKW2012 using 868MHz RF sensor receiver (+1k7 code) #define USE_SM16716 // Add support for SM16716 RGB LED controller (+0k7 code) #define USE_HRE // Add support for Badger HR-E Water Meter (+1k4 code) +//#define USE_SOLAX_X1 // Enable Solax X1 series log info support (+4k1 code) #endif // FIRMWARE_SENSORS /*********************************************************************************************\ diff --git a/sonoff/sonoff_template.h b/sonoff/sonoff_template.h index 83ce16f08..78bbe98d9 100644 --- a/sonoff/sonoff_template.h +++ b/sonoff/sonoff_template.h @@ -187,6 +187,8 @@ enum UserSelectablePins { GPIO_BUZZER, // Buzzer GPIO_BUZZER_INV, // Inverted buzzer GPIO_OLED_RESET, // OLED Display Reset + GPIO_SOLAXX1_TX, // Solax Inverter tx pin + GPIO_SOLAXX1_RX, // Solax Inverter rx pin GPIO_SENSOR_END }; // Programmer selectable GPIO functionality @@ -256,6 +258,7 @@ const char kSensorNames[] PROGMEM = D_SENSOR_ARIRFSEL "|" D_SENSOR_BUZZER "|" D_SENSOR_BUZZER "i|" D_SENSOR_OLED_RESET "|" + D_SENSOR_SOLAXX1_TX "|" D_SENSOR_SOLAXX1_RX "|" ; // User selectable ADC0 functionality @@ -646,6 +649,10 @@ const uint8_t kGpioNiceList[] PROGMEM = { GPIO_HRE_CLOCK, GPIO_HRE_DATA #endif +#ifdef USE_SOLAX_X1 + GPIO_SOLAXX1_TX, // Solax Inverter tx pin + GPIO_SOLAXX1_RX, // Solax Inverter rx pin +#endif }; const uint8_t kModuleNiceList[] PROGMEM = { diff --git a/sonoff/xsns_49_solaxX1.ino b/sonoff/xsns_49_solaxX1.ino new file mode 100644 index 000000000..3c94b938f --- /dev/null +++ b/sonoff/xsns_49_solaxX1.ino @@ -0,0 +1,618 @@ +/* + xsns_48_solaxX1.ino - Solax X1 inverter RS485 support for Sonoff-Tasmota + + Copyright (C) 2019 Pablo Zerón + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . +*/ + +#ifdef USE_SOLAX_X1 + +#define XSNS_49 49 + +#define solaxX1_SPEED 9600 // default solax rs485 speed + +#define PV2 // comment this line if you use only one PV input + +#include + +enum solaxX1_Error +{ + solaxX1_ERR_NO_ERROR, + solaxX1_ERR_CRC_ERROR +}; + +union { + uint32_t ErrMessage; + struct { + //BYTE0 + uint8_t TzProtectFault:1;//0 + uint8_t MainsLostFault:1;//1 + uint8_t GridVoltFault:1;//2 + uint8_t GridFreqFault:1;//3 + uint8_t PLLLostFault:1;//4 + uint8_t BusVoltFault:1;//5 + uint8_t ErrBit06:1;//6 + uint8_t OciFault:1;//7 + //BYTE1 + uint8_t Dci_OCP_Fault:1;//8 + uint8_t ResidualCurrentFault:1;//9 + uint8_t PvVoltFault:1;//10 + uint8_t Ac10Mins_Voltage_Fault:1;//11 + uint8_t IsolationFault:1;//12 + uint8_t TemperatureOverFault:1;//13 + uint8_t FanFault:1;//14 + uint8_t ErrBit15:1;//15 + //BYTE2 + uint8_t SpiCommsFault:1;//16 + uint8_t SciCommsFault:1;//17 + uint8_t ErrBit18:1;//18 + uint8_t InputConfigFault:1;//19 + uint8_t EepromFault:1;//20 + uint8_t RelayFault:1;//21 + uint8_t SampleConsistenceFault:1;//22 + uint8_t ResidualCurrent_DeviceFault:1;//23 + //BYTE3 + uint8_t ErrBit24:1;//24 + uint8_t ErrBit25:1;//25 + uint8_t ErrBit26:1;//26 + uint8_t ErrBit27:1;//27 + uint8_t ErrBit28:1;//28 + uint8_t DCI_DeviceFault:1;//29 + uint8_t OtherDeviceFault:1;//30 + uint8_t ErrBit31:1;//31 + }; +} ErrCode; + +const char solax_mode_0[] PROGMEM = D_WAITING; +const char solax_mode_1[] PROGMEM = D_CHECKING; +const char solax_mode_2[] PROGMEM = D_WORKING; +const char solax_mode_3[] PROGMEM = D_FAILURE; + +const char *const solaxX1_Mode[] PROGMEM = {solax_mode_0, solax_mode_1, solax_mode_2, solax_mode_3}; + +const char solax_error_0[] PROGMEM = D_SOLAX_ERROR_0; +const char solax_error_1[] PROGMEM = D_SOLAX_ERROR_1; +const char solax_error_2[] PROGMEM = D_SOLAX_ERROR_2; +const char solax_error_3[] PROGMEM = D_SOLAX_ERROR_3; +const char solax_error_4[] PROGMEM = D_SOLAX_ERROR_4; +const char solax_error_5[] PROGMEM = D_SOLAX_ERROR_5; +const char solax_error_6[] PROGMEM = D_SOLAX_ERROR_6; +const char solax_error_7[] PROGMEM = D_SOLAX_ERROR_7; +const char solax_error_8[] PROGMEM = D_SOLAX_ERROR_8; + +const char *const solaxX1_ErrCode[] PROGMEM = {solax_error_0, solax_error_1, solax_error_2, solax_error_3, solax_error_4, solax_error_5, solax_error_6, solax_error_7, solax_error_8}; + +/*********************************************************************************************/ + +TasmotaSerial *solaxX1Serial; + +uint8_t solaxX1_Init = 1; + +uint8_t solaxX1_status = 0; +uint32_t solaxX1_errorCode = 0; + +float solaxX1_temperature = 0; +float solaxX1_energy_today = 0; +float solaxX1_dc1_voltage = 0; +float solaxX1_dc2_voltage = 0; +float solaxX1_dc1_current = 0; +float solaxX1_dc2_current = 0; +float solaxX1_ac_current = 0; +float solaxX1_ac_voltage = 0; +float solaxX1_frequency = 0; +float solaxX1_power = 0; +float solaxX1_energy_total = 0; +float solaxX1_runtime_total = 0; + +float solaxX1_dc1_power = 0; +float solaxX1_dc2_power = 0; + +bool queryOffline = false; +bool queryOfflineSend = false; +bool hasAddress = true; +bool inverterAddressSend = false; +bool inverterSnReceived = false; + +uint8_t header[2] = {0xAA, 0x55}; +uint8_t source[2] = {0x00, 0x00}; +uint8_t destination[2] = {0x00, 0x00}; +uint8_t controlCode[1] = {0x00}; +uint8_t functionCode[1] = {0x00}; +uint8_t dataLength[1] = {0x00}; +uint8_t data[16] = {0}; + +uint8_t message[30]; + +#define INVERTER_ADDRESS 0x0A + +/*********************************************************************************************/ + +bool solaxX1_RS485ReceiveReady(void) +{ + return (solaxX1Serial->available() > 1); +} + +void solaxX1_RS485Send(uint8_t *msg, uint16_t msgLen) +{ + + uint16_t crc = solaxX1_calculateCRC(msg, msgLen - 1); // calculate out crc bytes + + while (solaxX1Serial->available() > 0) + { // read serial if any old data is available + solaxX1Serial->read(); + } + + solaxX1Serial->flush(); + solaxX1Serial->write(msg, msgLen); + solaxX1Serial->write(highByte(crc)); + solaxX1Serial->write(lowByte(crc)); +} + +uint8_t solaxX1_RS485Receive(uint8_t *value) +{ + uint8_t len = 0; + + while (solaxX1Serial->available() > 0) + { + value[len++] = (uint8_t)solaxX1Serial->read(); + } + + uint16_t crc = solaxX1_calculateCRC(value, len - 3); // calculate out crc bytes + + if (value[len - 1] == lowByte(crc) && value[len - 2] == highByte(crc)) + { // check calc crc with received crc + return solaxX1_ERR_NO_ERROR; + } + else + { + return solaxX1_ERR_CRC_ERROR; + } +} + +uint16_t solaxX1_calculateCRC(uint8_t *bExternTxPackage, uint8_t bLen) +{ + uint8_t i; + uint16_t wChkSum; + wChkSum = 0; + + for (i = 0; i <= bLen; i++) + { + wChkSum = wChkSum + bExternTxPackage[i]; + } + return wChkSum; +} + +void solaxX1_setMessage(uint8_t *message) +{ + memcpy(message, header, 2); + memcpy(message + 2, source, 2); + memcpy(message + 4, destination, 2); + memcpy(message + 6, controlCode, 1); + memcpy(message + 7, functionCode, 1); + memcpy(message + 8, dataLength, 1); + memcpy(message + 9, data, sizeof(data)); +} + +void solaxX1_SendInverterAddress() +{ + source[0] = 0x00; + destination[0] = 0x00; + destination[1] = 0x00; + controlCode[0] = 0x10; + functionCode[0] = 0x01; + dataLength[0] = 0x0F; + + // Inverter Address, It must be unique in case of more inverters in the same rs485 net. + data[14] = INVERTER_ADDRESS; + + solaxX1_setMessage(message); + solaxX1_RS485Send(message, 24); +} + +void solaxX1_QueryLiveData() +{ + source[0] = 0x01; + destination[0] = 0x00; + destination[1] = INVERTER_ADDRESS; + controlCode[0] = 0x11; + functionCode[0] = 0x02; + dataLength[0] = 0x00; + + solaxX1_setMessage(message); + solaxX1_RS485Send(message, 9); +} + +uint8_t solaxX1_ParseErrorCode(uint32_t code){ + ErrCode.ErrMessage = code; + + if (code == 0) return 0; + if (ErrCode.MainsLostFault) return 1; + if (ErrCode.GridVoltFault) return 2; + if (ErrCode.GridFreqFault) return 3; + if (ErrCode.PvVoltFault) return 4; + if (ErrCode.IsolationFault) return 5; + if (ErrCode.TemperatureOverFault) return 6; + if (ErrCode.FanFault) return 7; + if (ErrCode.OtherDeviceFault) return 8; +} + +/*********************************************************************************************/ + +uint8_t solaxX1_send_retry = 0; +uint8_t solaxX1_nodata_count = 0; + +void solaxX1_Update(void) // Every Second +{ + uint8_t value[61] = {0}; + + bool data_ready = solaxX1_RS485ReceiveReady(); + + AddLog_P2(LOG_LEVEL_DEBUG, PSTR(D_LOG_DEBUG "queryOffline: %d , queryOfflineSend: %d, hasAddress: %d, inverterAddressSend: %d, solaxX1_send_retry: %d"), queryOffline, queryOfflineSend, hasAddress, inverterAddressSend, solaxX1_send_retry); + + if (!hasAddress && (data_ready || solaxX1_send_retry == 0)) + { + + if (data_ready) + { + // check address confirmation from inverter + if (inverterAddressSend) + { + uint8_t error = solaxX1_RS485Receive(value); + if (error) + { + AddLog_P2(LOG_LEVEL_DEBUG, PSTR(D_LOG_DEBUG "Address confirmation response CRC error")); + } + else + { + if (value[6] == 0x10 && value[7] == 0x81 && value[9] == 0x06) + { + inverterAddressSend = false; + queryOfflineSend = false; + hasAddress = true; + } + } + } + + // Check inverter serial number and send the set address request + if (queryOfflineSend) + { + uint8_t error = solaxX1_RS485Receive(value); + if (error) + { + AddLog_P2(LOG_LEVEL_DEBUG, PSTR(D_LOG_DEBUG "Query Offline response CRC error")); + } + else + { + // Serial number from query response + if (value[6] == 0x10 && value[7] == 0x80 && inverterSnReceived == false) + { + for (uint8_t i = 9; i <= 22; i++) + { + data[i - 9] = value[i]; + } + inverterSnReceived = true; + } + + solaxX1_SendInverterAddress(); + + inverterAddressSend = true; + queryOfflineSend = false; + queryOffline = false; + } + } + } + + // request to the inverter the serial number if offline + if (queryOffline) + { + // We sent the message to query inverters in offline status + source[0] = 0x01; + destination[1] = 0x00; + controlCode[0] = 0x10; + functionCode[0] = 0x00; + dataLength[0] = 0x00; + + solaxX1_setMessage(message); + solaxX1_RS485Send(message, 9); + + queryOfflineSend = true; + queryOffline = false; + } + + if (solaxX1_send_retry == 0) + { + + if (inverterAddressSend) + { + solaxX1_SendInverterAddress(); + } + if (queryOfflineSend) + { + queryOffline = true; + queryOfflineSend = false; + } + solaxX1_send_retry = 2; + } + + } // end !hasAddress && (data_ready || solaxX1_send_retry == 0) + + if (hasAddress && (data_ready || solaxX1_send_retry == 0)) + { + + if (data_ready) + { + uint8_t error = solaxX1_RS485Receive(value); + if (error) + { + AddLog_P2(LOG_LEVEL_DEBUG, PSTR(D_LOG_DEBUG "Data response CRC error")); + } + else + { + /* char hexCar[2]; + for(int i=0; ibegin(solaxX1_SPEED)) + { + if (solaxX1Serial->hardwareSerial()) + { + ClaimSerial(); + } + solaxX1_Init = 1; + } + } +} + +#ifdef USE_WEBSERVER +const char HTTP_SNS_solaxX1_DATA[] PROGMEM = + "{s}solaxX1 " D_VOLTAGE "{m}%s " D_UNIT_VOLT "{e}" + "{s}solaxX1 " D_CURRENT "{m}%s " D_UNIT_AMPERE "{e}" + "{s}solaxX1 " D_FREQUENCY "{m}%s " D_UNIT_HERTZ "{e}" + "{s}solaxX1 " D_INVERTER_POWER "{m}%s " D_UNIT_WATT "{e}" + "{s}solaxX1 " D_SOLAR_POWER "{m}%s " D_UNIT_WATT "{e}" + "{s}solaxX1 " D_ENERGY_TOTAL "{m}%s " D_UNIT_KILOWATTHOUR "{e}" + "{s}solaxX1 " D_ENERGY_TODAY "{m}%s " D_UNIT_KILOWATTHOUR "{e}" + "{s}solaxX1 " D_PV1_VOLTAGE "{m}%s " D_UNIT_VOLT "{e}" + "{s}solaxX1 " D_PV1_CURRENT "{m}%s " D_UNIT_AMPERE "{e}" + "{s}solaxX1 " D_PV1_POWER "{m}%s " D_UNIT_WATT "{e}" +#ifdef PV2 + "{s}solaxX1 " D_PV2_VOLTAGE "{m}%s " D_UNIT_VOLT "{e}" + "{s}solaxX1 " D_PV2_CURRENT "{m}%s " D_UNIT_AMPERE "{e}" + "{s}solaxX1 " D_PV2_POWER "{m}%s " D_UNIT_WATT "{e}" +#endif + "{s}solaxX1 " D_TEMPERATURE "{m}%s " D_UNIT_TEMPERATURE "{e}" + "{s}solaxX1 " D_WORKTIME "{m}%s " D_UNIT_HOUR "{e}" + "{s}solaxX1 " D_STATUS "{m}%s" + "{s}solaxX1 " D_ERROR "{m}%s"; +#endif // USE_WEBSERVER + +void solaxX1Show(bool json) +{ + char voltage[33]; + dtostrfd(solaxX1_ac_voltage, 2, voltage); + char current[33]; + dtostrfd(solaxX1_ac_current, 3, current); + char inverter_power[33]; + dtostrfd(solaxX1_power, 2, inverter_power); + char solar_power[33]; + dtostrfd(solaxX1_dc1_power + + solaxX1_dc2_power, 2, solar_power); + char frequency[33]; + dtostrfd(solaxX1_frequency, 2, frequency); + char energy_total[33]; + dtostrfd(solaxX1_energy_total, 1, energy_total); + char energy_today[33]; + dtostrfd(solaxX1_energy_today, 1, energy_today); + char pv1_voltage[33]; + dtostrfd(solaxX1_dc1_voltage, 2, pv1_voltage); + char pv1_current[33]; + dtostrfd(solaxX1_dc1_current, 3, pv1_current); + char pv1_power[33]; + dtostrfd(solaxX1_dc1_power, 2, pv1_power); +#ifdef PV2 + char pv2_voltage[33]; + dtostrfd(solaxX1_dc2_voltage, 2, pv2_voltage); + char pv2_current[33]; + dtostrfd(solaxX1_dc2_current, 3, pv2_current); + char pv2_power[33]; + dtostrfd(solaxX1_dc2_power, 2, pv2_power); +#endif + char temperature[33]; + dtostrfd(solaxX1_temperature, 1, temperature); + char runtime[33]; + dtostrfd(solaxX1_runtime_total, 0, runtime); + char status[33]; + strcpy_P(status, (PGM_P)solaxX1_Mode[solaxX1_status]); + char errorCode[33]; + char errorCodeString[33]; + dtostrfd(solaxX1_errorCode, 0, errorCode); + strcpy_P(errorCodeString, (PGM_P)solaxX1_ErrCode[solaxX1_ParseErrorCode(solaxX1_errorCode)]); + + if (json) + { +#ifdef PV2 + ResponseAppend_P(PSTR(",\"" D_RSLT_ENERGY "\":{\"" D_JSON_VOLTAGE "\":%s,\"" D_JSON_CURRENT "\":%s,\"" D_JSON_ACTIVE_POWERUSAGE "\":%s,\"" D_JSON_SOLAR_POWER "\":%s,\"" D_JSON_FREQUENCY "\":%s,\"" D_JSON_TOTAL "\":%s,\"" D_JSON_TODAY "\":%s,\"" D_JSON_PV1_VOLTAGE "\":%s,\"" D_JSON_PV1_CURRENT "\":%s,\"" D_JSON_PV1_POWER "\":%s,\"" D_JSON_PV2_VOLTAGE "\":%s,\"" D_JSON_PV2_CURRENT "\":%s,\"" D_JSON_PV2_POWER "\":%s,\"" D_JSON_TEMPERATURE "\":%s,\"" D_JSON_RUNTIME "\":%s,\"" D_JSON_STATUS "\":\"%s\",\"" D_JSON_ERROR "\":%s}"), + voltage, current, inverter_power, solar_power, frequency, energy_total, energy_today, pv1_voltage, pv1_current, pv1_power, pv2_voltage, pv2_current, pv2_power, temperature, runtime, status, errorCode); +#else + ResponseAppend_P(PSTR(",\"" D_RSLT_ENERGY "\":{\"" D_JSON_VOLTAGE "\":%s,\"" D_JSON_CURRENT "\":%s,\"" D_JSON_ACTIVE_POWERUSAGE "\":%s,\"" D_JSON_SOLAR_POWER "\":%s,\"" D_JSON_FREQUENCY "\":%s,\"" D_JSON_TOTAL "\":%s,\"" D_JSON_TODAY "\":%s,\"" D_JSON_PV1_VOLTAGE "\":%s,\"" D_JSON_PV1_CURRENT "\":%s,\"" D_JSON_PV1_POWER "\":%s,\"" D_JSON_TEMPERATURE "\":%s,\"" D_JSON_RUNTIME "\":%s,\"" D_JSON_STATUS "\":\"%s\"}"), + voltage, current, inverter_power, solar_power, frequency, energy_total, energy_today, pv1_voltage, pv1_current, pv1_power, temperature, runtime, status, errorCode); +#endif + +#ifdef USE_DOMOTICZ + if (0 == tele_period) + { + char energy_total_chr[33]; + dtostrfd(solaxX1_energy_total * 1000, 1, energy_total_chr); + + DomoticzSensor(DZ_VOLTAGE, voltage); + DomoticzSensor(DZ_CURRENT, current); + // Only do the updates if the values are greater than 0, to avoid wrong data representation in domoticz + if (solaxX1_temperature > 0) DomoticzSensor(DZ_TEMP, temperature); + if (solaxX1_energy_total > 0) DomoticzSensorPowerEnergy((int)solaxX1_power, energy_total_chr); + } +#endif // USE_DOMOTICZ +#ifdef USE_WEBSERVER + } + else + { +#ifdef PV2 + WSContentSend_PD(HTTP_SNS_solaxX1_DATA, voltage, current, frequency, inverter_power, solar_power, energy_total, energy_today, pv1_voltage, pv1_current, pv1_power, pv2_voltage, pv2_current, pv2_power, temperature, runtime, status, errorCodeString); +#else + WSContentSend_PD(HTTP_SNS_solaxX1_DATA, voltage, current, frequency, inverter_power, solar_power, energy_total, energy_today, pv1_voltage, pv1_current, pv1_power, temperature, runtime, status, errorCodeString); +#endif +#endif // USE_WEBSERVER + } +} + +/*********************************************************************************************\ + * Interface +\*********************************************************************************************/ + +bool Xsns49(uint8_t function) +{ + bool result = false; + + if (solaxX1_Init) + { + switch (function) + { + case FUNC_INIT: + solaxX1Init(); + break; + case FUNC_EVERY_SECOND: + solaxX1_Update(); + break; + case FUNC_JSON_APPEND: + solaxX1Show(1); + break; +#ifdef USE_WEBSERVER + case FUNC_WEB_SENSOR: + solaxX1Show(0); + break; +#endif // USE_WEBSERVER + } + } + return result; +} + +#endif // USE_solaxX1 \ No newline at end of file