Mitsubishi MELCLOUD integration with Home Assistant

I tried your solution, but no luck for me.
Other suggestions I may try? I’m on Home Assistant 0.92.1

I’m on HA 0.92.1 as well and the custom component from the link above works nicely on my system. So in general it should work.

Hi everybody,
I’m just starting with this nice tool ^^

I just saw that you guys created a plugin based on the same plugin someone did for jeedom (a french tool, not as good as home assistant )

on jeedom my heat pump is working without any issue.
Is the plugin on HA only for air conditionner or does it read all melcloud values ?

I’m asking because I didn’t managed to make it work.
of course I did the stuff written in the last messages, like adding an init file
but still not managed to make it work

any help greatly appreciated :slight_smile:

for info in my logs i can see that melcloud did a login as my adress and some data from the heat pump are read, but a few lines after I saw this

2019-05-08 21:53:45 ERROR (MainThread) [homeassistant.components.climate] Error while setting up platform melcloud
Traceback (most recent call last):
File “/home/alain/homeassistant/lib/python3.5/site-packages/homeassistant/helpers/entity_platform.py”, line 126, in _async_setup
_platform
SLOW_SETUP_MAX_WAIT, loop=hass.loop)
File “/usr/lib/python3.5/asyncio/tasks.py”, line 400, in wait_for
return fut.result()
File “/usr/lib/python3.5/asyncio/futures.py”, line 293, in result
raise self._exception
File “/usr/lib/python3.5/concurrent/futures/thread.py”, line 55, in run
result = self.fn(*self.args, **self.kwargs)
File “/home/alain/.homeassistant/custom_components/melcloud/climate.py”, line 575, in setup_platform
devices = mc.getDevicesList()
File “/home/alain/.homeassistant/custom_components/melcloud/climate.py”, line 376, in getDevicesList
devices.append( MelCloudDevice(device[“DeviceID”], device[“BuildingID”], device[“DeviceName”], self._authentication) )
File “/home/alain/.homeassistant/custom_components/melcloud/climate.py”, line 152, in init
self._refresh_device_info()
File “/home/alain/.homeassistant/custom_components/melcloud/climate.py”, line 180, in _refresh_device_info
self._temp_list.append(self._json[“RoomTemperature”])
KeyError: ‘RoomTemperature’
2019-05-08 21:53:45 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event service_registered[L]: domain=climate, service=set_away_mode>

This component only works with Air Conditioning units. When I add my Ecodan Water/Heat pump to MelCloud, this component stops working. I guess the solution is just a few lines of code to read the extra values from the Melcaloud account (water temp, etc), but that can only be done by someone with coding knowledge.

@Jon123 I just logged a feature request for Kumo Cloud, any chance you started work on this?

No, I ended up getting a different brand (Fujitsu), so didn’t have a need for it.

Hi all! Anybody using this component through haaska Alexa integration?
I can actually control my Mitsubishi with Alexa, but she keeps saying that it’s not responding and that is pretty annoying.

In the log I can see:

2019-06-17 22:14:26 INFO (MainThread) [custom_components.melcloud.climate] Device info lease timeout, refreshing...
2019-06-17 22:14:26 DEBUG (MainThread) [homeassistant.components.http.view] Serving /api/alexa/smart_home to 54.154.153.205 (auth: True)
2019-06-17 22:14:26 DEBUG (MainThread) [homeassistant.components.alexa.smart_home] Received Alexa Smart Home request: {'directive': {'header': {'namespace': 'Alexa.PowerController', 'name': 'TurnOn', 'payloadVersion': '3', 'messageId': 'be1b91da-ce95-4faa-ad75-6468295fdd6a', 'correlationToken': 'AAAAAAAAAQDpPdVjODRGcPNNIS5zPUdrDAIAAAAAAABWmjz6FZUoRLUYH0Lmncfj6QNO8KBEXf6yxg+ElwRdcpXaZxc2AzvCRZAAraut1mmI03TypTg2tbVUkoTKnc7sZG8/yzH8xYS78YA9OlXS7uH5P17El+jqW3L62/cRnbYMMihlH0Hd+Q495m8cN7VdMjL/s9rmGiEJkC8Cjy66xFnUDDEzL94LKEGMG1ealVBmIF2M1/7BSsCMkhAfWx7reWk6Im7iDJELGvMKrEGu6NufIDmh9BuAby1tOrJl64gJanSlg7+8r6e0onMQWeZVsKbzHKauTLaocSL73GIKz6pLWKNKuFEzvs/VspfJ2ou/E2/zfuXNgeKGcPNCGYgyKW+/YWpMHbioNH9ob3PAx4AgUY403HSts6PuVzRs3p/40v0yht/48nQCtoJab6h4yAG5F0tfP8W2qML7/jrKugMdDVdZR7rlmLzy+tBYzcspPlPNehKgyhueH33BCs/B7/TFi5XIpaufAL944MnhlFSCy5bXph9b+egwVymhMeR0lk/CP4j50c6bzNj7p00j4QIMLoCUFcvviY3Ym1k4UAvN+ik9rC6976ra5Zkxr7LlkDbOVqEIf/wq14qeMaR/UNQGixdPwsK0NllALfBg8c3Zo8Ed0l9vl07piZgp9bTtOCnkngEOxWq1pPOdMz+8SXKqJNfqeeEd4rDNi/6MuMfyp6F4LhI2b5OFxQ=='}, 'endpoint': {'scope': {'type': 'BearerToken', 'token': 'Atza|IwEBIBBBG7bEyDOv-UI8fR8uqogro_m1XREsiunZSSZtuDUpl6C0bdF4SVYDjsNCEAMSiPdCinof0_zLGUtTa9EUtgg6xndX9YklI2yU2wiu2JXfQ_xp8DMokFNF9g6vvkmL0oFvxPX3YZ5pJvB9hUeeQgKYvTK0jjifnQl1GaY_n02S5mwrOcTdRKccH3K7rOiSvKHASNPbBe_6qoz-s3iu4CVJy0sCwqTdn1xBGChb5okyDQiHeFM6TbqMb_p4PfuiSepWsc0Pac-HahXYLpSASRdE_IxFVBhzyOs8YpTV3BtaaUhyHKZiEVL0RDwdJpq4WQpXPGiJfCRDN2OjzZxTq7TezaLcy6dZmFFK7FPKYRE7LWl04D-rf_AbJjMmh8DeqKqB7lpn8_dGqutndTY6L1GxPlys5yl4PWxcOkOxkrfXfHGDWvB7yE4ce1-yomvJsb5GY8BX2y8yFpze_GxU8F4o_JpqsaEYwDNO0oPSry_-tYKMmPdB8TuVSrY84pHMLpLafIILwcVoZMDoq4smvB1Q'}, 'endpointId': 'climate#melcloud_sala_XXXXXX', 'cookie': {}}, 'payload': {}}}
2019-06-17 22:14:26 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event call_service[L]: domain=climate, service=turn_on, service_data=entity_id=climate.melcloud_sala_XXXXXX>
2019-06-17 22:14:26 ERROR (MainThread) [homeassistant.components.alexa.smart_home] climate.melcloud_sala_XXXXXX (<class 'homeassistant.core.State'>) has unsupported operation_mode value 'Off'
2019-06-17 22:14:26 ERROR (MainThread) [aiohttp.server] Error handling request
Traceback (most recent call last):
  File "/usr/local/lib/python3.7/site-packages/aiohttp/web_protocol.py", line 418, in start
    resp = await task
  File "/usr/local/lib/python3.7/site-packages/aiohttp/web_app.py", line 458, in _handle
    resp = await handler(request)
  File "/usr/local/lib/python3.7/site-packages/aiohttp/web_middlewares.py", line 119, in impl
    return await handler(request)
  File "/usr/src/homeassistant/homeassistant/components/http/real_ip.py", line 33, in real_ip_middleware
    return await handler(request)
  File "/usr/src/homeassistant/homeassistant/components/http/ban.py", line 67, in ban_middleware
    return await handler(request)
  File "/usr/src/homeassistant/homeassistant/components/http/auth.py", line 216, in auth_middleware
    return await handler(request)
  File "/usr/src/homeassistant/homeassistant/components/http/view.py", line 115, in handle
    result = await result
  File "/usr/src/homeassistant/homeassistant/components/alexa/smart_home.py", line 1155, in post
    context=ha.Context(user_id=user.id)
  File "/usr/src/homeassistant/homeassistant/components/alexa/smart_home.py", line 1370, in async_handle_message
    response.merge_context_properties(directive.endpoint)
  File "/usr/src/homeassistant/homeassistant/components/alexa/smart_home.py", line 1329, in merge_context_properties
    for prop in endpoint.serialize_properties():
  File "/usr/src/homeassistant/homeassistant/components/alexa/smart_home.py", line 312, in serialize_properties
    for prop in interface.serialize_properties():
  File "/usr/src/homeassistant/homeassistant/components/alexa/smart_home.py", line 388, in serialize_properties
    prop_value = self.get_property(prop_name)
  File "/usr/src/homeassistant/homeassistant/components/alexa/smart_home.py", line 790, in get_property
    raise _UnsupportedProperty(name)
homeassistant.components.alexa.smart_home._UnsupportedProperty: thermostatMode
2019-06-17 22:14:28 INFO (SyncWorker_1) [custom_components.melcloud.climate] Device configuration successfully applied
2019-06-17 22:14:28 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event state_changed[L]: entity_id=climate.melcloud_sala_XXXXXX, old_state=<state climate.melcloud_sala_XXXXXX=off; current_temperature=25.6, min_temp=7, max_temp=35, temperature=25.0, fan_mode=Speed 1 (Min), fan_list=['Speed Auto', 'Speed 1 (Min)', 'Speed 2', 'Speed 3', 'Speed 4', 'Speed 5 (Max)'], operation_mode=Off, operation_list=['Heat', 'Cool', 'Dry', 'Fan', 'Auto', 'Off'], swing_mode=Top, swing_list=['Auto', 'Top', 'MiddleTop', 'Middle', 'MiddleBottom', 'Bottom', 'Swing'], friendly_name=MELCloud Sala (XXXXXX), supported_features=4801 @ 2019-06-17T22:13:09.543743+02:00>, new_state=<state climate.melcloud_sala_XXXXXX=Cool; current_temperature=25.6, min_temp=7, max_temp=35, temperature=25.0, fan_mode=Speed 1 (Min), fan_list=['Speed Auto', 'Speed 1 (Min)', 'Speed 2', 'Speed 3', 'Speed 4', 'Speed 5 (Max)'], operation_mode=Cool, operation_list=['Heat', 'Cool', 'Dry', 'Fan', 'Auto', 'Off'], swing_mode=Top, swing_list=['Auto', 'Top', 'MiddleTop', 'Middle', 'MiddleBottom', 'Bottom', 'Swing'], friendly_name=MELCloud Sala (XXXXXX), supported_features=4801 @ 2019-06-17T22:14:28.344154+02:00>>
2019-06-17 22:14:28 DEBUG (MainThread) [homeassistant.components.websocket_api.http.connection.139897433593168] Sending {'id': 2, 'type': 'event', 'event': <Event state_changed[L]: entity_id=climate.melcloud_sala_XXXXXX, old_state=<state climate.melcloud_sala_XXXXXX=off; current_temperature=25.6, min_temp=7, max_temp=35, temperature=25.0, fan_mode=Speed 1 (Min), fan_list=['Speed Auto', 'Speed 1 (Min)', 'Speed 2', 'Speed 3', 'Speed 4', 'Speed 5 (Max)'], operation_mode=Off, operation_list=['Heat', 'Cool', 'Dry', 'Fan', 'Auto', 'Off'], swing_mode=Top, swing_list=['Auto', 'Top', 'MiddleTop', 'Middle', 'MiddleBottom', 'Bottom', 'Swing'], friendly_name=MELCloud Sala (XXXXXX), supported_features=4801 @ 2019-06-17T22:13:09.543743+02:00>, new_state=<state climate.melcloud_sala_XXXXXX=Cool; current_temperature=25.6, min_temp=7, max_temp=35, temperature=25.0, fan_mode=Speed 1 (Min), fan_list=['Speed Auto', 'Speed 1 (Min)', 'Speed 2', 'Speed 3', 'Speed 4', 'Speed 5 (Max)'], operation_mode=Cool, operation_list=['Heat', 'Cool', 'Dry', 'Fan', 'Auto', 'Off'], swing_mode=Top, swing_list=['Auto', 'Top', 'MiddleTop', 'Middle', 'MiddleBottom', 'Bottom', 'Swing'], friendly_name=MELCloud Sala (XXXXXX), supported_features=4801 @ 2019-06-17T22:14:28.344154+02:00>>}
2019-06-17 22:14:33 DEBUG (MainThread) [homeassistant.components.http.view] Serving /api/hassio_ingress/UcSAIGQAjZOn_wKC6olXQaVnMzrglIwDzDpBF_qZpW0/api/file to 192.168.104.32 (auth: False)

Can anyone help me? Or is it a problem of Alexa integration?
Thank You :slight_smile:

ok, I’ve found a solution to this issue.
I’ve modified the file climate.py and set:

OPERATION_HEAT_STR = ‘heat’
OPERATION_COOL_STR = ‘cool’
OPERATION_FAN_STR = ‘fan’
OPERATION_AUTO_STR = ‘auto’
OPERATION_OFF_STR = ‘off’
OPERATION_DRY_STR = ‘dry’

The original file has Heat, Cool, Fan, Auto, Off and Dry (first capital letter).

Is it possible to change it on github for future upgrades?

Bye

Hello,

I never had the “operation_mode” working.
I have an automation like this:

- alias: 'AIRCO KAMER Nacht modus zomer ON'
  initial_state: true
  hide_entity: True
  trigger:
    - platform: state
      entity_id:  input_boolean.airco_kamer_nachtmodus
      to: 'on'
  action:
    - service: climate.turn_on
      data:
        entity_id: climate.melcloud_zolder_117363
    - service: climate.set_temperature
      data_template:
        entity_id: climate.melcloud_zolder_117363
        temperature: 23
        operation_mode: Cool 
    - service: climate.set_fan_mode
      data:
        entity_id: climate.melcloud_zolder_117363
        fan_mode: Speed 1 (Min)

Everything works only the airco always uses the last used operation_mode. So when I put the airco in “heat” mode and then run this automation the airco starts again in heat mode . Temperature & fan_mode are set correctly to 23° & Speed 1.

Does anyone got this to work?

Thanks,

Erik

Isn’t climate working on way that remember last run option ?

If I am correct then if you run as Cool and shutdown climate as Cool mode, then next time it will be started as Cool.
But if you run climate with remote control, then it will use last remote control settings…

Hi,
I got it working in the mean while.

THX

E.

Sorry, I can’t do any coding or I don’t know what to do with those ready github python files. Could someone be so kind and like tell me how to get started and what to do. The purpose is that i would get Voice Control (through Google Home) to MelCloud Mitsubishi’s AC’s.

This custom component will stop working on 0.96 releasing this week.

Multiple breaking changes to climate. I have created a issue. But not sure if it will be updated before hass 0.96 is released.

https://github.com/home-assistant/home-assistant/pull/23899

1 Like

Is there any news regarding component update?

You can try to update component… Should be working now on 0.96.x version…

Hi,

I justed updated the component to support new homeassistant v0.96. I also introduced some minor fixes.

BR

4 Likes

Thanks @o0Zz
Updated now.

I get this error ‘OPERATION_COOL_STR’ is not defined and Dry, cool, fan and auto not possible to select. Get that error above.

Edit: Found a few errors in the code where old operations mode was not changed to HVAC_MODE_. After fixing the dry, cool functions etc both heatpumps loads correct.

I have created a pull request to fix the Auto, dry, cool and fan options.

1 Like

Thanks Denis87, I merged your pull request to the master.

1 Like