Vistapool Integration

Tried with proper Serial settings, as instructed in message Vistapool Integration - #115 by kajmaj

I did change A B cables around a few times just in case, all I get in Status of EW for serial is Sent frames but non received… I thought should be the bloody A-B wiring but seems not.

I did test with other modbus device and my client working fine… this are settings used in HA. If I change IP/port and set a different sensor I read fine another server, and HA it is connecting to EW1.

- name: "aquarite"
  type: tcp
  host: 192.168.1.137
  port: 4328
  
  sensors:
    - name: MBF_MEASURE_PH #  hodnota pH
      slave: 1
      address: 258
      input_type: holding
      data_type: uint16
      scale: 0.01
      precision: 2
      scan_interval: 3
      unit_of_measurement: pH

I was running out of ideas, maybe different serial port settings on this AquaRite Flo Advanced device?
What do you think I could look at more?

While sending this post the light bulb moment appeared :slight_smile:
The plug it was reversed in this device, and I was missing one of the AB cables, changed poisitions to the empty pin and data apperead :wink:

You saved me running to check PH that is acting funky this year :slight_smile:

Thanks a lot!

You posted “your config file”. Is it truly 1 file? If so: where is it located? Or is it just an excerpt of your configuration yaml?

I see. It is an excerpt of my swimming pool package.
This is yaml file of Vistapool modbus sensors I am currently using.
My whole swimming pool package more than 30 yaml files.

It is thanks to that file, and some trial and error with the HF2211 (also getting power from my Sugar Valley OX1) that I have it working: reading of pH, temperature and such. Thank you for that.

Any chance that you can share your total package? It would be nice to not only read data from my Sugar Valley, but also write to it (really control my pool).

Hi kajmaj,
can you post your script to control the pool light ?
I’m trying to make a script with the sequence of this 4 modbus register address with modbus.write_register service but unfortunately the relay does not switch :confused:
Thank you :wink:

Here you are.

#----------------------------------------------------------------#
#        Vistapool light control MODBUS script        #
#----------------------------------------------------------------#

script:
 
  light_mb_toggle:
    sequence:
    - service: modbus.write_register
      data:
        hub: pool  #  your name of hub   
        unit: 1    #  your address of slave  
        address: 1147
        value: [2]          
    - service: modbus.write_register
      data_template:
        hub: pool  #  your name of hub   
        unit: 1    #  your address of slave
        address: 1136
        value: [3]       #  [3] for ON   [4] for OFF
    - service: modbus.write_register
      data:
        hub: pool  #  your name of hub  
        unit: 1    #  your address of slave 
        address: 752
        value: [1]
    - delay: 00:00:01
    - service: modbus.write_register
      data:
        hub: pool  #  your name of hub   
        unit: 1    #  your address of slave 
        address: 757
        value: [1]
2 Likes

it works perfectly, thank you ! :slight_smile:

Hello, did you compile the tasmota with the neopool andon? do you have some infos how you did the compilation, which changes you made in the setup file for the compilation and how did you flashed ypour own version on the ESP?

Hello I got it to work! I now have my pH and my Temp. What is the address for the Redox ? Anyone ?

Here’s my config for Redox:

    - name: redox  # MBF_MEASURE_RX #  Redox ppm 
      slave: 1
      address: 259
      input_type: holding
      data_type: uint16
      scan_interval: 300   
      unit_of_measurement: mV
      scale: 1
      precision: 0
1 Like

Hi, I was tryning to connect hidralife to homessitant via HF7121 RS485. Now I can get data from device, but the pump doesen’t work with hidralife… I was trying to write data via modbus to turn on/off the system.

Could you help me?
How can i fixed? There is a way to reset hidralife? Somebody has all de modbus adress?

Thanks

I answered myself.

I had to change 0x0412 to 2

Hi, thanks a lot for all the Vistapool @ ModBus information in this thread!! It helped me to connect my pool automation to Home Assistant. I’ve been using HF5111S for modbus communication over LAN.

I am getting all the values from the pool nicely (I am able to read it) and I am also able to control filtration ON / OFF. However, what does not work for me (yet) is the heating of the pool. This is connected to relay 7 and I can read the value from there using MBF_RELAY_STATE address. I can see the heating working in INTELIGENT mode. Not sure how to control this myself though in MANUAL mode. In your sample config I can see a script heating_mb_toggle where you write to MBF_PAR_TIMER_BLOCK_BASE registers at 0x0480 and 0x04D9. Unfortunately this does not work for me; maybe my heating relay is different to yours(?).
Any ideas ?

I use Vistapool Hidrolife and there are 4 relays I am able (I know how) to control in it. i.e. Lights (relay 2), filtration (relay 3), AUX3 and AUX4.
AUX4 is for heating and if I remember well, it must be activated somewhere in Hidrolife service menu.
For those 4 I published writting sequences and registers description is available.
Vistapool itself has to be in manual mode if you want to control Vistapool via “external” modbus device.
You will need to create all automation to achieve the same behavior like Heating in INTELLIGENT mode.
btw: where did you find 0x0480 register?

As for the 0x480 I can see this in your post here here:

  heating_mb_toggle:
    sequence:
    - service: modbus.write_register
      data:
        hub: bazen
        unit: 1
        address: 1152
        value: [16384]

Can you explain a bit what’s happening here actually? You seems to be controlling “Auxiliary relay 2 – Second interval” / OFFMB_TIMER_ON and writing 16384 there.

And then there’s register 1241 set to 1, which is “Auxiliary relay 4 – First interval” OFFMB_TIMER_ENABLE writing 3 or 4 here. I guess that’s the relay with your heating and you’re setting this to CTIMER_ALWAYS_ON / CTIMER_ALWAYS_OFF with 3 and 4.

Ups, Seems to be a bit embarassing … it is my typo error. :woozy_face:
There should be 1252 (0x04E4) register address.

The whole sequence is originated from anybody else who adopted Vistapool to Loxone. At least partially by reverse engineering, rest is from registers description. I’ve just modified it iaw HA needs. I verified if it works only and applied it afterwards.

If I understood well the script is doing sthg like this >>> “open” register, write, confirm/save, “close” register.
It is the same way as Vistapool works if it is controlled either manually or via cloud.

Vistapool has to be in “manual” mode to be controlled by MODBUS. If is in any other mode it falls to “soft brick” if you try to write (at least in my case). Reading is fine in any mode.
Because of it, you cannot exploit ‘intelligent heating’ or any other heating mode or embedded timers.

Makes sense now, thank a lot for your help. Controlling heating relay still does not work for me though. It’s strange when my config for heating sensor seems identical to yours and it changes state correctly ON/FF when running in “Intelligent” mode :

      ohrev:
        friendly_name: "Ohrev bazen"
        value_template: "{{ states('sensor.MBF_RELAY_STATE')|int // 64 % 2 }}"

As per the documentation such mask for 6-th bit is “0x0040 Estado del relé 7”

Did you try to switch Vistapool to “manual” and write?

I am able to control filtration ON/OFF when in manual mode. I am not able to control heating though.

At the moment when I want heat the pool I need to switch to Intelligent mode (for a few hours) and then switch back to manual.

Do you have heating connected to the AUX4 relay?