From dc2d7cc6816011af29acbb6ce5a6cab2f2b686d3 Mon Sep 17 00:00:00 2001 From: saper-2 Date: Sun, 5 Jan 2020 01:06:30 +0100 Subject: [PATCH 1/6] Added F&F LE-01MR support --- tasmota/language/en-GB.h | 2 + tasmota/my_user_config.h | 4 +- tasmota/support_features.ino | 5 +- tasmota/tasmota_post.h | 5 + tasmota/tasmota_template.h | 9 +- tasmota/xnrg_13_fif_le01mr.ino | 290 +++++++++++++++++++++++++++++++++ 6 files changed, 311 insertions(+), 4 deletions(-) create mode 100644 tasmota/xnrg_13_fif_le01mr.ino diff --git a/tasmota/language/en-GB.h b/tasmota/language/en-GB.h index 5121a7471..7c68553a4 100644 --- a/tasmota/language/en-GB.h +++ b/tasmota/language/en-GB.h @@ -634,6 +634,8 @@ #define D_SENSOR_SLAVE_RESET "Slave RST" #define D_SENSOR_GPS_RX "GPS RX" #define D_SENSOR_GPS_TX "GPS TX" +#define D_SENSOR_LE01MR_RX "LE-01MR Rx" +#define D_SENSOR_LE01MR_TX "LE-01MR Tx" // Units #define D_UNIT_AMPERE "A" diff --git a/tasmota/my_user_config.h b/tasmota/my_user_config.h index 06e444658..18e48992f 100644 --- a/tasmota/my_user_config.h +++ b/tasmota/my_user_config.h @@ -498,7 +498,9 @@ //#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 meter + //#define LE01MR_SPEED 2400 // LE-01MR modbus baudrate (2400 default) + //#define LE01MR_ADDR 0x01 // LE-01MR modbus address (0x01 default) // -- Low level interface devices ----------------- #define USE_DHT // Add support for DHT11, AM2301 (DHT21, DHT22, AM2302, AM2321) and SI7021 Temperature and Humidity sensor (1k6 code) diff --git a/tasmota/support_features.ino b/tasmota/support_features.ino index d86bf11bb..8d37d3a71 100644 --- a/tasmota/support_features.ino +++ b/tasmota/support_features.ino @@ -501,8 +501,9 @@ void GetFeatures(void) #ifdef USE_HOTPLUG feature5 |= 0x00800000; #endif - -// feature5 |= 0x01000000; +#ifdef USE_LE01MR + feature5 |= 0x01000000; +#endif // feature5 |= 0x02000000; // feature5 |= 0x04000000; // feature5 |= 0x08000000; diff --git a/tasmota/tasmota_post.h b/tasmota/tasmota_post.h index af2fe00f7..8a16ffead 100644 --- a/tasmota/tasmota_post.h +++ b/tasmota/tasmota_post.h @@ -194,6 +194,7 @@ extern "C" void custom_crash_callback(struct rst_info * rst_info, uint32_t stack #define USE_DDS2382 // Add support for Hiking DDS2382 Modbus energy monitor (+0k6 code) #define USE_DDSU666 // Add support for Chint DDSU666 Modbus energy monitor (+0k6 code) //#define USE_SOLAX_X1 // Add support for Solax X1 series Modbus log info (+3k1 code) +//#define USE_LE01MR // Add support for F&F LE-01MR modbus energy meter #define USE_DHT // Add support for DHT11, AM2301 (DHT21, DHT22, AM2302, AM2321) and SI7021 Temperature and Humidity sensor #define USE_MAX31855 // Add support for MAX31855 K-Type thermocouple sensor using softSPI @@ -281,6 +282,7 @@ extern "C" void custom_crash_callback(struct rst_info * rst_info, uint32_t stack #undef USE_DDS2382 // Disable support for Hiking DDS2382 Modbus energy monitor (+0k6 code) #undef USE_DDSU666 // Disable support for Chint DDSU666 Modbus energy monitor (+0k6 code) #undef USE_SOLAX_X1 // Disable support for Solax X1 series Modbus log info (+3k1 code) + #undef USE_LE01MR // Disable support for F&F LE-01MR Modbus energy meter #define USE_I2C // I2C using library wire (+10k code, 0k2 mem, 124 iram) #define USE_DISPLAY // Add I2C Display Support (+2k code) @@ -362,6 +364,7 @@ extern "C" void custom_crash_callback(struct rst_info * rst_info, uint32_t stack #undef USE_DDS2382 // Disable support for Hiking DDS2382 Modbus energy monitor (+0k6 code) #undef USE_DDSU666 // Disable support for Chint DDSU666 Modbus energy monitor (+0k6 code) #undef USE_SOLAX_X1 // Disable support for Solax X1 series Modbus log info (+3k1 code) + #undef USE_LE01MR // Disable support for F&F LE-01MR Modbus energy meter //#undef USE_DS18x20 // Disable support for DS18x20 sensors with id sort, single scan and read retry (+1k3 code) @@ -481,6 +484,7 @@ extern "C" void custom_crash_callback(struct rst_info * rst_info, uint32_t stack #undef USE_DDS2382 // Disable support for Hiking DDS2382 Modbus energy monitor (+0k6 code) #undef USE_DDSU666 // Disable support for Chint DDSU666 Modbus energy monitor (+0k6 code) #undef USE_SOLAX_X1 // Disable support for Solax X1 series Modbus log info (+3k1 code) +#undef USE_LE01MR // Disable support for F&F LE-01MR Modbus energy meter #undef USE_DHT // Disable support for DHT11, AM2301 (DHT21, DHT22, AM2302, AM2321) and SI7021 Temperature and Humidity sensor #undef USE_MAX31855 // Disable MAX31855 K-Type thermocouple sensor using softSPI @@ -592,6 +596,7 @@ extern "C" void custom_crash_callback(struct rst_info * rst_info, uint32_t stack #undef USE_DDS2382 // Disable support for Hiking DDS2382 Modbus energy monitor (+0k6 code) #undef USE_DDSU666 // Disable support for Chint DDSU666 Modbus energy monitor (+0k6 code) #undef USE_SOLAX_X1 // Disable support for Solax X1 series Modbus log info (+3k1 code) +#undef USE_LE01MR // Disable support for F&F LE-01MR Modbus energy meter #undef USE_DHT // Disable support for DHT11, AM2301 (DHT21, DHT22, AM2302, AM2321) and SI7021 Temperature and Humidity sensor #undef USE_MAX31855 // Disable MAX31855 K-Type thermocouple sensor using softSPI diff --git a/tasmota/tasmota_template.h b/tasmota/tasmota_template.h index 1793902eb..0d0eab2f5 100644 --- a/tasmota/tasmota_template.h +++ b/tasmota/tasmota_template.h @@ -216,6 +216,8 @@ enum UserSelectablePins { GPIO_HPMA_TX, // Honeywell HPMA115S0 Serial interface GPIO_GPS_RX, // GPS serial interface GPIO_GPS_TX, // GPS serial interface + GPIO_LE01MR_RX, // F&F LE-01MR energy meter + GPIO_LE01MR_TX, // F&F LE-01MR energy meter GPIO_SENSOR_END }; // Programmer selectable GPIO functionality @@ -296,7 +298,8 @@ const char kSensorNames[] PROGMEM = D_SENSOR_DEEPSLEEP "|" D_SENSOR_EXS_ENABLE "|" D_SENSOR_SLAVE_TX "|" D_SENSOR_SLAVE_RX "|" D_SENSOR_SLAVE_RESET "|" D_SENSOR_SLAVE_RESET "i|" D_SENSOR_HPMA_RX "|" D_SENSOR_HPMA_TX "|" - D_SENSOR_GPS_RX "|" D_SENSOR_GPS_TX + D_SENSOR_GPS_RX "|" D_SENSOR_GPS_TX "|" + D_SENSOR_LE01MR_RX "|" D_SENSOR_LE01MR_TX ; const char kSensorNamesFixed[] PROGMEM = @@ -676,6 +679,10 @@ const uint8_t kGpioNiceList[] PROGMEM = { GPIO_SOLAXX1_TX, // Solax Inverter tx pin GPIO_SOLAXX1_RX, // Solax Inverter rx pin #endif // USE_SOLAX_X1 +#ifdef USE_LE01MR + GPIO_LE01MR_RX, // F7F LE-01MR energy meter rx pin + GPIO_LE01MR_TX, // F7F LE-01MR energy meter tx pin +#endif // IFDEF:USE_LE01MR #endif // USE_ENERGY_SENSOR // Serial diff --git a/tasmota/xnrg_13_fif_le01mr.ino b/tasmota/xnrg_13_fif_le01mr.ino new file mode 100644 index 000000000..35e975358 --- /dev/null +++ b/tasmota/xnrg_13_fif_le01mr.ino @@ -0,0 +1,290 @@ +/* + xnrg_13_fif_le01mr.ino - F&F LE-01MR energy meter with Modbus interface - support for Tasmota + + Copyright (C) 2020 Przemyslaw Wistuba + + 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_ENERGY_SENSOR +#ifdef USE_LE01MR +/*********************************************************************************************\ + * F&F LE-01MR - This is a single phase energy meter with rs485 modbus interface + * (and bidirectional energy counting - enabled by RS485). + * It measure: Active energy imported AE+ [kWh] , Reactive energy imported RE+ [kvarh], + * Voltage V [V], Current I [A], Frequency F [Hz], power factor (aka "cos-phi"), + * Active power P [kW], Reactive power Q [kvar], Apparent power S [kVA], + * *Active energy exported AE- [kWh] (when meter is switched to bi-directional counting then + * reactive energy imported register contains value of Active energy exported). + * + * Meter descriptions at manufacturer page (english version have some description errors): + * EN: https://www.fif.com.pl/en/usage-electric-power-meters/517-electricity-consumption-meter-le-01mr.html + * PL: https://www.fif.com.pl/pl/liczniki-zuzycia-energii-elektrycznej/517-licznik-zuzycia-energii-le-01mr.html + * + * Register descriptions (not all, only those that are being read): + * + * /----------------------------------- Register address + * | /-------------------------- Registers count + * | | /---------------------- Datatype and size + * | | | /----------------- Resolution (or multiplier) + * | | | | /---------- Unit + * | | | | | /---- Description + * 0x0130 1 U16 0.01 Hz Frequency + * 0x0131 1 U16 0.01 V Voltage + * 0x0139 2 U32 0.001 A Current + * 0x0140 2 U32 0.001 kW Active power + * 0x0148 2 U32 0.001 kvar Reactive power + * 0x0150 2 U32 0.001 kVA Apparent power + * 0x0158 1 S16 0.001 - Power factor + * 0xA000 2 U32 0.01 kWh Active energy imported + * 0xA01E 2 U32 0.01 kvarh Reactive energy imported + * + * Datatype: S = signed int, U = unsigend int, + * U32 - the first (lower) register contains high word, + * second register contains lower word of 32bit dword: + * value_32bit = (register+0)<<16 | (register+1); + * /or/ val32bit = (reg+0)*65536 + (reg+1); +\*********************************************************************************************/ + +#define XNRG_13 13 + +// can be user defined in my_user_config.h +#ifndef LE01MR_SPEED + #define LE01MR_SPEED 2400 // default LE01MR Modbus speed +#endif +// can be user defined in my_user_config.h +#ifndef LE01MR_ADDR + #define LE01MR_ADDR 1 // default LE01MR Modbus address +#endif + +#include +TasmotaModbus *FifLEModbus; + +const uint8_t le01mr_table_sz = 9; + +const uint16_t le01mr_register_addresses[] { + // IDX (reg count/datatype) [unit] + 0x0130, // 00 . LE01MR_FREQUENCY (1/U16) [Hz] + 0x0131, // 01 . LE01MR_VOLTAGE (1/U16) [V] + 0x0158, // 02 . LE01MR_POWER_FACTOR (1/S16) + 0x0139, // 03 . LE01MR_CURRENT (2/U32) [A] + 0x0140, // 04 . LE01MR_ACTIVE_POWER (2/U32) [kW] + 0x0148, // 05 . LE01MR_REACTIVE_POWER (2/U32) [kvar] + 0x0150, // 06 . LE01MR_APPARENT_POWER (2/U32) [kVA] + 0xA000, // 07 . LE01MR_TOTAL_ACTIVE_ENERGY (2/U32) [kWh] + 0xA01E // 08 . LE01MR_TOTAL_REACTIVE_ENERGY (2/U32) [kvarh] +}; + +struct LE01MR { + float total_active = 0; + float total_reactive = 0; + uint8_t read_state = 0; + uint8_t send_retry = 0; + uint8_t start_address_count = le01mr_table_sz; +} Le01mr; + +/*********************************************************************************************/ + +void FifLEEvery250ms(void) +{ + bool data_ready = FifLEModbus->ReceiveReady(); + + if (data_ready) { + uint8_t buffer[14]; // At least 9 + uint8_t reg_count = 2; + if (Le01mr.read_state >= 0 && Le01mr.read_state < 3) { + reg_count=1; + } + + uint32_t error = FifLEModbus->ReceiveBuffer(buffer, reg_count); + + AddLogBuffer(LOG_LEVEL_DEBUG_MORE, buffer, FifLEModbus->ReceiveCount()); + + if (error) { + AddLog_P2(LOG_LEVEL_DEBUG, PSTR("FiF-LE: LE01MR Modbus error %d"), error); + } else { + Energy.data_valid[0] = 0; + + // SA=Slave Address, FC=Function Code, BC=Byte Count, B3..B0=Data byte, Ch Cl = crc16 checksum + // U32 registers: + // 00 01 02 03 04 05 06 07 08 + // SA FC BC B3 B2 B1 B0 Cl Ch + // 01 03 04 00 00 00 72 7A 16 = REG[B3..B2=0x0139,B1..B0=0x013A] 114 = 0.114 A + // 01 03 04 00 00 00 B0 FB 87 = REG[B3..B2=0xA01E,B1..B0=0xA01F] 176 = 1.76 kvarh + // U16/S16 registers: + // 00 01 02 03 04 05 06 + // SA FC BC B1 B0 Cl Ch + // 01 03 02 5B 02 02 B5 = REG[B1..B0=0x0131] 23298 = 232.98 V + // 01 03 02 03 E8 B8 FA = REG[B1..B0=0x0158] 1000 = 1.000 (power factor) + // there are 3 data types used: + // U16 - uint16_t + // U32 - uint32_t + // S16 - int16_t + // everything drop into uint32 value, but depending on register ther will be 2 or 4 bytes + uint32_t value_buff = 0; + // for register table items 0..2 use 2 bytes (U16) + if (Le01mr.read_state >= 0 && Le01mr.read_state < 3) { // + value_buff = ((uint32_t)buffer[3])<<8 | buffer[4]; + //((uint8_t*)&value_buff)[1] = buffer[3]; + //((uint8_t*)&value_buff)[0] = buffer[4]; + } else { + value_buff = ((uint32_t)buffer[3])<<24 | ((uint32_t)buffer[4])<<16 | ((uint32_t)buffer[5])<<8 | buffer[6]; + } + + switch(Le01mr.read_state) { + case 0: + Energy.frequency[0] = value_buff * 0.01f; // 5000 => 50.00 + break; + + case 1: + Energy.voltage[0] = value_buff * 0.01f; // 23298 => 232.98 V + break; + + case 2: + Energy.power_factor[0] = ((int16_t)value_buff) * 0.001f; // 1000 => 1.000 + break; + + case 3: + Energy.current[0] = value_buff * 0.001f; // 114 => 0.114 A + break; + + case 4: + Energy.active_power[0] = value_buff * 0.001f; + break; + + case 5: + Energy.reactive_power[0] = value_buff * 0.001f; + break; + + case 6: + Energy.apparent_power[0] = value_buff * 0.001f; + break; + + case 7: + Le01mr.total_active = value_buff * 0.01f; + break; + + case 8: + Le01mr.total_reactive = value_buff * 0.01f; // 176 => 1.76 + break; + } + + Le01mr.read_state++; + if (Le01mr.read_state == Le01mr.start_address_count) { + Le01mr.read_state = 0; + + EnergyUpdateTotal(Le01mr.total_active, true); + } + } + } // end data ready + + if (0 == Le01mr.send_retry || data_ready) { + uint8_t reg_count = 2; + + Le01mr.send_retry = 5; + // some registers are 1reg in size + if (Le01mr.read_state >= 0 && Le01mr.read_state < 3) reg_count=1; + // send request + AddLog_P2(LOG_LEVEL_DEBUG, PSTR("FiF-LE: LE01MR Modbus req reg %X, count %d"), le01mr_register_addresses[Le01mr.read_state], reg_count); + FifLEModbus->Send(LE01MR_ADDR, 0x03, le01mr_register_addresses[Le01mr.read_state], reg_count); + } else { + Le01mr.send_retry--; + } +} + +void FifLESnsInit(void) +{ + FifLEModbus = new TasmotaModbus(pin[GPIO_LE01MR_RX], pin[GPIO_LE01MR_RX]); + uint8_t result = FifLEModbus->Begin(LE01MR_SPEED); + if (result) { + if (2 == result) { ClaimSerial(); } + } else { + energy_flg = ENERGY_NONE; + } +} + +void FifLEDrvInit(void) +{ + if ((pin[GPIO_LE01MR_RX] < 99) && (pin[GPIO_LE01MR_RX] < 99)) { + energy_flg = XNRG_13; + } +} + +void FifLEReset(void) +{ + Le01mr.total_active = 0; +} + +#ifdef USE_WEBSERVER +const char HTTP_ENERGY_LE01MR[] PROGMEM = + "{s}" D_IMPORT_REACTIVE "{m}%s " D_UNIT_KWARH "{e}"; +#endif // USE_WEBSERVER + +void FifLEShow(bool json) +{ + char total_reactive_chr[FLOATSZ]; + dtostrfd(Le01mr.total_reactive, Settings.flag2.energy_resolution, total_reactive_chr); + + if (json) { + ResponseAppend_P(PSTR(",\"" D_JSON_IMPORT_REACTIVE "\":%s"), + total_reactive_chr); +#ifdef USE_WEBSERVER + } else { + WSContentSend_PD(HTTP_ENERGY_LE01MR, total_reactive_chr); +#endif // USE_WEBSERVER + } +} + +/*********************************************************************************************\ + * Interface +\*********************************************************************************************/ + +#define SLOW_DOWN_X250MS 6 +uint8_t slowdown = SLOW_DOWN_X250MS; + +bool Xnrg13(uint8_t function) +{ + bool result = false; + + switch (function) { + case FUNC_EVERY_250_MSECOND: + if (uptime > 4) { + if (--slowdown == 0) { + FifLEEvery250ms(); + slowdown=SLOW_DOWN_X250MS; + } + } + break; + case FUNC_JSON_APPEND: + FifLEShow(1); + break; +#ifdef USE_WEBSERVER + case FUNC_WEB_SENSOR: + FifLEShow(0); + break; +#endif // USE_WEBSERVER + case FUNC_ENERGY_RESET: + FifLEReset(); + break; + case FUNC_INIT: + FifLESnsInit(); + break; + case FUNC_PRE_INIT: + FifLEDrvInit(); + break; + } + return result; +} + +#endif // USE_LE01MR +#endif // USE_ENERGY_SENSOR From 179a1c549d0f555e7c1c0bf8f39a3fd4b58eb191 Mon Sep 17 00:00:00 2001 From: saper-2 Date: Sun, 5 Jan 2020 14:32:35 +0100 Subject: [PATCH 2/6] Fixed few bugs (multiplers, 0's, etc) --- tasmota/xnrg_13_fif_le01mr.ino | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/tasmota/xnrg_13_fif_le01mr.ino b/tasmota/xnrg_13_fif_le01mr.ino index 35e975358..f5998d95f 100644 --- a/tasmota/xnrg_13_fif_le01mr.ino +++ b/tasmota/xnrg_13_fif_le01mr.ino @@ -102,7 +102,7 @@ void FifLEEvery250ms(void) if (data_ready) { uint8_t buffer[14]; // At least 9 uint8_t reg_count = 2; - if (Le01mr.read_state >= 0 && Le01mr.read_state < 3) { + if (Le01mr.read_state < 3) { reg_count=1; } @@ -141,6 +141,9 @@ void FifLEEvery250ms(void) value_buff = ((uint32_t)buffer[3])<<24 | ((uint32_t)buffer[4])<<16 | ((uint32_t)buffer[5])<<8 | buffer[6]; } + //AddLog_P2(LOG_LEVEL_DEBUG, PSTR("FiF-LE: LE01MR buff[3..6]: %2x %2x %2x %2x"), buffer[3], buffer[4], buffer[5], buffer[6]); + //AddLog_P2(LOG_LEVEL_DEBUG, PSTR("FiF-LE: LE01MR reg_count/value_buff: %d / %d"), reg_count,value_buff); + switch(Le01mr.read_state) { case 0: Energy.frequency[0] = value_buff * 0.01f; // 5000 => 50.00 @@ -159,23 +162,23 @@ void FifLEEvery250ms(void) break; case 4: - Energy.active_power[0] = value_buff * 0.001f; + Energy.active_power[0] = value_buff * 1.0f; // P [W] break; case 5: - Energy.reactive_power[0] = value_buff * 0.001f; + Energy.reactive_power[0] = value_buff * 1.0f; // Q [var] break; case 6: - Energy.apparent_power[0] = value_buff * 0.001f; + Energy.apparent_power[0] = value_buff * 1.0f; // S [VA] break; case 7: - Le01mr.total_active = value_buff * 0.01f; + Le01mr.total_active = value_buff * 0.01f; // [kWh] break; case 8: - Le01mr.total_reactive = value_buff * 0.01f; // 176 => 1.76 + Le01mr.total_reactive = value_buff * 0.01f; // [kvarh] 176 => 1.76 break; } @@ -193,7 +196,7 @@ void FifLEEvery250ms(void) Le01mr.send_retry = 5; // some registers are 1reg in size - if (Le01mr.read_state >= 0 && Le01mr.read_state < 3) reg_count=1; + if (Le01mr.read_state < 3) reg_count=1; // send request AddLog_P2(LOG_LEVEL_DEBUG, PSTR("FiF-LE: LE01MR Modbus req reg %X, count %d"), le01mr_register_addresses[Le01mr.read_state], reg_count); FifLEModbus->Send(LE01MR_ADDR, 0x03, le01mr_register_addresses[Le01mr.read_state], reg_count); @@ -204,7 +207,7 @@ void FifLEEvery250ms(void) void FifLESnsInit(void) { - FifLEModbus = new TasmotaModbus(pin[GPIO_LE01MR_RX], pin[GPIO_LE01MR_RX]); + FifLEModbus = new TasmotaModbus(pin[GPIO_LE01MR_RX], pin[GPIO_LE01MR_TX]); uint8_t result = FifLEModbus->Begin(LE01MR_SPEED); if (result) { if (2 == result) { ClaimSerial(); } @@ -249,7 +252,8 @@ void FifLEShow(bool json) * Interface \*********************************************************************************************/ -#define SLOW_DOWN_X250MS 6 +// just to slow down tramitter (for deug purpouses) +#define SLOW_DOWN_X250MS 1 uint8_t slowdown = SLOW_DOWN_X250MS; bool Xnrg13(uint8_t function) From f2ca1f3e47b9434ff84143cecb215b8a71ce0cf1 Mon Sep 17 00:00:00 2001 From: saper-2 Date: Sun, 5 Jan 2020 19:51:12 +0100 Subject: [PATCH 3/6] Added totalActive from le01, more code tunning --- tasmota/i18n.h | 1 + tasmota/language/en-GB.h | 3 ++- tasmota/my_user_config.h | 6 +++--- tasmota/xnrg_13_fif_le01mr.ino | 31 ++++++++++++++++++++----------- 4 files changed, 26 insertions(+), 15 deletions(-) diff --git a/tasmota/i18n.h b/tasmota/i18n.h index fb54edd4a..67a262b75 100644 --- a/tasmota/i18n.h +++ b/tasmota/i18n.h @@ -183,6 +183,7 @@ #define D_JSON_SOLAR_POWER "SolarPower" #define D_JSON_USAGE "Usage" #define D_JSON_EXPORT "Export" +#define D_JSON_TOTAL_ACTIVE "TotalActive" #define D_RSLT_ENERGY "ENERGY" #define D_RSLT_HASS_STATE "HASS_STATE" diff --git a/tasmota/language/en-GB.h b/tasmota/language/en-GB.h index 7c68553a4..163a46b87 100644 --- a/tasmota/language/en-GB.h +++ b/tasmota/language/en-GB.h @@ -671,7 +671,7 @@ #define D_UNIT_WATTHOUR "Wh" #define D_UNIT_WATT_METER_QUADRAT "W/m²" -//SDM220 +//SDM220, SDM120, LE01MR #define D_PHASE_ANGLE "Phase Angle" #define D_IMPORT_ACTIVE "Import Active" #define D_EXPORT_ACTIVE "Export Active" @@ -680,6 +680,7 @@ #define D_TOTAL_REACTIVE "Total Reactive" #define D_UNIT_KWARH "kVArh" #define D_UNIT_ANGLE "Deg" +#define D_TOTAL_ACTIVE "Total Active" //SOLAXX1 #define D_PV1_VOLTAGE "PV1 Voltage" diff --git a/tasmota/my_user_config.h b/tasmota/my_user_config.h index 18e48992f..85d6737e9 100644 --- a/tasmota/my_user_config.h +++ b/tasmota/my_user_config.h @@ -498,9 +498,9 @@ //#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 meter - //#define LE01MR_SPEED 2400 // LE-01MR modbus baudrate (2400 default) - //#define LE01MR_ADDR 0x01 // LE-01MR modbus address (0x01 default) +//#define USE_LE01MR // Add support for F&F LE-01MR modbus energy meter + #define LE01MR_SPEED 2400 // LE-01MR modbus baudrate (2400 default) + #define LE01MR_ADDR 1 // LE-01MR modbus address (0x01 default) // -- Low level interface devices ----------------- #define USE_DHT // Add support for DHT11, AM2301 (DHT21, DHT22, AM2302, AM2321) and SI7021 Temperature and Humidity sensor (1k6 code) diff --git a/tasmota/xnrg_13_fif_le01mr.ino b/tasmota/xnrg_13_fif_le01mr.ino index f5998d95f..3ca424d66 100644 --- a/tasmota/xnrg_13_fif_le01mr.ino +++ b/tasmota/xnrg_13_fif_le01mr.ino @@ -198,7 +198,7 @@ void FifLEEvery250ms(void) // some registers are 1reg in size if (Le01mr.read_state < 3) reg_count=1; // send request - AddLog_P2(LOG_LEVEL_DEBUG, PSTR("FiF-LE: LE01MR Modbus req reg %X, count %d"), le01mr_register_addresses[Le01mr.read_state], reg_count); + //AddLog_P2(LOG_LEVEL_DEBUG, PSTR("FiF-LE: LE01MR Modbus req reg %X, count %d"), le01mr_register_addresses[Le01mr.read_state], reg_count); FifLEModbus->Send(LE01MR_ADDR, 0x03, le01mr_register_addresses[Le01mr.read_state], reg_count); } else { Le01mr.send_retry--; @@ -226,24 +226,30 @@ void FifLEDrvInit(void) void FifLEReset(void) { Le01mr.total_active = 0; + Le01mr.total_reactive = 0; } #ifdef USE_WEBSERVER const char HTTP_ENERGY_LE01MR[] PROGMEM = - "{s}" D_IMPORT_REACTIVE "{m}%s " D_UNIT_KWARH "{e}"; + "{s}" D_TOTAL_ACTIVE "{m}%s " D_UNIT_KILOWATTHOUR "{e}" + "{s}" D_TOTAL_REACTIVE "{m}%s " D_UNIT_KWARH "{e}" + ; #endif // USE_WEBSERVER void FifLEShow(bool json) { char total_reactive_chr[FLOATSZ]; dtostrfd(Le01mr.total_reactive, Settings.flag2.energy_resolution, total_reactive_chr); + char total_active_chr[FLOATSZ]; + dtostrfd(Le01mr.total_active, Settings.flag2.energy_resolution, total_active_chr); + if (json) { - ResponseAppend_P(PSTR(",\"" D_JSON_IMPORT_REACTIVE "\":%s"), - total_reactive_chr); + ResponseAppend_P(PSTR(",\"" D_JSON_TOTAL_ACTIVE "\":%s,\"" D_JSON_TOTAL_REACTIVE "\":%s"), + total_active_chr, total_reactive_chr); #ifdef USE_WEBSERVER } else { - WSContentSend_PD(HTTP_ENERGY_LE01MR, total_reactive_chr); + WSContentSend_PD(HTTP_ENERGY_LE01MR, total_active_chr, total_reactive_chr); #endif // USE_WEBSERVER } } @@ -253,20 +259,23 @@ void FifLEShow(bool json) \*********************************************************************************************/ // just to slow down tramitter (for deug purpouses) -#define SLOW_DOWN_X250MS 1 -uint8_t slowdown = SLOW_DOWN_X250MS; +//#define SLOW_DOWN_X250MS 1 +//uint8_t slowdown = SLOW_DOWN_X250MS; bool Xnrg13(uint8_t function) { bool result = false; switch (function) { + // TODO: Verify if there is corrleaction with 250ms scan time, + // and MQTT breaking connection and causing exception in ESP8266 after few minutes + // test with "FUNC_EVERY_SECOND" case FUNC_EVERY_250_MSECOND: - if (uptime > 4) { - if (--slowdown == 0) { + if (uptime > 4) { + //if (--slowdown == 0) { FifLEEvery250ms(); - slowdown=SLOW_DOWN_X250MS; - } + // slowdown=SLOW_DOWN_X250MS; + //} } break; case FUNC_JSON_APPEND: From f145d22e90df65b3750ba643fa26dfe68ee57635 Mon Sep 17 00:00:00 2001 From: saper-2 Date: Sun, 5 Jan 2020 22:09:00 +0100 Subject: [PATCH 4/6] A bit more of code cleanup --- tasmota/xnrg_13_fif_le01mr.ino | 17 +++-------------- 1 file changed, 3 insertions(+), 14 deletions(-) diff --git a/tasmota/xnrg_13_fif_le01mr.ino b/tasmota/xnrg_13_fif_le01mr.ino index 3ca424d66..342e8cf17 100644 --- a/tasmota/xnrg_13_fif_le01mr.ino +++ b/tasmota/xnrg_13_fif_le01mr.ino @@ -113,6 +113,7 @@ void FifLEEvery250ms(void) if (error) { AddLog_P2(LOG_LEVEL_DEBUG, PSTR("FiF-LE: LE01MR Modbus error %d"), error); } else { + //if (Le01mr.read_state == 0) Energy.data_valid[0] = 0; // SA=Slave Address, FC=Function Code, BC=Byte Count, B3..B0=Data byte, Ch Cl = crc16 checksum @@ -135,8 +136,6 @@ void FifLEEvery250ms(void) // for register table items 0..2 use 2 bytes (U16) if (Le01mr.read_state >= 0 && Le01mr.read_state < 3) { // value_buff = ((uint32_t)buffer[3])<<8 | buffer[4]; - //((uint8_t*)&value_buff)[1] = buffer[3]; - //((uint8_t*)&value_buff)[0] = buffer[4]; } else { value_buff = ((uint32_t)buffer[3])<<24 | ((uint32_t)buffer[4])<<16 | ((uint32_t)buffer[5])<<8 | buffer[6]; } @@ -154,7 +153,7 @@ void FifLEEvery250ms(void) break; case 2: - Energy.power_factor[0] = ((int16_t)value_buff) * 0.001f; // 1000 => 1.000 + Energy.power_factor[0] = ((int16_t)value_buff) * 0.001f; // 1000 => 1.000 //note: I never saw this negative... break; case 3: @@ -218,7 +217,7 @@ void FifLESnsInit(void) void FifLEDrvInit(void) { - if ((pin[GPIO_LE01MR_RX] < 99) && (pin[GPIO_LE01MR_RX] < 99)) { + if ((pin[GPIO_LE01MR_RX] < 99) && (pin[GPIO_LE01MR_TX] < 99)) { energy_flg = XNRG_13; } } @@ -258,24 +257,14 @@ void FifLEShow(bool json) * Interface \*********************************************************************************************/ -// just to slow down tramitter (for deug purpouses) -//#define SLOW_DOWN_X250MS 1 -//uint8_t slowdown = SLOW_DOWN_X250MS; - bool Xnrg13(uint8_t function) { bool result = false; switch (function) { - // TODO: Verify if there is corrleaction with 250ms scan time, - // and MQTT breaking connection and causing exception in ESP8266 after few minutes - // test with "FUNC_EVERY_SECOND" case FUNC_EVERY_250_MSECOND: if (uptime > 4) { - //if (--slowdown == 0) { FifLEEvery250ms(); - // slowdown=SLOW_DOWN_X250MS; - //} } break; case FUNC_JSON_APPEND: From ad083d1675003e20ed5cf9ec16e1cf7e78d0e74c Mon Sep 17 00:00:00 2001 From: saper-2 Date: Thu, 23 Jan 2020 16:13:25 +0100 Subject: [PATCH 5/6] Some code cleanup and add comments & info --- tasmota/my_user_config.h | 2 +- tasmota/xnrg_13_fif_le01mr.ino | 18 ++++++++++++------ 2 files changed, 13 insertions(+), 7 deletions(-) diff --git a/tasmota/my_user_config.h b/tasmota/my_user_config.h index 85d6737e9..8a709c2dd 100644 --- a/tasmota/my_user_config.h +++ b/tasmota/my_user_config.h @@ -499,7 +499,7 @@ #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 meter - #define LE01MR_SPEED 2400 // LE-01MR modbus baudrate (2400 default) + #define LE01MR_SPEED 2400 // LE-01MR modbus baudrate (9600 default) (+2k code, +36 RAM) #define LE01MR_ADDR 1 // LE-01MR modbus address (0x01 default) // -- Low level interface devices ----------------- #define USE_DHT // Add support for DHT11, AM2301 (DHT21, DHT22, AM2302, AM2321) and SI7021 Temperature and Humidity sensor (1k6 code) diff --git a/tasmota/xnrg_13_fif_le01mr.ino b/tasmota/xnrg_13_fif_le01mr.ino index 342e8cf17..e99041c9c 100644 --- a/tasmota/xnrg_13_fif_le01mr.ino +++ b/tasmota/xnrg_13_fif_le01mr.ino @@ -23,7 +23,7 @@ * (and bidirectional energy counting - enabled by RS485). * It measure: Active energy imported AE+ [kWh] , Reactive energy imported RE+ [kvarh], * Voltage V [V], Current I [A], Frequency F [Hz], power factor (aka "cos-phi"), - * Active power P [kW], Reactive power Q [kvar], Apparent power S [kVA], + * Active power P [kW], Reactive power Q [kVAr], Apparent power S [kVA], * *Active energy exported AE- [kWh] (when meter is switched to bi-directional counting then * reactive energy imported register contains value of Active energy exported). * @@ -31,6 +31,12 @@ * EN: https://www.fif.com.pl/en/usage-electric-power-meters/517-electricity-consumption-meter-le-01mr.html * PL: https://www.fif.com.pl/pl/liczniki-zuzycia-energii-elektrycznej/517-licznik-zuzycia-energii-le-01mr.html * + * Note about communication settings: The meter must be reconfigured to use baudrate 2400 (or 9600) *without* + * parity bit - by default the meter is configured to 9600 8E1 + * (Frame format: "EVEN 1") . To make those changes, use LE-Config + * software (can be found in download tab in product page - link above) + * and USB-RS485 dongle (those cheap ~2$ from ali works fine) + * * Register descriptions (not all, only those that are being read): * * /----------------------------------- Register address @@ -54,6 +60,11 @@ * second register contains lower word of 32bit dword: * value_32bit = (register+0)<<16 | (register+1); * /or/ val32bit = (reg+0)*65536 + (reg+1); + * + * Note about MQTT/JSON: In fields "ENERGY.TotalActive" and "ENERGY.TotalReactive" there are + * counters values directly from the meter (without Tasmota calculation, + * energy used calculated by Tasmota is in Total/Today fields ). + * Filed "ENERGY.Period" is always zero. \*********************************************************************************************/ #define XNRG_13 13 @@ -113,7 +124,6 @@ void FifLEEvery250ms(void) if (error) { AddLog_P2(LOG_LEVEL_DEBUG, PSTR("FiF-LE: LE01MR Modbus error %d"), error); } else { - //if (Le01mr.read_state == 0) Energy.data_valid[0] = 0; // SA=Slave Address, FC=Function Code, BC=Byte Count, B3..B0=Data byte, Ch Cl = crc16 checksum @@ -140,9 +150,6 @@ void FifLEEvery250ms(void) value_buff = ((uint32_t)buffer[3])<<24 | ((uint32_t)buffer[4])<<16 | ((uint32_t)buffer[5])<<8 | buffer[6]; } - //AddLog_P2(LOG_LEVEL_DEBUG, PSTR("FiF-LE: LE01MR buff[3..6]: %2x %2x %2x %2x"), buffer[3], buffer[4], buffer[5], buffer[6]); - //AddLog_P2(LOG_LEVEL_DEBUG, PSTR("FiF-LE: LE01MR reg_count/value_buff: %d / %d"), reg_count,value_buff); - switch(Le01mr.read_state) { case 0: Energy.frequency[0] = value_buff * 0.01f; // 5000 => 50.00 @@ -197,7 +204,6 @@ void FifLEEvery250ms(void) // some registers are 1reg in size if (Le01mr.read_state < 3) reg_count=1; // send request - //AddLog_P2(LOG_LEVEL_DEBUG, PSTR("FiF-LE: LE01MR Modbus req reg %X, count %d"), le01mr_register_addresses[Le01mr.read_state], reg_count); FifLEModbus->Send(LE01MR_ADDR, 0x03, le01mr_register_addresses[Le01mr.read_state], reg_count); } else { Le01mr.send_retry--; From e26999f3006673933313c669f4dfb8b41cc558c0 Mon Sep 17 00:00:00 2001 From: saper-2 Date: Thu, 23 Jan 2020 17:18:44 +0100 Subject: [PATCH 6/6] Updated lang files with new defines + comments --- tasmota/language/bg-BG.h | 5 ++++- tasmota/language/cs-CZ.h | 5 ++++- tasmota/language/de-DE.h | 5 ++++- tasmota/language/el-GR.h | 5 ++++- tasmota/language/es-ES.h | 5 ++++- tasmota/language/fr-FR.h | 5 ++++- tasmota/language/he-HE.h | 5 ++++- tasmota/language/hu-HU.h | 5 ++++- tasmota/language/it-IT.h | 5 ++++- tasmota/language/ko-KO.h | 5 ++++- tasmota/language/nl-NL.h | 5 ++++- tasmota/language/pl-PL.h | 5 ++++- tasmota/language/pt-BR.h | 5 ++++- tasmota/language/pt-PT.h | 5 ++++- tasmota/language/ru-RU.h | 5 ++++- tasmota/language/sk-SK.h | 5 ++++- tasmota/language/sv-SE.h | 5 ++++- tasmota/language/tr-TR.h | 5 ++++- tasmota/language/uk-UA.h | 5 ++++- tasmota/language/zh-CN.h | 5 ++++- tasmota/language/zh-TW.h | 5 ++++- tasmota/my_user_config.h | 2 +- tasmota/tasmota_post.h | 10 +++++----- 23 files changed, 90 insertions(+), 27 deletions(-) diff --git a/tasmota/language/bg-BG.h b/tasmota/language/bg-BG.h index 8f1c82bc3..b91a2e6e4 100644 --- a/tasmota/language/bg-BG.h +++ b/tasmota/language/bg-BG.h @@ -634,6 +634,8 @@ #define D_SENSOR_SLAVE_RESET "Slave RST" #define D_SENSOR_GPS_RX "GPS RX" #define D_SENSOR_GPS_TX "GPS TX" +#define D_SENSOR_LE01MR_RX "LE-01MR Rx" +#define D_SENSOR_LE01MR_TX "LE-01MR Tx" // Units #define D_UNIT_AMPERE "A" @@ -669,7 +671,7 @@ #define D_UNIT_WATTHOUR "Wh" #define D_UNIT_WATT_METER_QUADRAT "W/m²" -//SDM220 +//SDM220, SDM120, LE01MR #define D_PHASE_ANGLE "Фазов ъгъл" #define D_IMPORT_ACTIVE "Входна активна мощност" #define D_EXPORT_ACTIVE "Изходна активна мощност" @@ -678,6 +680,7 @@ #define D_TOTAL_REACTIVE "Общо реактивна мощност" #define D_UNIT_KWARH "kVArh" #define D_UNIT_ANGLE "°" +#define D_TOTAL_ACTIVE "Total Active" //SOLAXX1 #define D_PV1_VOLTAGE "Напрежение на PV1" diff --git a/tasmota/language/cs-CZ.h b/tasmota/language/cs-CZ.h index 3b11a7ebc..4bf6a8355 100644 --- a/tasmota/language/cs-CZ.h +++ b/tasmota/language/cs-CZ.h @@ -634,6 +634,8 @@ #define D_SENSOR_SLAVE_RESET "Slave RST" #define D_SENSOR_GPS_RX "GPS RX" #define D_SENSOR_GPS_TX "GPS TX" +#define D_SENSOR_LE01MR_RX "LE-01MR Rx" +#define D_SENSOR_LE01MR_TX "LE-01MR Tx" // Units #define D_UNIT_AMPERE "A" @@ -669,7 +671,7 @@ #define D_UNIT_WATTHOUR "Wh" #define D_UNIT_WATT_METER_QUADRAT "W/m²" -//SDM220 +//SDM220, SDM120, LE01MR #define D_PHASE_ANGLE "Phase Angle" #define D_IMPORT_ACTIVE "Import Active" #define D_EXPORT_ACTIVE "Export Active" @@ -678,6 +680,7 @@ #define D_TOTAL_REACTIVE "Total Reactive" #define D_UNIT_KWARH "kVArh" #define D_UNIT_ANGLE "Deg" +#define D_TOTAL_ACTIVE "Total Active" //SOLAXX1 #define D_PV1_VOLTAGE "PV1 Voltage" diff --git a/tasmota/language/de-DE.h b/tasmota/language/de-DE.h index e09278526..944ce7123 100644 --- a/tasmota/language/de-DE.h +++ b/tasmota/language/de-DE.h @@ -634,6 +634,8 @@ #define D_SENSOR_SLAVE_RESET "Slave RST" #define D_SENSOR_GPS_RX "GPS RX" #define D_SENSOR_GPS_TX "GPS TX" +#define D_SENSOR_LE01MR_RX "LE-01MR Rx" +#define D_SENSOR_LE01MR_TX "LE-01MR Tx" // Units #define D_UNIT_AMPERE "A" @@ -669,7 +671,7 @@ #define D_UNIT_WATTHOUR "Wh" #define D_UNIT_WATT_METER_QUADRAT "W/m²" -//SDM220 +//SDM220, SDM120, LE01MR #define D_PHASE_ANGLE "Phasenwinkel" #define D_IMPORT_ACTIVE "Importiere Wirk" #define D_EXPORT_ACTIVE "Exportiere Wirk" @@ -678,6 +680,7 @@ #define D_TOTAL_REACTIVE "Total Blind" #define D_UNIT_KWARH "kVArh" #define D_UNIT_ANGLE "Grad" +#define D_TOTAL_ACTIVE "Total Active" //SOLAXX1 #define D_PV1_VOLTAGE "PV1 Spannung" diff --git a/tasmota/language/el-GR.h b/tasmota/language/el-GR.h index 070267215..82def9666 100644 --- a/tasmota/language/el-GR.h +++ b/tasmota/language/el-GR.h @@ -634,6 +634,8 @@ #define D_SENSOR_SLAVE_RESET "Slave RST" #define D_SENSOR_GPS_RX "GPS RX" #define D_SENSOR_GPS_TX "GPS TX" +#define D_SENSOR_LE01MR_RX "LE-01MR Rx" +#define D_SENSOR_LE01MR_TX "LE-01MR Tx" // Units #define D_UNIT_AMPERE "A" @@ -669,7 +671,7 @@ #define D_UNIT_WATTHOUR "Wh" #define D_UNIT_WATT_METER_QUADRAT "W/m²" -//SDM220 +//SDM220, SDM120, LE01MR #define D_PHASE_ANGLE "Phase Angle" #define D_IMPORT_ACTIVE "Import Active" #define D_EXPORT_ACTIVE "Export Active" @@ -678,6 +680,7 @@ #define D_TOTAL_REACTIVE "Total Reactive" #define D_UNIT_KWARH "kVArh" #define D_UNIT_ANGLE "Deg" +#define D_TOTAL_ACTIVE "Total Active" //SOLAXX1 #define D_PV1_VOLTAGE "PV1 Voltage" diff --git a/tasmota/language/es-ES.h b/tasmota/language/es-ES.h index 8ff2b415f..48d0f26e0 100644 --- a/tasmota/language/es-ES.h +++ b/tasmota/language/es-ES.h @@ -634,6 +634,8 @@ #define D_SENSOR_SLAVE_RESET "Slave RST" #define D_SENSOR_GPS_RX "GPS RX" #define D_SENSOR_GPS_TX "GPS TX" +#define D_SENSOR_LE01MR_RX "LE-01MR Rx" +#define D_SENSOR_LE01MR_TX "LE-01MR Tx" // Units #define D_UNIT_AMPERE "A" @@ -669,7 +671,7 @@ #define D_UNIT_WATTHOUR "Wh" #define D_UNIT_WATT_METER_QUADRAT "W/m²" -//SDM220 +//SDM220, SDM120, LE01MR #define D_PHASE_ANGLE "Ángulo de Fase" #define D_IMPORT_ACTIVE "P. Activa Entrante" #define D_EXPORT_ACTIVE "P. Activa Saliente" @@ -678,6 +680,7 @@ #define D_TOTAL_REACTIVE "P. Reactiva Total" #define D_UNIT_KWARH "kVArH" #define D_UNIT_ANGLE "Grados" +#define D_TOTAL_ACTIVE "Total Active" //SOLAXX1 #define D_PV1_VOLTAGE "PV1 Voltaje" diff --git a/tasmota/language/fr-FR.h b/tasmota/language/fr-FR.h index 3829a8681..c5f7dcc38 100644 --- a/tasmota/language/fr-FR.h +++ b/tasmota/language/fr-FR.h @@ -634,6 +634,8 @@ #define D_SENSOR_SLAVE_RESET "Esclave Rst" #define D_SENSOR_GPS_TX "GPS TX" #define D_SENSOR_GPS_RX "GPS RX" +#define D_SENSOR_LE01MR_RX "LE-01MR Rx" +#define D_SENSOR_LE01MR_TX "LE-01MR Tx" // Units #define D_UNIT_AMPERE "A" @@ -669,7 +671,7 @@ #define D_UNIT_WATTHOUR "Wh" #define D_UNIT_WATT_METER_QUADRAT "W/m²" -//SDM220 +//SDM220, SDM120, LE01MR #define D_PHASE_ANGLE "Angle de phase" #define D_IMPORT_ACTIVE "Énergie act conso" #define D_EXPORT_ACTIVE "Énergie act fournie" @@ -678,6 +680,7 @@ #define D_TOTAL_REACTIVE "Énergie réa totale" #define D_UNIT_KWARH "kVArh" #define D_UNIT_ANGLE "°" +#define D_TOTAL_ACTIVE "Total Active" //SOLAXX1 #define D_PV1_VOLTAGE "Tension PV1" diff --git a/tasmota/language/he-HE.h b/tasmota/language/he-HE.h index d0c5e364b..491e85192 100644 --- a/tasmota/language/he-HE.h +++ b/tasmota/language/he-HE.h @@ -634,6 +634,8 @@ #define D_SENSOR_SLAVE_RESET "Slave RST" #define D_SENSOR_GPS_RX "GPS RX" #define D_SENSOR_GPS_TX "GPS TX" +#define D_SENSOR_LE01MR_RX "LE-01MR Rx" +#define D_SENSOR_LE01MR_TX "LE-01MR Tx" // Units #define D_UNIT_AMPERE "A" @@ -669,7 +671,7 @@ #define D_UNIT_WATTHOUR "Wh" #define D_UNIT_WATT_METER_QUADRAT "W/m²" -//SDM220 +//SDM220, SDM120, LE01MR #define D_PHASE_ANGLE "Phase Angle" #define D_IMPORT_ACTIVE "Import Active" #define D_EXPORT_ACTIVE "Export Active" @@ -678,6 +680,7 @@ #define D_TOTAL_REACTIVE "Total Reactive" #define D_UNIT_KWARH "kVArh" #define D_UNIT_ANGLE "Deg" +#define D_TOTAL_ACTIVE "Total Active" //SOLAXX1 #define D_PV1_VOLTAGE "PV1 Voltage" diff --git a/tasmota/language/hu-HU.h b/tasmota/language/hu-HU.h index 70f219c98..eb0b6d6b4 100644 --- a/tasmota/language/hu-HU.h +++ b/tasmota/language/hu-HU.h @@ -634,6 +634,8 @@ #define D_SENSOR_SLAVE_RESET "Slave RST" #define D_SENSOR_GPS_RX "GPS RX" #define D_SENSOR_GPS_TX "GPS TX" +#define D_SENSOR_LE01MR_RX "LE-01MR Rx" +#define D_SENSOR_LE01MR_TX "LE-01MR Tx" // Units #define D_UNIT_AMPERE "A" @@ -669,7 +671,7 @@ #define D_UNIT_WATTHOUR "Wh" #define D_UNIT_WATT_METER_QUADRAT "W/m²" -//SDM220 +//SDM220, SDM120, LE01MR #define D_PHASE_ANGLE "Fázisszög" #define D_IMPORT_ACTIVE "Bejövő aktív" #define D_EXPORT_ACTIVE "Kimenő aktív" @@ -678,6 +680,7 @@ #define D_TOTAL_REACTIVE "Összes reaktív" #define D_UNIT_KWARH "kVArh" #define D_UNIT_ANGLE "fok" +#define D_TOTAL_ACTIVE "Total Active" //SOLAXX1 #define D_PV1_VOLTAGE "PV1 Voltage" diff --git a/tasmota/language/it-IT.h b/tasmota/language/it-IT.h index 73830deca..a5255e9ed 100644 --- a/tasmota/language/it-IT.h +++ b/tasmota/language/it-IT.h @@ -634,6 +634,8 @@ #define D_SENSOR_SLAVE_RESET "Slave RST" #define D_SENSOR_GPS_RX "GPS RX" #define D_SENSOR_GPS_TX "GPS TX" +#define D_SENSOR_LE01MR_RX "LE-01MR Rx" +#define D_SENSOR_LE01MR_TX "LE-01MR Tx" // Units #define D_UNIT_AMPERE "A" @@ -669,7 +671,7 @@ #define D_UNIT_WATTHOUR "Wh" #define D_UNIT_WATT_METER_QUADRAT "W/m²" -//SDM220 +//SDM220, SDM120, LE01MR #define D_PHASE_ANGLE "Angolo Fase" #define D_IMPORT_ACTIVE "Potenza Attiva Importata" #define D_EXPORT_ACTIVE "Potenza Attiva Esportata" @@ -678,6 +680,7 @@ #define D_TOTAL_REACTIVE "Potenza Reattiva Totale" #define D_UNIT_KWARH "kVArh" #define D_UNIT_ANGLE "°" +#define D_TOTAL_ACTIVE "Total Active" //SOLAXX1 #define D_PV1_VOLTAGE "PV1 Voltaggio" diff --git a/tasmota/language/ko-KO.h b/tasmota/language/ko-KO.h index 328acc568..036f4adbb 100644 --- a/tasmota/language/ko-KO.h +++ b/tasmota/language/ko-KO.h @@ -634,6 +634,8 @@ #define D_SENSOR_SLAVE_RESET "Slave RST" #define D_SENSOR_GPS_RX "GPS RX" #define D_SENSOR_GPS_TX "GPS TX" +#define D_SENSOR_LE01MR_RX "LE-01MR Rx" +#define D_SENSOR_LE01MR_TX "LE-01MR Tx" // Units #define D_UNIT_AMPERE "A" @@ -669,7 +671,7 @@ #define D_UNIT_WATTHOUR "Wh" #define D_UNIT_WATT_METER_QUADRAT "W/m²" -//SDM220 +//SDM220, SDM120, LE01MR #define D_PHASE_ANGLE "Phase Angle" #define D_IMPORT_ACTIVE "Import Active" #define D_EXPORT_ACTIVE "Export Active" @@ -678,6 +680,7 @@ #define D_TOTAL_REACTIVE "Total Reactive" #define D_UNIT_KWARH "kVArh" #define D_UNIT_ANGLE "Deg" +#define D_TOTAL_ACTIVE "Total Active" //SOLAXX1 #define D_PV1_VOLTAGE "PV1 Voltage" diff --git a/tasmota/language/nl-NL.h b/tasmota/language/nl-NL.h index 3d5ec8b7d..de15f5d05 100644 --- a/tasmota/language/nl-NL.h +++ b/tasmota/language/nl-NL.h @@ -634,6 +634,8 @@ #define D_SENSOR_SLAVE_RESET "Slave RST" #define D_SENSOR_GPS_RX "GPS RX" #define D_SENSOR_GPS_TX "GPS TX" +#define D_SENSOR_LE01MR_RX "LE-01MR Rx" +#define D_SENSOR_LE01MR_TX "LE-01MR Tx" // Units #define D_UNIT_AMPERE "A" @@ -669,7 +671,7 @@ #define D_UNIT_WATTHOUR "Wh" #define D_UNIT_WATT_METER_QUADRAT "W/m²" -//SDM220 +//SDM220, SDM120, LE01MR #define D_PHASE_ANGLE "Fase hoek" #define D_IMPORT_ACTIVE "Import werkelijk" #define D_EXPORT_ACTIVE "Export werkelijk" @@ -678,6 +680,7 @@ #define D_TOTAL_REACTIVE "Totaal blind" #define D_UNIT_KWARH "kVArh" #define D_UNIT_ANGLE "Deg" +#define D_TOTAL_ACTIVE "Total Active" //SOLAXX1 #define D_PV1_VOLTAGE "PV1 spanning" diff --git a/tasmota/language/pl-PL.h b/tasmota/language/pl-PL.h index 63fe6fcad..ac2da9524 100644 --- a/tasmota/language/pl-PL.h +++ b/tasmota/language/pl-PL.h @@ -634,6 +634,8 @@ #define D_SENSOR_SLAVE_RESET "Slave RST" #define D_SENSOR_GPS_RX "GPS RX" #define D_SENSOR_GPS_TX "GPS TX" +#define D_SENSOR_LE01MR_RX "LE-01MR Rx" +#define D_SENSOR_LE01MR_TX "LE-01MR Tx" // Units #define D_UNIT_AMPERE "A" @@ -669,7 +671,7 @@ #define D_UNIT_WATTHOUR "Wh" #define D_UNIT_WATT_METER_QUADRAT "W/m²" -//SDM220 +//SDM220, SDM120, LE01MR #define D_PHASE_ANGLE "Przesunięcie faz" #define D_IMPORT_ACTIVE "Czynna pobrana" #define D_EXPORT_ACTIVE "Czynna oddana" @@ -678,6 +680,7 @@ #define D_TOTAL_REACTIVE "Bierna całkowita" #define D_UNIT_KWARH "kVArh" #define D_UNIT_ANGLE "Deg" +#define D_TOTAL_ACTIVE "Całkowita czynna" //SOLAXX1 #define D_PV1_VOLTAGE "Napięcie PV1" diff --git a/tasmota/language/pt-BR.h b/tasmota/language/pt-BR.h index da6e8ca1b..6695e144d 100644 --- a/tasmota/language/pt-BR.h +++ b/tasmota/language/pt-BR.h @@ -634,6 +634,8 @@ #define D_SENSOR_SLAVE_RESET "Slave RST" #define D_SENSOR_GPS_RX "GPS RX" #define D_SENSOR_GPS_TX "GPS TX" +#define D_SENSOR_LE01MR_RX "LE-01MR Rx" +#define D_SENSOR_LE01MR_TX "LE-01MR Tx" // Units #define D_UNIT_AMPERE "A" @@ -669,7 +671,7 @@ #define D_UNIT_WATTHOUR "W/h" #define D_UNIT_WATT_METER_QUADRAT "W/m²" -//SDM220 +//SDM220, SDM120, LE01MR #define D_PHASE_ANGLE "Ângulo de Fase" #define D_IMPORT_ACTIVE "Importar Ativo" #define D_EXPORT_ACTIVE "Exportar Ativo" @@ -678,6 +680,7 @@ #define D_TOTAL_REACTIVE "Reativo total" #define D_UNIT_KWARH "kVArh" #define D_UNIT_ANGLE "Deg" +#define D_TOTAL_ACTIVE "Total Active" //SOLAXX1 #define D_PV1_VOLTAGE "PV1 Voltagem" diff --git a/tasmota/language/pt-PT.h b/tasmota/language/pt-PT.h index 47137b90b..53e31cb5a 100644 --- a/tasmota/language/pt-PT.h +++ b/tasmota/language/pt-PT.h @@ -634,6 +634,8 @@ #define D_SENSOR_SLAVE_RESET "Slave RST" #define D_SENSOR_GPS_RX "GPS RX" #define D_SENSOR_GPS_TX "GPS TX" +#define D_SENSOR_LE01MR_RX "LE-01MR Rx" +#define D_SENSOR_LE01MR_TX "LE-01MR Tx" // Units #define D_UNIT_AMPERE "A" @@ -669,7 +671,7 @@ #define D_UNIT_WATTHOUR "Wh" #define D_UNIT_WATT_METER_QUADRAT "W/m²" -//SDM220 +//SDM220, SDM120, LE01MR #define D_PHASE_ANGLE "Ângulo de fase" #define D_IMPORT_ACTIVE "Ativo importado" #define D_EXPORT_ACTIVE "Ativo exportado" @@ -678,6 +680,7 @@ #define D_TOTAL_REACTIVE "Reactivo total" #define D_UNIT_KWARH "kVArh" #define D_UNIT_ANGLE "Deg" +#define D_TOTAL_ACTIVE "Total Active" //SOLAXX1 #define D_PV1_VOLTAGE "Voltagem PV1" diff --git a/tasmota/language/ru-RU.h b/tasmota/language/ru-RU.h index 31c295059..3cf388240 100644 --- a/tasmota/language/ru-RU.h +++ b/tasmota/language/ru-RU.h @@ -634,6 +634,8 @@ #define D_SENSOR_SLAVE_RESET "Slave RST" #define D_SENSOR_GPS_RX "GPS RX" #define D_SENSOR_GPS_TX "GPS TX" +#define D_SENSOR_LE01MR_RX "LE-01MR Rx" +#define D_SENSOR_LE01MR_TX "LE-01MR Tx" // Units #define D_UNIT_AMPERE "А" @@ -669,7 +671,7 @@ #define D_UNIT_WATTHOUR "ВтЧ" #define D_UNIT_WATT_METER_QUADRAT "W/m²" -//SDM220 +//SDM220, SDM120, LE01MR #define D_PHASE_ANGLE "Угол фазы" #define D_IMPORT_ACTIVE "Импорт активной мощности" #define D_EXPORT_ACTIVE "Экспорт активной мощности" @@ -678,6 +680,7 @@ #define D_TOTAL_REACTIVE "Итого реактивная мощность" #define D_UNIT_KWARH "kVArh" #define D_UNIT_ANGLE "Град" +#define D_TOTAL_ACTIVE "Total Active" //SOLAXX1 #define D_PV1_VOLTAGE "PV1 Voltage" diff --git a/tasmota/language/sk-SK.h b/tasmota/language/sk-SK.h index 89f3d7353..b3d007214 100644 --- a/tasmota/language/sk-SK.h +++ b/tasmota/language/sk-SK.h @@ -634,6 +634,8 @@ #define D_SENSOR_SLAVE_RESET "Slave RST" #define D_SENSOR_GPS_RX "GPS RX" #define D_SENSOR_GPS_TX "GPS TX" +#define D_SENSOR_LE01MR_RX "LE-01MR Rx" +#define D_SENSOR_LE01MR_TX "LE-01MR Tx" // Units #define D_UNIT_AMPERE "A" @@ -669,7 +671,7 @@ #define D_UNIT_WATTHOUR "Wh" #define D_UNIT_WATT_METER_QUADRAT "W/m²" -//SDM220 +//SDM220, SDM120, LE01MR #define D_PHASE_ANGLE "Phase Angle" #define D_IMPORT_ACTIVE "Import Active" #define D_EXPORT_ACTIVE "Export Active" @@ -678,6 +680,7 @@ #define D_TOTAL_REACTIVE "Total Reactive" #define D_UNIT_KWARH "kVArh" #define D_UNIT_ANGLE "Deg" +#define D_TOTAL_ACTIVE "Total Active" //SOLAXX1 #define D_PV1_VOLTAGE "PV1 Voltage" diff --git a/tasmota/language/sv-SE.h b/tasmota/language/sv-SE.h index ddc2307b4..23badaeed 100644 --- a/tasmota/language/sv-SE.h +++ b/tasmota/language/sv-SE.h @@ -634,6 +634,8 @@ #define D_SENSOR_SLAVE_RESET "Slave RST" #define D_SENSOR_GPS_RX "GPS RX" #define D_SENSOR_GPS_TX "GPS TX" +#define D_SENSOR_LE01MR_RX "LE-01MR Rx" +#define D_SENSOR_LE01MR_TX "LE-01MR Tx" // Units #define D_UNIT_AMPERE "A" @@ -669,7 +671,7 @@ #define D_UNIT_WATTHOUR "Wh" #define D_UNIT_WATT_METER_QUADRAT "W/m²" -//SDM220 +//SDM220, SDM120, LE01MR #define D_PHASE_ANGLE "Fasvinkel" #define D_IMPORT_ACTIVE "Import aktiv" #define D_EXPORT_ACTIVE "Export aktiv" @@ -678,6 +680,7 @@ #define D_TOTAL_REACTIVE "Total reaktiv" #define D_UNIT_KWARH "kVArh" #define D_UNIT_ANGLE "Deg" +#define D_TOTAL_ACTIVE "Total aktiv" //SOLAXX1 #define D_PV1_VOLTAGE "PV1 Voltage" diff --git a/tasmota/language/tr-TR.h b/tasmota/language/tr-TR.h index 38f125d6c..03b49afc1 100644 --- a/tasmota/language/tr-TR.h +++ b/tasmota/language/tr-TR.h @@ -634,6 +634,8 @@ #define D_SENSOR_SLAVE_RESET "Slave RST" #define D_SENSOR_GPS_RX "GPS RX" #define D_SENSOR_GPS_TX "GPS TX" +#define D_SENSOR_LE01MR_RX "LE-01MR Rx" +#define D_SENSOR_LE01MR_TX "LE-01MR Tx" // Units #define D_UNIT_AMPERE "A" @@ -669,7 +671,7 @@ #define D_UNIT_WATTHOUR "Wh" #define D_UNIT_WATT_METER_QUADRAT "W/m²" -//SDM220 +//SDM220, SDM120, LE01MR #define D_PHASE_ANGLE "Phase Angle" #define D_IMPORT_ACTIVE "Import Active" #define D_EXPORT_ACTIVE "Export Active" @@ -678,6 +680,7 @@ #define D_TOTAL_REACTIVE "Total Reactive" #define D_UNIT_KWARH "kVArh" #define D_UNIT_ANGLE "Deg" +#define D_TOTAL_ACTIVE "Total Active" //SOLAXX1 #define D_PV1_VOLTAGE "PV1 Voltage" diff --git a/tasmota/language/uk-UA.h b/tasmota/language/uk-UA.h index b634935cf..067a50c31 100644 --- a/tasmota/language/uk-UA.h +++ b/tasmota/language/uk-UA.h @@ -634,6 +634,8 @@ #define D_SENSOR_SLAVE_RESET "Slave RST" #define D_SENSOR_GPS_RX "GPS RX" #define D_SENSOR_GPS_TX "GPS TX" +#define D_SENSOR_LE01MR_RX "LE-01MR Rx" +#define D_SENSOR_LE01MR_TX "LE-01MR Tx" // Units #define D_UNIT_AMPERE "А" @@ -669,7 +671,7 @@ #define D_UNIT_WATTHOUR "Вт/г" #define D_UNIT_WATT_METER_QUADRAT "Вт/м²" -//SDM220 +//SDM220, SDM120, LE01MR #define D_PHASE_ANGLE "Кут фази" #define D_IMPORT_ACTIVE "Активна вхід" #define D_EXPORT_ACTIVE "Активна вихід" @@ -678,6 +680,7 @@ #define D_TOTAL_REACTIVE "Всього реактивна" #define D_UNIT_KWARH "кВАр/г" #define D_UNIT_ANGLE "Град" +#define D_TOTAL_ACTIVE "Total Active" //SOLAXX1 #define D_PV1_VOLTAGE "PV1 Напруга" diff --git a/tasmota/language/zh-CN.h b/tasmota/language/zh-CN.h index 97b41a29a..0c9d56922 100644 --- a/tasmota/language/zh-CN.h +++ b/tasmota/language/zh-CN.h @@ -634,6 +634,8 @@ #define D_SENSOR_SLAVE_RESET "Slave RST" #define D_SENSOR_GPS_RX "GPS RX" #define D_SENSOR_GPS_TX "GPS TX" +#define D_SENSOR_LE01MR_RX "LE-01MR Rx" +#define D_SENSOR_LE01MR_TX "LE-01MR Tx" // Units #define D_UNIT_AMPERE "安" @@ -669,7 +671,7 @@ #define D_UNIT_WATTHOUR "瓦时" #define D_UNIT_WATT_METER_QUADRAT "瓦/平米" -//SDM220 +//SDM220, SDM120, LE01MR #define D_PHASE_ANGLE "相位角" #define D_IMPORT_ACTIVE "有功输入" #define D_EXPORT_ACTIVE "有功输出" @@ -678,6 +680,7 @@ #define D_TOTAL_REACTIVE "总无功功率" #define D_UNIT_KWARH "千乏时" #define D_UNIT_ANGLE "度" +#define D_TOTAL_ACTIVE "Total Active" //SOLAXX1 #define D_PV1_VOLTAGE "PV1 Voltage" diff --git a/tasmota/language/zh-TW.h b/tasmota/language/zh-TW.h index 1fd30e6e4..6f1033c54 100644 --- a/tasmota/language/zh-TW.h +++ b/tasmota/language/zh-TW.h @@ -634,6 +634,8 @@ #define D_SENSOR_SLAVE_RESET "Slave RST" #define D_SENSOR_GPS_RX "GPS RX" #define D_SENSOR_GPS_TX "GPS TX" +#define D_SENSOR_LE01MR_RX "LE-01MR Rx" +#define D_SENSOR_LE01MR_TX "LE-01MR Tx" // Units #define D_UNIT_AMPERE "安" @@ -669,7 +671,7 @@ #define D_UNIT_WATTHOUR "瓦時" #define D_UNIT_WATT_METER_QUADRAT "W/m²" -//SDM220 +//SDM220, SDM120, LE01MR #define D_PHASE_ANGLE "Phase Angle" #define D_IMPORT_ACTIVE "Import Active" #define D_EXPORT_ACTIVE "Export Active" @@ -678,6 +680,7 @@ #define D_TOTAL_REACTIVE "Total Reactive" #define D_UNIT_KWARH "kVArh" #define D_UNIT_ANGLE "Deg" +#define D_TOTAL_ACTIVE "Total Active" //SOLAXX1 #define D_PV1_VOLTAGE "PV1 Voltage" diff --git a/tasmota/my_user_config.h b/tasmota/my_user_config.h index 8a709c2dd..d72e8cce9 100644 --- a/tasmota/my_user_config.h +++ b/tasmota/my_user_config.h @@ -499,7 +499,7 @@ #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 meter - #define LE01MR_SPEED 2400 // LE-01MR modbus baudrate (9600 default) (+2k code, +36 RAM) + #define LE01MR_SPEED 9600 // LE-01MR modbus baudrate (9600 default) (+2k code, +36 RAM) #define LE01MR_ADDR 1 // LE-01MR modbus address (0x01 default) // -- Low level interface devices ----------------- #define USE_DHT // Add support for DHT11, AM2301 (DHT21, DHT22, AM2302, AM2321) and SI7021 Temperature and Humidity sensor (1k6 code) diff --git a/tasmota/tasmota_post.h b/tasmota/tasmota_post.h index 8a16ffead..c1b897920 100644 --- a/tasmota/tasmota_post.h +++ b/tasmota/tasmota_post.h @@ -194,7 +194,7 @@ extern "C" void custom_crash_callback(struct rst_info * rst_info, uint32_t stack #define USE_DDS2382 // Add support for Hiking DDS2382 Modbus energy monitor (+0k6 code) #define USE_DDSU666 // Add support for Chint DDSU666 Modbus energy monitor (+0k6 code) //#define USE_SOLAX_X1 // Add support for Solax X1 series Modbus log info (+3k1 code) -//#define USE_LE01MR // Add support for F&F LE-01MR modbus energy meter +//#define USE_LE01MR // Add support for F&F LE-01MR modbus energy meter (+2k code) #define USE_DHT // Add support for DHT11, AM2301 (DHT21, DHT22, AM2302, AM2321) and SI7021 Temperature and Humidity sensor #define USE_MAX31855 // Add support for MAX31855 K-Type thermocouple sensor using softSPI @@ -282,7 +282,7 @@ extern "C" void custom_crash_callback(struct rst_info * rst_info, uint32_t stack #undef USE_DDS2382 // Disable support for Hiking DDS2382 Modbus energy monitor (+0k6 code) #undef USE_DDSU666 // Disable support for Chint DDSU666 Modbus energy monitor (+0k6 code) #undef USE_SOLAX_X1 // Disable support for Solax X1 series Modbus log info (+3k1 code) - #undef USE_LE01MR // Disable support for F&F LE-01MR Modbus energy meter + #undef USE_LE01MR // Disable support for F&F LE-01MR Modbus energy meter (+2k code) #define USE_I2C // I2C using library wire (+10k code, 0k2 mem, 124 iram) #define USE_DISPLAY // Add I2C Display Support (+2k code) @@ -364,7 +364,7 @@ extern "C" void custom_crash_callback(struct rst_info * rst_info, uint32_t stack #undef USE_DDS2382 // Disable support for Hiking DDS2382 Modbus energy monitor (+0k6 code) #undef USE_DDSU666 // Disable support for Chint DDSU666 Modbus energy monitor (+0k6 code) #undef USE_SOLAX_X1 // Disable support for Solax X1 series Modbus log info (+3k1 code) - #undef USE_LE01MR // Disable support for F&F LE-01MR Modbus energy meter + #undef USE_LE01MR // Disable support for F&F LE-01MR Modbus energy meter (+2k code) //#undef USE_DS18x20 // Disable support for DS18x20 sensors with id sort, single scan and read retry (+1k3 code) @@ -484,7 +484,7 @@ extern "C" void custom_crash_callback(struct rst_info * rst_info, uint32_t stack #undef USE_DDS2382 // Disable support for Hiking DDS2382 Modbus energy monitor (+0k6 code) #undef USE_DDSU666 // Disable support for Chint DDSU666 Modbus energy monitor (+0k6 code) #undef USE_SOLAX_X1 // Disable support for Solax X1 series Modbus log info (+3k1 code) -#undef USE_LE01MR // Disable support for F&F LE-01MR Modbus energy meter +#undef USE_LE01MR // Disable support for F&F LE-01MR Modbus energy meter (+2k code) #undef USE_DHT // Disable support for DHT11, AM2301 (DHT21, DHT22, AM2302, AM2321) and SI7021 Temperature and Humidity sensor #undef USE_MAX31855 // Disable MAX31855 K-Type thermocouple sensor using softSPI @@ -596,7 +596,7 @@ extern "C" void custom_crash_callback(struct rst_info * rst_info, uint32_t stack #undef USE_DDS2382 // Disable support for Hiking DDS2382 Modbus energy monitor (+0k6 code) #undef USE_DDSU666 // Disable support for Chint DDSU666 Modbus energy monitor (+0k6 code) #undef USE_SOLAX_X1 // Disable support for Solax X1 series Modbus log info (+3k1 code) -#undef USE_LE01MR // Disable support for F&F LE-01MR Modbus energy meter +#undef USE_LE01MR // Disable support for F&F LE-01MR Modbus energy meter (+2k code) #undef USE_DHT // Disable support for DHT11, AM2301 (DHT21, DHT22, AM2302, AM2321) and SI7021 Temperature and Humidity sensor #undef USE_MAX31855 // Disable MAX31855 K-Type thermocouple sensor using softSPI