Skip to content

Commit

Permalink
Update NeoPool commands
Browse files Browse the repository at this point in the history
  • Loading branch information
curzon01 committed Aug 14, 2024
1 parent 32e0ef0 commit 22f2aa7
Show file tree
Hide file tree
Showing 2 changed files with 55 additions and 1 deletion.
2 changes: 2 additions & 0 deletions docs/Commands.md
Original file line number Diff line number Diff line change
Expand Up @@ -1026,6 +1026,8 @@ NPResult<a class="cmnd" id="npresult"></a>|`<format>`<BR>Set addr/data result fo
NPPHRes<a class="cmnd" id="npphres"></a>|`<resolution>`<BR>Set number of decimal places in results for PH value (resolution = `0..3`).
NPCLRes<a class="cmnd" id="npclres"></a>|`<resolution>`<BR>Set number of decimal places in results for CL value (resolution = `0..3`).
NPIONRes<a class="cmnd" id="npionres"></a>|`<resolution>`<BR>Set number of decimal places in results for ION value (resolution = `0..3`).
NPSetOption0<a class="cmnd" id="npsetoption0"></a>Sensor data min/max validation and correction (ESP32 only)<BR>`0` = disable correction<BR> `1` = enable correction *(default)*.
NPSetOption1<a class="cmnd" id="npsetoption1"></a>NeoPool Modbus connection statistics (ESP32 only)<BR>`0` = disable statistics<BR> `1` = disable statistics *(default)*.
NPRead<a class="cmnd" id="npread"></a>|`<addr>( <cnt>)`<BR>Read device 16-bit register (addr = `0..0x060F`, cnt = `1..30`). `<cnt>` = `1` if omitted
NPReadL<a class="cmnd" id="npreadl"></a>|`<addr>( <cnt>)`<BR>Read device 32-bit register (addr = `0..0x060F`, cnt = `1..15`). `<cnt>` = `1` if omitted
NPWrite<a class="cmnd" id="npwrite"></a>|`<addr> <data>( <data>...)`<BR>Write device 16-bit register (addr = `0..0x060F`, data = `0..0xFFFF`). Use of `<data>` max 10 times
Expand Down
54 changes: 53 additions & 1 deletion docs/NeoPool.md
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,28 @@ Sensor data is sent via the Tasmota topic `tele/%topic%/SENSOR` in JSON format e
"State": [0, 1, 0, 0, 0, 1, 0],
"Aux": [0, 0, 1, 0],
"Acid": 0
},
"Connection": {
"Time": "2024-08-14T15:00:00",
"MBRequests": 9040,
"MBNoError": 9039,
"MBIllegalFunc": 0,
"MBIllegalDataAddr": 0,
"MBIllegalDataValue": 0,
"MBSlaveError": 0,
"MBAck": 0,
"MBSlaveBusy": 0,
"MBNotEnoughData": 0,
"MBMemParityErr": 0,
"MBCRCErr": 0,
"MBGWPath": 0,
"MBGWTarget": 0,
"MBRegErr": 0,
"MBRegData": 0,
"MBTooManyReg": 0,
"MBUnknownErr": 0,
"MBNoResponse": 1,
"DataOutOfRange": 0
}
},
"TempUnit": "C"
Expand Down Expand Up @@ -268,12 +290,33 @@ Relay.Conductivity|(Bool) Conductivity relay state
Relay.Heating|(Bool) Heating relay state
Relay.UV|(Bool) UV relay state
Relay.Valve|(Bool) Valve relay state
Connection|NeoPool Modbus connection statistics (ESP32 only, [NPSetOption1](#NPSetOption1) must be 1):
Connection.Time|(String) Start time statistics
Connection.MBRequests|(Int) Total ModBus queries
Connection.MBNoError|(Int) Responses without error
Connection.MBNoResponse|(Int) Missing responses
Connection.DataOutOfRange|(Int) Number of values outside the sensor range
Connection.MBIllegalFunc|(Int) Err 1: Illegal Function
Connection.MBIllegalDataAddr|(Int) Err 2: Illegal Data Address
Connection.MBIllegalDataValue|(Int) Err 3: Illegal Data Value
Connection.MBSlaveError|(Int) Err 4: Slave Error
Connection.MBAck|(Int) Err 5: Acknowledge but not finished (no error)
Connection.MBSlaveBusy|(Int) Err 6: Slave Busy
Connection.MBNotEnoughData|(Int) Err 7: Not enough minimal data received
Connection.MBMemParityErr|(Int) Err 8: Memory Parity error
Connection.MBCRCErr|(Int) Err 9: CRC error
Connection.MBGWPath|(Int) Err 10: Gateway Path Unavailable
Connection.MBGWTarget|(Int) Err 11: Gateway Target device failed to respond
Connection.MBRegErr|(Int) Err 12: Wrong number of registers
Connection.MBRegData|(Int) Err 13: Register data not specified
Connection.MBTooManyReg|(Int) Err 14: To many registers
Connection.MBUnknownErr|(Int) Unknown errors occured

The JSON values `pH`, `Redox`, `Hydrolysis`, `Chlorine`, `Conductivity` and `Ionization` are only available if the corresponding module is installed in the device (the corresponding "Module" subkey must be `1`).

The `Relay` subkeys `Acid`, `Base`, `Redox`, `Chlorine`, `Conductivity`, `Heating`, `UV` and `Valve` are only available if the related function is assigned to a relay.

To check which modules are installed use the `Module` value from SENSOR topic or query it manually by using the [NPControl command](#NPControl):
To check which modules are installed use the `Module` value from SENSOR topic or query it manually by using the [NPControl](#NPControl) command:

```json
{
Expand Down Expand Up @@ -334,6 +377,8 @@ NPResult<a id="NPResult"></a>|`<format>`<BR>Set addr/data result format for read
NPPHRes<a id="NPPHRes"></a>|`<resolution>`<BR>Set number of decimal places in results for PH value (resolution = `0..3`).
NPCLRes<a id="NPCLRes"></a>|`<resolution>`<BR>Set number of decimal places in results for CL value (resolution = `0..3`).
NPIONRes<a id="NPIONRes"></a>|`<resolution>`<BR>Set number of decimal places in results for ION value (resolution = `0..3`).
NPSetOption0<a id="NPSetOption0"></a>Sensor data min/max validation and correction function (ESP32 only)<BR>`0` = disable correction<BR> `1` = enable correction *(default)*
NPSetOption1<a id="NPSetOption1"></a>NeoPool Modbus connection statistics (ESP32 only)<BR>`0` = disable statistics<BR> `1` = disable statistics *(default)*
NPRead<a id="NPRead"></a>|`<addr>( <cnt>)`<BR>Read device 16-bit register (addr = `0..0x060F`, cnt = `1..30`). `<cnt>` = `1` if omitted
NPReadL<a id="NPReadL"></a>|`<addr>( <cnt>)`<BR>Read device 32-bit register (addr = `0..0x060F`, cnt = `1..15`). `<cnt>` = `1` if omitted
NPWrite<a id="NPWrite"></a>|`<addr> <data>( <data>...)`<BR>Write device 16-bit register (addr = `0..0x060F`, data = `0..0xFFFF`). Use of `<data>` max 10 times
Expand All @@ -345,6 +390,13 @@ NPExec<a id="NPExec"></a>|Take over changes without writing to EEPROM. This comm
NPSave<a id="NPSave"></a>|Write data permanently into EEPROM.<BR>During the EEPROM write procedure the NeoPool device may be unresponsive to MODBUS requests, this process always takes less than 1 second.<BR>Since this process is limited by the number of EEPROM write cycles, it is recommend to write all necessary changes to the registers and only then execute EEPROM write process using this command.<BR>__Note: The number of EEPROM writes for Sugar Valley NeoPool devices is guaranteed 100,000 cycles. As soon as this number is exceeded, further storage of information can no longer be guaranteed__.
See also|[`SetOption157`](Commands.md#setoption157) - Hide/Show sensitive data

!!! note
The setttings changed by commands [NPPHRes](#NPPHRes), [NPCLRes](#NPCLRes), [NPIONRes](#NPIONRes), [NPSetOption0](#NPSetOption0)
and [NPSetOption1](#NPSetOption1) are permanently stored only if firmware was compiled with USE_UFILESYS
(#define `USE_UFILESYS`, default enabled on ESP32 and disabled on ESP82xx).
Without USE_UFILESYS (default on ESP82xx), you can alternatively use a rule to set your defaults during system start, e. g.:
`Rule1 ON System#Init DO Backlog NPPHRes 1;NPCLRes 1;NPIonRes 1;NPSetOption0 1;NPSetOption1 0`

### Examples

!!! example
Expand Down

0 comments on commit 22f2aa7

Please sign in to comment.