Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NeoPool add data validation and statistics #21721

Merged
merged 2 commits into from
Jul 4, 2024

Conversation

curzon01
Copy link
Contributor

@curzon01 curzon01 commented Jul 3, 2024

Description:

Adds NeoPool data validation for some sensors and communication statistics (default enabled for ESP32, default disabled for ESP8266, to enable it on ESP8266 define NEOPOOL_RANGE_CHECKS and NEOPOOL_CONNSTAT).

Data validation

The following controller measurements are checked against a min/max range, values outside the range are discarded:

  • Ionization level [0..100] (%)
  • Hydrolysis intensity level [0..x] (% or g/h), x is system-dependent
  • pH level [0..14]
  • Redox level [0..1000] (mV)
  • Chlorine level [0..10.0] (ppm)
  • Conductivity level [0..100] (%)
  • Temperature sensor [0..65] (°C)

Communication statistics

add the following stats to NeoPool SENSOR topic

    "Connection": {
      "Time": "2024-07-03T15:00:00",
      "MBRequests": 36103,
      "MBNoError": 34888,
      "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": 1215,
      "DataOutOfRange": 0
    }
  • MBRequests is the total number of system request
  • MBNoError is the total number of system responses without error
  • MBNoResponse is the number of MBRequests having no repsonse
  • DataOutOfRange is the total number of values outside the valid range
  • All other MB... items are Modbus response errors (Modbus error 1..14)

Checklist:

  • The pull request is done against the latest development branch
  • Only relevant files were touched
  • Only one feature/fix was added per PR and the code change compiles without warnings
  • The code change is tested and works with Tasmota core ESP8266 V.2.7.7
  • The code change is tested and works with Tasmota core ESP32 V.3.0.2
  • I accept the CLA.

@arendst arendst merged commit 843dd17 into arendst:development Jul 4, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants