Bayrol pool manager

Hi everyone.

my old pool manager has finally died and its time to replace it. I am looking to replace it with a Bayrol PoolManager (https://www.bayrol.com/products/dosing-systems/automatic-dosing-equipment/premium-class/), the PoolManager advertises as having a network connection and accessible via a web browser. however seems there is no integration built for HA (as far as I can tell)

Would it be possible for someone to take on this challenge? I would be happy to contribute some donations and access to my (not yet purhcased) system for development

Sorry to say but you are taking the problem in the wrong way ! You first check products that have API or communication protocol and you select among these ! If product you want have no interface you won’t be able to do something with it in your home automation !

thanks @vincen,

I did some checking and it seems Bayrol has documented and made it fairly straight forward to read data from the unit over TCP.
http://www.pm5-update.net/download_files/DE/PM5_PoolManager_XML_Data_Protocol_EN.pdf

and

http://www.pm5-update.net/download_files/DE/PM5_PoolManager_Modbus_TCP_Protocol_EN_V1.2.pdf

At this stage I would only be needing HA to read the data in order to integrate into a Lovelace panel.

do you think with this info it would be possible to build something?

one more link which describes how the system can interface with a building management system

http://www.pm5-update.net/download_files/EN/PM5_BMS_Interfacing_EN.pdf

Well you have already all needed in HA to interface with it ! You can read all parameters of system through Modbus TCP that is already implemented in HA: https://www.home-assistant.io/integrations/modbus/
Should be pretty easy to parameter in HA and then you can use datas for your Lovelace interface :wink: Publish the result here and/or ask if you have any issues in setup !

I tried it, but i can´t get it running.
@vincen could you maybe help me how to get the data via Modbus in Home Assistant?

I know the IP-Adress of my PoolManager and I tried it with this:

modbus:
  - name: PoolManager
    type: tcp
    host: IP_ADDRESS
    port: 502
    sensors:
      - name: Sensor1
        unit_of_measurement: °C
        slave: 1
        address: 4033

But it wont work :confused:

Hi @LuegmayerM - did you get this working by any chance?

Hi all,

Thanks to the amazing help of @tom_l on discord, (he) I was able to get this working with the following addition to the configuration.json:

sensor:
  - platform: command_line
    name: PoolTemp
    command: curl "http://IP_ADDRESS_OF_PM/cgi-bin/webgui.fcgi?xmlitem=34.4033"
    value_template: >
      {{ value|regex_findall_index("value=\"(\d+\.?\d*)") }}
    unit_of_measurement: "°C"
    scan_interval: 60

this now returns the temperature of the pool as a sensor in HA.

Thanks again @tom_l and all those in this post!

1 Like

You might be able to do this with a restful sensor and avoid all that nasty regex as rest sensors convert xml to json. It will use less CPU resources. Regex are quite intensive searches.

rest:
  - resource: http://IP_ADDRESS_OF_PM/cgi-bin/webgui.fcgi?xmlitem=34.4033
    scan_interval: 60
    sensor:
      - name: "PoolTemp"
        value_template: '{{ value_json.pm5.item["@value"] }}'
        unit_of_measurement: "°C"

EDIT: corrected value template. Roger confirmed it works on Discord.

1 Like

Thank you, this worked, however I get the following error:

This entity ('sensor.pooltemp') does not have a unique ID, therefore its settings cannot be managed from the UI. See the [documentation](https://www.home-assistant.io/faq/unique_id) for more detail.

What should I add to the config?

That’s not an error. It is a yaml only integration.