-
Notifications
You must be signed in to change notification settings - Fork 93
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
Understanding the custom_component shenanigans #40
Comments
A) The AC partner (device firmware) is some kind of a middleware. You must use the MiHome app to upload a so called "preset" of infrared commands to the AC partner. Later on you are able to use this custom component to request/send a configuration to the AC partner. The device translates the configuration (power state, temperature, swing mode, ...) into the respective infrared instruction. Take a look at this method: https://github.com/rytilahti/python-miio/blob/master/miio/airconditioningcompanion.py#L403 If you change the temperature f.e. this B) The MiHome app is needed once to setup the AC partner. Because of the online "preset" database. C) The MiHome app sets the ac_model. It's needed later on to select the proper preset. |
Ok, so I guess I have two more questions! A) Why the settings that the custom_component started with (inherited from MiHome) do not change when I change them from the UI? (i.e. temperature is stuck on 22 degrees, mode in heat, fan speed in high and no matter what I select it won't send the command). B) Can I use the component to separately train the GW for another IR device (i.e. my Logitech speakers)? Or similar to AC I need to train from MiHome app - then use from custom component? Thanks again! |
A) The custom component retrieves the current state periodically from the AC partner (middleware). If you change the temperature via the MiHome app the information should propagate to Home Assistant after a while. If you use the custom component to change the temperature and it doesn't work - this is a bug! Which AC partner hardware version (v1, v2, v3) do you own? Please enable the debug output of the component:
B) Yes. You can learn/capture additional commands by https://github.com/syssi/xiaomi_airconditioningcompanion#service-climatexiaomi_miio_learn_command And replay a previously captured command by https://github.com/syssi/xiaomi_airconditioningcompanion#service-climatexiaomi_miio_send_command |
Please feel free to ask additional questions and point out bad behaviour. My air condition doesn't work with the AC partner. I'm unable to test the custom component properly. |
Hi again, I will update this with some back-to-back replies with the output log after several actions have been performed. Kicking things off with a fresh cold start of home assistant. This is the first thing to pop-up:
|
Trying to turn the AC ON: Expected behavior: The air-conditioning unit should turn on.
|
Unplugging and replugging the air conditioning device from its socket while home assistant running:
|
Changing the temperature from 22 to 23 degrees (seems to be accepted the air conditioning makes happy noises):
|
Changing from "heat" to "ventilate" - air condition unit didn't seem to accept it with beepbeep noise but from the behavior I can say it's most likely accepted:
|
Changing fan mode from "high" to "medium" - didn't seem to get accepted neither through a beepbeep sound neither through the unit itself it still blows in high:
EDIT: Went back to "heat" from "ventilate" tried changing fan mode to "medium" from "high" again same log as above. |
I don't want to spam you more - the whole log file can be found here and if you want me try a specific use case let me know! -G |
Hi, I have installed your component and I can see the information in my user interface. Previously I had used the companion with MiHome where I had registered my air-condition through a list of registered devices that Xiaomi has pre-selected settings (I assume).
Finging A) What has confused me is that your custom_component initialised already with some settings and it could control my air-condition out of the box (no training occurred).
Finding B) What I realised it "seems" as if the custom_component uses the last settings I used for my registered air-condition through MiHome when I used it through MiHome.
Finding C) Looking in of home assistant I see that my climate component has a value of "ac_model: 010504870000466601" which I suspect is inside the companion's memory now and forces it to use the necessary IR commands for this particular model.
Finding D) It is very unusual that the companion uses these specific settings only and refuses to change anything through the UI (like mode, fan speed, or temperature) - but the ON/OFF functionality works.
Do I need to somehow make it "forget" the ac_model variable and re-train the companion only through your custom_component?
Do I need to just "train" it for the rest commands that it cannot issue besides the ON/OFF that already works?
In terms of training how do slots exactly work? What is the philosophy? Based on the documentation I cannot understand right now, but if you help me understand, I am willing to put all this knowledge into examples and extend the existing documentation.
That is all for now in a nutshell! I will appreciate the effort and time you take to reply. And I already thank you and appreciate your hard work on this!
Regards,
George
The text was updated successfully, but these errors were encountered: