Egyras / HeishaMon

Panasonic Aquarea air-water H, J, K and L series protocol decrypt
230 stars 117 forks source link

Conflictive actions in home assistant #448

Closed drsugranes closed 8 months ago

drsugranes commented 8 months ago

Hi. First of all thanks all of you for the developement and the board. I use it with Home Assistant and, when I change some values, it start a loop with the automations or return to the original value. In example: 1- I change the quiet level at HA 2- HA start the automation Set Heatmode and sends the topic (topic1) with the new value 3- Meanwhile (up to 5 seconds), Heishamon board publish the value (topic2). 4- HA detecs the topic (topic2) and run Set Heatmode Selector 5- Heishamon board process the topic1

This is the reason I modify the yaml to stop the automations selector during 5 seconds. This is the file I use. Hope it should be useful.

################################################################

Packages / Heishamon

################################################################

################################################################

Changelog

################################################################

1.0.0 (08-01-2020)

Added

- Initial version

1.1.0 (10-01-2020)

Added

- Added power switch and Fan RPM sensors

1.2.0 (17-05-2020)

Fixed

- New/changed topics

1.3.0 (22-06-2022)

Compatibility with Home Assistant 2022.6 MQTT configuration format

1.4.0 (18-09-2022)

Added

- Split heatshift into separate Z1 and Z2

1.5.0 (16-10-2023)

Added

- Cool modes

- All modes COP calculations

Removed

- S0 energy calculations (we are already calculating it in sensors)

1.5.1 (18-10-2023)

Fixed

- Power templates when values not available

1.5.2 (28-12-2023)

Fixed

- Wait to enable selectors automations

Automations

############### automation:

Fetches quiet level from status and sets the selector accordingly

input_number

################ input_number: heishamon_tank_temp: name: Set Tank Temperature min: 40 max: 75 step: 1

heishamon_heatshift_z1: name: Set Zone 1 Temperature min: -5 max: 40 step: 1

heishamon_heatshift_z2: name: Set Zone 2 Temperature min: -5 max: 40 step: 1

input_select

################ input_select: heishamon_quietmode: name: Set Quiet Mode options:

sensor

########## mqtt: sensor:

TOP0 - Power state

- name: Aquarea Power State
  state_topic: "panasonic_heat_pump/main/Heatpump_State"
  value_template: >-
    {%- if value == "0" -%}
      Off
    {%- elif value == "1" -%}
      On
    {%- endif -%}

#TOP1 - Pumpflow
- name: Aquarea Pump Flow
  state_topic: "panasonic_heat_pump/main/Pump_Flow"
  unit_of_measurement: "L/min"
  state_class: "measurement"

#TOP2 - Force DHW
- name: Aquarea Force DHW Mode
  state_topic: "panasonic_heat_pump/main/Force_DHW_State"
  value_template: >-
    {%- if value == "0" -%}
      Off
    {%- elif value == "1" -%}
      On
    {%- endif -%}

#TOP4 - Heat mode (Hot water, Heat or Hot water + heat)
- name: Aquarea Mode
  state_topic: "panasonic_heat_pump/main/Operating_Mode_State"
  value_template: >-
    {%- if value == "0" -%}
      Heat
    {%- elif value == "1" -%}
      Cool
    {%- elif value == "2" -%}
      Auto
    {%- elif value == "3" -%}
      DHW
    {%- elif value == "4" -%}
      Heat+DHW
    {%- elif value == "5" -%}
      Cool+DHW
    {%- elif value == "6" -%}
      Auto(Heat)+DHW
    {%- elif value == "7" -%}
      Auto(Cool)
    {%- elif value == "8" -%}
      Auto(Cool)+DHW
    {%- endif -%}

#TOP5 - Water inlet temp
- name: Aquarea Inlet Temperature
  state_topic: "panasonic_heat_pump/main/Main_Inlet_Temp"
  unit_of_measurement: "°C"
  state_class: "measurement"

#TOP6 - Water outlet temp
- name: Aquarea Outlet Temperature
  state_topic: "panasonic_heat_pump/main/Main_Outlet_Temp"
  unit_of_measurement: "°C"
  state_class: "measurement"

#TOP7 - Water outlet target temp
- name: Aquarea Outlet Target Temperature
  state_topic: "panasonic_heat_pump/main/Main_Target_Temp"
  unit_of_measurement: "°C"
  state_class: "measurement"

#TOP8 - Compressor frequency
- name: Aquarea Compressor Frequency
  state_topic: "panasonic_heat_pump/main/Compressor_Freq"
  unit_of_measurement: "Hz"
  state_class: "measurement"

#TOP9 - Tank set temperature
- name: Aquarea Tank Set Temperature
  state_topic: "panasonic_heat_pump/main/DHW_Target_Temp"
  unit_of_measurement: "°C"
  state_class: "measurement"

#TOP10 - Tank current temperature
- name: Aquarea Tank Temperature
  state_topic: "panasonic_heat_pump/main/DHW_Temp"
  unit_of_measurement: "°C"
  state_class: "measurement"

#TOP11 - Compressor Operating Time
- name: Aquarea Compressor Operating Hours
  state_topic: "panasonic_heat_pump/main/Operations_Hours"
  unit_of_measurement: "Hours"

state_class: total

  state_class: "measurement"

#TOP12 - Compressor On/Off cycle number
- name: Aquarea Compressor Start/Stop Counter
  state_topic: "panasonic_heat_pump/main/Operations_Counter"

state_class: total

  state_class: "measurement"

#TOP14 - Outside ambient temperature
- name: Aquarea Outside Ambient Temperature
  state_topic: "panasonic_heat_pump/main/Outside_Temp"
  unit_of_measurement: "°C"
  state_class: "measurement"

state_class: "measurement"

#TOP15 - Heat power produced
- name: Aquarea Heat Power Produced
  state_topic: "panasonic_heat_pump/main/Heat_Power_Production"
  unit_of_measurement: "W"
  device_class: "power"
  state_class: "measurement"
  force_update: true

#TOP16 - Heat power consumed
- name: Aquarea Heat Power Consumed
  state_topic: "panasonic_heat_pump/main/Heat_Power_Consumption"
  unit_of_measurement: "W"
  device_class: "power"
  state_class: "measurement"
  force_update: true

#TOP17 - Powerful mode
- name: Aquarea Powerful Mode
  state_topic: "panasonic_heat_pump/main/Powerful_Mode_Time"
  unit_of_measurement: "Min"
  value_template: >-
    {{ (value | int) * 30 }}

#TOP18 - Heat quiet mode
- name: Aquarea Quiet Mode
  state_topic: "panasonic_heat_pump/main/Quiet_Mode_Level"
  value_template: >-
    {%- if value == "4" -%}
      Scheduled
    {%- elif value == "0" -%}
      Off
    {%- else -%}
      {{ value }}
    {%- endif -%}

#TOP19 - Holiday Mode
- name: Aquarea Holiday Mode
  state_topic: "panasonic_heat_pump/main/Holiday_Mode_State"
  value_template: >-
    {%- if value == "0" -%}
      Off
    {%- elif value == "1" -%}
      On
    {%- endif -%}

#TOP20 - 3-way valve state
- name: Aquarea 3-way Valve
  state_topic: "panasonic_heat_pump/main/ThreeWay_Valve_State"
  value_template: >-
    {%- if value == "0" -%}
      Room
    {%- elif value == "1" -%}
      Tank
    {%- endif -%}

#TOP21 - Outside pipe temperature
- name: Aquarea Outside Pipe Temperature
  state_topic: "panasonic_heat_pump/main/Outside_Pipe_Temp"
  unit_of_measurement: "°C"

#TOP26 - Defrost state
- name: Aquarea Defrost State
  state_topic: "panasonic_heat_pump/main/Defrosting_State"
  value_template: >-
    {%- if value == "0" -%}
      Inactive
    {%- elif value == "1" -%}
      Active
    {%- endif -%}

#TOP27 - Z1 heat request temperature
- name: Aquarea Z1 Heat Request Temperature
  state_topic: "panasonic_heat_pump/main/Z1_Heat_Request_Temp"
  unit_of_measurement: "°C"
  state_class: "measurement"

#TOP28 - Z1 cool request temperature
- name: Aquarea Z1 Cool Request Temperature
  state_topic: "panasonic_heat_pump/main/Z1_Cool_Request_Temp"
  unit_of_measurement: "°C"
  state_class: "measurement"

#TOP29 - Z1 Heat curve target high temperature
- name: Aquarea Z1 Heat Curve Target High Temperature
  state_topic: "panasonic_heat_pump/main/Z1_Heat_Curve_Target_High_Temp"
  unit_of_measurement: "°C"
  state_class: "measurement"

#TOP30 - Z1 Heat curve target low temperature
- name: Aquarea Z1 Heat Curve Target Low Temperature
  state_topic: "panasonic_heat_pump/main/Z1_Heat_Curve_Target_Low_Temp"
  unit_of_measurement: "°C"
  state_class: "measurement"

#TOP31 - Z1 Heat curve outside high temperature
- name: Aquarea Z1 Heat Curve Outside High Temperature
  state_topic: "panasonic_heat_pump/main/Z1_Heat_Curve_Outside_High_Temp"
  unit_of_measurement: "°C"
  state_class: "measurement"

#TOP32 - Z1 Heat curve outside low temperature
- name: Aquarea Z1 Heat Curve Outside Low Temperature
  state_topic: "panasonic_heat_pump/main/Z1_Heat_Curve_Outside_Low_Temp"
  unit_of_measurement: "°C"
  state_class: "measurement"

#TOP34 - Z2 Heat request temp
- name: Aquarea Z2 Heat Request Temperature
  state_topic: "panasonic_heat_pump/main/Z2_Heat_Request_Temp"
  unit_of_measurement: "°C"
  state_class: "measurement"

#TOP35 - Z2 Cool request temp
- name: Aquarea Z2 Cool Request Temperature
  state_topic: "panasonic_heat_pump/main/Z2_Cool_Request_Temp"
  unit_of_measurement: "°C"
  state_class: "measurement"

#TOP36 - Z1 water temperature
- name: Aquarea Z1 Water Temperature
  state_topic: "panasonic_heat_pump/main/Z1_Water_Temp"
  unit_of_measurement: "°C"
  state_class: "measurement"

#TOP37 - Z2 water temperature
- name: Aquarea Z2 Water Temperature
  state_topic: "panasonic_heat_pump/main/Z2_Water_Temp"
  unit_of_measurement: "°C"
  state_class: "measurement"

#TOP38 - Cool power produced
- name: Aquarea Cool Power Produced
  state_topic: "panasonic_heat_pump/main/Cool_Power_Production"
  unit_of_measurement: "W"
  device_class: "power"
  state_class: "measurement"
  force_update: true

#TOP39 - Cool power consumed
- name: Aquarea Cool Power Consumed
  state_topic: "panasonic_heat_pump/main/Cool_Power_Consumption"
  unit_of_measurement: "W"
  device_class: "power"
  state_class: "measurement"
  force_update: true

#TOP40 - DHW power produced
- name: Aquarea DHW Power Produced
  state_topic: "panasonic_heat_pump/main/DHW_Power_Production"
  unit_of_measurement: "W"
  device_class: "power"
  state_class: "measurement"
  force_update: true

#TOP41 - DHW power consumed
- name: Aquarea DHW Power Consumed
  state_topic: "panasonic_heat_pump/main/DHW_Power_Consumption"
  unit_of_measurement: "W"
  device_class: "power"
  state_class: "measurement"
  force_update: true

#TOP42 - Z1 water target temperature
- name: Aquarea Z1 Water Target Temperature
  state_topic: "panasonic_heat_pump/main/Z1_Water_Target_Temp"
  unit_of_measurement: "°C"
  state_class: "measurement"

#TOP42 - Z2 water target temperature
- name: Aquarea Z2 Water Target Temperature
  state_topic: "panasonic_heat_pump/main/Z2_Water_Target_Temp"
  unit_of_measurement: "°C"
  state_class: "measurement"

#TOP44 - Last active error
- name: Aquarea Last Error
  state_topic: "panasonic_heat_pump/main/Error"

#TOP49 - Main HEX Outlet temp
- name: Aquarea Main HEX Outlet Temperature
  state_topic: "panasonic_heat_pump/main/Main_Hex_Outlet_Temp"
  unit_of_measurement: "°C"

#TOP50 - Discharge temp
- name: Aquarea Discharge Temperature
  state_topic: "panasonic_heat_pump/main/Discharge_Temp"
  unit_of_measurement: "°C"

#TOP51 - Inside Pipe temp
- name: Aquarea Inside Pipe Temperature
  state_topic: "panasonic_heat_pump/main/Inside_Pipe_Temp"
  unit_of_measurement: "°C"
  state_class: "measurement"

#TOP52 - Defrost temp
- name: Aquarea Defrost Temperature
  state_topic: "panasonic_heat_pump/main/Defrost_Temp"
  unit_of_measurement: "°C"

#TOP53 - Eva Outlet temp
- name: Aquarea Eva Outlet Temperature
  state_topic: "panasonic_heat_pump/main/Eva_Outlet_Temp"
  unit_of_measurement: "°C"

#TOP54 - Bypass Outlet temp
- name: Aquarea Bypass Outlet Temperature
  state_topic: "panasonic_heat_pump/main/Bypass_Outlet_Temp"
  unit_of_measurement: "°C"
  state_class: "measurement"

#TOP55 - lpm temp
- name: Aquarea Ipm Temperature
  state_topic: "panasonic_heat_pump/main/Ipm_Temp"
  unit_of_measurement: "°C"

#TOP58 - Tank electric heater allowed state
- name: Aquarea Tank Heater Enabled
  state_topic: "panasonic_heat_pump/main/DHW_Heater_State"
  value_template: >-
    {%- if value == "0" -%}
      Off
    {%- elif value == "1" -%}
      On
    {%- endif -%}

#TOP59 - Water electric heater allowed state
- name: Aquarea Room Heater Enabled
  state_topic: "panasonic_heat_pump/main/Room_Heater_State"
  value_template: >-
    {%- if value == "0" -%}
      Off
    {%- elif value == "1" -%}
      On
    {%- endif -%}

#TOP60 - Internal heater state
- name: Aquarea Internal Heater State
  state_topic: "panasonic_heat_pump/main/Internal_Heater_State"
  value_template: >-
    {%- if value == "0" -%}
      Off
    {%- elif value == "1" -%}
      On
    {%- endif -%}

#TOP61 - External heater state
- name: Aquarea External Heater State
  state_topic: "panasonic_heat_pump/main/External_Heater_State"
  value_template: >-
    {%- if value == "0" -%}
      Off
    {%- elif value == "1" -%}
      On
    {%- endif -%}

#TOP62 - Fan1 speed
- name: Aquarea Fan 1 Speed
  state_topic: "panasonic_heat_pump/main/Fan1_Motor_Speed"
  unit_of_measurement: "R/min"
  state_class: "measurement"

#TOP63 - Fan2 speed
- name: Aquarea Fan 2 Speed
  state_topic: "panasonic_heat_pump/main/Fan2_Motor_Speed"
  unit_of_measurement: "R/min"
  state_class: "measurement"

#TOP64 - High pressure
- name: Aquarea High pressure
  state_topic: "panasonic_heat_pump/main/High_Pressure"
  unit_of_measurement: "Kgf/cm2"
  state_class: "measurement"

#TOP65 - Pump speed
- name: Aquarea Pump Speed
  state_topic: "panasonic_heat_pump/main/Pump_Speed"
  unit_of_measurement: "R/min"
  state_class: "measurement"

#TOP66 - Low pressure
- name: Aquarea Low pressure
  state_topic: "panasonic_heat_pump/main/Low_Pressure"
  unit_of_measurement: "Kgf/cm2"
  state_class: "measurement"

#TOP67 - Compressor Current
- name: Aquarea Compressor Current
  state_topic: "panasonic_heat_pump/main/Compressor_Current"
  unit_of_measurement: "A"
  state_class: "measurement"

##1-Wire - Example, replace with correct sensor ID
#- name: 1-wire sensor temperature
#  state_topic: "panasonic_heat_pump/1wire/1234567890abcdef"
#  unit_of_measurement: '°C'
#  value_template: '{{value | round(1) }}'

switch

########## switch:

Turn on/off holiday mode

- name: Aquarea Holiday Mode
  command_topic: "panasonic_heat_pump/commands/SetHolidayMode"
  state_topic: "panasonic_heat_pump/main/Holiday_Mode_State"
  qos: 0
  payload_on: "1"
  payload_off: "0"
  retain: false

#Turn on/off heatpump
- name: Aquarea Main Power
  command_topic: "panasonic_heat_pump/commands/SetHeatpump"
  state_topic: "panasonic_heat_pump/main/Heatpump_State"
  qos: 0
  payload_on: "1"
  payload_off: "0"
  retain: false

- name: Aquarea Force DHW Mode
  command_topic: "panasonic_heat_pump/commands/SetForceDHW"
  state_topic: "panasonic_heat_pump/main/Force_DHW_State"
  qos: 0
  payload_on: "1"
  payload_off: "0"
  retain: false

sensor:

SENSORS BELOW ARE NOT IN FIRMWARE

Energy use/production

geduxas commented 8 months ago

Yes it's known problems. Thanks for sharing your suggestions, but please make proper push request for changes in yaml.

drsugranes commented 8 months ago

Ok, thankyou.