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

hey all, finally deployed the system and it’s awesome. Having issue with NTP. the dongle keep changing my system time bringing it one hour behind. I believe this is linked to timezone or solar timing ? can i fix it ? other question is , do we have access to system menu parameter or timer based parameter ?thank you

EDIT: solved by setting solar time and timezone by console for italy the following commands :

cmnd/NeoPool/TimeSTD 0, 0, 10, 1, 3, 60
cmnd/NeoPool/TimeDST 0, 0, 3, 1, 2, 120
cmnd/NeoPool/Timezone 99

I need to ask another question related to external sensor, i would like to import a 4-20ma pressur sensor on the filter to trigger a notification to backwash. Do you know the wiring scheme ?

image
do you think this is correct for a 12-24v 4-20ma 2 wire sensor?

You can’t import just any sensor signals, each connector has a specific function. This system does not have a connector for a pressure sensor.

i can do it via the HA , i’m reading the 4-20ma input and i build the expression following the sensor spec ?

don’t you think this is feasible?

Otherwise can I use GPIO left over in the Atom Lite? it can be either a 0-5v sensor or a 4-20ma

Sure, you are measuring the current loop here, but

  • it is not calibrated
  • there are systems where this input is intended for a potentiostatic chlorine probe, so there is no guarantee that a pressure probe at this input will generate any unwanted control in your system.

This is the better approach for your requirement, GPIO33 for example is a free ADC input on your Atom Lite.

Can you guide me a bit? If I understand well I can feed a 0-3.3v voltage to gpio33 and then transform the readout at HA from MQTT.

So I must use a 0-5v sensor 3 wires, from where I can take the voltage to supply the sensor ?

Right, but assuming your sensor works with an operating voltage of 5V and also supplies 0-5V at the signal output, you will need an additional voltage divider (you can calculate this here), because ESP32 analogue inputs can only tolerate 0-3.3V.

Connect the sensor like this:
image

then go to Tasmota go to ‘Configuration’ → ‘Configure Module’ and set GPIO33 to ‘ADC Input’, you will now find the value in the MQTT “SENSOR” topic under “ANALOG.A1” and on the WebUI. If you need help with the HA YAML configuration, let me know.

The Atom Lite (see " Peripherals Pin Map") has 5V and GND available on the 4-pin connector. On the 5-pin you will find GPIO33

1 Like

This looks pretty cool, I had the Neopool thing working under openHAB using an ESP8266… though output of a set of parameters only (RX,Temp,PH).

Now switching to HA but since I started with the HA green I really got kicked into cool water here. Like what the heck are Home Assistant Packages? The Documentation isn’t exactly helpful since it doesn’t explain what to do. I got HACS integrated, got a file editor running but no clue how and where to add packages.

" Packages are configured under the core homeassistant/packages in the configuration "

What core? Due to the regular updates I am not even sure if things didn’t change meanwhile. Does this packages thing even exist in V2024.10.2 anymore?

Sorry if this is noob stuff, but what do I have to do here? Do I have to get back to linux bash level? Thought I could get around that with HA.

Flashing your firmware to the D1 mini worked flawlessly, thanks for providing the precompiled stuff, this really makes things easier.

@nouseforaname don’t panic. If the documentation is not clear to beginners it’s understandable, HA takes time and discipline. :slight_smile:

Packages are there, if they didn’e exist anymore, you wouldn’t have found the documentation that explains how to configure it, or it would have said they’re deprecated or something like that.

So, it’s easier than you think…

In configuration.yaml, under the homeassistant topic, put the packages subtopic (indentation is critical in yaml, be sure to indent the subtopic):

homeassistant:
  packages: !include_dir_named packages/

This tells HA that there’s a packages folder under the main config directory (at the same level of www folder to give you a hint)

Create the folder packages, under that folder, where you also need to place the provided package file.

The main config folder should look like this:

Then restart HA (or reload everything) and it should work.

Duh, okay, there is no config.yaml here but a configuation.yaml. Added the two rows there, created a sub-path /packages and tried to reboot, getting this:
grafik

There is no www folder here btw, I guess that is not a default thing though my packages folder parallel to /custom_components and /blueprints like in your screenshot. So I guess I did that one right :wink:

Line 216 in the yaml is a html body tag so I guess that isn’t really the issue.

the ha_neopool_mqtt_package.yaml package file does not contain any html code, it’s yaml code. I bet you didn’t download the file correctly or you probably did a bad copy&paste from the web page.

Please show a screenshot of the folders in HA (like my screenshot), and also show the contents of the package file you downloaded from lines 200 to lines 250.

The link to correctly download the file from the repo is: https://raw.githubusercontent.com/alexdelprete/HA-NeoPool-MQTT/refs/heads/main/ha_neopool_mqtt_package.yaml

Oh…sh… thanks, yes that was stupid, okay got the yaml in it now.

Downloaded the cards as well:
grafik

The entities are all available, a ton of them. Now I need to find out how to include your pre-made yaml. Sensor values are “undefined”, I assume I need to double check the GPIO, I remember I set some in the Tasmota config manually in my old version back then.

“available” in HA means that you see a value. If you see undefined it means that the entities (sensors, etc.) contained in the package file, are not working. In order to understand why, you need to check the Tasmota UI on the device: if it shows all the values of the pool sensors, then it means GPIO is fine, if it doesn’t you need to check wiring etc. Once you see the correct values of the pool sensors in Tasmota UI homepage, then those values are also sent by Tasmota to the MQTT broker.

The package yaml file tells HA how to populate the sensors values pulling them from MQTT.

This is in simple terms how it works.

Yes I need to double check the wiring, if I remember right there was a default status page with the sensor info directly on the first page of the tasmota backend, there is nothing now.
grafik

Wiring is correct at RX/TX of the D1 mini, so nothing just like I had it in the prior working setup. Not sure what is going on now. My pool is already in winter mode and the sensors are out. However it should at least show the general fltration settings and the temperature as long as the sugarvalley is on power. :frowning:

What confuses me a bit is this (console):

10:39:20.334 MQT: stat/SmartPool/RESULT = {“GPIO0”:{“6496”:“NeoPool Tx”},“GPIO2”:{“0”:“None”},“GPIO4”:{“0”:“None”},"GPIO5":{“6528”:“NeoPool Rx”},“GPIO12”:{“0”:“None”},“GPIO13”:{“0”:“None”},“GPIO14”:{“0”:“None”},“GPIO15”:{“0”:“None”},“GPIO16”:{“0”:“None”},“GPIO17”:{“0”:“None”}}

This should be on 3, 5 is Digital1 on the D1 mini, I assume hardware serial is used?
However:

If you want to use your defined template “Neopool ESP32/ESP8266” activated be sure it’s enabled in Tasmota under “Configuration” → “Configure Module” by select here Module Type “Neopool ESP32/ESP8266 (0)” - assuming it’s still on “ESP32-DevKit (1)”

Hi Curzon,

looks okay?


What is the number representing? (0)

unfortunately not

You have now assigned Tx/Rx twice

  • NeoPool Tx on GPIO0 (in Module Config) and GPIO3 (from Template)
  • NeoPool Rx on GPIO5 (in Module Config) and GPIO1 (from Template)

this will not work, because the sensor driver can only handle one Tx/Rx pair, not two.

You have to decide where to assign Rx/Tx:

  • either you use a Template and then select this in ‘Configure Module’
  • or you select ‘ESP32-DevKit (1)’ in ‘Configure Module’ and assign the GPIOs there.

In other words

  • If you select ‘ESP32-DevKit (1)’ in ‘Configure Module’, then the template is irrelevant and you only make the GPIO assignment in ‘Configure Module’
  • If you select the template (which is Module (0)), then you have the GPIO assignment from the template. At the same time, all GPIOs that you have defined as ‘User’ in the template are also offered for free selection in ‘Configure Module’.

And with the last one you have made the double assignment.

To cleanup:

  1. re-choose ‘ESP32-DevKit (1)’ and remove all GPIO assignments
  2. make your desired GPIO assigment within the Template definition
  3. last re-select ‘Neopool ESP32/ESP8266 (0)’

Make further changes in Template definition only. Best way is you set all unused GPIOs within your Template to “None”. Then you can’t make any mistakes in Module Config anymore

This simply means you have selected Module (0), which is your Template definition.

understood, I am just not sure where the GPIO 5 thing came from

So as in OP:

Other ESP32/ESP8266 devices (GPIO3: NeoPool TX - GPIO1: NeoPool RX):

Template {"NAME":"NeoPool ESP32/ESP8266","GPIO":[1,6528,1,6496,1,1,0,0,1,1,1,1,1,1],"FLAG":0,"BASE":18}

So 6528=GPIO 1 and 6496=GPIO 3 1=User 0=None I assume?

If I set all (except 1 and 3) on none I get this in the console :-/

14:41:05.250 CMD: gpio
14:41:05.256 MQT: stat/SmartPool/RESULT = {“GPIO”:“Not supported”}

So it looks like this now:



grafik

Hmm. I should remind myself more often to never change a running system.

that’s correct, nothing wrong.

Defining a template for which no GPIO is available is like selecting a build-in module for a hardware that has no GPIOs. “GPIO” makes no sense in this case either.

When using a template and you want to show the GPIO assignment by cmnd use the command “Template”.

So now, where is your physical Rs485 interface Rx/Tx connected to?
GPIO1 and 3? True?

If yes, try swapping assignment e. g. GPIO1 Tx and GPIO3 Rx.