Thanks @scotty! I’m using this and it works perfectly!
I’m in Australia using the MAC559IF-E adapter. So, no echolite and no MELCLOUD. Is anyone aware of an HA integration I could use? The only things I could find rely on either echolite or
MELCLOUD.
It also depends on how much your time is worth as well to source all the electronic parts needed for the Arduino approach, and crimp + solder it all together, assuming you are confident to solder
The advantages of using the factory module is that:
-
The factory module has been properly engineered and would have passed a proper QC test -
- I question the Wi-Fi performance and reliability of the ESP8266 especially if you are using its built-in antenna.
-
You will not lose compatibility with the official app which makes it wife and kids friendly.
Of course you are still tethered to the cloud when you use the official app but the ECHONET support means you can control at home via Home Assistant as long as your inbound connection is properly firewalled (which is a must!). I think it is fair to say you would face slightly fewer security issues using the Arduino + MQTT approach in that your connection is not in the cloud but is reliant on you having a good firewall at home and security on your MQTT broker etc…
As a bonus you get much simpler and cheaper Alexa integration for your HVAC with the Mitsubishi cloud API then what Home Assistant currently offers in this space (in my opinion). I am of two minds about Amazon but I do like having decent voice control over my home automation. Siri support can be done natively through Home Assistant via whatever means you like. Cant comment about Google Assistant support.
You could buy the MAC-568 adaptor and sell your MAC-559 adaptor, and you might not be as much out of pocket as you think…
most of us are running an mqtt server.
the mqtt client part is on the esp32/8266 device itself.
wife/kids can use home assistant can’t they? Besides the best app is no app. Let the automation do its things.
Thats why I edited my comment mate, i realised that the Arduino itself would host the client.
And no my wife does not like to use Home Assistant despite my training attempts and yes I have made the GUI as simple to use as possible.
I agree to let the automation do its own thing but my wife prefers to be able to turn on the HVAC when she wants. And as per my first comment not everyone knows how to solder and correct me if I am wrong here but isn’t a goal of Home Assistant to be accessible for everyone not just software developers?
She gets annoyed when it shuts itself off because I have coded an automation combining the HVAC with some Xiaomi BLE temperature sensors… And she loves the Alexa integration and I am not paying Nabu Casa a subscription or spending hours coding some flash briefing skills to make it work. I would prefer to spend that time with my family.
The good thing about HA is that we can each have our preferences and debate them openly. Each to their own, and so it should be
Confession: I have the gear to get the esp version going, but am still relying on my cloud based sensibo integration. I will get the esp’s done sometime, promise!
Its all good Totally understand, It took me months to build my latest Garage door sensors…
Also Confession: I would have gone down the ESP path too if I had not already had the official Wi-Fi module to begin with, it was a stroke of luck I had the ECHONET lite enabled version to play around… but I do see the advantages of the factory module now (obviously biased somewhat )
I am going to give this a go: https://github.com/unixko/MitsuCon
I already have a bunch of Wemos D1 mini’s in the house, so having one more attached to the Mitsubishi unit isn’t an issue.
My wife only ever uses the remote.
I use the Mitsubishi ‘Wifi Control’ app from my phone occasionally (twice a month)
The most useful feature that I currently use from the Mitsubishi system is the turn off at 22:30 and turn off at 02:30. The have been implemented as rules within the Mitsubishi app.
This is useful in winter when we are drying clothes in our Rumpus room, bring the room up to temperature, then let the residual heat in the room finish the clothes off.
I will be able to re-create this feature in HomeAssistant, but will have a much more flexible future to change the status of the AirCon.
I have the MAC-568 and I use Scotty’s HA code to control the aircon. I don’t use the official app at all after the initial configuration. The official app does have Google assistant integration, but I exposed the unit via HA scripts and google app. I probably would have gone down the self development path if I knew in advance that my indoor unit was compatible. I agree with Scotty on the time factor - took 20 minutes stuffing about in the ceiling with the MAC-568 and then it was hooked up. I know that if I did a custom job I would have been up and down the ladder for hours. With regards to the D1 mini, the pro option has much better WiFi range then the standard version.
Ok, found this and it works perfectly for me. Melview custom component. This should work for Australian units with a Wi-Fi module. And it seems to be running locally?!
Have you made your own module?
I’m struggling to find the CN105 connector on the cheap. I’m in Sydney, any ideas?
first off, thanks for the awesome work @scotty . It looks like its almost working flawlessly for me, but it eventually seems to get stuck with an “index out of range” error, presumably because of some error response? I’m not overly familiar with python (and even less so with hass.io) so i’d be keen for your thoughts on this one. It seems to usually communicate fine (apart from the “no data was received” warning you mentioned earlier) but then this error.
(MainThread) [homeassistant.components.websocket_api.http.connection.140277425411280] list index out of range
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 134, in handle_call_service
connection.context(msg),
File "/usr/src/homeassistant/homeassistant/core.py", line 1230, in async_call
await asyncio.shield(self._execute_service(handler, service_call))
File "/usr/src/homeassistant/homeassistant/core.py", line 1253, in _execute_service
await handler.func(service_call)
File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 198, in handle_service
self._platforms.values(), func, call, required_features
File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 402, in entity_service_call
future.result() # pop exception if have
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 590, in async_request_call
await coro
File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 433, in _handle_entity_call
await result
File "/usr/src/homeassistant/homeassistant/components/climate/__init__.py", line 422, in async_set_hvac_mode
await self.hass.async_add_executor_job(self.set_hvac_mode, hvac_mode)
File "/usr/local/lib/python3.7/concurrent/futures/thread.py", line 57, in run
result = self.fn(*self.args, **self.kwargs)
File "/config/custom_components/mitsubishi/climate.py", line 297, in set_hvac_mode
self._api.setMode(operation_mode)
File "/usr/local/lib/python3.7/site-packages/mitsubishi_echonet/__init__.py", line 470, in setMode
if self.setMessage(0xB0, MODES[mode]):
File "/usr/local/lib/python3.7/site-packages/mitsubishi_echonet/__init__.py", line 327, in setMessage
rx = decodeEchonetMsg(data[0]['payload'])
IndexError: list index out of range
Okay, I have replicated the error message and need to do a bit of work in the back end to make it more tolerant of that index error. Basically it occurs when the system does not response quickly enough to a ‘set mode’ message like you send it many messages at once. I will see what I can do about better error handling for that particular section of the code.
Can you update to the latest version of my component? You shouldn’t see that error message again now. Basically what I think was happening is that when your system was not responding in time to the ‘setMessage’ it was causing the python API to throw the error. I have tweaked the system to basically ignore that error (technically setMessage returns FALSE if it does not receive a response from the HVAC but for our purposes that doesn’t matter as Home Assistant polls it seperately for its state)
Hiya!
I’m actually the author of that component - glad it’s useful to others!
Just to clarify, the system isn’t completely local (yet?), I communicate with the MelView API just like the app/website.
Assuming you’re on a network with the unit, MelView then sends back a special code. I just grab that code and forward it onto the unit locally - meaning we don’t hit the delay waiting for the unit to poll MelView.
Usually, the browser/app checks this by polling the local unit (at http://<unit-ip>/MAC-559IF-E.gif
in my case). Note that the local unit only offers a http
server, so cross-origin limits block the request if you use the https
site…
In the future, I want to try reverse engineer the code format, but time is currently not on my side…
Cheers!
Hi Scott
Thanks for putting this together, really appreciate your work to date! I just posted a feature request in github before I found this thread.
However, that’s not the real reason I’m here. Unfortunately I can’t get your module to operate my system at all, despite it seeming to have installed correctly. Simply, it doesn’t turn on or off, and can’t seem to get status updates from the hvac.
Setup is as follows:
HassOS 3.12 (vmware image/fresh install today)
Home Assistant 0.107.7
Mitsubishi PEAD-M100-JAA(D) Ducted (although I think it’s one model newer, as the installer couldn’t find the latest model when they setup the app)
MAC-568IF-E (i believe, need to confirm tomorrow).
Echonetlite: enabled
Downloaded your three component files from https://github.com/scottyphillips/mitsubishi_hass/tree/master/custom_components/mitsubishi
Created the custom_components/mitsubishi folder and placed them in there.
config.yaml:
climate:
- platform: mitsubishi
ip_address: 192.168.60.13
name: "Mitsubishi Aircon"
fan_modes:
- 'auto'
- 'minimum'
- 'low'
- 'medium-low'
- 'medium-high'
- 'high'
Restarted HA, the hvac widget shows up fine (but as above is not functional) and getting the following errors in the logs:
HA requested an update from HVAC 192.168.60.13 but no data was received
11:25:46 PM – custom_components/mitsubishi/climate.py (WARNING) - message first occurred at 8:55:44 PM and shows up 151 times
'MitsubishiClimate' object has no attribute '_on'
11:15:33 PM – websocket_api (ERROR) - message first occurred at 11:13:27 PM and shows up 4 times
HA requested an update from HVAC 192.168.60.13 but no data was received. Using Defaults
8:54:43 PM – custom_components/mitsubishi/climate.py (WARNING)
You are using a custom integration for mitsubishi which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant.
8:54:43 PM – loader.py (WARNING)
Oh, and as an aside, HA is on 192.168.60.11 (wired), the HVAC is 192.168.60.13 (wifi obv). Can ping from both the HA container and the host to the HVAC.
Any insights?
Thanks again for your work here.
Well now I feel like an idiot. It looks like the echonetlite protocol was off, not sure how that happened but after enabling it on the app, and restarting HA control is now working!
My unit is a Mitsubishi PEAD-M100-JAA(D) according to my invoice and the manual I have here.
I’m guessing the WiFi controller must be a MAC-568IF-E as that’s the only one which has echonetlite.
As per my feature request on github, now super keen to get zone control working. Happy to fork and have a go myself, but need a gentle pointer in the right direction.
Thanks again
Aaron
I think you might need to poke around with CLI Python and see if your device returns an ECHONET class that contains some form of zone functionality as the ‘Home Air Conditioner’ class does not support zones (neither does the ‘Climate’ class in HA for that matter). Not really something I can implement myself sorry. Check GitHub for a more detailed answer.
Also, since zones are available in the MELVIEW API maybe talk to @zacharyrs about what he can do with the cloud service to get zone functionality up and running as a workaround. I can certainly poll my own controller via the cloud API but since I dont have any zones configured I cant go much further…
Thanks @scotty.
I’ve had a bit of a play and got as far as the following:
>>> aircon.__dict__
{'netif': '192.168.60.13', 'last_transaction_id': 3, 'eojgc': 1, 'eojcc': 48, 'instance': 1, 'available_functions': {128: ('Operation status', <function Function._013080 at 0x7fef74718710>), 143: ('Operation power-saving', None), 176: ('Operation mode setting', <function Function._0130B0 at 0x7fef74718c20>), 177: ('Automatic temperature control setting', None), 178: ('Normal/high-speed/silent operation setting', None), 179: ('Set temperature value', <function Function._0130B3 at 0x7fef74718950>), 180: ('Set value of relative humidity in dehumidifying mode', None), 181: ('Set temperature value in cooling mode', None), 182: ('Set temperature value in heating mode', None), 183: ('Set temperature value in dehumidifying mode', None), 184: ('Rated power consumption', None), 185: ('Measured value of current consumption', None), 186: ('Measured value of room relative humidity', None), 187: ('Measured value of room temperature', <function Function._0130BB at 0x7fef747189e0>), 188: ('Set temperature value of user remote control', None), 189: ('Measured cooled air temperature', None), 190: ('Measured outdoor air temperature', <function Function._0130BE at 0x7fef74718a70>), 191: ('Relative temperature setting', None), 160: ('Air flow rate setting', <function Function._0130A0 at 0x7fef74718b00>), 161: ('Automatic control of air flow direction setting', None), 163: ('Automatic swing of air flow setting', None), 164: ('Air flow direction (vertical) setting', None), 165: ('Air flow direction (horizontal) setting', None), 170: ('Special state', <function Function._0130AA at 0x7fef74718b90>), 171: ('Non-priority state', None), 192: ('Ventilation function setting', None), 193: ('Humidifier function setting', None), 194: ('Ventilation air flow rate setting', None), 196: ('Degree of humidification setting', None), 198: ('Mounted air cleaning method', None), 199: ('Air purifier function setting', None), 200: ('Mounted air refresh method', None), 201: ('Air refresher function setting', None), 202: ('Mounted self-cleaning method', None), 203: ('Self-cleaning function setting', None), 204: ('Special function setting', None), 205: ('Operation status of components', None), 206: ('Thermostat setting override function', None), 207: ('Air purification mode setting', None), 144: ('ON timer-based reservation setting', None), 145: ('ON timer setting (time)', None), 146: ('ON timer setting (relative time)', None), 148: ('OFF timer-based reservation setting', None), 149: ('OFF timer setting (time)', None), 150: ('OFF timer setting (relative time)', None)}, 'status': False, 'propertyMaps': {}, 'setTemperature': 25, 'roomTemperature': None, 'outdoorTemperature': None, 'mode': False, 'fan_speed': None, 'JSON': {}}
Does anything there look interesting? Maybe propertymaps
?
I also had a read through the spec as posted by futomi. His code looks super useful, and if I knew node.js at all I might be able to work it out.
Being from an infrastructure background, I am happy to spend a few hours digging deeper, just don’t want to be digging in the wrong place if you get me, especially if I’m needing to pickup a new language.