Mitsubishi Kumo Cloud Integration

Getting some weird error messages and I can no longer access climate controls. Any idea what to make of it?

2019-12-13 21:19:59 ERROR (MainThread) [homeassistant.components.climate] Error while setting up platform kumo
Traceback (most recent call last):
File “/usr/src/homeassistant/homeassistant/helpers/entity_platform.py”, line 150, in _async_setup_platform
await asyncio.wait_for(asyncio.shield(task), SLOW_SETUP_MAX_WAIT)
File “/usr/local/lib/python3.7/asyncio/tasks.py”, line 442, in wait_for
return fut.result()
File “/config/custom_components/kumo/climate.py”, line 74, in async_setup_platform
units = data.get_account().get_indoor_units()
File “/usr/local/lib/python3.7/site-packages/pykumo/pykumo.py”, line 406, in get_indoor_units
self._fetch_if_needed()
File “/usr/local/lib/python3.7/site-packages/pykumo/pykumo.py”, line 366, in _fetch_if_needed
response = requests.post(self._url, headers=headers, data=body)
File “/usr/local/lib/python3.7/site-packages/requests/api.py”, line 116, in post
return request(‘post’, url, data=data, json=json, **kwargs)
File “/usr/local/lib/python3.7/site-packages/requests/api.py”, line 60, in request
return session.request(method=method, url=url, **kwargs)
File “/usr/local/lib/python3.7/site-packages/requests/sessions.py”, line 519, in request
prep = self.prepare_request(req)
File “/usr/local/lib/python3.7/site-packages/requests/sessions.py”, line 462, in prepare_request
hooks=merge_hooks(request.hooks, self.hooks),
File “/usr/local/lib/python3.7/site-packages/requests/models.py”, line 313, in prepare
self.prepare_url(url, params)
File “/usr/local/lib/python3.7/site-packages/requests/models.py”, line 387, in prepare_url
raise MissingSchema(error)
requests.exceptions.MissingSchema: Invalid URL ‘None’: No schema supplied. Perhaps you meant http://None?

Fixed with a restore from a hassio image backup. Still not sure what went wrong… but not a problem anymore.

Let me know if you see this again. There may be a race in setting up if it’s using the cached KumoCloud config.

Another happy user here! Thanks so much parkercat for making this possible…

Just installed, shows up my AC unit and I can control it… :slight_smile:

Checking still the logs and how it operates… I can see some controls (swing mode) that I should not have, since it’s a ducted unit… And also trying to figure out the fan speeds…

Let me know if it would be useful for you to send any debugging to you.

R

I’m finally getting around to testing this implementation out as my primary configuration.

It was very easy to cutover to this installation. Since my units all matched the same names, my automations and UI was unaffected. The performance of this is much better. One question I have is regarding the UI that is displayed, what are the two dials below the main temp dial? I had not had this before. I’ve explicitly disabled “auto” mode on my units so would only expect to see a single temp adjustment.

Boy, I have no idea. Mine does not look like that at all in Heat mode. I’m still on HA 0.102 though.

The code, as it stands now, is consulting the indoor unit for certain capabilities, such as whether it supports heat, dry (dehumidify) mode, fan-only mode, etc. But whether it supports Swing mode is not among the capabilities that’s dynamically configured, currently. I also suspect fan speeds may be different for ducted vs. direct units.

It does appear that the JSON config dictionary we retrieve from the unit tells us whether swing is supported, so that would be easy to add. It also tells us the number of fan speeds supported, but (as far as I can tell) not what they’re called. A packet capture (see up-thread) of stepping through the available fan speeds with the KumoCloud app would tell us a lot. I should add a utility Python file to the repo to retrieve a unit’s config dictionary so people can report it for different indoor unit types.

Alternatively, if you play around with fan speeds and can tell us (for example) that there are 3 speeds that work and their names are “quiet”, “low”, and “powerful” that tells us something. I think I (and upstream kumojs) may be missing a fan speed, because my unit claims to support 5 speeds yet I only have names for 4. I’ll need to do the packet capture thing myself soon to figure it out. I always use “auto” anyway so I hadn’t noticed this until today.

Interesting, I’m on 0.103. Once you update to 0.103 we can compare what we are seeing and go from there.

I’ve taken @parkercat up on the request for documentation to get this ready for homeassistant.
I have created a first draft for the documentation and it is posted on the issue he opened https://github.com/dlarrick/hass-kumo/issues/5

Please take a look and let me know if you have any input or knowledge about the attributes I’m missing.

As a side note @parkercat this is working perfectly for me, I had been on kumojs as an addon to hassio and I completely deleted and deactivated that because this worked so well.

1 Like

As I mentioned over on GitHub this looks like a good start, and I should have a chance to review it more thoroughly over the holidays. Others should feel free to review and add comments as well.

I should get a chance to look at some of the other outstanding issues over the next couple of weeks, too.

Just upgraded to 0.103.2 and I’m seeing the same UI issue @gregorymartin is seeing.

Ah. This is https://github.com/home-assistant/home-assistant-polymer/issues/4359 . Nothing hass-kumo is doing wrong. The old KumoJS-based integration doesn’t do this because it doesn’t support Auto mode at all.

I have pushed a new version of the kumo integration to GitHub. This version reads more configuration info from the indoor units at startup time. Notably, it reads whether vane direction (aka swing mode) is supported, which should fix what @rbarbero reported. And if your unit has Auto mode (aka heat/cool) disabled, you should no longer hit the display bug reported by @gregorymartin and @James_Huang. (Sadly, you will still hit the display bug if your unit does support Auto mode. The HA devs will need to fix this one.) It also adds a missing fan speed (superQuiet). I’m curious how well these fan speeds work on different types of units.

Make sure you update the whole kumo directory from GitHub for your custom_components folder, since this update requires a new version of the pykumo module (which should automatically get installed on Hass restart).

Next up, I want to look in detail at the docs graciously provided by @omriasta, provide some tools for local debugging, and read up on what it would take to be hosted by HACS.

1 Like

I just installed it and can confirm the display bug is gone.

I’m still getting the artifact that @gregorymartin described earlier despite a couple of reboot. You indicated the the bug is persistent if the unit supports “auto” mode. Which drop down would “Auto” appear in for me to know that I fall into this category?

I mean Operation mode “Heat/Cool” AKA Auto. If your units support that they’ll show the bug (as will all other Climate integrations in HA) until the core HA UI fixes the bug I quoted above.

Note that if you don’t use Heat/Cool, I think there’s a way to disable it in the Installer section of the KumoCloud app, but I’m not about to try to walk anybody through that.

Hello!
Tested the new version, now that I’m back from Holidays and it improved for me! Thanks again @parkercat!

The vane direction is not showing anymore for me (my system does not have that functionality, since it’s ducted).

I have seen a couple of strange behaviors, though:
Fan speed - My unit only supports 4. Using the integration names: “quiet, low, powerful, auto”. Other two are available in the integration “super quiet” -> in this case my unit goes to the equivalent of “quiet” and “super powerful”, in this case my unit goes to “powerful”.
What I’ve seen is that the UI, after selecting a new fan speed (doesn’t matter which), will revert back to the previous setting… The unit, however, is still on the new setting.
For example… I change from quiet to powerful in the UI Card… UI shows ‘powerful’, unit changes to powerful, UI changes to ‘quiet’ (without changing anything - unexpected)… unit remains in ‘powerful’ (expected)

Another thing I’ve seen is that when the unit is set in fan mode, the UI card shows ‘Idle’… But the Kumo App shows ‘Fan’…

These are just small appearance bugs… But the integration works perfectly!
R

Cool, I’m glad the vane direction change worked.

For the fan speeds: yeah, the unit reports how many fan speeds it has but not what they’re called. Right now I’m assuming it’s 6 (5 plus auto). It should be logging this discrepancy – you should see “Unit reports a different number of fan speeds than supported x != 5”, either in your home-assistant.log or in wherever your logs go (for me it’s systemd, so sudo journalctl -x -n2000 [email protected] | grep support would find it). I would expect the number ‘x’ in your case to be 3 – if so, I can include an update to fix this properly next time I’m in there.

I further expect the weirdness with the UI-displayed fan speeds to be a result of trying to set invalid ones. If this is the case It should settle down to the right thing on the next polling cycle (within 5-10 minutes certainly).

Really, what I need to do is add some debug-level logging that records the raw communication with the unit. That would make troubleshooting for different unit types much easier.

My unit also shows “Idle” in the UI if it’s in fan-only. The Fan icon (across the bottom) is on, but since it’s just a different shade of grey it’s subtle. If I click and get the details card, it shows “Idle (Fan Only)”.
See:
image
vs:
image

I suspect this is expected HA UI behavior.

My first post here, led down by a rabbithole that started off with a missing neutral in a switch box…

Anyway - I got the Kumo integration working, couldn’t figure out how to do a “Custom Component” so used the brute force copy and paste method.

Got it all working without any problem. What a treat :slight_smile:

Many thanks to parkerkat for putting this together, awesome work.

Got a sizeable system with 7 Units across three floors, happy to contribute test results where needed.

1 Like