diff --git a/tasmota/xsns_83_neopool.ino b/tasmota/xsns_83_neopool.ino index 981badf31..eb7ac25d4 100644 --- a/tasmota/xsns_83_neopool.ino +++ b/tasmota/xsns_83_neopool.ino @@ -94,7 +94,7 @@ enum NeoPoolRegister { // GLOBAL page (0x02xx) MBF_SAVE_TO_EEPROM=0x02F0, // 0x02F0 A write operation to this register starts a EEPROM storage operation immediately. During the EEPROM storage procedure, the system may be unresponsive to MODBUS requests. The operation will last always less than 1 second. - MBF_IMM_TAKE_OVER=0x02F5, // 0x02F5 undocumented - immediately tale over - a write operation to this register take over the previous written data (neccessary if changing e.g. timers) + MBF_EXEC=0x02F5, // 0x02F5 undocumented - immediately take over settings - a write operation to this register take over the previous written data // FACTORY page (0x03xx) MBF_PAR_VERSION=0x0300, // 0x0300* Software version of the PowerBox (unused) @@ -483,6 +483,13 @@ enum NeoPoolConstAndBitMask { #include TasmotaModbus *NeoPoolModbus; +enum NeoPoolResult { + NEOPOOL_RESULT_DEC=false, + NEOPOOL_RESULT_HEX, + NEOPOOL_RESULT_MAX +}; +uint8_t neopool_result = NEOPOOL_RESULT_HEX; + bool neopool_active = false; volatile bool neopool_poll = true; @@ -507,11 +514,13 @@ struct NEOPOOL_REG { }; // NeoPool modbus function errors -#define NEOPOOL_OK 0 -#define NEOPOOL_ERROR_RW_DATA 1 -#define NEOPOOL_ERROR_TIMEOUT 2 -#define NEOPOOL_ERROR_OUT_OF_MEM 3 -#define NEOPOOL_ERROR_DEADLOCK 4 +enum NeoPoolModbusCode { + NEOPOOL_OK=0, + NEOPOOL_ERROR_RW_DATA, + NEOPOOL_ERROR_TIMEOUT, + NEOPOOL_ERROR_OUT_OF_MEM, + NEOPOOL_ERROR_DEADLOCK +}; #define D_NEOPOOL_NAME "NeoPool" @@ -576,6 +585,153 @@ const char HTTP_SNS_NEOPOOL_HYDROLYSIS[] PROGMEM = "{s}%s " D_NEOPOOL_HYDR const char HTTP_SNS_NEOPOOL_FILT_MODE[] PROGMEM = "{s}%s " D_NEOPOOL_FILT_MODE "{m}%s" "{e}"; const char HTTP_SNS_NEOPOOL_RELAY[] PROGMEM = "{s}%s " D_NEOPOOL_RELAY " %d %s" "{m}%s" "{e}"; +/*********************************************************************************************\ + * Commands + * + * NPFiltration {} + * get/set manual filtration (state=0|1) + * get filtration state if is omitted, otherwise set new state + * + * NPFiltrationMode {} + * get/set filtration mode (mode=0..4|13) + * get mode if is omitted, otherwise set new mode + * + * NPTime {