Skip to content
This repository has been archived by the owner on Apr 20, 2020. It is now read-only.

Temperature units #7

Open
ghost opened this issue Jan 4, 2019 · 10 comments · May be fixed by #8
Open

Temperature units #7

ghost opened this issue Jan 4, 2019 · 10 comments · May be fixed by #8

Comments

@ghost
Copy link

ghost commented Jan 4, 2019

First off, kudos! This library is awesome and is working well with Mr Cool DIY 12k mini-split (whitelabel midea). However, any set command changes the temperature unit from F to C.

Is it possible to retain the current setting or at least for me to hard code it somewhere (in the data I presume)?

@NeoAcheron
Copy link

Hi @AlexGrieco

Is it the temperature display on your AC changing to Fahrenheit, or the value returned by the app?

@ghost
Copy link
Author

ghost commented Jan 7, 2019

Hi @NeoAcheron

It’s the other way around. I have manually set my AC to Fahrenheit (my own preference), but anytime I run a command through midea-ac the setting is switched to Celsius. I can see in the midea iOS app, there is a setting called “Units”. There is also an led display on the actual AC which also changes from (F) to (C) after firing a command through midea-ac.

I tried to wireshark the commands, while manually changing the setting in the app but I can’t tell which value is changing.

It is not a huge deal, everything works fine, just a preference and wondered if it might be easy to use Fahrenheit.

@yitsushi
Copy link
Owner

yitsushi commented Jan 8, 2019

I think there is a bit for that and because we use Celsius all the data I had was Celsius. When I started my experiment it was in my mind, but later (because I had no issue with this) totally format about that.

I'll check if I find anything quick, but to speed up all the researches, I will publish all the scripts I used for reverse-engineering (basically I patched apk with my own ssl cert + an ruby MitM proxy with that SSL cert which is encoding every single message and prints out in a much readable format)

The problem with wireshark is... all packets are aes encoded so watching on raw packets is totally useless.

@yitsushi
Copy link
Owner

yitsushi commented Jan 8, 2019

I started to publish a HowTo-ish post here: https://cheppers.com/operation-ac-ctf-without-flag-part-i

The second part (the guessing game) is sadly is still in progress because of time issues :/

@yitsushi yitsushi linked a pull request Jan 8, 2019 that will close this issue
@yitsushi
Copy link
Owner

yitsushi commented Jan 8, 2019

@AlexGrieco : Can you check if the linked patch works or not? I'm not sure if I'll have the opportunity to test it this week.

Check out the branch, build and install the built gem (ping me if you need more details).

@yitsushi
Copy link
Owner

yitsushi commented Jan 8, 2019

I pushed up some maybe useful materials/docs into the research-pack branch

@ghost
Copy link
Author

ghost commented Jan 8, 2019

@yitsushi Thank you! The link works. I will try to dig into it today.

@ghost
Copy link
Author

ghost commented Jan 8, 2019

@yitsushi I ran the 7-temp-unit branch today and I think this is positive feedback.

Before, the get command will show:

Target temperature: 22 celsius
Indoor temperature: 25 celsius
Outdoor temperature: 17 celsius

After, it reads the unit correctly, but does not convert the actual value (maybe expected at this point)

Target temperature: 22.0 F
Indoor temperature: 24 F
Outdoor temperature: 17 F

Then if I send any set command...it will revert to C.

Target temperature: 22.0 C
Indoor temperature: 24 C
Outdoor temperature: 17 C

@yitsushi
Copy link
Owner

yitsushi commented Jan 8, 2019

Thanks for the quick test. Next time I can inspect/test it in the office (where we have all the devices) will be next Monday.

@robp2175
Copy link

Any update on this? If you can lead me in the right direction to prevent the AC changing from Fahrenheit to Celsius every time a command is sent, I would really appreciate.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants