mirror of
https://github.com/arendst/Tasmota.git
synced 2025-07-24 03:06:33 +00:00
Merge pull request #13343 from curzon01/dev-neopool
Add NeoPool cell runtime, rw error repetition, register desc
This commit is contained in:
commit
c010a4b9de
@ -1063,6 +1063,7 @@
|
||||
#define D_NEOPOOL_RELAY_CD "Brine pump"
|
||||
#define D_NEOPOOL_TIME "Time"
|
||||
#define D_NEOPOOL_FILT_MODE "Filtration"
|
||||
#define D_NEOPOOL_CELL_RUNTIME "Cell runtime"
|
||||
#define D_NEOPOOL_POLARIZATION "Pol" // Sensor status
|
||||
#define D_NEOPOOL_PR_OFF "PrOff"
|
||||
#define D_NEOPOOL_SETPOINT_OK "Ok"
|
||||
|
@ -1064,6 +1064,7 @@
|
||||
#define D_NEOPOOL_RELAY_CD "Brine pump"
|
||||
#define D_NEOPOOL_TIME "Time"
|
||||
#define D_NEOPOOL_FILT_MODE "Filtration"
|
||||
#define D_NEOPOOL_CELL_RUNTIME "Cell runtime"
|
||||
#define D_NEOPOOL_POLARIZATION "Pol" // Sensor status
|
||||
#define D_NEOPOOL_PR_OFF "PrOff"
|
||||
#define D_NEOPOOL_SETPOINT_OK "Ok"
|
||||
|
@ -1064,6 +1064,7 @@
|
||||
#define D_NEOPOOL_RELAY_CD "Salzwasserpumpe"
|
||||
#define D_NEOPOOL_TIME "Zeit"
|
||||
#define D_NEOPOOL_FILT_MODE "Filtration"
|
||||
#define D_NEOPOOL_CELL_RUNTIME "Laufzeit Zelle"
|
||||
#define D_NEOPOOL_POLARIZATION "Pol" // Sensor status
|
||||
#define D_NEOPOOL_PR_OFF "PrAus"
|
||||
#define D_NEOPOOL_SETPOINT_OK "Ok"
|
||||
|
@ -1064,6 +1064,7 @@
|
||||
#define D_NEOPOOL_RELAY_CD "Brine pump"
|
||||
#define D_NEOPOOL_TIME "Time"
|
||||
#define D_NEOPOOL_FILT_MODE "Filtration"
|
||||
#define D_NEOPOOL_CELL_RUNTIME "Cell runtime"
|
||||
#define D_NEOPOOL_POLARIZATION "Pol" // Sensor status
|
||||
#define D_NEOPOOL_PR_OFF "PrOff"
|
||||
#define D_NEOPOOL_SETPOINT_OK "Ok"
|
||||
|
@ -1064,6 +1064,7 @@
|
||||
#define D_NEOPOOL_RELAY_CD "Brine pump"
|
||||
#define D_NEOPOOL_TIME "Time"
|
||||
#define D_NEOPOOL_FILT_MODE "Filtration"
|
||||
#define D_NEOPOOL_CELL_RUNTIME "Cell runtime"
|
||||
#define D_NEOPOOL_POLARIZATION "Pol" // Sensor status
|
||||
#define D_NEOPOOL_PR_OFF "PrOff"
|
||||
#define D_NEOPOOL_SETPOINT_OK "Ok"
|
||||
|
@ -1063,6 +1063,7 @@
|
||||
#define D_NEOPOOL_RELAY_CD "Pompe Brome"
|
||||
#define D_NEOPOOL_TIME "Durée"
|
||||
#define D_NEOPOOL_FILT_MODE "Filtration"
|
||||
#define D_NEOPOOL_CELL_RUNTIME "Cell runtime"
|
||||
#define D_NEOPOOL_POLARIZATION "Pol" // Sensor status
|
||||
#define D_NEOPOOL_PR_OFF "PrOff"
|
||||
#define D_NEOPOOL_SETPOINT_OK "OK"
|
||||
|
@ -1064,6 +1064,7 @@
|
||||
#define D_NEOPOOL_RELAY_CD "Brine pump"
|
||||
#define D_NEOPOOL_TIME "Time"
|
||||
#define D_NEOPOOL_FILT_MODE "Filtration"
|
||||
#define D_NEOPOOL_CELL_RUNTIME "Cell runtime"
|
||||
#define D_NEOPOOL_POLARIZATION "Pol" // Sensor status
|
||||
#define D_NEOPOOL_PR_OFF "PrOff"
|
||||
#define D_NEOPOOL_SETPOINT_OK "Ok"
|
||||
|
@ -1064,6 +1064,7 @@
|
||||
#define D_NEOPOOL_RELAY_CD "Brine pump"
|
||||
#define D_NEOPOOL_TIME "Time"
|
||||
#define D_NEOPOOL_FILT_MODE "Filtration"
|
||||
#define D_NEOPOOL_CELL_RUNTIME "Cell runtime"
|
||||
#define D_NEOPOOL_POLARIZATION "Pol" // Sensor status
|
||||
#define D_NEOPOOL_PR_OFF "PrOff"
|
||||
#define D_NEOPOOL_SETPOINT_OK "Ok"
|
||||
|
@ -1064,6 +1064,7 @@
|
||||
#define D_NEOPOOL_RELAY_CD "Brine pump"
|
||||
#define D_NEOPOOL_TIME "Idő"
|
||||
#define D_NEOPOOL_FILT_MODE "Filtration"
|
||||
#define D_NEOPOOL_CELL_RUNTIME "Cell runtime"
|
||||
#define D_NEOPOOL_POLARIZATION "Pol" // Sensor status
|
||||
#define D_NEOPOOL_PR_OFF "PrOff"
|
||||
#define D_NEOPOOL_SETPOINT_OK "Ok"
|
||||
|
@ -1064,6 +1064,7 @@
|
||||
#define D_NEOPOOL_RELAY_CD "Brine pump"
|
||||
#define D_NEOPOOL_TIME "Time"
|
||||
#define D_NEOPOOL_FILT_MODE "Filtration"
|
||||
#define D_NEOPOOL_CELL_RUNTIME "Cell runtime"
|
||||
#define D_NEOPOOL_POLARIZATION "Pol" // Sensor status
|
||||
#define D_NEOPOOL_PR_OFF "PrOff"
|
||||
#define D_NEOPOOL_SETPOINT_OK "Ok"
|
||||
|
@ -1064,6 +1064,7 @@
|
||||
#define D_NEOPOOL_RELAY_CD "Brine pump"
|
||||
#define D_NEOPOOL_TIME "Time"
|
||||
#define D_NEOPOOL_FILT_MODE "Filtration"
|
||||
#define D_NEOPOOL_CELL_RUNTIME "Cell runtime"
|
||||
#define D_NEOPOOL_POLARIZATION "Pol" // Sensor status
|
||||
#define D_NEOPOOL_PR_OFF "PrOff"
|
||||
#define D_NEOPOOL_SETPOINT_OK "Ok"
|
||||
|
@ -1064,6 +1064,7 @@
|
||||
#define D_NEOPOOL_RELAY_CD "Brine pump"
|
||||
#define D_NEOPOOL_TIME "Time"
|
||||
#define D_NEOPOOL_FILT_MODE "Filtration"
|
||||
#define D_NEOPOOL_CELL_RUNTIME "Cell runtime"
|
||||
#define D_NEOPOOL_POLARIZATION "Pol" // Sensor status
|
||||
#define D_NEOPOOL_PR_OFF "PrOff"
|
||||
#define D_NEOPOOL_SETPOINT_OK "Ok"
|
||||
|
@ -1064,6 +1064,7 @@
|
||||
#define D_NEOPOOL_RELAY_CD "Brine pump"
|
||||
#define D_NEOPOOL_TIME "Time"
|
||||
#define D_NEOPOOL_FILT_MODE "Filtration"
|
||||
#define D_NEOPOOL_CELL_RUNTIME "Cell runtime"
|
||||
#define D_NEOPOOL_POLARIZATION "Pol" // Sensor status
|
||||
#define D_NEOPOOL_PR_OFF "PrOff"
|
||||
#define D_NEOPOOL_SETPOINT_OK "Ok"
|
||||
|
@ -1064,6 +1064,7 @@
|
||||
#define D_NEOPOOL_RELAY_CD "Brine pump"
|
||||
#define D_NEOPOOL_TIME "Time"
|
||||
#define D_NEOPOOL_FILT_MODE "Filtration"
|
||||
#define D_NEOPOOL_CELL_RUNTIME "Cell runtime"
|
||||
#define D_NEOPOOL_POLARIZATION "Pol" // Sensor status
|
||||
#define D_NEOPOOL_PR_OFF "PrOff"
|
||||
#define D_NEOPOOL_SETPOINT_OK "Ok"
|
||||
|
@ -1064,6 +1064,7 @@
|
||||
#define D_NEOPOOL_RELAY_CD "Brine pump"
|
||||
#define D_NEOPOOL_TIME "Time"
|
||||
#define D_NEOPOOL_FILT_MODE "Filtration"
|
||||
#define D_NEOPOOL_CELL_RUNTIME "Cell runtime"
|
||||
#define D_NEOPOOL_POLARIZATION "Pol" // Sensor status
|
||||
#define D_NEOPOOL_PR_OFF "PrOff"
|
||||
#define D_NEOPOOL_SETPOINT_OK "Ok"
|
||||
|
@ -1064,6 +1064,7 @@
|
||||
#define D_NEOPOOL_RELAY_CD "Brine pump"
|
||||
#define D_NEOPOOL_TIME "Time"
|
||||
#define D_NEOPOOL_FILT_MODE "Filtration"
|
||||
#define D_NEOPOOL_CELL_RUNTIME "Cell runtime"
|
||||
#define D_NEOPOOL_POLARIZATION "Pol" // Sensor status
|
||||
#define D_NEOPOOL_PR_OFF "PrOff"
|
||||
#define D_NEOPOOL_SETPOINT_OK "Ok"
|
||||
|
@ -1064,6 +1064,7 @@
|
||||
#define D_NEOPOOL_RELAY_CD "Brine pump"
|
||||
#define D_NEOPOOL_TIME "Time"
|
||||
#define D_NEOPOOL_FILT_MODE "Filtration"
|
||||
#define D_NEOPOOL_CELL_RUNTIME "Cell runtime"
|
||||
#define D_NEOPOOL_POLARIZATION "Pol" // Sensor status
|
||||
#define D_NEOPOOL_PR_OFF "PrOff"
|
||||
#define D_NEOPOOL_SETPOINT_OK "Ok"
|
||||
|
@ -1064,6 +1064,7 @@
|
||||
#define D_NEOPOOL_RELAY_CD "Brine pump"
|
||||
#define D_NEOPOOL_TIME "Time"
|
||||
#define D_NEOPOOL_FILT_MODE "Filtration"
|
||||
#define D_NEOPOOL_CELL_RUNTIME "Cell runtime"
|
||||
#define D_NEOPOOL_POLARIZATION "Pol" // Sensor status
|
||||
#define D_NEOPOOL_PR_OFF "PrOff"
|
||||
#define D_NEOPOOL_SETPOINT_OK "Ok"
|
||||
|
@ -1064,6 +1064,7 @@
|
||||
#define D_NEOPOOL_RELAY_CD "Brine pump"
|
||||
#define D_NEOPOOL_TIME "Time"
|
||||
#define D_NEOPOOL_FILT_MODE "Filtration"
|
||||
#define D_NEOPOOL_CELL_RUNTIME "Cell runtime"
|
||||
#define D_NEOPOOL_POLARIZATION "Pol" // Sensor status
|
||||
#define D_NEOPOOL_PR_OFF "PrOff"
|
||||
#define D_NEOPOOL_SETPOINT_OK "Ok"
|
||||
|
@ -1064,6 +1064,7 @@
|
||||
#define D_NEOPOOL_RELAY_CD "Brine pump"
|
||||
#define D_NEOPOOL_TIME "Time"
|
||||
#define D_NEOPOOL_FILT_MODE "Filtration"
|
||||
#define D_NEOPOOL_CELL_RUNTIME "Cell runtime"
|
||||
#define D_NEOPOOL_POLARIZATION "Pol" // Sensor status
|
||||
#define D_NEOPOOL_PR_OFF "PrOff"
|
||||
#define D_NEOPOOL_SETPOINT_OK "Ok"
|
||||
|
@ -1064,6 +1064,7 @@
|
||||
#define D_NEOPOOL_RELAY_CD "Brine pump"
|
||||
#define D_NEOPOOL_TIME "Time"
|
||||
#define D_NEOPOOL_FILT_MODE "Filtration"
|
||||
#define D_NEOPOOL_CELL_RUNTIME "Cell runtime"
|
||||
#define D_NEOPOOL_POLARIZATION "Pol" // Sensor status
|
||||
#define D_NEOPOOL_PR_OFF "PrOff"
|
||||
#define D_NEOPOOL_SETPOINT_OK "Ok"
|
||||
|
@ -1064,6 +1064,7 @@
|
||||
#define D_NEOPOOL_RELAY_CD "Brine pump"
|
||||
#define D_NEOPOOL_TIME "Time"
|
||||
#define D_NEOPOOL_FILT_MODE "Filtration"
|
||||
#define D_NEOPOOL_CELL_RUNTIME "Cell runtime"
|
||||
#define D_NEOPOOL_POLARIZATION "Pol" // Sensor status
|
||||
#define D_NEOPOOL_PR_OFF "PrOff"
|
||||
#define D_NEOPOOL_SETPOINT_OK "Ok"
|
||||
|
@ -105,6 +105,9 @@ enum NeoPoolRegister {
|
||||
MBF_HIDRO_VOLTAGE, // 0x0111 Reports on the stress applied to the hydrolysis cell. This register, together with that of MBF_HIDRO_CURRENT allows extrapolating the salinity of the water.
|
||||
|
||||
// GLOBAL page (0x02xx)
|
||||
MBF_CELL_RUNTIME_LOW = 0x0206, // 0x0206* undocumented - cell runtime (32 bit) - low word
|
||||
MBF_CELL_RUNTIME_HIGH = 0x0207, // 0x0207* undocumented - cell runtime (32 bit) - high word
|
||||
MBF_BOOST_CTRL = 0x020C, // 0x020C undocumented - 0x0000 = Boost Off, 0x05A0 = Boost with redox ctrl, 0x85A0 = Boost without redox ctrl
|
||||
MBF_SET_MANUAL_CTRL = 0x0289, // 0x0289 undocumented - write a 1 before manual control MBF_RELAY_STATE, after done write 0 and do MBF_EXEC
|
||||
MBF_ESCAPE = 0x0297, // 0x0297 undocumented - A write operation to this register is the same as using the ESC button on main screen - clears error
|
||||
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.
|
||||
@ -549,6 +552,9 @@ bool neopool_first_read = true;
|
||||
#endif // NEOPOOL_OPTIMIZE_READINGS
|
||||
bool neopool_error = true;
|
||||
|
||||
#define NEOPOOL_MAX_REPEAT_ON_ERROR 10
|
||||
uint8_t neopool_repeat_on_error = 2;
|
||||
|
||||
uint16_t neopool_light_relay;
|
||||
uint8_t neopool_light_prg_delay;
|
||||
uint8_t neopoll_cmd_delay = 0;
|
||||
@ -577,8 +583,9 @@ struct {
|
||||
NeoPoolRegList list[];
|
||||
};
|
||||
} NeoPoolReg[] = {
|
||||
// 4 entries so using 250ms poll interval we are through in a second for all register
|
||||
// 6 entries so using 250ms poll interval we are through in 1,5 for all register
|
||||
{NEOPOOL_REG_TYPE_BLOCK, {MBF_ION_CURRENT, MBF_NOTIFICATION - MBF_ION_CURRENT + 1, nullptr}},
|
||||
{NEOPOOL_REG_TYPE_BLOCK, {MBF_CELL_RUNTIME_LOW, MBF_CELL_RUNTIME_HIGH - MBF_CELL_RUNTIME_LOW + 1, nullptr}},
|
||||
{NEOPOOL_REG_TYPE_BLOCK, {MBF_PAR_VERSION, MBF_PAR_MODEL - MBF_PAR_VERSION + 1, nullptr}},
|
||||
{NEOPOOL_REG_TYPE_BLOCK, {MBF_PAR_TIME_LOW, MBF_PAR_FILT_GPIO - MBF_PAR_TIME_LOW + 1, nullptr}},
|
||||
{NEOPOOL_REG_TYPE_BLOCK, {MBF_PAR_ION, MBF_PAR_FILTRATION_TYPE - MBF_PAR_ION + 1, nullptr}},
|
||||
@ -681,6 +688,7 @@ const char HTTP_SNS_NEOPOOL_CONDUCTIVITY[] PROGMEM = "{s}%s " D_NEOPOOL_COND
|
||||
const char HTTP_SNS_NEOPOOL_IONIZATION[] PROGMEM = "{s}%s " D_NEOPOOL_IONIZATION "{m}" NEOPOOL_FMT_ION " " "%s%s" "{e}";
|
||||
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 " "%s" "{m}%s" "{e}";
|
||||
const char HTTP_SNS_NEOPOOL_CELL_RUNTIME[] PROGMEM = "{s}%s " D_NEOPOOL_CELL_RUNTIME "{m}%s" "{e}";
|
||||
|
||||
const char HTTP_SNS_NEOPOOL_STATUS[] PROGMEM = "<span style=\"background-color:%s;font-size:small;text-align:center;%s;\"> %s </span>";
|
||||
const char HTTP_SNS_NEOPOOL_STATUS_NORMAL[] PROGMEM = "filter:invert(0.1)";
|
||||
@ -730,9 +738,15 @@ const char HTTP_SNS_NEOPOOL_STATUS_ACTIVE[] PROGMEM = "filter:invert(1)";
|
||||
*
|
||||
* NPResult {<format>}
|
||||
* get/set addr/data result format read/write commands (format = 0|1):
|
||||
* get output format if <format> is omitted, otherwise
|
||||
* 0 - output as decimal numbers
|
||||
* 1 - output as hexadecimal strings (default)
|
||||
* get output format if <format> is omitted, otherwise
|
||||
*
|
||||
* NPOnError {<repeat>}
|
||||
* get/set auto-repeat Modbus read/write commands on error (repeat = 0..10):
|
||||
* get auto-repeat setting if <repeat> is omitted, otherwise
|
||||
* 0 - disable auto-repeat on read/write error
|
||||
* 1..10 - repeat commands n times until ok
|
||||
*
|
||||
* NPPHRes {<digits>}
|
||||
* NPCLRes {<digits>}
|
||||
@ -830,6 +844,7 @@ const char HTTP_SNS_NEOPOOL_STATUS_ACTIVE[] PROGMEM = "filter:invert(1)";
|
||||
#define D_CMND_NP_SAVE "Save"
|
||||
#define D_CMND_NP_EXEC "Exec"
|
||||
#define D_CMND_NP_ESCAPE "Escape"
|
||||
#define D_CMND_NP_ONERROR "OnError"
|
||||
#define D_CMND_NP_PHRES "PHRes"
|
||||
#define D_CMND_NP_CLRES "CLRes"
|
||||
#define D_CMND_NP_IONRES "IONRes"
|
||||
@ -849,6 +864,7 @@ const char kNPCommands[] PROGMEM = D_PRFX_NEOPOOL "|" // Prefix
|
||||
D_CMND_NP_SAVE "|"
|
||||
D_CMND_NP_EXEC "|"
|
||||
D_CMND_NP_ESCAPE "|"
|
||||
D_CMND_NP_ONERROR "|"
|
||||
D_CMND_NP_PHRES "|"
|
||||
D_CMND_NP_CLRES "|"
|
||||
D_CMND_NP_IONRES
|
||||
@ -869,6 +885,7 @@ void (* const NPCommand[])(void) PROGMEM = {
|
||||
&CmndNeopoolSave,
|
||||
&CmndNeopoolExec,
|
||||
&CmndNeopoolEscape,
|
||||
&CmndNeopoolOnError,
|
||||
&CmndNeopoolPHRes,
|
||||
&CmndNeopoolCLRes,
|
||||
&CmndNeopoolIONRes
|
||||
@ -1051,7 +1068,7 @@ void NeoPool250msSetStatus(bool status)
|
||||
}
|
||||
|
||||
|
||||
uint8_t NeoPoolReadRegister(uint16_t addr, uint16_t *data, uint16_t cnt)
|
||||
uint8_t NeoPoolReadRegisterData(uint16_t addr, uint16_t *data, uint16_t cnt)
|
||||
{
|
||||
bool data_ready;
|
||||
uint32_t timeoutMS;
|
||||
@ -1099,7 +1116,7 @@ uint8_t NeoPoolReadRegister(uint16_t addr, uint16_t *data, uint16_t cnt)
|
||||
}
|
||||
|
||||
|
||||
uint8_t NeoPoolWriteRegister(uint16_t addr, uint16_t *data, uint16_t cnt)
|
||||
uint8_t NeoPoolWriteRegisterData(uint16_t addr, uint16_t *data, uint16_t cnt)
|
||||
{
|
||||
uint8_t *frame;
|
||||
uint32_t numbytes;
|
||||
@ -1176,6 +1193,30 @@ uint8_t NeoPoolWriteRegister(uint16_t addr, uint16_t *data, uint16_t cnt)
|
||||
}
|
||||
|
||||
|
||||
uint8_t NeoPoolReadRegister(uint16_t addr, uint16_t *data, uint16_t cnt)
|
||||
{
|
||||
uint8_t repeat = neopool_repeat_on_error;
|
||||
uint8_t result;
|
||||
do {
|
||||
result = NeoPoolReadRegisterData(addr, data, cnt);
|
||||
SleepDelay(0);
|
||||
} while(repeat-- > 0 || NEOPOOL_MODBUS_OK != result);
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
uint8_t NeoPoolWriteRegister(uint16_t addr, uint16_t *data, uint16_t cnt)
|
||||
{
|
||||
uint8_t repeat = neopool_repeat_on_error;
|
||||
uint8_t result;
|
||||
do {
|
||||
result = NeoPoolWriteRegisterData(addr, data, cnt);
|
||||
SleepDelay(0);
|
||||
} while(repeat-- > 0 || NEOPOOL_MODBUS_OK != result);
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
uint8_t NeoPoolWriteRegisterWord(uint16_t addr, uint16_t data)
|
||||
{
|
||||
return NeoPoolWriteRegister(addr, &data, 1);
|
||||
@ -1217,6 +1258,7 @@ uint32_t NeoPoolGetSpeedIndex(uint16_t speedvalue)
|
||||
#define D_NEOPOOL_JSON_FILTRATION_MODE "Mode"
|
||||
#define D_NEOPOOL_JSON_FILTRATION_SPEED "Speed"
|
||||
#define D_NEOPOOL_JSON_HYDROLYSIS "Hydrolysis"
|
||||
#define D_NEOPOOL_JSON_CELL_RUNTIME "Runtime"
|
||||
#define D_NEOPOOL_JSON_IONIZATION "Ionization"
|
||||
#define D_NEOPOOL_JSON_LIGHT "Light"
|
||||
#define D_NEOPOOL_JSON_LIGHT_MODE "Mode"
|
||||
@ -1345,6 +1387,11 @@ void NeoPoolShow(bool json)
|
||||
ResponseAppend_P(PSTR(",\"" D_NEOPOOL_JSON_HYDROLYSIS "\":{\"" D_JSON_DATA "\":" NEOPOOL_FMT_HIDRO), dec, &fvalue);
|
||||
ResponseAppend_P(PSTR(",\"" D_NEOPOOL_JSON_UNIT "\":\"%s\""), sunit);
|
||||
|
||||
#ifndef NEOPOOL_OPTIMIZE_READINGS
|
||||
ResponseAppend_P(PSTR(",\"" D_NEOPOOL_JSON_CELL_RUNTIME "\":\"%s\""),
|
||||
GetDuration((uint32_t)NeoPoolGetData(MBF_CELL_RUNTIME_LOW) + ((uint32_t)NeoPoolGetData(MBF_CELL_RUNTIME_HIGH) << 16)).c_str());
|
||||
#endif // NEOPOOL_OPTIMIZE_READINGS
|
||||
|
||||
// S1
|
||||
const char *state = PSTR("");
|
||||
if (0 == (NeoPoolGetData(MBF_HIDRO_STATUS) & MBMSK_HIDRO_STATUS_MODULE_ACTIVE)) {
|
||||
@ -1419,13 +1466,15 @@ void NeoPoolShow(bool json)
|
||||
);
|
||||
|
||||
#ifndef NEOPOOL_OPTIMIZE_READINGS
|
||||
// Time
|
||||
char dt[20];
|
||||
TIME_T tmpTime;
|
||||
BreakTime((uint32_t)NeoPoolGetData(MBF_PAR_TIME_LOW) + ((uint32_t)NeoPoolGetData(MBF_PAR_TIME_HIGH) << 16), tmpTime);
|
||||
snprintf_P(dt, sizeof(dt), PSTR("%04d-%02d-%02d %02d:%02d"),
|
||||
tmpTime.year +1970, tmpTime.month, tmpTime.day_of_month, tmpTime.hour, tmpTime.minute);
|
||||
WSContentSend_PD(HTTP_SNS_NEOPOOL_TIME, neopool_type, dt);
|
||||
{
|
||||
// Time
|
||||
char dt[20];
|
||||
TIME_T tmpTime;
|
||||
BreakTime((uint32_t)NeoPoolGetData(MBF_PAR_TIME_LOW) + ((uint32_t)NeoPoolGetData(MBF_PAR_TIME_HIGH) << 16), tmpTime);
|
||||
snprintf_P(dt, sizeof(dt), PSTR("%04d-%02d-%02d %02d:%02d"),
|
||||
tmpTime.year +1970, tmpTime.month, tmpTime.day_of_month, tmpTime.hour, tmpTime.minute);
|
||||
WSContentSend_PD(HTTP_SNS_NEOPOOL_TIME, neopool_type, dt);
|
||||
}
|
||||
#endif // NEOPOOL_OPTIMIZE_READINGS
|
||||
|
||||
// Temperature
|
||||
@ -1598,6 +1647,18 @@ void NeoPoolShow(bool json)
|
||||
WSContentSend_PD(HTTP_SNS_NEOPOOL_RELAY,neopool_type, sdesc,
|
||||
'\0' == *stemp ? ((NeoPoolGetData(MBF_RELAY_STATE) & (1<<i))?PSTR(D_ON):PSTR(D_OFF)) : stemp);
|
||||
}
|
||||
|
||||
#ifndef NEOPOOL_OPTIMIZE_READINGS
|
||||
{
|
||||
// Cell runtime
|
||||
char dt[16];
|
||||
TIME_T tmpTime;
|
||||
BreakTime((uint32_t)NeoPoolGetData(MBF_CELL_RUNTIME_LOW) + ((uint32_t)NeoPoolGetData(MBF_CELL_RUNTIME_HIGH) << 16), tmpTime);
|
||||
snprintf_P(dt, sizeof(dt), PSTR("%dT%02d:%02d"), tmpTime.days, tmpTime.hour, tmpTime.minute);
|
||||
WSContentSend_PD(HTTP_SNS_NEOPOOL_CELL_RUNTIME, neopool_type, dt);
|
||||
}
|
||||
#endif // NEOPOOL_OPTIMIZE_READINGS
|
||||
|
||||
#endif // USE_WEBSERVER
|
||||
}
|
||||
}
|
||||
@ -2011,6 +2072,15 @@ void CmndNeopoolEscape(void)
|
||||
}
|
||||
|
||||
|
||||
void CmndNeopoolOnError(void)
|
||||
{
|
||||
if (XdrvMailbox.data_len && XdrvMailbox.payload >= 0 && XdrvMailbox.payload <= NEOPOOL_MAX_REPEAT_ON_ERROR) {
|
||||
neopool_repeat_on_error = XdrvMailbox.payload;
|
||||
}
|
||||
ResponseCmndNumber(neopool_repeat_on_error);
|
||||
}
|
||||
|
||||
|
||||
void CmndNeopoolPHRes(void)
|
||||
{
|
||||
if (XdrvMailbox.data_len && XdrvMailbox.payload >= 0 && XdrvMailbox.payload <= 3) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user