Mitsubishi MELCLOUD integration with Home Assistant

Great update. Thanks :grinning:

Will do some testing when im back home.

component show total 6 levels + swing and auto in hass. My Mitsubishi Kaiteki only have 5 levels + swing and auto. Do some models have 6?

I dont think the vane vertical is working. tried to adjust to level 1 and 2 and I see the change is actually done in melcloud ui. But after 20-30 sec it jumps back to level 4 that was the previous setting I had set from Melcloud.

Melcloud looks like this for the Kaiteki Heatpump.
kaiteki

@Dennis87 my bad, I fixed it on my repo. Let me know if it’s better.

1 Like

Yes vane adjust is working now :slight_smile:

Only Python 3.7 issue left and I think this is ready to be included as an official hass component? :smiley:

@o0Zz Thanks again for creating and fixing this component.

Fantastic job @o0Zz !! Now we keep the fingers cross to see if this gets implemented in the next versions.
Quick question…is there a way to shorten the communication time with MelCloud ?

1 Like

@nsoares are you talking about the communication between your air conditioner and melcloud or homeassistant and melcloud ?actually when you change something from homeassitant it will be propagated immediatly. However when you will update your air conditioner with your remote control you will get on maximum 6min of latency 5min caused by the melcloud design itself and +1min caused by the home hassistant plugin which poll the melcloud every minutes. You can reduce this 1 min but you will not be able to reduce the first 5min :/.

Cool @o0Zz ! Can you help on how to reduce to 1min?
Thanks do much

@nsoares, I just sent a pull request this evening: https://github.com/home-assistant/home-assistant/pull/17338. In this new version you will be able to configure this time by adding “lease_time” in your configuration.yaml, However, you need to know that homeassistant will poll the plugin every minutes, so i’m not sure how to reduce this polling time in homeassistant.

1 Like

In the last few weeks my component stopped loading. I added a new device at Melcloud, could that be an issue? This is what I get in the logs. Thanks!

File "/config/custom_components/climate/melcloud.py", line 574, in setup_platform
    devices = mc.getDevicesList()
  File "/config/custom_components/climate/melcloud.py", line 389, in getDevicesList
    devices.append( MelCloudDevice(device["DeviceID"], device["BuildingID"], device["DeviceName"], self._authentication) )
  File "/config/custom_components/climate/melcloud.py", line 151, in __init__
    self._refresh_device_info()
  File "/config/custom_components/climate/melcloud.py", line 179, in _refresh_device_info
    self._temp_list.append(self._json["RoomTemperature"])

Maybe my issue is related to a new device I added to my Melcloud account, an Ecodan system for heating and hot water. Can that be the case? Here’s a screenshot of the Melcloud control page:

I see that PR has been rejected because device specific code it’s not moved to PyPI. It would be great to have this plugin officially in Home Assistant :frowning:

1 Like

He did respond he dont have time :slight_smile: So someone else need to create a new pull request and fix the missing requirements.

Regarding this point, Could you accept the component without this change ?
To be honest with you, I will not have enough time to change this.
I send you this PR because lot of peoples requested it but I was not aware it was so restrictive.

If this component doesn’t match your requierement I can understand it. Just reject it or let another contributor update it. Unfortunatly, I will not have enough time to do this change.

Thanks for your work on HA.
Best regards,
o0zz

Tried to install the Melcloud plugin yesterday but couldn’t get it to work. Then I saw this thread and if I am correct, no one is working on it anymore?
If so, sad to hear, it would be nice to have Melcloud in HA…
Hope someone else catch up on it…

Plugin is working. Just not an official hass component. Also if you are using Python 3.7 it will fail to load.

1 Like

Okej, Is there any way you can find what my problem is? Running HA in vEnvironment on Ubuntu.
My python version seems to be 3.6.6
Best regards
Richard

Log Details (ERROR)
Thu Oct 25 2018 22:07:22 GMT+0200 (centraleuropeisk sommartid)

Error while setting up platform melcloud
Traceback (most recent call last):
File “/srv/homeassistant/lib/python3.6/site-packages/homeassistant/helpers/entity_platform.py”, line 128, in _async_setup_platform
SLOW_SETUP_MAX_WAIT, loop=hass.loop)
File “/usr/lib/python3.6/asyncio/tasks.py”, line 358, in wait_for
return fut.result()
File “/usr/lib/python3.6/concurrent/futures/thread.py”, line 56, in run
result = self.fn(*self.args, **self.kwargs)
File “/home/homeassistant/.homeassistant/custom_components/climate/melcloud.py”, line 574, in setup_platform
devices = mc.getDevicesList()
File “/home/homeassistant/.homeassistant/custom_components/climate/melcloud.py”, line 375, in getDevicesList
devices.append( MelCloudDevice(device[“DeviceID”], device[“BuildingID”], device[“DeviceName”], self._authentication) )
File “/home/homeassistant/.homeassistant/custom_components/climate/melcloud.py”, line 151, in init
self._refresh_device_info()
File “/home/homeassistant/.homeassistant/custom_components/climate/melcloud.py”, line 179, in _refresh_device_info
self._temp_list.append(self._json[“RoomTemperature”])
KeyError: ‘RoomTemperature’

After installing i get this issue in HA log:

Timer got out of sync. Resetting
5:32 PM core.py (ERROR)

It happens once a minute. Exacly one time every minute.
When i disable melcloud it goes away. Have you any idea whats causing it?

Maybe my problem is because I have a air/water Heater and then i look through the logs my RoomTemperature seems to be named “RoomTemperatureZone1” there is also others with Zone1 and Zone2 included in the name.
Do you think it would be possible to just replace RoomTemperature with RoomTemperatureZon1 in melcloud.py to get it to work?

‘HasThermostatZone1’: True, ‘HasThermostatZone2’: True, ‘TemperatureIncrement’: 0.5, ‘DefrostMode’: 0, ‘HeatPumpFrequency’: 0, ‘MaxSetTemperature’: 50.0, ‘MinSetTemperature’: 30.0, ‘RoomTemperatureZone1’: 21.5, ‘RoomTemperatureZone2’: -39.0, ‘OutdoorTemperature’: 12.0, ‘FlowTemperature’: 31.5, ‘FlowTemperatureZone1’: 25.0, ‘FlowTemperatureZone2’: 25.0, ‘FlowTemperatureBoiler’: 25.0, ‘ReturnTemperature’: 28.5, ‘ReturnTemperatureZone1’: 25.0, ‘ReturnTemperatureZone2’: 25.0, ‘ReturnTemperatureBoiler’: 25.0, ‘BoilerStatus’: False, ‘BoosterHeater1Status’: False, ‘BoosterHeater2Status’: False, ‘BoosterHeater2PlusStatus’: False, ‘ImmersionHeaterStatus’: False, ‘WaterPump1Status’: False, ‘WaterPump2Status’: False, ‘WaterPump3Status’: False, ‘ValveStatus3Way’: False, ‘ValveStatus2Way’: False, ‘WaterPump4Status’: False, ‘ValveStatus2Way2a’: False, ‘ValveStatus2Way2b’: False, ‘TankWaterTemperature’: 47.0, ‘UnitStatus’: 0, ‘HeatingFunctionEnabled’: True, ‘ServerTimerEnabled’: False, ‘ThermostatStatusZone1’: False, ‘ThermostatStatusZone2’: False, ‘ThermostatTypeZone1’: 1, ‘ThermostatTypeZone2’: 2, ‘EffectiveFlags’: 0, ‘LastEffectiveFlags’: 0, ‘Power’: True, ‘EcoHotWater’: False, ‘OperationMode’: 0, ‘OperationModeZone1’: 1, ‘OperationModeZone2’: 2, ‘SetTemperatureZone1’: 21.0, ‘SetTemperatureZone2’: 20.0, ‘SetTankWaterTemperature’: 50.0, ‘TargetHCTemperatureZone1’: 45.0, ‘TargetHCTemperatureZone2’: 35.0, ‘ForcedHotWaterMode’: False, ‘HolidayMode’: False, ‘ProhibitHotWater’: False, ‘ProhibitHeatingZone1’: False, ‘ProhibitHeatingZone2’: False, ‘ProhibitCoolingZone1’: False, ‘ProhibitCoolingZone2’: False, ‘ServerTimerDesired’: False, ‘SecondaryZoneHeatCurve’: False, ‘SetHeatFlowTemperatureZone1’: 45.0, ‘SetHeatFlowTemperatureZone2’: 0.0, ‘SetCoolFlowTemperatureZone1’: 0.0, ‘SetCoolFlowTemperatureZone2’: 0.0, ‘ThermostatTemperatureZone1’: 0.0, ‘ThermostatTemperatureZone2’: 0.0, ‘DECCReport’: False, ‘CSVReport1min’: False, ‘Zone2Master’: False, ‘DailyEnergyConsumedDate’: ‘2018-11-01T00:00:00’, ‘DailyEnergyProducedDate’: ‘2018-11-01T00:00:00’, ‘CurrentEnergyConsumed’: 0, ‘CurrentEnergyProduced’: 0, ‘CurrentEnergyMode’: None, ‘HeatingEnergyConsumedRate1’: 0, ‘HeatingEnergyConsumedRate2’: 0, ‘CoolingEnergyConsumedRate1’: 0, ‘CoolingEnergyConsumedRate2’: 0, ‘HotWaterEnergyConsumedRate1’: 0, ‘HotWaterEnergyConsumedRate2’: 0, ‘HeatingEnergyProducedRate1’: 0, ‘HeatingEnergyProducedRate2’: 0, ‘CoolingEnergyProducedRate1’: 0, ‘CoolingEnergyProducedRate2’: 0, ‘HotWaterEnergyProducedRate1’: 0, ‘HotWaterEnergyProducedRate2’: 0, ‘ErrorCode2Digit’: 0, ‘SendSpecialFunctions’: 0, ‘RequestSpecialFunctions’: 0, ‘SpecialFunctionsState’: 0, ‘PendingSendSpecialFunctions’: 0, ‘PendingRequestSpecialFunctions’: 0, ‘HasZone2’: False, ‘HasSimplifiedZone2’: False, ‘CanHeat’: True, ‘CanCool’: False, ‘HasHotWaterTank’: True, ‘CanSetTankTemperature’: True, ‘CanSetEcoHotWater’: True, ‘HasEnergyConsumedMeter’: True, ‘HasEnergyProducedMeter’: True, ‘CanMeasureEnergyProduced’: False, ‘CanMeasureEnergyConsumed’: False, ‘Zone1InRoomMode’: False, ‘Zone2InRoomMode’: False, ‘Zone1InHeatMode’: True, ‘Zone2InHeatMode’: True, ‘Zone1InCoolMode’: False, ‘Zone2InCoolMode’: False, ‘AllowDualRoomTemperature’: False, ‘HasEcoCuteSettings’: False, ‘HasFTC45Settings’: True, ‘CanEstimateEnergyUsage’: True, ‘CanUseRoomTemperatureCooling’: False, ‘IsFtcModelSupported’: True, ‘MaxTankTemperature’: 60.0, ‘IdleZone1’: True, ‘IdleZone2’: True, ‘MinPcycle’: 1, ‘MaxPcycle’: 1, ‘MaxOutdoorUnits’: 255, ‘MaxIndoorUnits’: 255, ‘MaxTemperatureControlUnits’: 0, ‘DeviceID’: 110135, ‘MacAddress’: 'a0:cc:2b:e3:2d:e

I’m having the same issue as described above with error in first line (7).

SyntaxError: invalid syntax
Fatal error while loading config: invalid syntax (melcloud.py, line 7)
Failed config
  General Errors: 
    - invalid syntax (melcloud.py, line 7)

And it’s not the issue of transfer method, I’m using WGET to get the file. Any other ideas?

Never mind, but I thought of responding to myself when/if someone else get the same issue.

Using the correct download link instead of the HTML version helped things. First custom component installed and I’m learning. :slight_smile: