Mitsubishi MELCLOUD integration with Home Assistant

Hi,
I did the integration with melcloud and from time to time this message appears:

023-09-10 00:05:17.211 WARNING (MainThread) [homeassistant.helpers.entity] Update of sensor.ac_sala_room_temperature is taking over 10 seconds

I have 2 air conditioners and the message for both appears.
They are 2 meters from the WiFi router and I have no network problems at home.
Is there any parameter that I can change to make these messages disappear?

Thanks

Hi,
could someone help with the automation for hot water setting on Ecodan?
Have tried below code but not sure if it’s working as it have not started at all.
I want it to force heat on low electricity price and stop or lower the set temp on high electricity price.
What is the best way to make such automation? Is the below correct?

alias: VV VP on force_hot_water 53C
description: ""
trigger:
  - platform: numeric_state
    entity_id: sensor.elpris_just_nu
    above: -1.5
    below: 0.6
condition: []
action:
  - service: water_heater.set_temperature
    data:
      temperature: 53
      operation_mode: force_hot_water
    target:
      device_id: 29555dfbf2588de762563a40a4ed6a3a
      entity_id: water_heater.hemma
      area_id: tvattstuga
mode: single


alias: VV VP off 40C auto
description: ""
trigger:
  - platform: numeric_state
    entity_id: sensor.elpris_just_nu
    above: 0.6
condition: []
action:
  - service: water_heater.set_temperature
    data:
      temperature: 40
      operation_mode: auto
    target:
      device_id: 29555dfbf2588de762563a40a4ed6a3a
      area_id: tvattstuga
      entity_id: water_heater.hemma
mode: single

any idea ?

Without having checked the code completely, are you sure that your ÂŽsensor.elpris_just_nuÂŽ works?
And is the electricity pricing in the sensor showing to SEK/kwh or öre/kwh?

Same for me.
There is also a lot of sensors in MelCloud app that not appear in integration.
I have a Geodan brine/water.

Hello all, we have a Mitsubishi Ecodan water heater.
We added Melcloud support, and we can see it from the Melcloud app and website.
In HA I can’t access the general On/Off toggle, even if in the documentation it says that a “Power” parameter is present for the water_heater entity.
My problem is that I want to turn it off if the house power consumption exceeds the contract limit, and avoid a blackout.

(Another option would be to turn off the water heating production, but the only options are auto and force hot water, so I don’t think it’s the right way).

The button i’m referring to is in the top left corner of the Melcloud panel, the On/Off general toggle for the Ecodan.

Thank you very much, Fabio

good morning, I also have the same problem, I can’t find a way to send the power on/off command to the machine, help
Thank you

I agree, any chance to have the flow temperature implemented? have you resolved it in a different way?

There is no way to do it; what you can do is set a lower target temperature (for example 18°).

Hi,
I did the integration with melcloud and from time to time this message appears:

023-09-10 00:05:17.211 WARNING (MainThread) [homeassistant.helpers.entity] Update of sensor.ac_sala_room_temperature is taking over 10 seconds

I have 2 air conditioners and the message for both appears.
They are 2 meters from the WiFi router and I have no network problems at home.
Is there any parameter that I can change to make these messages disappear?

Thanks

Hi all.
I want to use MelCloud or other system to control my Mitsubishi HeatPumps.
I got an Air/Air HeatPump with two splits and one Air/Water with one internal module (ecodan).
In melcloud integration, the Air/Air is well reporting total energy used (for both splits) and the daily consumption (a total on one split for both splits).
But for the Air/Water One, i do not have the energy used or consumption.
In melcloud web, with devlopper tools from firefox or chorme, i got this values:

  1. DailyHeatingEnergyConsumed: 8.04
  2. DailyHeatingEnergyProduced: 29.18

The integration does not seems to work well.
Where do you put your curl command and how do you use it.
I tried in command_line.yaml, but the sensors created report “unknown”.
Maybe we can try with a rest command, but where ?
Kind regards

Hello StreetChat,
I have created some sensors based on the REST interface.
Look at MELCLOUD REST integration example , if it could be of any help.
I have to say, that although, the api polls every 60 sec, not all attributes get updated so often.
It seems that the Ecodan reports only “changing values” and the current energy consume and produce are rounded to integer values.
I hope this is helpful.

Hi,

many thanks for your help and you work on this.
i tried by adding your code with my values from melcloud in sensors.yaml and rebooted HA.
but i got nothing in HA.
nothing in dev tools/States.
sensors.yam is included in configuration.yaml.

do y miss something ?

Can you paste your code and don’t forget to anonomise your credentials.

Hi @Chrissi28 , how do you create this fancy graph?

Hi,
of course, here is my sensors.yaml:

- platform: rest
  name: heat_pump_api
  resource: https://app.melcloud.com/Mitsubishi.Wifi.Client/user/ListDevices?id=88506454&buildingID=660070
  method: GET
  headers: 
      X-MitsContextKey: 'XXXXXXXXXXXXXXXXXXXXXX'
  value_template: "OK"
  scan_interval: 60
  force_update: true
  unique_id: "heat_pump_api1"
  json_attributes_path: "$..Devices[?(@.DeviceID==88506454)].Device"
  json_attributes:
    - CurrentEnergyConsumed
    - CurrentEnergyProduced
    - DefrostMode
    - RoomTemperatureZone1
    - RoomTemperatureZone2
    - OutdoorTemperature
    - FlowTemperature
    - FlowTemperatureZone1
    - FlowTemperatureZone2
    - FlowTemperatureBoiler
    - ReturnTemperature
    - ReturnTemperatureZone1
    - ReturnTemperatureZone2
    - ReturnTemperatureBoiler
    - TankWaterTemperature
    - SetTankWaterTemperature
    - MixingTankWaterTemperature
    - TargetHCTemperatureZone1
    - TargetHCTemperatureZone2      
    - CondensingTemperature
    - HeatPumpFrequency
    - DailyHeatingEnergyConsumed
    - DailyHotWaterEnergyConsumed
    - DailyHeatingEnergyProduced
    - DailyHotWaterEnergyProduced
    - DailyLegionellaActivationCounter
    - BoilerStatus
    - BoosterHeater1Status
    - BoosterHeater2Status
    - BoosterHeater2PlusStatus
    - ImmersionHeaterStatus
    - WaterPump1Status
    - WaterPump2Status
    - WaterPump3Status
    - ValveStatus3Way
    - ValveStatus2Way
    - WaterPump4Status
    - ValveStatus2Way2a
    - ValveStatus2Way2b
    - ThermostatStatusZone1
    - ThermostatStatusZone2
- platform: template
  sensors:
    heat_pump_currentenergyconsumedpower:
        friendly_name: "CurrentEnergyConsumed"
        # availability_template: "{{ is_state('sensor.heat_pump_api', 'OK') }}"
        availability_template: >-
          {{ (states("sensor.heat_pump_api") not in ["unknown", "unavailable"]) and (state_attr('sensor.heat_pump_api', 'CurrentEnergyConsumed') != None) }}
        value_template: "{{ state_attr('sensor.heat_pump_api', 'CurrentEnergyConsumed') }}"
        device_class: power
        unit_of_measurement: "kW"
        unique_id: "CurrentEnergyConsumed1"
    heat_pump_currentenergyproduced:
        friendly_name: "CurrentEnergyProduced"
        # availability_template: "{{ is_state('sensor.heat_pump_api', 'OK') }}"
        availability_template: >-
          {{ (states("sensor.heat_pump_api") not in ["unknown", "unavailable"]) and (state_attr('sensor.heat_pump_api', 'CurrentEnergyProduced') != None) }}
        value_template: "{{ state_attr('sensor.heat_pump_api', 'CurrentEnergyProduced') }}"
        device_class: power
        unit_of_measurement: "kW"
        unique_id: "CurrentEnergyProduced1"
    heat_pump_dailyheatingenergyconsumed:
      friendly_name: "DailyHeatingEnergyConsumed"
      # availability_template: "{{ is_state('sensor.heat_pump_api', 'OK') }}"
      availability_template: >-
        {{ (states("sensor.heat_pump_api") not in ["unknown", "unavailable"]) and (state_attr('sensor.heat_pump_api', 'DailyHeatingEnergyConsumed') != None) }}
      value_template: "{{ state_attr('sensor.heat_pump_api', 'DailyHeatingEnergyConsumed') }}"
      device_class: energy
      unit_of_measurement: "kWh"
      unique_id: "DailyHeatingEnergyConsumed1"
    heat_pump_dailyhotwaterenergyconsumed:
      friendly_name: "DailyHotWaterEnergyConsumed"
      # availability_template: "{{ is_state('sensor.heat_pump_api', 'OK') }}"
      availability_template: >-
        {{ (states("sensor.heat_pump_api") not in ["unknown", "unavailable"]) and (state_attr('sensor.heat_pump_api', 'DailyHotWaterEnergyConsumed') != None) }}
      value_template: "{{ state_attr('sensor.heat_pump_api', 'DailyHotWaterEnergyConsumed') }}"
      device_class: energy
      unit_of_measurement: "kWh"
      unique_id: "DailyHotWaterEnergyConsumed1"
    heat_pump_dailyheatingenergyproduced:
      friendly_name: "DailyHeatingEnergyProduced"
      availability_template: >-
        {{ (states("sensor.heat_pump_api") not in ["unknown", "unavailable"]) and (state_attr('sensor.heat_pump_api', 'DailyHeatingEnergyProduced') != None) }}
      value_template: "{{ state_attr('sensor.heat_pump_api', 'DailyHeatingEnergyProduced') }}"
      device_class: energy
      unit_of_measurement: "kWh"
      unique_id: "DailyHeatingEnergyProduced1"
    heat_pump_dailyhotwaterenergyproduced:
      friendly_name: "DailyHotWaterEnergyProduced"
      availability_template: >-
        {{ (states("sensor.heat_pump_api") not in ["unknown", "unavailable"]) and (state_attr('sensor.heat_pump_api', 'DailyHotWaterEnergyProduced') != None) }}
      value_template: "{{ state_attr('sensor.heat_pump_api', 'DailyHotWaterEnergyProduced') }}"
      device_class: energy
      unit_of_measurement: "kWh"
      unique_id: "DailyHotWaterEnergyProduced1"
    heat_pump_heatpumpfrequency:
      friendly_name: "HeatPumpFrequency"
      # availability_template: "{{ is_state('sensor.heat_pump_api', 'OK') }}"
      availability_template: >-
        {{ (states("sensor.heat_pump_api") not in ["unknown", "unavailable"]) and (state_attr('sensor.heat_pump_api', 'HeatPumpFrequency') != None) }}
      value_template: "{{ state_attr('sensor.heat_pump_api', 'HeatPumpFrequency') }}"
      device_class: frequency
      unit_of_measurement: "Hz"
      unique_id: "HeatPumpFrequency1"
    heat_pump_defrostmode:
      friendly_name: "DefrostMode"
      # availability_template: "{{ is_state('sensor.heat_pump_api', 'OK') }}"
      availability_template: >-
        {{ (states("sensor.heat_pump_api") not in ["unknown", "unavailable"]) and (state_attr('sensor.heat_pump_api', 'DefrostMode') != None) }}
      value_template: "{{ state_attr('sensor.heat_pump_api', 'DefrostMode') }}"
      device_class: aqi
      unit_of_measurement: ""
      unique_id: "DefrostMode1"     
    heat_pump_roomtemperaturezone1:
      friendly_name: "RoomTemperatureZone1"
      availability_template: >-
        {{ (states("sensor.heat_pump_api") not in ["unknown", "unavailable"]) and (state_attr('sensor.heat_pump_api', 'RoomTemperatureZone1') != None) }}
      value_template: "{{ state_attr('sensor.heat_pump_api', 'RoomTemperatureZone1') }}"
      device_class: temperature
      unit_of_measurement: "°C"
      unique_id: "RoomTemperatureZone1_1"     
    heat_pump_roomtemperaturezone2:
      friendly_name: "RoomTemperatureZone2"
      availability_template: >-
        {{ (states("sensor.heat_pump_api") not in ["unknown", "unavailable"]) and (state_attr('sensor.heat_pump_api', 'RoomTemperatureZone2') != None) }}
      value_template: "{{ state_attr('sensor.heat_pump_api', 'RoomTemperatureZone2') }}"
      device_class: temperature
      unit_of_measurement: "°C"
      unique_id: "RoomTemperatureZone2_1"     
    heat_pump_outdoortemperature:
      friendly_name: "OutdoorTemperature"
      availability_template: >-
        {{ (states("sensor.heat_pump_api") not in ["unknown", "unavailable"]) and (state_attr('sensor.heat_pump_api', 'OutdoorTemperature') != None) }}
      value_template: "{{ state_attr('sensor.heat_pump_api', 'OutdoorTemperature') }}"
      device_class: temperature
      unit_of_measurement: "°C"
      unique_id: "OutdoorTemperature_1"     
    heat_pump_flowtemperature:
      friendly_name: "FlowTemperature"
      availability_template: >-
        {{ (states("sensor.heat_pump_api") not in ["unknown", "unavailable"]) and (state_attr('sensor.heat_pump_api', 'FlowTemperature') != None) }}
      value_template: "{{ state_attr('sensor.heat_pump_api', 'FlowTemperature') }}"
      device_class: temperature
      unit_of_measurement: "°C"
      unique_id: "FlowTemperature_1"     
    heat_pump_tankwatertemperature:
      friendly_name: "TankWaterTemperature"
      availability_template: >-
        {{ (states("sensor.heat_pump_api") not in ["unknown", "unavailable"]) and (state_attr('sensor.heat_pump_api', 'TankWaterTemperature') != None) }}
      value_template: "{{ state_attr('sensor.heat_pump_api', 'TankWaterTemperature') }}"
      device_class: temperature
      unit_of_measurement: "°C"
      unique_id: "TankWaterTemperature_1"     
    heat_pump_mixingtankwatertemperature:
      friendly_name: "MixingTankWaterTemperature"
      availability_template: >-
        {{ (states("sensor.heat_pump_api") not in ["unknown", "unavailable"]) and (state_attr('sensor.heat_pump_api', 'MixingTankWaterTemperature') != None) }}
      value_template: "{{ state_attr('sensor.heat_pump_api', 'MixingTankWaterTemperature') }}"
      device_class: temperature
      unit_of_measurement: "°C"
      unique_id: "MixingTankWaterTemperature_1"     
    heat_pump_condensingtemperature:
      friendly_name: "CondensingTemperature"
      availability_template: >-
        {{ (states("sensor.heat_pump_api") not in ["unknown", "unavailable"]) and (state_attr('sensor.heat_pump_api', 'CondensingTemperature') != None) }}
      value_template: "{{ state_attr('sensor.heat_pump_api', 'CondensingTemperature') }}"
      device_class: temperature
      unit_of_measurement: "°C"
      unique_id: "CondensingTemperature_1"     
    heat_pump_returntemperature:
      friendly_name: "ReturnTemperature"
      availability_template: >-
        {{ (states("sensor.heat_pump_api") not in ["unknown", "unavailable"]) and (state_attr('sensor.heat_pump_api', 'ReturnTemperature') != None) }}
      value_template: "{{ state_attr('sensor.heat_pump_api', 'ReturnTemperature') }}"
      device_class: temperature
      unit_of_measurement: "°C"
      unique_id: "ReturnTemperature_1"

hi,
i just tried and the same code but in configuration.yaml is working.
it does not work in sensors.yaml.

did you include the

sensor: !include sensors.yaml

Hi @RTJC
I use custom:apexcharts-card from HACS, but I currently have custom:history-explorer-card, because you can zoom with the mouse and move the graph.

custom:history-explorer-card

Is there any known issue to use both the MelCloud integration and sensors that use the rest API at the same time? As soon as I start to pull data from the rest API my wifi adaptor stops updating tank temperature changes and such to MelCloud, only solution for it is to reboot my wifi-adaptor connected to my Ecodan and turn of my REST-sensors. :frowning: Would really like to pull the Hz data from the API.