Add JSON modules info

This commit is contained in:
Norbert Richter 2022-03-11 17:32:27 +01:00
parent ee664c852e
commit 0d99126c16
No known key found for this signature in database
GPG Key ID: 6628701A626FA674
2 changed files with 15 additions and 8 deletions

View File

@ -21,7 +21,7 @@ All notable changes to this project will be documented in this file.
- ESP32 TasmotaSerial uart mapping to support multiple ``begin()`` and implement ``getUart()`` (#14981)
- Commands ``Sensor12 D0 .. D5, S0 .. S5`` allowing differential or single-ended modes (#15001)
- NeoPool commands ``NPpHMin``, ``NPpHMax``, ``NPpH``, ``NPRedox``, ``NPHydrolysis``, ``NPIonization``, ``NPChlorine`` and ``NPControl`` (#15015)
- NeoPool system voltages display, add JSON power module, cell info, chlorine, conductivity and ionization to SENSOR
- NeoPool system voltages display, JSON modules, power module, cell info, chlorine, conductivity and ionization
- Full DS3231 integration and synchronisation when using UBX (=GPS), NTP or manual time
- LVGL Splash screen and ``SetOption135 1`` to disable splash screen
- Command ``RfTimeout 100..60000`` to disable duplicate RfReceive. Default 1000 (#15061)

View File

@ -1390,7 +1390,7 @@ bool NeoPoolIsIonization(void)
/*********************************************************************************************/
#define D_NEOPOOL_JSON_MODULES "Modules"
#define D_NEOPOOL_JSON_CHLORINE "Chlorine"
#define D_NEOPOOL_JSON_CONDUCTIVITY "Conductivity"
#define D_NEOPOOL_JSON_FILTRATION "Filtration"
@ -1449,14 +1449,21 @@ void NeoPoolShow(bool json)
#ifndef NEOPOOL_OPTIMIZE_READINGS
// Time
ResponseAppend_P(PSTR("\"" D_JSON_TIME "\":\"%s\""),
GetDT(NeoPoolGetDataLong(MBF_PAR_TIME_LOW)).c_str());
ResponseAppend_P(PSTR("\"" D_JSON_TIME "\":\"%s\","), GetDT(NeoPoolGetDataLong(MBF_PAR_TIME_LOW)).c_str());
#endif // NEOPOOL_OPTIMIZE_READINGS
// Type
ResponseAppend_P(PSTR(","));
#endif // NEOPOOL_OPTIMIZE_READINGS
// Type
ResponseAppend_P(PSTR("\"" D_NEOPOOL_TYPE "\":\"%s\""), neopool_type);
ResponseAppend_P(PSTR("\"" D_JSON_TYPE "\":\"%s\""), neopool_type);
// Module
ResponseAppend_P(PSTR(",\"" D_NEOPOOL_JSON_MODULES "\":{"));
ResponseAppend_P(PSTR( "\"" D_JSON_PH "\":%d"), NeoPoolIspHModule());
ResponseAppend_P(PSTR(",\"" D_NEOPOOL_JSON_REDOX "\":%d"), NeoPoolIsRedox());
ResponseAppend_P(PSTR(",\"" D_NEOPOOL_JSON_HYDROLYSIS "\":%d"), NeoPoolIsHydrolysis());
ResponseAppend_P(PSTR(",\"" D_NEOPOOL_JSON_CHLORINE "\":%d"), NeoPoolIsChlorine());
ResponseAppend_P(PSTR(",\"" D_NEOPOOL_JSON_CONDUCTIVITY "\":%d"), NeoPoolIsConductivity());
ResponseAppend_P(PSTR(",\"" D_NEOPOOL_JSON_IONIZATION "\":%d"), NeoPoolIsIonization());
ResponseJsonEnd();
// Temperature
if (NeoPoolGetData(MBF_PAR_TEMPERATURE_ACTIVE)) {