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: Modbus - Home Assistant
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.

2 Likes

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.

Reviewing old thread with an alternative solution.

Where there is a working way to get the Bayrol device integrated into HA.
In this German forum, there is a solution do it with Multiscrape:
https://www.poolpowershop-forum.de/forum/thread/1161947-home-assistant-anbindung-bayrol-automatic-cl-ph-neue-vers-mit-wlan/

To make it short after installing Multiscrape via HACS you need to add the following script to the configuration.yaml. ON configuration you just need to update your user ID and password for Bayrol web access and update the cid number to match yours in the first link on config.

multiscrape:
  - name: Bayrol
    resource: https://www.bayrol-poolaccess.de/webview/getdata.php?cid=12345
    log_response: true
    scan_interval: 30
    form_submit:
      submit_once: true
      resource: https://www.bayrol-poolaccess.de/webview/p/login.php
      select: '#form_login'
      input:
        username: # Mailadress
        password: # Password
        autologin: None
    sensor:
      - unique_id: Pool PH Wert
        name: Pool PH Wert
        select: 'body > div > div.tab_data_link > div:nth-child(2) > h1'
      - unique_id: Redoxwert
        name: Redoxwert
        unit_of_measurement: "mV"
        select: 'body > div > div.tab_data_link > div:nth-child(3) > h1'
      - unique_id: Pooltemperatur
        name: Pooltemperatur
        unit_of_measurement: "°C"
        select: 'body > div > div.tab_data_link > div:nth-child(4) > h1'

Hello,

This solution is based on queries via the web portal. Is there perhaps a way to solve the problem locally without first sending the data to the cloud?

Background: I’m currently in the process of combining our smart home components in Homeassistant and trying to solve as many things locally as possible.

I would be very grateful for your help.

1 Like

I’ve found a better way than with Multiscrape (test in progress).

It use MQTT from the provider (so it doesn’t solve the fact to stay local but it seems more robust & efficient)

Bayroll use MQTTS between the device to their server.

Because of the SSL layer, we are unable to decode the traffic. I didn’t find a way to change the destination MQTT(s) server inside the Bayroll device

Hello everyone. Newbie here :slight_smile: I am trying to find the cid number / device ID of my Bayrol device without luck. I have tried to look in the URL of Bayrol poolaccess and in the cookie left on my computer without luck. Any idea? Thanks

Hi @pauldrb - you shouldn’t need the device ID if you use the method above.

the Bayrol manual here has the list of the items you can pull:

if you use the method tom_i posted above it should work: Bayrol pool manager - #9 by tom_l

I developed an integration for the German Bayrol Cloud. If I can get access to an account using bayrol.com, I may be able to do the same for this one. Just open a GitHub issue.