Hayward, Oasis and other generic Pool Heatpump using PC1002

Hi there,

If anyone interested, I was able to create climate entity from PC1002 pool heatpump board using Modbus.

Most of the information come from either this pdf https://www.oasisheatpumps.com/pdf/Technical_Manual_Pool_inverter_of_PC1002_2019.pdf or comparing registers after changer a settings on display.

If you think I am missing something, please share.

Modbus is done using a EW11 RS485 to Wifi gateway

modbus:
  - name: modbus_pool
    type: tcp
    host: 172.30.30.21
    port: 9999
    climates:
      - name: "Piscine"
        input_type: holding
        address: 2046
        slave: 1
        hvac_mode_register:
          address: 1019
          values:
            state_cool: 0
            state_auto: 1
            state_heat: 2
        fan_mode_register:
          address: 1076
          values:
            state_fan_low: 1
            state_fan_auto: 0
        hvac_onoff_register: 1011
        target_temp_register: 1136
        max_temp: 35
        min_temp: 15
        offset: 0
        precision: 1
        scale: 0.1
        temp_step: 0.5
        temperature_unit: C

If you have any question, feel free to ask.

Etienne

Hello Etienne,

I’ve been looking for this solution for a long time now, could you show me the configuration for home assistant, and tell me exactly how to set up this configuration. ?
Thank you very much

Hi Eric,

You need a RS485 to Wifi gateway (like Elfin EW11 https://www.aliexpress.com/item/32916950283.html).
You then connect it to your heatpump RS485 (I used a cat5 cable)

Follow intruction in EW11 manual to configure it (basically connect it to your Wifi)
Then configure Serial settings as this :

And Communications Settings as this :

And finally add this to your configuration.yaml (edit IP address according to yours)

modbus:
  - name: modbus_pool
    type: tcp
    host: 172.30.30.21
    port: 9999
    climates:
      - name: "Pool"
        input_type: holding
        address: 2046
        slave: 1
        hvac_mode_register:
          address: 1019
          values:
            state_cool: 0
            state_heat_cool: 1
            state_heat: 2
        fan_mode_register:
          address: 1076
          values:
            state_fan_low: 1
            state_fan_auto: 0
        hvac_onoff_register: 1011
        target_temp_register: 1136
        max_temp: 35
        min_temp: 15
        offset: 0
        precision: 1
        scale: 0.1
        temp_step: 1
        temperature_unit: C
    sensors:
      - name: "Pool Ambiant Temperature"
        slave: 1
        address: 2049
        data_type: int16
        input_type: holding
        scale: 0.1
        offset: 0
        precision: 1
        device_class: temperature
        state_class: measurement
        unit_of_measurement: '..C'
      - name: "Pool Water Outlet Temperature"
        slave: 1
        address: 2047
        data_type: int16
        input_type: holding
        scale: 0.1
        offset: 0
        precision: 1
        device_class: temperature
        state_class: measurement
        unit_of_measurement: '..C'
      - name: "Pool Fan Speed"
        slave: 1
        address: 2061
        data_type: int16
        input_type: holding
        scale: 0.1
        offset: 0
        precision: 1
        state_class: measurement
        unit_of_measurement: 'RPM'
      - name: "Pool Condenser Current"
        slave: 1
        address: 2022
        data_type: int16
        input_type: holding
        state_class: measurement
        unit_of_measurement: 'A'

This will create a standard entity climate and few other sensors to monitor things around like ambiant temperature, water outlet temperature, fan speed and Condenser Current (which can be use to track heatpump running or not).

Hello,
I have been looking to do this for a long time. I will order the EW11 and I will come back to you to give you news of my installation

really, thank you

Eric

For those interested, I create a MQTT using modbus4mqtt and MQTT HVAC Integration

The advantage is with this integration, you can use HVACAction which tells us current state of HVAC (heating, cooling, off, idle, etc) instead of only preset mode.

modbus4mqtt configuration (pc1002.yaml):

ip: 172.30.30.21
port: 9999
update_rate: 1
scan_batching: 1
registers:
  - pub_topic: "pool/hvac"
    address: 1019
    type: int16
    table: 'holding'
    pub_only_on_change: false
    json_key: mode
    value_map:
      cool: 0
      auto: 1
      heat: 2
  - pub_topic: "pool/hvac"
    address: 1011
    type: int16
    table: 'holding'
    pub_only_on_change: false
    json_key: power
    value_map:
      off: 0
      on: 1
  - pub_topic: "pool/hvac"
    address: 1136
    type: int16
    table: 'holding'
    scale: 0.1
    pub_only_on_change: false
    json_key: temp_target
  - pub_topic: "pool/hvac"
    address: 2046
    type: int16
    table: 'holding'
    scale: 0.1
    pub_only_on_change: false
    json_key: temp_inlet
  - pub_topic: "pool/hvac"
    address: 2047
    type: int16
    table: 'holding'
    scale: 0.1
    pub_only_on_change: false
    json_key: temp_outlet
  - pub_topic: "pool/hvac"
    address: 2049
    type: int16
    table: 'holding'
    scale: 0.1
    pub_only_on_change: false
    json_key: temp_ambient
  - pub_topic: "pool/hvac"
    address: 2061
    type: int16
    table: 'holding'
    scale: 0.1
    pub_only_on_change: false
    json_key: fan_speed
  - pub_topic: "pool/hvac"
    address: 1076
    type: int16
    table: 'holding'
    pub_only_on_change: false
    json_key: fan_mode
    value_map:
      auto: 0
      low: 1
  - pub_topic: "pool/hvac"
    address: 2022
    type: int16
    table: 'holding'
    pub_only_on_change: false
    json_key: condenser_current
  - set_topic: "pool/hvac/fan/set"
    address: 1076
    type: int16
    table: 'holding'
    value_map:
      auto: 0
      low: 1
  - set_topic: "pool/hvac/mode/set"
    address: 1019
    type: int16
    table: 'holding'
    value_map:
      cool: 0
      auto: 1
      heat: 2
  - set_topic: "pool/hvac/power/set"
    address: 1011
    type: int16
    table: 'holding'
    value_map:
      off: 0
      on: 1
  - set_topic: "pool/hvac/target/set"
    address: 1136
    type: int16
    table: 'holding'
    scale: 0.1

Home Assistant (configuration.yaml)

mqtt:
  climate:
    - name: Pool
      unique_id: pool
      current_temperature_topic: "modbus4mqtt/pool/hvac"
      current_temperature_template: "{{ value_json.temp_inlet }}"
      fan_modes:
        - "auto"
        - "low"
      fan_mode_state_topic: "modbus4mqtt/pool/hvac"
      fan_mode_state_template: "{{ value_json.fan_mode }}"
      fan_mode_command_topic: "modbus4mqtt/pool/hvac/fan/set"
      icon: mdi:pool-thermometer
      max_temp: 35
      min_temp: 15
      modes:
        - "auto"
        - "cool"
        - "heat"
        - "off"
      mode_state_topic: "modbus4mqtt/pool/hvac"
      mode_state_template: "{{ 'off' if 'off' in value_json.power else value_json.mode }}"
      mode_command_topic: "modbus4mqtt/pool/hvac/mode/set"
      power_command_topic: "modbus4mqtt/pool/hvac/power/set"
      payload_off: "off"
      payload_on: "on"
      action_topic: "modbus4mqtt/pool/hvac"
      action_template : >-
        {% if value_json.condenser_current|int > 0 %}
          {% if (value_json.temp_inlet|int < value_json.temp_outlet|int and value_json.mode == 'auto') or value_json.mode == 'heat' %}
            heating
          {% elif (value_json.temp_inlet|int > value_json.temp_outlet|int and value_json.mode == 'auto') or value_json.mode == 'cool' %}
            cooling
          {% endif %}
        {% elif value_json.power == 'off' %}
          off
        {% else %}
          idle
        {% endif %}
      temperature_state_topic: "modbus4mqtt/pool/hvac"
      temperature_state_template: "{{ value_json.temp_target }}"
      temperature_command_topic: "modbus4mqtt/pool/hvac/target/set"
      temperature_unit: C
      temp_step: 0.1
  sensor:
   -  name: Pool Fan Speed
      state_topic: modbus4mqtt/pool/hvac
      unit_of_measurement: 'RPM'
      state_class: measurement
      value_template: "{{ value_json.fan_speed }}"
      icon: mdi:fan
   -  name: Pool Ambient Temperature
      state_topic: modbus4mqtt/pool/hvac
      unit_of_measurement: '..C'
      state_class: measurement
      value_template: "{{ value_json.temp_ambient }}"
      icon: mdi:pool-thermometer
   -  name: Pool Outlet Temperature
      state_topic: modbus4mqtt/pool/hvac
      unit_of_measurement: '..C'
      state_class: measurement
      value_template: "{{ value_json.temp_outlet }}"
      icon: mdi:thermometer

Then for turning off automatically when choosing mode off or tuning on if other mode I create this automation :

alias: Pool - ON/OFF
description: Pool - ON/OFF
trigger:
  - platform: mqtt
    topic: modbus4mqtt/pool/hvac/mode/set
    payload: "off"
    id: "off"
  - platform: mqtt
    topic: modbus4mqtt/pool/hvac/mode/set
    payload: heat
  - platform: mqtt
    topic: modbus4mqtt/pool/hvac/mode/set
    payload: cool
  - platform: mqtt
    topic: modbus4mqtt/pool/hvac/mode/set
    payload: auto
condition: []
action:
  - if:
      - condition: trigger
        id:
          - "off"
    then:
      - service: climate.turn_off
        metadata: {}
        data: {}
        target:
          entity_id: climate.pool
    else:
      - service: climate.turn_on
        metadata: {}
        data: {}
        target:
          entity_id: climate.pool
mode: single

Hello Etienne,

Hello,
I haven’t received my EW11 yet, I hope it arrives quickly
to test all of this.
thank you and I will come back to you
Eric


Hello Etienne,

I received my EW11, I plugged it in following your instructions.
I also added the information in the home assistant configuration file, but home assistant cannot retrieve the information, I see the home assistant IP in the communicate state tab on EW11
“here is the error” Enregistreur: homeassistant.components.modbus.modbus
Source: components/modbus/modbus.py:331
intégration: Modbus (documentation, problèmes)
S’est produit pour la première fois: 13:53:12 (1 occurrences)
Dernier enregistrement: 13:53:12

Pymodbus: modbus_pool: Error: device: 1 address: 1136 → Modbus Error: [Input/Output] ERROR: No response received after 3 retries"

do you have any idea about my problem?
quick question do you speak French?::slight_smile: