-
Notifications
You must be signed in to change notification settings - Fork 23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Get and Set 'Advanced Installer Settings' / Function Code Values via Integration? #139
Comments
TL;DR: this may be possible, but someone would have to figure out how to do it locally. The Kumo HA integration (and pykumo Python library) uses the undocumented API running on your local indoor units, via your local network. The only piece that communicates with the KumoCloud service is at setup, to get info about the devices that are associated with the user's account there. The kumo_cache.json file is the verbatim info retrieved from the KumoCloud servers, so that it can be reused at next HA startup (if prefer_cache is on). The information and control that we do have was reverse-engineered, mostly by observing the traffic between the Android/iOS app and the indoor units. This traffic goes over http, so it's easy enough to snoop. The traffic to the KumoCloud servers is https, and harder to get at -- especially since what we're most interested in is the traffic between those servers and the indoor unit. I don't think anyone has tried capturing traffic on a phone while in the Installer Settings section of the app. If this does direct communication with the unit, then yes, it would likely be easy enough to add support. If it goes through the KumoCloud servers, though, it's probably beyond the scope of pykumo. If you do manage to capture traffic, it's local, and you want to try out reading/sending those sections, see the notes over at pykumo for interactive use. |
Thanks @dlarrick! Started capturing some traffic and gonna try the pykumo in interactive mode (i.e. saw that the app's 'Refresh Settings' command sends* a Besides that however, these installer settings seem to go through the cloud (only*), more precisely via a
sends* / only*: The reason I put an asterisk up there twice is because the local command to refresh the settings aka reboot, is sent to was sent to Any way, refresh settings seems to cause the adapter to reboot and therefore (I assume) pull the new values off the indoor unit and send them to the kumo cloud shortly thereafter with a Is that call to an undefined host normal / is there any function in the app that is known to call the adapter's local api? Just tried changing temperature and that one also goes through the cloud, so not sure if there's something misconfigured with my particular system at the moment. Thanks! |
I think Mitsubishi has made a recent change where most everything goes thru the cloud. Which is... not great. There may be a way to force it to go local. Such as disconnecting your router from the Internet :-) or blocking the KumoCloud servers via firewall. The "reboot" command is definitely news! Thanks for that! This may possibly be a way out of the error-response issues we've been seeing in the past year or so -- which seemed to be a memory leak in the unit's adapter. I'll definitely add that command to pykumo and try to figure out when it makes sense to use it.
(background: you send a 'c' ('command') dictionary, and the indoor unit responds with an 'r' ('response') with things filled in. Sub-dictionaries you leave blank are queries. Values you set within those sub-dictionaries are commands to change that value. The 'r' response to a non-empty command is at least sometimes what the value used to be. So if you include values in that We just need to map those numeric settings to things that it's reasonable and safe to control, which the docs you quoted should help us figure out. But overall I think this is quite promising! |
This took a little while but here's the request info sent when making changes to these advanced installer settings in the iOS Kumo Cloud app... in this case below I changed the value of setting no 25 ("Fan speed setting after set point has been met in Heat Mode" as per .pdf ("Application Note 3050 How to configure the Function Settings on a Deluxe MA")) to value '3' and the app sent the following request:
.. and the response was:
The app also makes one change, so one key / setting and its -value at a time. The moment you select a value in the app, the app sends that POST request with the singular changed/selected value for that one key/setting of 25 in the example above.. there's quasi no bulk changing multiple values and then committing/saving them in the app in on go. |
FYI the latest version of PyKumo (v0.3.9) which is pulled in by hass-kumo v0.3.12 implements the ability to reboot the WiFi adapter when it sees certain API errors. I think this will help stability for folks, so thanks for finding that! |
Nice, thank you! |
Application Note 3050 for M- & P- Series Units defines the Function Settings (see page 10 onwards in the corresponding .pdf file) for the indoor units and while most of those settings are rather static, some I do actually change throughout of the year and one in particular (room temperature sensing location) I'd ideally change more frequently / once a day or so.. and hence I was wondering if the integration already has or could support getting and setting these Function Settings by number and (numeric) value?
It appears these are already in the kumo_cache.json file in the
"reportedInitialSettings": {}
, albeit I am not a 100% how that section logically works. There's a sub-section which contains"assigned_settings": { }
, there' also a"leftovers_settings": {}
sub-sections and then a bunch of named key/value entries also."assigned_settings": { }
and"leftovers_settings": {}
contain keys by their Setting / Mode No (as per the Application Note: 3050 .pdf / setting in app and also MHK2) and the corresponding value per the same (.pdf) table.I am not entirely sure what goes into
"assigned_settings": { }
and"leftovers_settings": {}
(I assume some are/where the ones set during the initial installer setup and the other ones the one I set thereafter)... simply because -I- have modified the values of mode no "25" and "02" in the app (or on the MHK2 and then refreshed the settings in the Kumo Cloud app.).. you can see they're different to the default values as per that .pdf's table:Inside the Kumo App you can see and set those under Settings > System Setup > Installer Settings > Home > Zone Name > Advanced > Settings by Number , in the MHK2 unit you can set them in the semi-secret Settings Menu (see the same .pdf linked above on page 4).
Is there any way to get/set these function codes & their values today already or is there any chance this could be added in the future?
Thanks!
The text was updated successfully, but these errors were encountered: