Gree Versati III Air to water heat pump

These are addresses I have found variously on the internet for other Gree Versati. I just don’t understand the modbus addresses at all. I’ll try 0x76 and let you know.

Can you share your configuration in ESPHome and exactly what converter you are using?

Thanks!

I have done the integration as dslava suggested and I have ordered a
usb to RS485 to see how it will go. Also I have ordered one esp32 and one esp8266 to try make the connection wirelessly aftewards.I have no Idea if that will work. I’ll keep you updated with all the procedures I will try.

Very Happy this is getting closer to be done. The UI of that machine is really crappy. Putting it in HA will help save a lot of $$ in consumption and overall have custom automations.

Thank you all so far.

2 Likes

Seems that everything works fine with an usb directly in raspberry instead of esphome.

2 Likes

So I still have a problem with esphome.
Does anyone know what I have wrong?

mcu: ESP32

esphome code:

uart:
  id: mod_bus
  tx_pin: GPIO16
  rx_pin: GPIO17
  baud_rate: 9600
  stop_bits: 1

modbus:
  send_wait_time: 200ms
  id: modbus_versati3

modbus_controller:
  - id: modbus_cotnroller
    address: 0x01
    modbus_id: modbus_versati3
    setup_priority: -10

sensor:
  - platform: modbus_controller
    modbus_controller_id: modbus_cotnroller
    id: nasi_komora_modbus_testsensor
    name: "nasi_komora_modbus_testsensor"
    address: 0x76
    register_type: holding
    value_type: U_WORD
    offset: 0

Error in log:
[13:55:28][D][modbus_controller:032]: Modbus command to device=1 register=0x76 countdown=0 no response received - removed from send queue

Thank you all for your help! Especially for user @dslava because of the sensor list.

I also did the Modbus communication today. My Versati III also has a DHW tank, so another binary sensor had to be created:

    binary_sensors:
      - name: "Gree Tank Heater"
        unique_id: gree_tank_heater_state
        address: 173
        scan_interval: 10
        slave: 1
        input_type: coil

1 Like

I have completed the integration thanks to @dslava.

It’s connected via a usb on RPI4 and RS485 on the Touch controller’s modbus with a 2 euro adaptor.

What is not included in his code and it is essential for me, is to control the temperature (as I am doing via the touch panel) using the unit’s room temperature sensor and not an external thermostat.

“Room temperature setpoint” needed to be added in automations.yaml for been able to select the desired temperature.

in automations.yaml

- id: Update_gree_modbus_value
  alias: Update gree modbus value
  mode: queued
  max: 20
  variables:
    sensor_id: sensor.{{trigger.to_state.object_id}}
  trigger:
  - platform: state
    entity_id:
    - input_number.gree_leaving_water_setpoint_temperature
    - input_number.gree_leaving_water_upper_setpoint_temperature
    - input_number.gree_leaving_water_lower_setpoint_temperature
    - input_number.gree_room_setpoint_temperature #added this to be able to set temperature with internal room temp sensor
    - input_number.gree_ambient_upper_setpoint_temperature
    - input_number.gree_ambient_lower_setpoint_temperature
    - input_number.gree_delta_t_heat_setpoint_temperature
    - input_number.gree_hotwater_tank_setpoint_temperature
    - input_number.gree_delta_t_hot_water_setpoint_temperature
    - input_number.gree_disinfection_setpoint_temperature
    - input_select.gree_optional_e_heater
  condition: []
  action:
  - service: modbus.write_register
    data_template:
      hub: versati3_hub
      unit: 1
      address: '{{ state_attr(sensor_id, ''address'' ) }}

        '
      value: "{% if 'input_select' in trigger.to_state.entity_id %}  \n  {{ state_attr(trigger.to_state.entity_id,
        'options').index(trigger.to_state.state) + 1 }}\n{% else %}\n  {{ (trigger.to_state.state
        | int) if (trigger.to_state.state | int >= 0) else (65536 + trigger.to_state.state
        | int) }}\n{% endif %}"

Then a sensor to be able to verify that my value has been properly sent. (maybe that can be checked otherwise) but I am a bit lost. I did that as well and everything works good.

Again in automation.yaml

- id: Handle_gree_setpoint_temperature_change
  alias: Handle gree setpoint temperature change
  trigger:
  - platform: state
    entity_id:
    - sensor.gree_leaving_water_setpoint_temperature
    - sensor.gree_leaving_water_upper_setpoint_temperature
    - sensor.gree_leaving_water_lower_setpoint_temperature
    - sensor.gree_room_setpoint_temperature #Just to verify the set temperature value
    - sensor.gree_ambient_upper_setpoint_temperature
    - sensor.gree_ambient_lower_setpoint_temperature
    - sensor.gree_delta_t_heat_setpoint_temperature
    - sensor.gree_hotwater_tank_setpoint_temperature
    - sensor.gree_delta_t_hot_water_setpoint_temperature
    - sensor.gree_disinfection_setpoint_temperature
    - sensor.gree_room_sensor_setpoint_temperature
  condition: []
  action:
  - condition: template
    value_template: '{{ is_number(trigger.to_state.state) and (trigger.to_state.state
      | float > -50 and trigger.to_state.state | float < 100) }}'
  - service: input_number.set_value
    data:
      entity_id: input_number.{{trigger.to_state.object_id}}
      value: '{{trigger.to_state.state}}'
  mode: queued
  max: 20

Also make sure that the “Gree Room Setpoint Temperature” is not # in the configuration.yaml in sensors: add

      - name: "Gree Room Setpoint Temperature"
        unique_id: gree_room_setpoint_temperature
        scan_interval: 10
        slave: 1
        address: 12
        unit_of_measurement: °C
        count: 1
        scale: 1
        offset: 0
        precision: 0
        input_type: holding
        data_type: uint16
        state_class: measurement
        device_class: temperature

Also in cofiguration.yaml input_number: add

  gree_room_setpoint_temperature:
    name: gree_room_setpoint_temperature
    min: 18
    max: 30
    step: 1
    mode: box            
    icon: mdi:thermometer
    unit_of_measurement: '°C'

Over all I am working on some more settings. After I finish (If i manage to succeed) I’ll post here everything.

1 Like

New sensor for Leaving Cool Water Setpoint:

      - name: "Gree Leaving Cool Water Setpoint Temperature"
        unique_id: gree_leaving_cool_water_setpoint_temperature
        scan_interval: 10
        slave: 1
        address: 9
        unit_of_measurement: °C
        count: 1
        scale: 1
        offset: 0
        precision: 0
        input_type: holding
        data_type: uint16
        state_class: measurement
        device_class: temperature

Modified sensor for Leaving Heat Water Setpoint:

      - name: "Gree Leaving Heat Water Setpoint Temperature" # Modified name, added the word heat
        unique_id: gree_leaving_heat_water_setpoint_temperature # Modified ID, added the word heat
        scan_interval: 10
        slave: 1
        address: 10
        unit_of_measurement: °C
        count: 1
        scale: 1
        offset: 0
        precision: 0
        input_type: holding
        data_type: uint16
        state_class: measurement
        device_class: temperature

Additional templates for digitals:

  - platform: template
    sensors:
      gree_unit_status_digital_mode:
        friendly_name: Gree Unit Status Mode
        value_template: >-
         {% if is_state('sensor.gree_unit_status_digital', '1') %}
         Cool
         {% elif is_state('sensor.gree_unit_status_digital', '2') %}
         Heat
         {% elif is_state('sensor.gree_unit_status_digital', '6') %}
         Hot water
         {% elif is_state('sensor.gree_unit_status_digital', '8') %}
         Off
         {% else %}
         Unknown
         {% endif %}

  - platform: template
    sensors:
      gree_thermostat_status_digital_mode:
        friendly_name: Gree Thermostat Status Mode
        value_template: >-
         {% if is_state('sensor.gree_thermostat_status_digital', '1') %}
         Cool
         {% elif is_state('sensor.gree_thermostat_status_digital', '2') %}
         Heat
         {% elif is_state('sensor.gree_thermostat_status_digital', '3') %}
         Off
         {% else %}
         Unknown
         {% endif %}

  - platform: template
    sensors:
      gree_thermostat_mode_digital_mode:
        friendly_name: Gree Thermostat Mode
        value_template: >-
         {% if is_state('sensor.gree_thermostat_mode_digital', '0') %}
         Without
         {% elif is_state('sensor.gree_thermostat_mode_digital', '1') %}
         Air
         {% elif is_state('sensor.gree_thermostat_mode_digital', '2') %}
         Air+hot water
         {% else %}
         Unknown
         {% endif %}

  - platform: template
    sensors:
      gree_optional_e_heater_mode:
        friendly_name: Gree Optional E-Heater Mode
        value_template: >-
         {% if is_state('sensor.gree_optional_e_heater', '1') %}
         1 set
         {% elif is_state('sensor.gree_optional_e_heater', '2') %}
         2 sets
         {% elif is_state('sensor.gree_optional_e_heater', '3') %}
         Off
         {% else %}
         Unknown
         {% endif %}

  - platform: template
    sensors:
      gree_disinfection_status_digital_mode:
        friendly_name: Gree Disinfection Status Mode
        value_template: >-
         {% if is_state('sensor.gree_disinfection_status_digital', '1') %}
         Running
         {% elif is_state('sensor.gree_disinfection_status_digital', '2') %}
         Done
         {% elif is_state('sensor.gree_disinfection_status_digital', '3') %}
         Failed
         {% elif is_state('sensor.gree_disinfection_status_digital', '0') %}
         Off
         {% else %}
         Unknown
         {% endif %}
2 Likes

Hallo guys.First sorry for my orrible english.

I have a Gree Versati 3 too.
I’m a beginner with modbus and I have found very interesting this post.

My question is this: it’s possible operate on the power of the Versati via Modbus ?

I have see other machine like daikin, named “Grid ready”, that have the function to regulate the power to optimize it with the solar production.

Someone has studies this function ?

Thank in advance

Yes it is. Here is the relative operation

Word 43
R/W Power limit
Actual value:0~10 Kw
Default :3 Kw
Transmission value=Actual value * 10
0.1 Kw Unsigned
Integer

2 Likes

Hello.

I am trying to integrate a Gree Versati III device through requests. I have several parameters but not all, I am mostly interested in the ones of Status View. Do you know if there is any relationship in the naming with the table of definitions and addresses of Modbus?

Thank you!

The naming is based as in the table. What exactly are you trying to do? I have fixed the status view in my configuration as Engusz said in sensor templates. It creates an entity with the actual status Off heat, hot water, cool.

I am trying to create a Homebridge plugin, but there is no documentation for requests. However there is more documentation on the parameters using Modbus, so I’m wondering if there is a relationship in terms of naming, or a translation table (for example, gree_hotwater_tank_setpoint_temperature is called WatBoxTemSet).

it’s finally working for me, I’ve created a tutorial here…

2 Likes

Well it is working pretty fine for me too.
The reasion why I’d like to use the versati II with HA is to have a place where I can log if there is any issue or error. And with the Word addresses I think I can go further but the Byte and bit part is a little bit harder does someone have a tutorial? :slight_smile: thank you!!

1 Like

Dudes… Are you aware that Gree have a lots ot thermo pumps with coding Versati II and Versati III? Are you aware that every coding of new Thermopump are different? And can you Please read a documents about every pump Please!!! No one here a wizard, and I’ll give you Ana starting point of using it… So please stop using tags on me, I’m not specialist of Gree - I’m just a a simple man that use my fucking model of this Thermopump… I’ve my model of use and I give it to you, so… Try to made this model good sorry but I have a live here - cheers :kissing_heart::+1:

Problem solved, device names in each file must be the same.

Hello! Thank you for good instructions.
Can you plese give me help for final step: And finally, in order to modify my settings (temperature and optional_e_heater dropdown selection) in ui-lovelace.yaml I use numberbox-card controls (GitHub - htmltiger/numberbox-card: Replace input_number sliders with plus and minus buttons 9)?
I installed numberbox card.js, but where i can put file ui-lovelace.yaml (I cannot find in conf folder)?

Hi,

Just to make it clear. So it is a limitation only, or current value as well?

Thanks in advance,
Tamas

Dont you have issue with modbus config after update to more recent HA version (2023.11.2). For example:
count: 1 cannot be combined with data_type: int16

I read that something has changed with modbus on homeasssistant and since I updated from an old version (I think mine was like from may) I did jump few versions and bumped into this issue. I was wondering if anyone else has this issue.

Checking the info, looks like count cannot be used with numeric values and those are calculated automatically. So removing count should do the trick.

Update:
If anyone bumps into the issue, just remove all occurences of count in your modbus configuration.yaml file

Great work. I am very new into HA, so my quiet questin is:
I run my HA on a NUC. How is it possible to connect to that?