Mitsubishi AirCon

This is what I got when trying to install manually from hass.io / docker /pip

1 Like

Thanks, I’ll have a look into that. If you want to try manually, edit mitsubishi.py and change the line
Import mitsubishi-echonet as mit
to:
Import custom_components.mitsubishi-echonet as mit

Guillaume_Corgnet What version of home assistant are you using? What sort of platform are you running it on? can you try to run ‘pip3 install mitsubishi-echonet’ instead of ‘pip’

I am running the latest version of hass.io on Raspberry pi and my instance didn’t have any issues downloading the library so there must be some environment difference between the two.

EDIT - It looked like that ‘pip’ didn’t like the setup.py file in version 0.1.6. I can only assume that current versions of hasso.io like 0.82 are using ‘pip3’. I have released version 0.1.7 which seems to be working fine again in both ‘pip’ and pip3’ so try cloning my repo down again and give it a go.

Thanks for that.
I am using hass.io v0.83.3 (latest as far as I know) on a raspberry Pi 3.

image

I had try the manual way first but got the following error

The new 0.1.7 version of your package doesn’t seem to help unfortunately

It’s strange, I am running a RPi one with HassOS 1.12. It has no issues with downloading the library automatically. I am just upgrading it now to HassOS 1.13, and I will let you know if it still works, I’ll build a new image as well and try to replicate it with a fresh install

Hi Guillaume,

I ended up running up a parallel development environment on a VM to do some more testing. Basically the Home assistant built-in dependancy handling seems totally stuffed up. However I did manage to get it working again on 83.3 and HassOS 2.3

There is another way you can try - you can install the official hass.io add-on called ‘Custom Deps Deployment’ - this should allow you to install the library into the deps folder. Use the following yams in the config for the add-on

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

This should install the library into the following folder - /config/deps/lib/python3.6/site-packages

If doesn’t work I have run out of ideas at this stage. Home Assistant is in pretty early development and a lot of behaviour like module installation simply isn’t happening properly between the different flavours of Home Assistant. I might give up and compress everything into a single library

Hi,
Thanks heaps for looking into this.
Unfortunately, I run into the same error when installing using Custom Deps Deployment:

You mention you are running HasOS 2.3… how did you manage that? I seem to be stuck at 1.13…

Even if I was to start from scratch, how would you advise I proceed? I know how to back up the config files, etc… but I have numerous ZWave devices and I don’t feel like having to set them up all again…

Hey Guillaume, Home assistant is all over the shop with its versions, I wouldn’t recommend breaking your environment at all just for this. I do think it is something to do with your version however, both my installs are pretty fresh. It could well be that PIP or Python itself need updating. Anyways I have written another custom component that condenses the external library into the component itself. Clone the git again and you will see a file called mitsubishi_mini.py - drop that straight into custom components. No dependancies needed. Set up your config.yaml like this:

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

You are using the MAC-568IF-E right?

You’re a genius!
The new component did load correctly and I confirmed I could control my ducted system.
I can’t thank you enough!

Hahah, thanks, can you do me a favour and keep an eye on any log messages that spit out please. Also, any features you might be missing from your ducted system let me know and I can update it. Can you tell me what model Mitsubishi you have so I can update my README file?

Sorry it took so long, I can only put it down to Home Assistant being a total mess of conflicting dependencies and different core versions.

My plan is to keep working on the library so it can become a new official component.

Will do. I am running a SEZ 85M00078 (Ducted) and (what I assume) is MAC-568IF-E (didn’t install it myself)
Installed in New Zealand

Here’s an error that popped up in the log
Log Details (ERROR)
Sat Dec 08 2018 23:06:17 GMT+1300 (New Zealand Daylight Time)

Update for climate.your_hvac fails
Traceback (most recent call last):
File “/usr/local/lib/python3.6/site-packages/homeassistant/helpers/entity.py”, line 221, in async_update_ha_state
await self.async_device_update()
File “/usr/local/lib/python3.6/site-packages/homeassistant/helpers/entity.py”, line 349, in async_device_update
await self.hass.async_add_executor_job(self.update)
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_mini.py”, line 557, in update
data = self._api.update()
File “/config/custom_components/climate/mitsubishi_mini.py”, line 469, in update
self.JSON = getOpCode(self.netif, self.eojgc, self.eojcc, self.instance, opc, self.last_transaction_id )
File “/config/custom_components/climate/mitsubishi_mini.py”, line 364, in getOpCode
rx = decodeEchonetMsg(tx_data[0][‘payload’])
IndexError: list index out of range

Yeah, that’s my lazy coding there. Occasionally the WiFi won’t return a response in time… It should ignore that error now that the component has loaded, but i’ll try to get it fixed up in the mean time to be more tolerant of errors.

Hi,

I am still using your library and it has been working well. I have noticed however that when using with a Lovelace Thermostat card, the On/Off button doesn’t show up. THere must be something simple in the code preventing that from showing up and working but I can;t figure it out.
Note: I can turn the system on and off from your own library/card.
Any help would be appreciated.
Cheers

image

Hi @scotty, this has stopped working due to the upgrade to v0.89.
Are you able to look into what;s required to get it working?
I believe it has to do with breaking changes introduced in this version, in the way custom components get loaded.
Cheers

It’s an easy fix - just pop into mitsubishi.py and change the section near the top which reads:

from homeassistant.components.climate import (
    ClimateDevice, ATTR_TARGET_TEMP_HIGH, ATTR_TARGET_TEMP_LOW,
    SUPPORT_TARGET_TEMPERATURE, SUPPORT_TARGET_HUMIDITY,
    SUPPORT_TARGET_HUMIDITY_LOW, SUPPORT_TARGET_HUMIDITY_HIGH,
    SUPPORT_AWAY_MODE, SUPPORT_HOLD_MODE, SUPPORT_FAN_MODE,
    SUPPORT_OPERATION_MODE, SUPPORT_SWING_MODE,
    SUPPORT_TARGET_TEMPERATURE_HIGH, SUPPORT_TARGET_TEMPERATURE_LOW,
    SUPPORT_ON_OFF)

To instead read:

from homeassistant.components.climate import ClimateDevice
from homeassistant.components.climate.const import (
    ATTR_TARGET_TEMP_HIGH, ATTR_TARGET_TEMP_LOW,
    SUPPORT_TARGET_TEMPERATURE, SUPPORT_TARGET_HUMIDITY,
    SUPPORT_TARGET_HUMIDITY_LOW, SUPPORT_TARGET_HUMIDITY_HIGH,
    SUPPORT_AWAY_MODE, SUPPORT_HOLD_MODE, SUPPORT_FAN_MODE,
    SUPPORT_OPERATION_MODE, SUPPORT_SWING_MODE,
    SUPPORT_TARGET_TEMPERATURE_HIGH, SUPPORT_TARGET_TEMPERATURE_LOW,
    SUPPORT_ON_OFF)
1 Like

It’s also worth noting that the “mitsubishi.py” file and “climate” folder need to be renamed otherwise it may stop working shortly. Your “home-assistant.log” in the config folder will indicate if this is the case so effectively:

|-config
…|-custom_components/
…|…|- mitsubishi_echonet/
…|…|- climate/
…|…|…|-mitsubishi.py

Will become:
|-config
…|-custom_components/
…|…|- mitsubishi_echonet/
…|…|- mitsubishi/
…|…|…|-climate.py

1 Like

Thanks awesome fault finders!!!
I’ll try to push these changes to the libraries when I find some time later this week. Didn’t even realise that 0.89 broke custom components (wtf) - I’m still on 0.86

I’ll try to look at it later this week