Is anyone aware of an effort to create an integration with Mitsubishi’s Kumo Cloud to bring their ductless climate units into HA? I’ve found this Node code which seems to work and my hope is that it might be easily ported into an integration. I’m a (rusty) developer but would love to help out if one is in the works, and if not then I’m willing to get one kicked off.
If you can get KumoJS running, I’ve written a simple module that implements a Home Assistant Climate object that talks to your running KumoJS server. It’s been running OK for me for a few months now: https://github.com/dlarrick/hass-kumo
This is great, I’ll play around with it. Ultimately I’ve love to see this working as a self contained component with HASS which I think would require porting KumoJS to a Python library.
It appears that it may be possible to run this package in HASS.IO as custom add-on leveraging a docker container. Have you attempted this?
My install is straight Raspbian, which does not have a recent enough node.js to run KumoJS. So I simply run KumoJS on another system in my house. It’s not ideal but it’s working.
Eventually it would be nice to port that JS to a Python library, as you state, and be able to use it natively from Home Assistant. But that’s not been a priority for me since it’s working fine.
It’s also possible that Raspbian 10 – likely out this summer, shortly after Debian 10 – will have the required updates.
Thanks, I’ll update this thread if I make any progress on this.
I have been able to get this successfully working self contained in Hass.io by creating a custom add-on for KumoJS. Here is the Dockerfile I use, note that I’m pointed at my fork of KumoJS as I’ve submitted a pull request that handles groups.
ARG BUILD_FROM
FROM $BUILD_FROM
ENV LANG C.UTF-8
FROM node:12.4
RUN cd /root && git clone https://github.com/gregorymartin/kumojs.git
RUN cd /root/kumojs && npm install
RUN cd /root/kumojs && npm run build
ADD kumo.cfg /root/kumojs/build/kumo.cfg
RUN echo "cd /root/kumojs && npm run server" > /root/run_kumojs.sh
RUN chmod +x /root/run_kumojs.sh
CMD [ "/root/run_kumojs.sh" ]
FYI I’ve pushed a bugfix to https://github.com/dlarrick/hass-kumo regarding changing the setpoint for the proper operation mode.
I’ve got this all working, though one thing I notice is that Home Assistant lists the set temperature one degree higher than the Kumo app does, have you observed this?
I have not, but I would think it’s different rounding in KumoCloud vs. HA/KumoJS Fahrenheit / Celsius conversion. KumoJS accepts F for setting but reports C so it’s almost unavoidable.
I have noticed that if setpoint winds up with too many decimal places, KumoCloud won’t display it.
Have you seen the Climate changes that just rolled out with 0.96? It looks like they may be breaking changes for this component.
Yes they’re definitely breaking changes. Fortunately they seem to be mostly cosmetic changes for this code. I should have a chance to take a look this weekend, with the caveat that Boston (where I am) is under an “excessive heat warning” for this weekend and it may not be the best time for me to be making changes to my A/C controls.
Makes sense, it’s a crucial component of my setup too, and my family doesn’t need me mucking it up. Let me know if I can be of assistance in development or testing.
I have pushed an updated version that at least loads under 0.96.2 to https://github.com/dlarrick/hass-kumo . I’ve done minimal testing but am able to change the setpoint and turn the units on & off.
As I suspected, the changes were fairly straightforward, though there may be bugs. If you encounter new issues, report them here (or fix them and make a PR on GitHub).
I’m not particularly handy with code – still trying to wrap my head around how to set up a KumoJS server on my Pi – but just wanted to say I’m eagerly awaiting this integration and happy to test if it’ll help! I’ve got a 5-zone Kumo Cloud setup right now.
hass-kumo been stable for me since the 0.96 upgrade. The hard part is getting KumoJS set up. If you have a system that can run a recent-enough node.js, sushilks’s instructions are good. I suspect Raspbian Buster may be able to do it though I have not tried yet.
I also suspect that porting the node.js component to Python may not be as hard as all that. Simple matter of finding the time…
I’ve been able to run KumoJS as an add-on within a docker container in Hass.io successfully. I’ll write up more detailed instructions on how I did it. There are hints in the thread above, but it’s probably not obvious.
I’m running your latest code on 0.96 and it seems to be stable for me as well.
Here are more detailed steps for how I’ve been able to get my Mitsubishi mini splits working in HASS.IO. Ideally one day the work to port the KumoJS node code into a python module can be done to turn this into an official integration, but for now this seems to work fine.
Prerequisites
- You have Mitsubishi Cooling & Heating product(s) installed in your home.
- You have wifi enabled your units with the PAC-US444CN-1 Thermostat Adapter Interface.
- You have setup Kumo Cloud.
1. Get KumoJS Running as a HASS.IO Add-On
Once you are done with this step you should have a custom add-on setup in HASS.IO that is running KumoJS as a REST API locally. More detail about creating add-ons can be found here.
- Get source code and follow instructions for building it and generating kumo.cfg file from https://github.com/sushilks/kumojs. Save the kumo.cfg file somewhere for later.
- Note: I forked this code and fixed an issue in it that was not showing units that were grouped into zones, if my pull request hasn’t been accepted yet, you can get that code here.
- Create a kumo_cloud folder in your addons folder in HASS.IO (I use the Samba add-on for easy access to working with the system)
- Copy your kumo.cfg file into the kumo_cloud folder.
- Create a config.json file in the kumo_cloud folder that matches below.
- Create a Dockerfile file in the kumo_cloud folder that matches below.
config.json
{
"name": "Kumo Cloud",
"version": "1",
"slug": "kumo_cloud",
"description": "Kumo Cloud KumoJS Add-On",
"arch": ["armhf", "armv7", "aarch64", "amd64", "i386"],
"startup": "before",
"boot": "auto",
"options": {},
"schema": {},
"ports": {
"8084/tcp": 8084
}
}
Dockerfile
ARG BUILD_FROM
FROM $BUILD_FROM
ENV LANG C.UTF-8
FROM node:12.4
RUN cd /root && git clone https://github.com/sushilks/kumojs.git
RUN cd /root/kumojs && npm install
RUN cd /root/kumojs && npm run build
ADD kumo.cfg /root/kumojs/build/kumo.cfg
RUN echo "cd /root/kumojs && npm run server" > /root/run_kumojs.sh
RUN chmod +x /root/run_kumojs.sh
CMD [ "/root/run_kumojs.sh" ]
2. Install hass-kumo Custom Component
- Get source code for hass-kumo interface from https://github.com/dlarrick/hass-kumo.
- Create a kumo_cloud folder in your config/custom_compontents folder.
- Copy the climate.py, manifest.json, and __init__.py files into that folder
3. Configure HASS.IO Climate Entities
- In your configuration.yaml file add entries for each of our units pointing to localhost as the host:
climate:
- platform: KumoJS
name: "Main Floor"
host: localhost
4. Restart HASS.IO
Everything should work!
Everthing worked up to the last part: after I added:
climate:
- platform: KumoJS
name: “Office”
host: localhost
No new climate entity appeared.
This is the only thing I see in Kumo Cloud log:
[email protected] server /root/kumojs
node --harmony ./build/kumoServer.js
App is running on port: 8084