HA NeoPool MQTT: integration of Tasmota NeoPool (for Sugar Valley, Hayward/Aquarite, Bayrol devices)

Great, just made the PR adding some documentation.

What I was thinking basically matched with the comment from @dami

All of this is covered in the PR.

Cheers!

Just got my Atom Mini in the mail and installed everything. I am using a Sugar Valley Aquascenic. I used to work with a HF2211 but this is so much easier and now I have more options (setting pump speed, changing hydrolysis and pH levels) which I really like!

Only problem I am having is that the temperature is not being read:

image

Temperature is also not shown on the Atom webinterface:

Also the polarity changes and Hydrolysis Data (g/h) doesn’t seem to load.

I could read the temperature with HF2211 (modbus address 262). Any idea why this isn’t working with the Neopool?

Edit: I did get a single temperature reading today (see screenshot below). Very strange that it is not reading the temperature constantly.
image

I suspect a typical error (because exactly this information is missing here):

  • Connect RS485 adapter to port WIFI or EXTERN only
  • do not use DISPLAY
  • do not use two devices e.g. Tasmota & HF2211 together on same port

See also Neopool docs Sugar Valley Connection

I am using the EXTERN port and the HF2211 is not connected. I turned off the Sugar Valley, disconnected the HF2211 and connected the Atom mini to the EXTERN port. So no other modbus communication is happening on the EXTERN/WIFI port. There is a display (internal display) connected to the sugar valley so I didn’t use that port.

Your problem does not concern this integration, as it does not communicate with your Aquascenic directly, but via MQTT JSON with Tasmota and the NeoPool module.

We should therefore focus on Tasmota first:

  • Update your Tasmota to the current version v14.2.0 (binaries are available in the repository firmware folder), because the statistics we need now are only available since v14.1.0.3 and yours is displaying as ‘not available’ so you do not have a Tasmota containg statistics.
    Update is easy via the WebGUI under “Firmware” “from File” and use the appropriate ESP32 with the extension “.bin” (not .factory.bin, these files are for initial flash only, not for OTA updates).

  • Let the whole thing run for a while and take a look at the “Connection Statistics”.

  • It would be better if you would provide several lines of the topic “tele/SmartPool/SENSOR”, as this contains much more information (either from the Tasmota WebGUI under “Tools”/“Console” or via MQTT viewer).

Thanks for the help @curzon01!

  • I am already using v14.2.0 (see screenshot).
    image
  • Not sure where I can see the connection statistics?
  • Below are multiple payloads of the mqtt topic “tele/SmartPool/SENSOR”:
Topic: tele/SmartPool/SENSOR QoS: 0
{"Time":"2024-08-16T09:26:16","NeoPool":{"Time":"2024-08-16T09:26:12","Type":"Aquascenic","Modules":{"pH":1,"Redox":1,"Hydrolysis":1,"Chlorine":0,"Conductivity":0,"Ionization":1},"Powerunit":{"Version":"V5.1","NodeID":"XXXX XXXX XXXX XXXX XXXX 3734","5V":5,"12V":14,"24-30V":32,"4-20mA":0.130},"pH":{"Data":7.6,"Min":7.0,"Max":9.3,"State":3,"Pump":2,"FL1":0,"Tank":1},"Redox":{"Data":670,"Setpoint":700},"Ionization":{"Data":0.0,"Setpoint":250.0,"Max":250.0},"Hydrolysis":{"Data":100,"Unit":"%","Setpoint":100,"Max":100,"Percent":{"Data":100,"Setpoint":100},"Runtime":{"Total":"79T02:50:00","Part":"79T02:50:00","Pol1":"39T11:36:17","Pol2":"39T15:13:43","Changes":365},"State":"Pol2","Cover":0,"Boost":0,"Low":0,"FL1":0,"Redox":1},"Filtration":{"State":1,"Speed":1,"Mode":0},"Light":0,"Relay":{"State":[0,1,0,0,0,0,0],"Aux":[0,0,0,0],"Acid":0},"Connection":{"Time":"2024-08-15T20:01:46","MBRequests":187191,"MBNoError":184748,"MBIllegalFunc":0,"MBIllegalDataAddr":1,"MBIllegalDataValue":0,"MBSlaveError":0,"MBAck":0,"MBSlaveBusy":0,"MBNotEnoughData":3,"MBMemParityErr":0,"MBCRCErr":1,"MBGWPath":0,"MBGWTarget":0,"MBRegErr":0,"MBRegData":0,"MBTooManyReg":0,"MBUnknownErr":1,"MBNoResponse":2437,"DataOutOfRange":2532}}}

Topic: tele/SmartPool/SENSOR QoS: 0
{"Time":"2024-08-16T09:27:49","NeoPool":{"Time":"2024-08-16T09:27:47","Type":"Aquascenic","Modules":{"pH":1,"Redox":1,"Hydrolysis":1,"Chlorine":0,"Conductivity":0,"Ionization":1},"Powerunit":{"Version":"V5.1","NodeID":"XXXX XXXX XXXX XXXX XXXX 3734","5V":5,"12V":13,"24-30V":29,"4-20mA":0.110},"pH":{"Data":7.6,"Min":7.0,"Max":9.3,"State":3,"Pump":2,"FL1":0,"Tank":1},"Redox":{"Data":670,"Setpoint":700},"Ionization":{"Data":0.0,"Setpoint":250.0,"Max":250.0},"Hydrolysis":{"Data":100,"Unit":"%","Setpoint":100,"Max":100,"Percent":{"Data":100,"Setpoint":100},"Runtime":{"Total":"79T02:51:31","Part":"79T02:51:31","Pol1":"39T11:36:17","Pol2":"39T15:15:14","Changes":365},"State":"Pol2","Cover":0,"Boost":0,"Low":0,"FL1":0,"Redox":1},"Filtration":{"State":1,"Speed":1,"Mode":0},"Light":0,"Relay":{"State":[0,1,0,0,0,0,0],"Aux":[0,0,0,0],"Acid":0},"Connection":{"Time":"2024-08-15T20:01:46","MBRequests":187598,"MBNoError":185149,"MBIllegalFunc":0,"MBIllegalDataAddr":1,"MBIllegalDataValue":0,"MBSlaveError":0,"MBAck":0,"MBSlaveBusy":0,"MBNotEnoughData":3,"MBMemParityErr":0,"MBCRCErr":1,"MBGWPath":0,"MBGWTarget":0,"MBRegErr":0,"MBRegData":0,"MBTooManyReg":0,"MBUnknownErr":1,"MBNoResponse":2443,"DataOutOfRange":2532}}}

Topic: tele/SmartPool/SENSOR QoS: 0
{"Time":"2024-08-16T09:27:55","NeoPool":{"Time":"2024-08-16T09:27:53","Type":"Aquascenic","Modules":{"pH":1,"Redox":1,"Hydrolysis":1,"Chlorine":0,"Conductivity":0,"Ionization":1},"Powerunit":{"Version":"V5.1","NodeID":"XXXX XXXX XXXX XXXX XXXX 3734","5V":5,"12V":13,"24-30V":29,"4-20mA":0.120},"pH":{"Data":7.6,"Min":7.0,"Max":9.3,"State":3,"Pump":2,"FL1":0,"Tank":1},"Redox":{"Data":670,"Setpoint":700},"Ionization":{"Data":0.0,"Setpoint":250.0,"Max":250.0},"Hydrolysis":{"Data":100,"Unit":"%","Setpoint":100,"Max":100,"Percent":{"Data":100,"Setpoint":100},"Runtime":{"Total":"79T02:51:37","Part":"79T02:51:37","Pol1":"39T11:36:17","Pol2":"39T15:15:20","Changes":365},"State":"Pol2","Cover":0,"Boost":0,"Low":0,"FL1":0,"Redox":1},"Filtration":{"State":1,"Speed":1,"Mode":0},"Light":0,"Relay":{"State":[0,1,0,0,0,0,0],"Aux":[0,0,0,0],"Acid":0},"Connection":{"Time":"2024-08-15T20:01:46","MBRequests":187622,"MBNoError":185173,"MBIllegalFunc":0,"MBIllegalDataAddr":1,"MBIllegalDataValue":0,"MBSlaveError":0,"MBAck":0,"MBSlaveBusy":0,"MBNotEnoughData":3,"MBMemParityErr":0,"MBCRCErr":1,"MBGWPath":0,"MBGWTarget":0,"MBRegErr":0,"MBRegData":0,"MBTooManyReg":0,"MBUnknownErr":1,"MBNoResponse":2443,"DataOutOfRange":2532}}}

Topic: tele/SmartPool/SENSOR QoS: 0
{"Time":"2024-08-16T09:28:55","NeoPool":{"Time":"2024-08-16T09:28:53","Type":"Aquascenic","Modules":{"pH":1,"Redox":1,"Hydrolysis":1,"Chlorine":0,"Conductivity":0,"Ionization":1},"Powerunit":{"Version":"V5.1","NodeID":"XXXX XXXX XXXX XXXX XXXX 3734","5V":5,"12V":13,"24-30V":29,"4-20mA":0.110},"pH":{"Data":7.6,"Min":7.0,"Max":9.3,"State":3,"Pump":2,"FL1":0,"Tank":1},"Redox":{"Data":670,"Setpoint":700},"Ionization":{"Data":0.0,"Setpoint":250.0,"Max":250.0},"Hydrolysis":{"Data":100,"Unit":"%","Setpoint":100,"Max":100,"Percent":{"Data":100,"Setpoint":100},"Runtime":{"Total":"79T02:52:38","Part":"79T02:52:38","Pol1":"39T11:36:17","Pol2":"39T15:16:21","Changes":365},"State":"Pol2","Cover":0,"Boost":0,"Low":0,"FL1":0,"Redox":1},"Filtration":{"State":1,"Speed":1,"Mode":0},"Light":0,"Relay":{"State":[0,1,0,0,0,0,0],"Aux":[0,0,0,0],"Acid":0},"Connection":{"Time":"2024-08-15T20:01:46","MBRequests":187885,"MBNoError":185432,"MBIllegalFunc":0,"MBIllegalDataAddr":1,"MBIllegalDataValue":0,"MBSlaveError":0,"MBAck":0,"MBSlaveBusy":0,"MBNotEnoughData":3,"MBMemParityErr":0,"MBCRCErr":1,"MBGWPath":0,"MBGWTarget":0,"MBRegErr":0,"MBRegData":0,"MBTooManyReg":0,"MBUnknownErr":1,"MBNoResponse":2447,"DataOutOfRange":2532}}}

Topic: tele/SmartPool/SENSOR QoS: 0
{"Time":"2024-08-16T09:30:19","NeoPool":{"Time":"2024-08-16T09:30:17","Type":"Aquascenic","Modules":{"pH":1,"Redox":1,"Hydrolysis":1,"Chlorine":0,"Conductivity":0,"Ionization":1},"Powerunit":{"Version":"V5.1","NodeID":"XXXX XXXX XXXX XXXX XXXX 3734","5V":5,"12V":13,"24-30V":28,"4-20mA":0.110},"pH":{"Data":7.6,"Min":7.0,"Max":9.3,"State":3,"Pump":2,"FL1":0,"Tank":1},"Redox":{"Data":670,"Setpoint":700},"Ionization":{"Data":0.0,"Setpoint":250.0,"Max":250.0},"Hydrolysis":{"Data":100,"Unit":"%","Setpoint":100,"Max":100,"Percent":{"Data":100,"Setpoint":100},"Runtime":{"Total":"79T02:54:02","Part":"79T02:54:02","Pol1":"39T11:36:17","Pol2":"39T15:17:45","Changes":365},"State":"Pol2","Cover":0,"Boost":0,"Low":0,"FL1":0,"Redox":1},"Filtration":{"State":1,"Speed":1,"Mode":0},"Light":0,"Relay":{"State":[0,1,0,0,0,0,0],"Aux":[0,0,0,0],"Acid":0},"Connection":{"Time":"2024-08-15T20:01:46","MBRequests":188227,"MBNoError":185767,"MBIllegalFunc":0,"MBIllegalDataAddr":1,"MBIllegalDataValue":0,"MBSlaveError":0,"MBAck":0,"MBSlaveBusy":0,"MBNotEnoughData":3,"MBMemParityErr":0,"MBCRCErr":1,"MBGWPath":0,"MBGWTarget":0,"MBRegErr":0,"MBRegData":0,"MBTooManyReg":0,"MBUnknownErr":1,"MBNoResponse":2454,"DataOutOfRange":2532}}}

The topic SENSOR contains it, key ‘Connection’ - see also NeoPool docs SENSOR data description:

    "Connection": {
      "Time": "2024-08-15T20:01:46",
      "MBRequests": 188227,
      "MBNoError": 185767,
      "MBIllegalFunc": 0,
      "MBIllegalDataAddr": 1,
      "MBIllegalDataValue": 0,
      "MBSlaveError": 0,
      "MBAck": 0,
      "MBSlaveBusy": 0,
      "MBNotEnoughData": 3,
      "MBMemParityErr": 0,
      "MBCRCErr": 1,
      "MBGWPath": 0,
      "MBGWTarget": 0,
      "MBRegErr": 0,
      "MBRegData": 0,
      "MBTooManyReg": 0,
      "MBUnknownErr": 1,
      "MBNoResponse": 2454,
      "DataOutOfRange": 2532
    }

Except DataOutOfRange it looks good so far (DataOutOfRange counts only realy out of range values but no invalid peeks within valid range), where MBIllegalDataAddr, MBNotEnoughData and MBUnknownErr should also be 0, but the values may have been caused by something else.

There exists the possibilty to log further debug outputs of all the modbus communication by #define DEBUG_TASMOTA_SENSOR during compilation. Can you compile Tasmota with NeoPool yourself or do you only use precompiled binaries?

Regardless of the DataOutOfRange errors, I would like to discuss the 3 values you mentioned.

For this pls can you take a screenshot of the display of your Aquascenic? I would be interested to see how it is set.

These are missing in the JSON too (and therefore in HA). The reason might be that the register MBF_PAR_TEMPERATURE_ACTIVE (0x40F) returns 0.

  • Pls read out this register using
    NPRead 0x40F
    on console, this must not be 0. Otherwise your Aquascenic tells us that temperature module is inactivated.

What is currently annoying is the retained MQTT messages for SENSOR (retained MQTT are generally problematic, but that’s just my opinion), we should disable temporarily:
SensorRetain 0
If everything works as desired, you can enable it if ylou want.

  • Hydrolysis Data (g/h): Your system tells Tasmota that it is working in %, not in g/h (SENSOR topic key “Hydrolysis”). I assume that your display shows g/h too, is that correct? If yes, can you please tell me the result of the following registers:
    NPRead 0x600,8

  • polarity changes: What do you mean? (it’s displays 363 on your screenshot)

Norbert, shouldn’t we add this to the detected modules section? Are there other modules we should add? This way we have a complete overview of the enabled/disabled modules from the system’s point of view.

image

Without retained SENSOR, on startup all the sensors would be unavailable because the initial state is unknown.

This confuses the nomenclature. Temperature is not a module in the sense of a module. You can configure the temperature function (sensor is present or not). The module flags are information from the system about whether the module is present or not. These are read-only values.
The card temperature should simply be hidden (condition) if it is not present (in this case the json key ‘Temperature’ is simply missing).

I already wrote that’s just my opinion.
Your objection is correct but it only applies for the first 60-300 seconds and retain is the only advantage here. I don’t want to go into this topic again, I think we’ve discussed it extensively in the past. My suggestion was only temporary for debugging purposes, but I mentioned that.

Are there other “modules” like the temperature one? ph/orp/cond for example? We could add an enabled/disabled section. Just to have a better overwiew of the system configuration.

Yes, and I wanted to express mine. :slight_smile:

I see no disadvantage in having retained sensor, only advantages. But we already discussed it enough in the past, I agree to not start it all over again. BTW: users can disable it if they feel it’s disadvantageous.

I did use the precompiled binaries and compiling myself is a bit out of my league I’m afraid.

This is the result, so this is probably the problem. How do I change this to 1?

08:12:26.454 CMD: NPRead 0x40F
08:12:26.479 MQT: stat/SmartPool/RESULT = {"NPRead":{"Address":"0x040F","Data":"0x0000"}}

The display shows %, this is the result of the NPRead:

08:15:13.258 CMD: NPRead 0x600,8
08:15:13.291 MQT: stat/SmartPool/RESULT = {"NPRead":{"Address":"0x0600","Data":["0x0002","0x0001","0x6404","0x0005","0x0000","0x0800","0x0221","0x0000"]}}```

Never mind, I don’t think it was working before but it was working when taking the screenshot and now it is still working.

I set SensorRetain to 0, this is the result of the SENSOR topic now:

Topic: tele/SmartPool/SENSOR QoS: 0
{"Time":"2024-08-18T08:33:36","NeoPool":{"Time":"2024-08-18T08:33:32","Type":"Aquascenic","Modules":{"pH":1,"Redox":1,"Hydrolysis":1,"Chlorine":0,"Conductivity":0,"Ionization":1},"Powerunit":{"Version":"V5.1","NodeID":"XXXX XXXX XXXX XXXX XXXX 3734","5V":5,"12V":14,"24-30V":32,"4-20mA":0.100},"pH":{"Data":7.4,"Min":7.0,"Max":9.3,"State":3,"Pump":2,"FL1":0,"Tank":1},"Redox":{"Data":708,"Setpoint":740},"Ionization":{"Data":0.0,"Setpoint":250.0,"Max":250.0},"Hydrolysis":{"Data":100,"Unit":"%","Setpoint":100,"Max":100,"Percent":{"Data":100,"Setpoint":100},"Runtime":{"Total":"79T21:10:41","Part":"79T21:10:41","Pol1":"39T18:02:36","Pol2":"40T03:08:05","Changes":368},"State":"Pol1","Cover":0,"Boost":0,"Low":0,"FL1":0,"Redox":1},"Filtration":{"State":1,"Speed":1,"Mode":0},"Light":0,"Relay":{"State":[0,1,0,0,0,0,0],"Aux":[0,0,0,0],"Acid":0},"Connection":{"Time":"2024-08-15T20:01:46","MBRequests":841897,"MBNoError":831974,"MBIllegalFunc":0,"MBIllegalDataAddr":1,"MBIllegalDataValue":1,"MBSlaveError":0,"MBAck":3,"MBSlaveBusy":0,"MBNotEnoughData":18,"MBMemParityErr":0,"MBCRCErr":16,"MBGWPath":0,"MBGWTarget":0,"MBRegErr":0,"MBRegData":0,"MBTooManyReg":0,"MBUnknownErr":1,"MBNoResponse":9883,"DataOutOfRange":7579}}}

Topic: tele/SmartPool/SENSOR QoS: 0
{"Time":"2024-08-18T08:33:42","NeoPool":{"Time":"2024-08-18T08:33:38","Type":"Aquascenic","Modules":{"pH":1,"Redox":1,"Hydrolysis":1,"Chlorine":0,"Conductivity":0,"Ionization":1},"Powerunit":{"Version":"V5.1","NodeID":"XXXX XXXX XXXX XXXX XXXX 3734","5V":5,"12V":13,"24-30V":29,"4-20mA":0.110},"pH":{"Data":7.4,"Min":7.0,"Max":9.3,"State":3,"Pump":2,"FL1":0,"Tank":1},"Redox":{"Data":708,"Setpoint":740},"Ionization":{"Data":0.0,"Setpoint":250.0,"Max":250.0},"Hydrolysis":{"Data":100,"Unit":"%","Setpoint":100,"Max":100,"Percent":{"Data":100,"Setpoint":100},"Runtime":{"Total":"79T21:10:47","Part":"79T21:10:47","Pol1":"39T18:02:42","Pol2":"40T03:08:05","Changes":368},"State":"Pol1","Cover":0,"Boost":0,"Low":0,"FL1":0,"Redox":1},"Filtration":{"State":1,"Speed":1,"Mode":0},"Light":0,"Relay":{"State":[0,1,0,0,0,0,0],"Aux":[0,0,0,0],"Acid":0},"Connection":{"Time":"2024-08-15T20:01:46","MBRequests":841921,"MBNoError":831998,"MBIllegalFunc":0,"MBIllegalDataAddr":1,"MBIllegalDataValue":1,"MBSlaveError":0,"MBAck":3,"MBSlaveBusy":0,"MBNotEnoughData":18,"MBMemParityErr":0,"MBCRCErr":16,"MBGWPath":0,"MBGWTarget":0,"MBRegErr":0,"MBRegData":0,"MBTooManyReg":0,"MBUnknownErr":1,"MBNoResponse":9883,"DataOutOfRange":7579}}}

Topic: tele/SmartPool/SENSOR QoS: 0
{"Time":"2024-08-18T08:33:48","NeoPool":{"Time":"2024-08-18T08:33:46","Type":"Aquascenic","Modules":{"pH":1,"Redox":1,"Hydrolysis":1,"Chlorine":0,"Conductivity":0,"Ionization":1},"Powerunit":{"Version":"V5.1","NodeID":"XXXX XXXX XXXX XXXX XXXX 3734","5V":5,"12V":13,"24-30V":29,"4-20mA":0.110},"pH":{"Data":7.4,"Min":7.0,"Max":9.3,"State":3,"Pump":2,"FL1":0,"Tank":1},"Redox":{"Data":708,"Setpoint":740},"Ionization":{"Data":0.0,"Setpoint":250.0,"Max":250.0},"Hydrolysis":{"Data":100,"Unit":"%","Setpoint":100,"Max":100,"Percent":{"Data":100,"Setpoint":100},"Runtime":{"Total":"79T21:10:52","Part":"79T21:10:52","Pol1":"39T18:02:47","Pol2":"40T03:08:05","Changes":368},"State":"Pol1","Cover":0,"Boost":0,"Low":0,"FL1":0,"Redox":1},"Filtration":{"State":1,"Speed":1,"Mode":0},"Light":0,"Relay":{"State":[0,1,0,0,0,0,0],"Aux":[0,0,0,0],"Acid":0},"Connection":{"Time":"2024-08-15T20:01:46","MBRequests":841942,"MBNoError":832018,"MBIllegalFunc":0,"MBIllegalDataAddr":1,"MBIllegalDataValue":1,"MBSlaveError":0,"MBAck":3,"MBSlaveBusy":0,"MBNotEnoughData":18,"MBMemParityErr":0,"MBCRCErr":16,"MBGWPath":0,"MBGWTarget":0,"MBRegErr":0,"MBRegData":0,"MBTooManyReg":0,"MBUnknownErr":1,"MBNoResponse":9884,"DataOutOfRange":7579}}}

Maybe this could be relevant: I had to send my sugar valley aquascenic back to sugar valley at the beginning of this year as it was bricked. When I got it back, the firmware was clearly a newer version (different UI on the display). Could this have something to do with this?

I can provide this if it becomes necessary

True, you have to configure your Aquascenic temperature sensor is enabled. The cleanest way to do that is:

Go to “Main menu” → “Service menu” → “Extra settings” and set “Temperature” to “Standard” (that should currently be set to “None”).

The password for “Service menu” is

  • For TFT screens (having buttons): Up-Key → Down-Key → Plus-Key → Minus-Key → Return
  • For Touchscreens: 36149

Your system is set by the manufacturer to works in %, not in g/h. You should not expect HA to show you the hydrolysis level in g/h,. that’s not possible. Everything is correct here.

Yes, that’s the reason.

1 Like

This fixed it! Now I can read the temperature values. Thank you so much for your help!

Norbert, those settings in the Extra menu can’t be configured via registers? I guess they can be read, right? At least we could show the settings in the card, I think it would be useful. The temperature sensor can actually have 3 values, it’s not a binary sensor.

Sure, but apart from the temperature setting, this is not always limited to a single register (see note below).

You can eval everything that the INSTALLER page (0x04xx) register offers, but note:

During the hours of checking and completing the SV documentation, I noticed that there are settings that have to be set in more than one register and/or depending on other register values (which prevents a setting the user wanted to do) and also that this was not offical documented. To do this I simply recorded the data traffic between the display and the motherboard and changed a lot of settings to see if the display only writes to one or more registers. This is certainly not complete.

I wouldn’t open this barrel from my side. These are things that are set once for the system configuration and then forgotten.

That’s great.
I recommend that you also check the most important other settings, I don’t think they made a backup of your settings before the replacement and restored them after that.

1 Like

I understand, thanks for the explanation. I will never understand though why they make things complicated. :slight_smile:

I do. The firmware has grown historically and in order to remain backward-compatible, SV often had no choice but to solve things this way. Unfortunately, you can’t always start building on a greenfield site.

Hello,
in my HA installation the data is not updated when there is a change in the Tasmota Neopool, using MQTT Explorer you can see that the data is updated, but on the dashboard the data is only updated when you reload the yaml, but unfortunately there is no automatic update. Do you have an idea where I can find the error? Sorry for my bad English (translated with Google. :wink: