Mitsubishi AirCon


#1

Hi Guys,
I have only been using HA for about 2 weeks now, and I love it. Thanks for all of the hard work that has been done so far!

I have ordered some TPLink HT100 units to play with.

I am hoping to use my AirCon split system which is a Mitsubishi, it isn’t listed yet. The system has a iphone/android app which I currently use.
https://play.google.com/store/apps/details?id=net.melview.app
This is Australia/NZ based, but I hope someone in the HA community might be able to help.

It looks like some others have done some of the heavy lifting to reverse engineer the protocol.


Would someone be able to code up a component based on this info?

Using HA 0.60 via Docker (hosted on UnRAID), but also have a RPi3 that I could use to help test.

PS - I have the MAC-558/559

Thanks in advance,
kortina


#2

Vote here to have this feature implemented.


#3

Hi,

You can find a first implementation of this feature here :

I will try to push it to the home assistant mainline asap.


#4

Those Mitsubishi wifi units are VERY expensive. For a lot less you can make your own.

It is already communicating with MQTT so I think implementation should be possible. (I was going to say easy, but that word should never be used by non programmers).


#5

Hi everyone, I have written an implementation targeting the MAC-568IF-E Wi-Fi adaptor.
It does not require connectivity to the MELVIEW or MELCLOUD services, and instead uses the local ECHONET-lite feature available on the module. 100% Python3, no NodeJS middleware needed. Uses a simple UDP socket implementation (almost too basic really). A lot of stuff is missing at this stage, but the basics are there - set temp, set mode, turn it on and off…

It is a VERY early build, and pretty rough around the edges, but I am keen to develop it a bit further

Getting Started

  1. Clone the repo and copy /bin/mitsubishi.py into your /config/custom_components/climate/ folder

  2. In ‘configuration.yaml’ add the following lines:

# HVAC
climate:
  - platform: mitsubishi
    name: your_system_name
    ip_address: 1.2.3.4
  1. Make sure you enable the ECHONET Lite service in the official Mitsubishi AU/NZ Wifi App.

Help me - Home assistant is basically broken and didn’t install the component

In theory, Home Assistant should recognise the required dependancy and download the library. Well, that’s the idea anyway. However this is not happening for a lot of people (even me) and the various flavours of home assistant are wildly varied. So in the first instance try to let Home Assistant download the module automatically, but it that fails there are a couple of workarounds:

Workaround #1:

If the module fails to install - you can install the official hass.io add-on called ‘Custom Deps Deployment’ - this should allow you to install the library. Use the following yaml in the config for the add-on to install the library and start the addd on.

This method has been tested working on HassOS 2.3 (VM) and HassOS 1.12 (Raspberry Pi 1)

{
  "pypi": [
    "mitsubishi_echonet==0.1.7"
  ],
  "apk": []
}

Workaround #2:

If the PyPI dependancy fails to automatically install you can cheat a little and clone the external directly into ‘custom_components’

  1. Download the ‘mitsubishi-echonet’ folder that is inside the git repo directly into the ‘custom_components’ folder.
  2. You now have the ‘mitsubishi-echo’ folder under 'custom components.
  3. Copy the ‘mitsubishi.py’ file into ‘custom_components/climate’. Modify the following lines of code so it looks like this:

# REQUIREMENTS = ["mitsubishi_echonet==0.1.7"]
SUPPORT_FLAGS = SUPPORT_TARGET_HUMIDITY_LOW | SUPPORT_TARGET_HUMIDITY_HIGH
# import mitsubishi_echonet as mit
import custom_components.mitsubishi_echonet as mit

Workaround #3:

If you are having no luck whatsoever with getting the dependancies right (and I cannot blame you because HASSIO is a mess in that regard) then this is your last option:

Clone the git again and you will see a file /bin/mitsubishi_mini.py - drop that straight into \config\custom_components\climate. No dependancies needed. Set up your config.yaml like this:

climate:
  - platform: mitsubishi_mini
    ip_address: X.X.X.X
    name: "your_HVAC"

Thoughts

I am interested in feedback, because the other ECHONET-lite libraries were all NodeJS middleware running in docker containers that didn’t seem to work properly in hass.io.

Not really too keen to explore MELVIEW or MELCOULD integration at this stage.

The hope is that if I can iron out the bugs that I will request this be added in as an officially supported component.
I swear to the almighty this works!


#6

This is great news and good work. Regrettably, I don’t think those of us on the MelCloud Mitsubishi system can make it work. I was using o0Zz component until he apparently gave up on development, and it does not work anymore for me.

I’m not sure those of us in Europe with Ecodans, MrSlims, etc, using Mitsubishi’s WiFi adapter on the Melcloud ecosystem, can even activate Echonet Lite service (truth be told, I don’t even know what Echonet is). Anyway, I tried and failed. Just in case it can be of any help, here’s the error log when I point your platform to one of my A/C Melcloud Wifi systems. Thanks!

Error while setting up platform mitsubishi
Traceback (most recent call last):
  File "/usr/local/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/local/lib/python3.6/asyncio/tasks.py", line 358, in wait_for
    return fut.result()
  File "/usr/local/lib/python3.6/concurrent/futures/thread.py", line 56, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/config/custom_components/climate/mitsubishi.py", line 28, in setup_platform
    None, None, None, 'cool', None, None, None, None)
  File "/config/custom_components/climate/mitsubishi.py", line 71, in __init__
    self._target_temperature = data['set_temperature']
KeyError: 'set_temperature'

#7

Do you know what sort of Wifi Adaptor your system has?

In the Mitsubishi application on my phone, I had to explicitly enable the ECHONET lite service. ECHONET is an old-school Japanese control protocol which runs on the LAN. Ill send a screen capture of my app setting I had to enable on ‘Mitsubishi WiFi control’

I think MELCloud must be their current remote service. My adaptor is MAC-568IF-E. Look in the settings under your wifi app and see if you have an options like this:


#8

Also the PyPi library is live now, so you should be able to run ‘pip install mitsubishi-echonet’. Still early days!


#9

The WiFi adaptors I use for MelCloud are model MAC-567IF-E.

I thing the whole system is cloud-based. In fact, when you change any setting, there is a small delay until the unit receives the command. The app makes no mention of Echonet. Any thoughts?


#10

Yeah I did some more digging and it looks like the ECHONET feature is only available on in MAC-568IF-E series. I’ll look into this MELCLOUD thing some more. It sucks they make folk to go to the cloud to control their co-located home HVAC systems, they should give people the option of local control as well. At least if my internet dies I can still control it from my Wifi anywhere in the house… :thinking:

Also, I had a look at the MELCloud service too, my Australian account would not allow me to authenticate so it looks like Mitsubishi uses totally different APIs depending on what region you are in… Crazy!


#11

PM me if you want access to my account so you can take a look.


#12

I’ll clean up the library so it’s a bit more robust, and I’ll let you know if I have the time. It could be that the API has been updated so older python libraries won’t work anymore. MELCLOUD is definitely not available in AU/NZ so I will play around with the existing libraries some more… Hopefully you wont need to share you credentials :smile:


#13

I created a fake account and could definitely log into the API. What is the issue you are having with the current app? You are using the o0Zz library right?


#14

Yes, I was using o0Zz library and it actually worked well for a while, when I had only two a/c units in the house. Then I added three more units and an Ecodan for hot water/radiators, and o0Zz plugin never worked again. The Ecodan is also perfectly managed by Melcloud with the same basic functions: water on, heating on, temp, etc. Here’s the error log I get when I try to run it:

2018-11-28 07:01:39 ERROR (MainThread) [homeassistant.components.climate] Error while setting up platform melcloud
Traceback (most recent call last):
  File "/usr/local/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/local/lib/python3.6/asyncio/tasks.py", line 358, in wait_for
    return fut.result()
  File "/usr/local/lib/python3.6/concurrent/futures/thread.py", line 56, in run
    result = self.fn(*self.args, **self.kwargs)
  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"])
KeyError: 'RoomTemperature'

Thank you for taking a look at this.


#15

Scotty, are you sure about MELVIEW not being available in AU/NZ? I had my aircons installed last week and I use the MELVIEW app. I can’t register a MELCLOUD account (AU/NZ not available when trying to register MELCLOUD) (I’m in NZ)


#16

Yeah I was confusing the two. You are right - MELVIEW is the AU/NZ app, whereas MELCLOUD is the EU based service… I haven’t looked into either of them much because I got the local Echonet-lite service running which means I didn’t need to talk to a cloud-based API. Having said that I am interested in continuing to develop my library - what AC/Wifi Combo do you use?


#17

@scotty as requested:

  • WiFi Modules: MAC-568IF-E
  • AC 1: MSZ-GL50VGD
  • AC 2: MSZ-GL35VGD

If I can help in any way please let me know.


#18

PM sent. I was working on autodiscovery and support for multiple systems - might use your systems as the test bed!


#19

Does that mean you’ll take a look at possible Melcloud/Melview integration?
Thanks!


#20

Cheers for that!
Would you be able to help clarify how to set that up from scratch for hass.io?

I have followed instructions and ended up with
|-config
…|-custom_components/
…|…|- mitsubishi_echonet/
…|…|- climate/
…|…|…|-mitsubishi.py

I hope that’s right?

When restarting, I get the following error:

Anything obvious?