Mitsubishi MELCLOUD integration with Home Assistant

Yesterday my air-to-air got a firmware update.
Now my energy measurements are very strange. In HA it appears to fetch the energy counter correctly, then 5 minutes later it receives 0 kWh. Another 5 minutes and the correct counter is recorded again, and so on. It looks as if the integration doesn’t understand that this is an accumulating counter and adds them all up. I currently have more than 170MWh of energy spending in the control panel.
Edit: Over 250MWh now

How did you get the firmware update? I wasn’t aware of such. Mine still seems to be working normally

In the app (on my phone). You can probably find it by opening the app, choose the “Settings” icon on the bottom row and then select “Firmware update” in the menu.
I can’t find firmware versions numbers in the app, it just reports that I am on the current version.

I’m also experiencing this issue since the firmware update. It’s nice that the units respond to commands in (near) real time now, but the energy reporting issue does massively skew the Home Assistant energy reports.

As this issue seems to relate to the recent firmware update, and not a configuration issue, I have opened up a bug for this on Github. Edit: Bug opened on the upstream library instead.

@nilux @KingJ @ks_ha: Is the communication between the browser (or the app) and MELCloud any different or does this change just improve the adapter to MELCloud communication? A simple test would be to change a value through the IR remote and see if the change propagates to the app any faster than before.

This firmware update sounds pretty neat. I hope my adapter gets something similar soon. I have an automation for running the fan a bit slower when the room with the ATA box is occupied. The 1 minute delay is really messing it up. The funny thing is that there is some sort of a built-in “comfort” feature for something similar in spirit, but I think it will actually try to aim the air-flow towards people in the room :sweat_smile:

The MELCloud UI appears to be exactly the same as before, it’s just that the communication is faster. Previously when i’d make a change in the UI, it would say something along the lines of the change would take effect at the next update interval, with the timestamp of the previous update interval.

Interestingly the LastCommunication and NextCommunication fields are still present in the responses back from the SetAta endpoint, despite the fact they now take effect immediately. I wonder if that’s just a fallback mode though?

If I turn the unit on/off via the IR remote, the change isn’t instantly reflected in the MELCloud UI on the overview screen. If I click on a unit, then it does perform a refresh and gets the current status. Using the remote control whilst on this screen also doesn’t appear to result in an instant refresh - it won’t change until I manually hit the refresh button. In Home Assistant the change is reflected after a 1-minute delay.

So overall, it really does only appear to improve the adapter’s communication with MELCloud. There are no improvements on the app side itself.

@KingJ Thanks for checking this. Given the stack they appear to be running (I think it looked like .NET) they could have switched to some sort of a WebSocket setup for the communication between the adapter and MELCloud.

I have a PR open towards home-assistant for fixing the zero energy readings. Similar upgrades have been merged pretty quick in the past but then again there are currently 402 other open PRs waiting for their turn.

1 Like

Thanks, I had same PUHZ, can U provide Code that U are using?

Thanks

Thanks! I can see the PR has been merged so once the next release is out hopefully that’ll fix things. Thanks for the fast turnaround!

I’ll update next weekend and verify that it works on my heatpump.

Please note that you’ll need to check against a 2021.12 beta release. These changes have not been released yet. 2021.11.15 is still missing these changes.

1 Like

Is there any chance that the profiles you can store in MELcloud could be selected from home assistant?

Hi,
Some questions/asks for additional feature to the integration:

  • The temperature sensors of my Mitsubishi Airco’s are too ‘pessimistic’. For example they report that its 20°C where a good room thermometer reports 21°C. Would it be possible to add a temperature offset to the integration so that HA reports the temperature as 21°C instead of 20°C and applies the same offset to the temperature control when sending changes to MelCloud?
  • Add a configurable min/max temp to the lovelace control so that my kids don’t set the heating to 25°C for no reason.
  • Integrate the MelCloud Pre-sets.
    Thx,
    D.

@Hemandk I’m sorry I didn’t quite understand this. Are you referring to the presets?

@ddeconin

  • I’ve been dreaming of some calibration options as well. I’m pretty sure my Aqara sensors are reporting at least 1°C too high temperatures. I don’t think it is worth it to implement sensor calibration on integration level. It should be provided by the home-assistant core entities instead.
  • You can configure automations to guard this setting from your kids. See below for details.
  • Adding support for presets should be straightforward, but I don’t know when I would have the time to spare for working on it.

Regarding the min/max automation

  1. Create an automation that triggers on target temperature change (probably trigger type = State)
  2. Add a Choose action
  3. Add Option 1 for the Choose, add Numeric State condition for checking if temp is less than min and add an Action for setting the temperature to min
  4. Add Option 2 and repeat above for max.

Hi,
Beginner in HA, so I’m not sure if what I wrote below is right:
I used the editor to get this, and then I selected device and I saw 4 triggers , ‘HVAC mode changed’, ‘measured temperature changed’, ‘temperature changes’ and ‘energy changes’.
I also tried to use state instead of device, but temperature requires a from & to, so thats a change from a specific value to a specific value, no?

alias: Airco Marie Limiter
description: ''
trigger:
  - platform: numeric_state
    entity_id: climate.airco_marie
    attribute: temperature
    above: '20'
    below: '99'
    for:
      hours: 0
      minutes: 0
      seconds: 5
condition:
  - condition: and
    conditions:
      - condition: numeric_state
        entity_id: climate.airco_marie
        attribute: temperature
        above: '20'
        below: '99'
      - condition: state
        entity_id: climate.airco_marie
        state: heat
        attribute: hvac_modes
action:
  - service: climate.set_temperature
    target:
      entity_id: climate.airco_marie
    data:
      temperature: 19
      hvac_mode: heat
  - device_id: 917d181729d0cf67206e97d1473c741b
    domain: mobile_app
    type: notify
    message: Temperature Airco Marie modified
mode: restart

Please post your code between [code=yaml ]here goes your code [/code ] but then without the space before th closing bracket. As YAML is very sensitive for wrong spacing it much easier to spot such problems when posted as code.

Hi, Thx, changed it. The code seems to work partly now. However, it never seems to detect the condition ‘heat’ as the state of the hvac_modes so it never fires…

I think you should change the last bit in:

      - condition: state
        entity_id: climate.airco_marie
        state: 'heat'
        attribute: hvac_modes

And are you sure it is hvac_modes, not hvac_mode?

Sorry for the late reply, but yes I’m talking about the presets that you can store in the app.

Would it be possible to activate them from HA?

Hi,
From the state of my entity I see

hvac_modes:

  • ‘off’
  • heat
  • dry
  • cool
  • fan_only
  • heat_cool

So I think I’m right about hvac_modes.