Vistapool Integration

From their docs:

Register 0x010E
Name MBF_RELAY_STATE
Description This register contains the status of each configurable relays:
0 0x0001 Status relay 1 (1 on; 0 off) (normally assigned to ph)
1 0x0002 Status relay 2 (1 on; 0 off) (normally assigned to filtration)
2 0x0004 Status relay 3 (1 on; 0 off) (normally assigned to lightning)
3 0x0008 Status relay 4
4 0x0010 Status relay 5
5 0x0020 Status relay 6
6 0x0040 Status relay 7

Hope it helps

Thanks for your answer Uspino. but then how do i get to each status relay ?
I use to do the following for the other sensors such as address 262 for the temp, 
sensors:
     - name: Pool_relay_270
        slave: 1
        address: 270
        input_type: holding
        scan_interval: 300

should i do something like this ?
{{ states('sensor.pool_relay_270') | int | bitwise_and(2) }} to get the status of relay 3 ?

What do you want to control by “cover”?
!!! MBF_RELAY_STATE is not for relay control !!! if you try to write there, you can brick or, in the better case, soft brick the device.
Each bit in this register works as “binary sensor”
this is how I read it (working templates):
ph peristalic pump state {{ states('sensor.MBF_RELAY_STATE')|int(0) // 1 % 2 }}
filtration relay state {{ states('sensor.MBF_RELAY_STATE')|int(0) // 2 % 2 }}

For controlling LED (single color) write sequence to 4 registers is needed :wink:
First column is for ON, third for OFF sequence.

Dear Kajmaj, thanks for your answer and indeed, i forgot to say that my objective was first to read. Writing is for later (maybe :slight_smile: ).

If i understand correctly the answer to my question is 

lights are on if {{ states('sensor.MBF_RELAY_STATE') | int(0)  //  4 % 2 == 1 }}
if this is true, you make my day 

Your assumption regarding light is correct :slight_smile:

1 Like

Hello,

I have just installed the Sugar valey equipment and I am worried about making a mistake, I would appreciate it if you could confirm if the connection configuration is correct, I attach images, there are 5 pins in the connection module.


See here on Vistapool you shall use pins 2,3
If you have different number of pins in the connector (I see 5) you should check UG of your device maybe ask manufacturer

1 Like

thanks, I think it works, I receive packages but I can’t see it from Home Assistant, I have integrated it, but the sensors come out with unknown status,. Can you check if the configuration of my HF5111B is correct?



In modbus.yaml I have added the following configuration,

 -  name: dagen
    type: tcp
    host: 192.168.1.210
    port: 8899
    delay: 5
    timeout: 5
    
    sensors:
    - name: MBF_MEASURE_PH #  hodnota pH
      slave: 1
      address: 258
      input_type: holding
      data_type: uint16
      scale: 0.01
      precision: 2
      scan_interval: 90
      unit_of_measurement: pH
#    - name: MBF_PAR_PH1 #  horni hranice pH
#      slave: 1
#      address: 1284
#      input_type: holding
#      data_type: uint16
#      scale: 0.01
#      precision: 1
#    - name: MBF_PAR_PH2  #   dolni hranice pH
#      slave: 1
#      address: 1285
#      input_type: holding
#      data_type: uint16
#      scale: 0.01
#      precision: 1
    - name: MBF_MEASURE_TEMPERATURE #  teplota vody
      slave: 1
      address: 262
      input_type: holding
      data_type: uint16
      unit_of_measurement: °C
      scale: 0.1
      precision: 1
      scan_interval: 90
    - name: MBF_PH_STATUS #  AL3, stav pH, peristaltika 
      slave: 1
      address: 263
      input_type: holding
      data_type: uint16
      scan_interval: 90
    - name: MBF_PAR_FILTRATION_STATE # stav filtrace (zap/vyp)
      slave: 1
      address: 1057
      input_type: holding
      data_type: uint16
      scan_interval: 90
    - name: MBF_PAR_FILT_MANUAL_STATE # MBF_PAR_FILT_MANUAL_STATE-stav filtrace zap/vyp
      slave: 1
      address: 1043
      input_type: holding
      data_type: uint16
      scan_interval: 90
    - name: MBF_PAR_FILT_MODE #  režim filtrace
      slave: 1
      address: 1041
      input_type: holding
      data_type: uint16
      scan_interval: 90
    - name: MBF_RELAY_STATE #  stav jednotlivych rele
      slave: 1
      address: 270
      input_type: holding
      data_type: uint16
    - name: MBF_PAR_HIDRO_COVER_ENABLE #  aktivace krytu 1/0
      slave: 1
      address: 1068
      input_type: holding
      data_type: uint16
      scan_interval: 90
    - name: MBF_PAR_HIDRO_COVER_REDUCTION # redukce hydrolyzy v % 
      slave: 1
      address: 1069
      input_type: holding
      data_type: uint16
      scan_interval: 90
    - name: MBF_HIDRO_STATUS # stav systemu hydrolyzy 
      slave: 1
      address: 269
      input_type: holding
      data_type: uint16 
      scan_interval: 90
    

Are you sure with the serial port configuration?
This is defined in NeoPool Control System, MODBUS Register description and works well for me:
 Baud rate: 19200 bauds (you have 115200)
 Parity: none.
 Stop bits: 1

For testing I use AVReporter Modbus Communication Tester. It seems to me better than try to read it directly in HA

1 Like

Pardon my ignorance
True, the port was wrong, I have changed the port to 23 but I still cannot obtain data in HA, I have installed the AVReport and this is what I choose. I’ve tried several ports and I haven’t been able to read anything (Port 502 is already occupied with other solar equipment.) Any ideas I can try?

Thank you very much for all the help.


Use following “Serial port settings”:


Flow control, Cli should stay disabled.
Device uses port 8899 (not 23, try to use any port scanner to verify it).

And following “Communication settings”:


Keep alive and timeout has no influence (in my case, if I remember well, initial setting was 120 and 0)

In AVReporter you should see something like this


for example Reg 270 is MBF_RELAY_STATE

StartReg is decimal address of first register to read, NumOfReg is number of registers to be read including StartReg. You see 270-279, i.e. 10 addresses, starting from 270.

Do not Write registers unless you know what and where you are writing and you are aware of consequencies :wink:

Hello,

I wanted to automate my sugar valley station. I bought the vistapool wifi and am very disappointed about the functionality: only 3 schedule intervals, no heating automation, very basic layout, …

So in my research I stumbled upon this thread. I just ordered a HF2211 and I’m going to try to automate it myself. But I’m confused about the power supply. According to the manual, the power input can be between 5V and 36V. The sugar valley pins deliver 12V, so why don’t you guys just connect the power supply to the sugar valley and use a separate supply?

Thanks for the answer!

There is a “small” difference between price of Sugar Valley Station and external power source for HF2211.
It might be the reason.
You have a chance to be first who try and report if it works.

Yes, if you have a power supply and no sugar valley station, you better use that power supply. But I see in the images above, that the pins are just not used. I’m now wondering if I have to buy a power supply, and if so, why?

HF 2211 has working current approx 200mA, if you are sure that Vistapool is able to feed it from the pin you are speaking about - try it.

Thank you very much for such transparent and clear information.
I have tried in every possible way, I have changed the Baud Rate and all the Slaves, and I cannot connect.
I have sent Sugar Valey to confirm if the parameters of my equipment (Dagen version) correspond to those of Hidrolife.
As soon as they confirm, I’ll let you know.

Ok, so it’s the max current that you’re worried about? That was my question in fact. I think I’m just gonna try and see. After all, the connector is supposed to power the vistapool wifi box…

Thanks for the answer! I’ll post back when it arrived and when I hooked it up.

To have all info in one:

  • the sticker on the back of HF2211 says input: 5-36V/1A, UG says 200mA
  • Vistapool wifi is connected through pins with “WiFi” label

Hello

While I’m still waiting for a response from Sugar Valey, I’ve continued to test, and with the parameters you’ve set the only way I can get any change is by plugging in the second DISPLAY module :roll_eyes:. But in AVR I continue without having values. :thinking: