Open JoshuaHolme opened 5 years ago
@ntableman Here are photos of the requests received by the app on refresh.
And these are pictures of the requests sent when the web app is trying to make changes to the AC Unit.
So, I cut my foot really badly...just back at it now. Will be home this weekend and can start to take a look - sorry for the delay. Takeaway: do not cut things near your foot when not wearing good shoes :(
No worries, hope it didn’t ruin your vacation!
@ntableman Any updates?
No, sorry, I haven’t been able to get the as-is working and got into a rabbit hole thinking maybe I have a different system, but I do not think that is possible. But I’m trying...
On Sep 11, 2019, at 6:50 PM, Joshua Holme notifications@github.com wrote:
@ntableman https://github.com/ntableman Any updates?
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/JoshuaHolme/homebridge-kumo/issues/1?email_source=notifications&email_token=AAH5ZHLBHRDYMPR4UIVOHUTQJFYZ3A5CNFSM4IMABKH2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD6QEAUY#issuecomment-530595923, or mute the thread https://github.com/notifications/unsubscribe-auth/AAH5ZHOZG7GW2WQROUVNWNTQJFYZ3ANCNFSM4IMABKHQ.
Do you have a kumo cloud for the Mitsubishi split system?
Maybe I can write up how I got it working to this point
What I did is download the plugin from here https://www.npmjs.com/package/@cmassa/homebridge-kumo and then placed it into the homebridge folder and swapped the index.js out I believe. See if that will get it working for you with my index.js and example config. If not I'll try to redo it and write down my steps. Let me know how it goes!
OK finally having some time to work on this...so I am starting from zero again on this, sorry.
I got all the old code in Homebridge on a system on the same net at my Kumo (split system).
But I back to just trying to get it to load, I re read all this and I need someone's Homebridge config entry to get it to load. I am trying to reverse out a version from the code, but if someone had one that would be great.
Do you have a kumo cloud for the Mitsubishi split system?
HAHA yes, it is more about the complexity of my homes/networks and the security I have setup. I am very deliberate in segmentation. Long story short a while ago I VLAN'ed a set of new systems and I forget that I had to allow DHCP to move through the various VLANs and how I did that. I had a profile called ALL and I assumed it meant all, but I forgot that for it to really be all I had to add the new VLANs to it...duh!
OK finally having some time to work on this...so I am starting from zero again on this, sorry.
I got all the old code in Homebridge on a system on the same net at my Kumo (split system).
But I back to just trying to get it to load, I re read all this and I need someone's Homebridge config entry to get it to load. I am trying to reverse out a version from the code, but if someone had one that would be great.
and duh, you committed one...
I have also been working on it. I got it working if I hard code in a heating/cooling mode, but I don't know how to get the input from the home app to set it to the user chosen mode (same goes for temperature)
ok I have the basics working, the main problem is that this is implemented as an accessory not a platform, so you won't be able to do certain things.
If you want to commit your updated code, I am drop that into my setup...but I am working on moving it to a platform as well.
I haven't made much progress into it since I've committed, everything I've toyed with hasn't panned out so you can just commit your code. I'm new to Homebridge development, but what does making it a Platform vs an Accessory allow you to do?
an accessory is 1 thing, a platform is a bunch of accessories...so if you have 2 of these units you need a platform.
ok I need to sit and rake through this...I am not seeing the right data coming back that matches my app...there is a project here on GitHub that is a CLI for this, so I am going to dig into what he did for some help.
Sounds good. My code may very well be garbage, this was my first Homebridge and JavaScript project, so i apologize if that is causing the issues lol
OK so I dug into two the projects which seem to work - and they have some kind of key generation routine to created a crypto key...what is curious is that the service gives you this key, but it seems to be different...so trying to figure that one out now...
Awesome, thanks so much for all the work on this! This is definitely now beyond my experience with homebridge and JavaScript, and I really want my Mitsubishi split system in the Home app 😂
OK so this is proving to be a bit mind hurting for me, I am in the middle of working backwards what the other projects have done. I can get the zones, status, temps, etc... but you need this really messy key to make it change state. I am worried it might not work for other systems, but hey I am getting closer. The units return SO MUCH information as well.
https://github.com/sushilks/kumojs/ is the project.
What do you mean by other systems? And do you mean the key to change from heating to cooling to off? I was able to control that through HomeKit in mine, but I had it hard coded in. I couldn’t figure out how to get the input from the Home App.
@ntableman Any updates?
Hey guys I stumbled upon this https://medium.com/@sushilks/hacking-mitsubishi-ac-controller-part-1-c31ab8364ef1 hope it helps.
Also found this https://community.home-assistant.io/t/mitsubishi-kumo-cloud-integration/121508/35 and this http://mgeek.fr/blog/un-peu-de-reverse-engineering-sur-melcloud might want to use google translate on the last link
Thanks for the links! Unfortunately I’m a little out of my element when it comes to HomeKit stuff, but once my semester ends in December I can try to take another look at it if this is still unsolved. Hopefully we can make progress sooner though!
I’m still trying to crack the key it needs by reverse engineering what those other projects did. Making it report the temp in HomeKit is easy and I’m guessing they’d why many projects stop there. I’m after full control....
On Nov 1, 2019, at 08:37, Joshua Holme notifications@github.com wrote:
Thanks for the links! Unfortunately I’m a little out of my element when it comes to HomeKit stuff, but once my semester ends in December I can try to take another look at it if this is still unsolved. Hopefully we can make progress sooner though!
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or unsubscribe.
I’m rooting for you @ntableman 👍🏻
Any updates @ntableman ? The suspense is killing me
OK so I took a detour into hacking three other things in my house and got solar installed (new house) and then back to this. I gave up and installed a esp8266 device, but don't care for that idea. So....just yesterday I took out the code from that other repo to figure out the hash. I am getting it to work in node-red via Homebridge mqtt thing plugin - so far I can get some of the commands to work by faking the hash. The next step is to make the hash "real", which I have been working on this morning.
Even if I get that right, I will need to write a plugin for Homebridge, so need to do some research on one that might be similar enough to jump-start and change out the interface.
Oh and look at heater-cooler it might be better than thermostat as a homekit thing. So slow progress...but making some.
Glad to hear it! It seems like there’s a good amount of people who would really appreciate this plunging if you can get it working! 👍🏻
OK!!!!!!
So I have the basics working in homebridge, the code is a MEEEESSSSS. I made a basic thermostat and you can turn off/cool/heat/set temp...there are so many many many more things to do and the entire code is likely wrong in that I should get status in one call and then use that data in all the methods vs. just doing it over and over, but it works.
Oh and I need to write code to help make it easier to set up and you'll need to make one entry for every unit vs. it auto config
so get
1 - your crypto key 2- your password as encoded by kumo 3 - ip of the unit
You can get that info as others desribe it or using charles and looking at the kumo traffic.
let me externalize these vars to the config and then I'll share the code.
That’s awesome! Do you have any experience publishing to npm? Once all of the code is working. If we can publish to there then I can write up the documentation to set up your unit and get it installed, then anyone can use it. Is the password always going to be encoded? I think I might’ve had it working without it being encoded in the code that’s in master right now. Just because for non developers it could be a barrier to entry to get it set up
Are you continuing to work on it? Or is it pencils down for you?
I am currently trying to move it to a platform from an accessory and do a couple of things:
1-get it to grab all the units through a call to the kumo API (so it is a better setup experience)...right now you would have to make an accessory for each by hand which isn't a big deal, but given all the features and variety of devices, it might be better to do this. I only have one unit, so I can give this a shot, but someone else with 2+ has to test. 2-provide fan switch in the current config. 3-I dont think the auto setting works exactly right - so I am working on this right now 4-it calls the apis way too often - so I am working on this right now
I also have a second project which makes this a heater/cooler because that has a fan speed and an oscillation mode which aligns with what these things do (at least mine)
so I am keeping working on it...because I need it to work :) as it is annoying the heck out of me that I cannot control all my HVAC as one (I have a split in one part of my house and a gas furnace in others)
@JoshuaHolme I made a new repo and added you to it, it has the working code...though there is one big "bug" it seems to sometimes lose the status. Honestly, I do not understand the lifecycle of the homebridge plugin and I cannot find documentation of this.
As in...I want to know what runs when it starts? For example...so I can poll the device...then get going.
But it works!!
That's awesome @ntableman! I don't know how the lifecycle of homebridge plugins work either. I think it was by sheer luck that I didn't seem to have any issues with that end of the project on the master that I had working. Do you still need to add your password as it's encoded by Kumo Cloud? Or were you able to get it to type it in regularly?
I put the way to get a password in the readme in 5 seconds. I have tried not using it encoded and I got errors, so I just left it as it.
There is one really important thing here: my plugin is doesn't use the cloud at all. It works directly with the devices. I have them blocked from the internet in fact.
I can work on this to use the cloud to get it, etc... but I'm only going to do that once I get it to a platform so that can also config all your units. Reminder, I only have one, so I cam limited in my ability to test this.
My main goal is to control everything without internet access. Feel free to tinker with my repo and have others do that same.
I only have one unit as well, so testing multiple units would be a tough thing for me too. Thanks for all of the work you put into this! I'm sure it'll help a good amount of people 👍🏻
Hi y'all, I'm moving into a new home soon and am getting multiple units so I can test this. What works and what doesn't with this plugin so far? I see "Fan Control", but I have never had any kind of A/C unit for fan control, so what does it do different then change the temp?
Sorry for asking a lot of questions, I am hesitant to drop a few k on multiple units if I can't get them into HomeKit.
Right now the plugin can read from the sumo cloud but can't make changes to the state of the device.