Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Support for apparent power calculation with current transformer connected at A0 #7100

Closed
wants to merge 10 commits into from
11 changes: 11 additions & 0 deletions tasmota/i18n.h
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@
#define D_JSON_EVERY "Every"
#define D_JSON_EXPORT_ACTIVE "ExportActive"
#define D_JSON_EXPORT_REACTIVE "ExportReactive"
#define D_JSON_ENERGY "Energy"
#define D_JSON_FAILED "Failed"
#define D_JSON_FALLBACKTOPIC "FallbackTopic"
#define D_JSON_FEATURES "Features"
Expand Down Expand Up @@ -569,6 +570,11 @@ const char JSON_SNS_ILLUMINANCE[] PROGMEM = ",\"%s\":{\"" D_JSON_ILLUMINANCE "\"

const char JSON_SNS_GNGPM[] PROGMEM = ",\"%s\":{\"" D_JSON_TOTAL_USAGE "\":%s,\"" D_JSON_FLOWRATE "\":%s}";

const char JSON_SNS_CURRENT[] PROGMEM = ",\"%s\":{\"" D_JSON_CURRENT "\":%s}";
const char JSON_SNS_VOLTAGE[] PROGMEM = ",\"%s\":{\"" D_JSON_VOLTAGE "\":%s}";
const char JSON_SNS_POWER[] PROGMEM = ",\"%s\":{\"" D_JSON_POWERUSAGE "\":%d}";
const char JSON_SNS_ENERGY[] PROGMEM = ",\"%s\":{\"" D_JSON_ENERGY "\":%s}";

const char S_LOG_I2C_FOUND_AT[] PROGMEM = D_LOG_I2C "%s " D_FOUND_AT " 0x%x";

const char S_LOG_HTTP[] PROGMEM = D_LOG_HTTP;
Expand All @@ -595,6 +601,11 @@ const char HTTP_SNS_CO2[] PROGMEM = "{s}%s " D_CO2 "{m}%d " D_UNIT_PARTS_PER_MIL
const char HTTP_SNS_CO2EAVG[] PROGMEM = "{s}%s " D_ECO2 "{m}%d " D_UNIT_PARTS_PER_MILLION "{e}"; // {s} = <tr><th>, {m} = </th><td>, {e} = </td></tr>
const char HTTP_SNS_GALLONS[] PROGMEM = "{s}%s " D_TOTAL_USAGE "{m}%s " D_UNIT_GALLONS " {e}"; // {s} = <tr><th>, {m} = </th><td>, {e} = </td></tr>
const char HTTP_SNS_GPM[] PROGMEM = "{s}%s " D_FLOW_RATE "{m}%s " D_UNIT_GALLONS_PER_MIN" {e}"; // {s} = <tr><th>, {m} = </th><td>, {e} = </td></tr>
const char HTTP_SNS_CURRENT[] PROGMEM = "{s}%s " D_CURRENT "{m}%s " D_UNIT_AMPERE "{e}"; // {s} = <tr><th>, {m} = </th><td>, {e} = </td></tr>
const char HTTP_SNS_POWER[] PROGMEM = "{s}%s " D_POWERUSAGE "{m}%d " D_UNIT_WATT "{e}"; // {s} = <tr><th>, {m} = </th><td>, {e} = </td></tr>
const char HTTP_SNS_VOLTAGE[] PROGMEM = "{s}%s " D_VOLTAGE "{m}%s " D_UNIT_VOLT "{e}"; // {s} = <tr><th>, {m} = </th><td>, {e} = </td></tr>
const char HTTP_SNS_ENERGY[] PROGMEM = "{s}%s " D_ENERGY_TOTAL "{m}%s " D_UNIT_KILOWATTHOUR "{e}"; // {s} = <tr><th>, {m} = </th><td>, {e} = </td></tr>


const char S_MAIN_MENU[] PROGMEM = D_MAIN_MENU;
const char S_CONFIGURATION[] PROGMEM = D_CONFIGURATION;
Expand Down
3 changes: 2 additions & 1 deletion tasmota/language/bg-BG.h
Original file line number Diff line number Diff line change
Expand Up @@ -627,7 +627,8 @@
#define D_SENSOR_EXS_ENABLE "EXS Enable"
#define D_SENSOR_SLAVE_TX "Slave TX"
#define D_SENSOR_SLAVE_RX "Slave RX"
#define D_SENSOR_SLAVE_RESET "Slave RST"
#define D_SENSOR_SLAVE_RESET "Slave RST"
#define D_SENSOR_CT_POWER "CT Power"

// Units
#define D_UNIT_AMPERE "A"
Expand Down
3 changes: 2 additions & 1 deletion tasmota/language/cs-CZ.h
Original file line number Diff line number Diff line change
Expand Up @@ -627,7 +627,8 @@
#define D_SENSOR_EXS_ENABLE "EXS Enable"
#define D_SENSOR_SLAVE_TX "Slave TX"
#define D_SENSOR_SLAVE_RX "Slave RX"
#define D_SENSOR_SLAVE_RESET "Slave RST"
#define D_SENSOR_SLAVE_RESET "Slave RST"
#define D_SENSOR_CT_POWER "CT Power"

// Units
#define D_UNIT_AMPERE "A"
Expand Down
3 changes: 2 additions & 1 deletion tasmota/language/de-DE.h
Original file line number Diff line number Diff line change
Expand Up @@ -627,7 +627,8 @@
#define D_SENSOR_EXS_ENABLE "EXS Enable"
#define D_SENSOR_SLAVE_TX "Slave TX"
#define D_SENSOR_SLAVE_RX "Slave RX"
#define D_SENSOR_SLAVE_RESET "Slave RST"
#define D_SENSOR_SLAVE_RESET "Slave RST"
#define D_SENSOR_CT_POWER "CT Power"

// Units
#define D_UNIT_AMPERE "A"
Expand Down
3 changes: 2 additions & 1 deletion tasmota/language/el-GR.h
Original file line number Diff line number Diff line change
Expand Up @@ -627,7 +627,8 @@
#define D_SENSOR_EXS_ENABLE "EXS Enable"
#define D_SENSOR_SLAVE_TX "Slave TX"
#define D_SENSOR_SLAVE_RX "Slave RX"
#define D_SENSOR_SLAVE_RESET "Slave RST"
#define D_SENSOR_SLAVE_RESET "Slave RST"
#define D_SENSOR_CT_POWER "CT Power"

// Units
#define D_UNIT_AMPERE "A"
Expand Down
7 changes: 4 additions & 3 deletions tasmota/language/en-GB.h
Original file line number Diff line number Diff line change
Expand Up @@ -625,9 +625,10 @@
#define D_SENSOR_SM2135_DAT "SM2135 Dat"
#define D_SENSOR_DEEPSLEEP "DeepSleep"
#define D_SENSOR_EXS_ENABLE "EXS Enable"
#define D_SENSOR_SLAVE_TX "Slave TX"
#define D_SENSOR_SLAVE_RX "Slave RX"
#define D_SENSOR_SLAVE_RESET "Slave RST"
#define D_SENSOR_SLAVE_TX "Slave TX"
#define D_SENSOR_SLAVE_RX "Slave RX"
#define D_SENSOR_SLAVE_RESET "Slave RST"
#define D_SENSOR_CT_POWER "CT Power"

// Units
#define D_UNIT_AMPERE "A"
Expand Down
7 changes: 4 additions & 3 deletions tasmota/language/es-ES.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
* Use online command StateText to translate ON, OFF, HOLD and TOGGLE.
* Use online command Prefix to translate cmnd, stat and tele.
*
* Updated until v7.0.0.5
* Updated until v7.0.0.3
\*********************************************************************/

#define LANGUAGE_MODULE_NAME // Enable to display "Module Generic" (ie Spanish), Disable to display "Generic Module" (ie English)
Expand Down Expand Up @@ -75,7 +75,7 @@
#define D_COUNTER "Contador"
#define D_CURRENT "Corriente" // As in Voltage and Current
#define D_DATA "Datos"
#define D_DARKLIGHT "Oscuro"
#define D_DARKLIGHT "Oscura"
#define D_DEBUG "Debug"
#define D_DISABLED "Deshabilitado"
#define D_DISTANCE "Distancia"
Expand Down Expand Up @@ -627,7 +627,8 @@
#define D_SENSOR_EXS_ENABLE "EXS Enable"
#define D_SENSOR_SLAVE_TX "Slave TX"
#define D_SENSOR_SLAVE_RX "Slave RX"
#define D_SENSOR_SLAVE_RESET "Slave RST"
#define D_SENSOR_SLAVE_RESET "Slave RST"
#define D_SENSOR_CT_POWER "CT Power"

// Units
#define D_UNIT_AMPERE "A"
Expand Down
3 changes: 2 additions & 1 deletion tasmota/language/fr-FR.h
Original file line number Diff line number Diff line change
Expand Up @@ -627,7 +627,8 @@
#define D_SENSOR_EXS_ENABLE "EXS Enable"
#define D_SENSOR_SLAVE_TX "Slave TX"
#define D_SENSOR_SLAVE_RX "Slave RX"
#define D_SENSOR_SLAVE_RESET "Slave RST"
#define D_SENSOR_SLAVE_RESET "Slave RST"
#define D_SENSOR_CT_POWER "CT Power"

// Units
#define D_UNIT_AMPERE "A"
Expand Down
3 changes: 2 additions & 1 deletion tasmota/language/he-HE.h
Original file line number Diff line number Diff line change
Expand Up @@ -627,7 +627,8 @@
#define D_SENSOR_EXS_ENABLE "EXS Enable"
#define D_SENSOR_SLAVE_TX "Slave TX"
#define D_SENSOR_SLAVE_RX "Slave RX"
#define D_SENSOR_SLAVE_RESET "Slave RST"
#define D_SENSOR_SLAVE_RESET "Slave RST"
#define D_SENSOR_CT_POWER "CT Power"

// Units
#define D_UNIT_AMPERE "A"
Expand Down
3 changes: 2 additions & 1 deletion tasmota/language/hu-HU.h
Original file line number Diff line number Diff line change
Expand Up @@ -627,7 +627,8 @@
#define D_SENSOR_EXS_ENABLE "EXS Enable"
#define D_SENSOR_SLAVE_TX "Slave TX"
#define D_SENSOR_SLAVE_RX "Slave RX"
#define D_SENSOR_SLAVE_RESET "Slave RST"
#define D_SENSOR_SLAVE_RESET "Slave RST"
#define D_SENSOR_CT_POWER "CT Power"

// Units
#define D_UNIT_AMPERE "A"
Expand Down
3 changes: 2 additions & 1 deletion tasmota/language/it-IT.h
Original file line number Diff line number Diff line change
Expand Up @@ -627,7 +627,8 @@
#define D_SENSOR_EXS_ENABLE "EXS Enable"
#define D_SENSOR_SLAVE_TX "Slave TX"
#define D_SENSOR_SLAVE_RX "Slave RX"
#define D_SENSOR_SLAVE_RESET "Slave RST"
#define D_SENSOR_SLAVE_RESET "Slave RST"
#define D_SENSOR_CT_POWER "CT Power"

// Units
#define D_UNIT_AMPERE "A"
Expand Down
31 changes: 16 additions & 15 deletions tasmota/language/ko-KO.h
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@
#define D_SECONDS "초"
#define D_DEVICE_WILL_RESTART "이 장치는 몇 초 후 재시작됩니다"
#define D_BUTTON_TOGGLE "켜기/끄기"
#define D_CONFIGURATION "설정 메뉴"
#define D_CONFIGURATION "설정"
#define D_INFORMATION "정보"
#define D_FIRMWARE_UPGRADE "펌웨어 업그레이드"
#define D_CONSOLE "콘솔"
Expand All @@ -250,20 +250,20 @@
#define D_CONFIGURE_OTHER "기타 설정"
#define D_CONFIRM_RESET_CONFIGURATION "설정 초기화 확인"
#define D_RESET_CONFIGURATION "설정 초기화"
#define D_BACKUP_CONFIGURATION "설정 백업"
#define D_RESTORE_CONFIGURATION "설정 복구"
#define D_BACKUP_CONFIGURATION "백업 설정"
#define D_RESTORE_CONFIGURATION "복원 설정"
#define D_MAIN_MENU "메인 메뉴"

#define D_MODULE_PARAMETERS "모듈 설정"
#define D_MODULE_PARAMETERS "모듈 파라미터"
#define D_MODULE_TYPE "모듈 타입"
#define D_PULLUP_ENABLE "버튼 없음/스위치 당김"
#define D_ADC "ADC"
#define D_GPIO "GPIO"
#define D_SERIAL_IN "Serial In"
#define D_SERIAL_OUT "Serial Out"

#define D_WIFI_PARAMETERS "Wifi 설정"
#define D_SCAN_FOR_WIFI_NETWORKS "Wifi 네트워크를 검색.."
#define D_WIFI_PARAMETERS "Wifi 파리미터"
#define D_SCAN_FOR_WIFI_NETWORKS "Wifi 네트워크를 검색.."
#define D_SCAN_DONE "검색 완료"
#define D_NO_NETWORKS_FOUND "발견된 네트워크가 없습니다"
#define D_REFRESH_TO_SCAN_AGAIN "검색 재시도"
Expand All @@ -278,11 +278,11 @@
#define D_AP2_SSID "AP2 SSId"
#define D_AP2_PASSWORD "AP2 비밀번호"

#define D_MQTT_PARAMETERS "MQTT 설정"
#define D_MQTT_PARAMETERS "MQTT 파라미터"
#define D_CLIENT "클라이언트"
#define D_FULL_TOPIC "Full Topic"

#define D_LOGGING_PARAMETERS "로그 설정"
#define D_LOGGING_PARAMETERS "로그 파라미터"
#define D_SERIAL_LOG_LEVEL "Serial 로그 레벨"
#define D_MQTT_LOG_LEVEL "Mqtt 로그 레벨"
#define D_WEB_LOG_LEVEL "Web 로그 레벨"
Expand All @@ -292,7 +292,7 @@
#define D_SYSLOG_PORT "시스템로그 포트"
#define D_TELEMETRY_PERIOD "보고 주기"

#define D_OTHER_PARAMETERS "기타 설정"
#define D_OTHER_PARAMETERS "기타 파라미터"
#define D_TEMPLATE "템플릿"
#define D_ACTIVATE "활성화"
#define D_WEB_ADMIN_PASSWORD "Web Admin 비밀번호"
Expand All @@ -304,7 +304,7 @@
#define D_MULTI_DEVICE "다수 장치"

#define D_CONFIGURE_TEMPLATE "템플릿 설정"
#define D_TEMPLATE_PARAMETERS "템플릿 설정"
#define D_TEMPLATE_PARAMETERS "템플릿 상세"
#define D_TEMPLATE_NAME "이름"
#define D_BASE_TYPE "Based on"
#define D_TEMPLATE_FLAGS "옵션"
Expand Down Expand Up @@ -335,7 +335,7 @@
#define D_UPGRADE_BY_WEBSERVER "웹 서버에서 업그레이드"
#define D_OTA_URL "OTA Url"
#define D_START_UPGRADE "업그레이드 시작"
#define D_UPGRADE_BY_FILE_UPLOAD "파일에서 업로드해 업그레이드"
#define D_UPGRADE_BY_FILE_UPLOAD "업로드 된 파일로 업그레이드"
#define D_UPLOAD_STARTED "업로드 시작됨"
#define D_UPGRADE_STARTED "업그레이드 시작됨"
#define D_UPLOAD_DONE "업그레이드 완료"
Expand Down Expand Up @@ -387,7 +387,7 @@
#define D_3_RESPONSE_PACKETS_SENT "3 요청 패킷이 전송됨"

// xdrv_07_domoticz.ino
#define D_DOMOTICZ_PARAMETERS "Domoticz 설정"
#define D_DOMOTICZ_PARAMETERS "Domoticz 파라미터"
#define D_DOMOTICZ_IDX "Idx"
#define D_DOMOTICZ_KEY_IDX "Key idx"
#define D_DOMOTICZ_SWITCH_IDX "스위치 idx"
Expand All @@ -406,7 +406,7 @@

// xdrv_09_timers.ino
#define D_CONFIGURE_TIMER "타이머 설정"
#define D_TIMER_PARAMETERS "타이머 설정"
#define D_TIMER_PARAMETERS "타이머 파라미터"
#define D_TIMER_ENABLE "타이머 사용"
#define D_TIMER_ARM "Arm"
#define D_TIMER_TIME "시간"
Expand All @@ -417,7 +417,7 @@

// xdrv_10_knx.ino
#define D_CONFIGURE_KNX "KNX 설정"
#define D_KNX_PARAMETERS "KNX 설정"
#define D_KNX_PARAMETERS "KNX 파라미터"
#define D_KNX_GENERAL_CONFIG "일반"
#define D_KNX_PHYSICAL_ADDRESS "물리적 주소"
#define D_KNX_PHYSICAL_ADDRESS_NOTE "( KNX 네트워크 상에서 반드시 고유한 이름이어야 합니다 )"
Expand Down Expand Up @@ -627,7 +627,8 @@
#define D_SENSOR_EXS_ENABLE "EXS Enable"
#define D_SENSOR_SLAVE_TX "Slave TX"
#define D_SENSOR_SLAVE_RX "Slave RX"
#define D_SENSOR_SLAVE_RESET "Slave RST"
#define D_SENSOR_SLAVE_RESET "Slave RST"
#define D_SENSOR_CT_POWER "CT Power"

// Units
#define D_UNIT_AMPERE "A"
Expand Down
3 changes: 2 additions & 1 deletion tasmota/language/nl-NL.h
Original file line number Diff line number Diff line change
Expand Up @@ -627,7 +627,8 @@
#define D_SENSOR_EXS_ENABLE "EXS Enable"
#define D_SENSOR_SLAVE_TX "Slave TX"
#define D_SENSOR_SLAVE_RX "Slave RX"
#define D_SENSOR_SLAVE_RESET "Slave RST"
#define D_SENSOR_SLAVE_RESET "Slave RST"
#define D_SENSOR_CT_POWER "CT Power"

// Units
#define D_UNIT_AMPERE "A"
Expand Down
Loading