mac-zhou / midea-ac-py

Home Assistant Custom Integration for Midea Group(Hualing, Senville, Klimaire, AirCon, Century, Pridiom, Thermocore, Comfee, Toshiba, Carrier, Goodman, Friedrich, Samsung, Kenmore, Trane, Lennox, LG and much more) Air Conditioners via LAN.
MIT License
528 stars 102 forks source link

Support for Midea fans #103

Open sctale opened 2 years ago

sctale commented 2 years ago

Describe the solution you'd like (描述需求) Is it possible to support Midea fans in the future versions? I bought a Midea fan, and it is only controlled by Meiju APP and Tmall Genie APP.

Screenshots / Logs / Pcap File(屏幕截图/日志/抓包文件) If applicable, add screenshots or your home-assistant log file or pcap file to help explain your problem. 请提交相关截图,日志,抓包让开发者能够更快的解决问题 DEBUG:msmart.cli:Midea Local Data 192.168.20.205 837000c8200f00005a5a0111b8007a8000000000324b3515170915147272310000960000000000000000018000000000f5300b05a896cc99a46fdc52b892b46c63540998f88a7f5ef968bb18e8edbffbb265f5dbc8b212cfe5331745ffd0ba7b48b369bef3f937e46e27ac229e4966f9285ccd40365f9d68f393470e4f702d6c6451847f94bea2ed1e42dd1d9fed751a4bdfb3e16e33d88768cc4c3d0658937d96fbcce99f70c976413c2f05f60f82e764b3854401373a3b2853cf04ed1305578359d38eb485326706de0d9587391180 DEBUG:msmart.cli:Decrypt Reply: 192.168.20.205 cd14a8c02c1900003030303046413331313536303031303931313331343131303232353543554b580d6d696465615f66615f3232353500008f0002000000000000000000fa001900000000003c20933488af150010012002010300000000000000000000000000000000000000000000000000000000000000000000 DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): mapp.appsmb.com:443 DEBUG:urllib3.connectionpool:https://mapp.appsmb.com:443 "POST /v1/user/login/id/get HTTP/1.1" 200 None DEBUG:msmart.cloud:Response: {"msg":"ok","result":{"loginId":"f957be96-2f72-4f0c-a749-26ce19203cc9"},"errorCode":"0"} DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): mapp.appsmb.com:443 DEBUG:urllib3.connectionpool:https://mapp.appsmb.com:443 "POST /v1/user/login HTTP/1.1" 200 None DEBUG:msmart.cloud:Response: {"msg":"ok","result":{"originPrivateVersion":"","nickname":"midea_is_best@outlook.com","sessionId":"4c488d3b083a46ea82b0c944e7a0440d20210923135321829","accessToken":"40582826f29e51533855d8655aa10baeb920ebb829d567559397ded751813801","userId":"4826094","versionCode":"","leftCount":""},"errorCode":"0"} DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): mapp.appsmb.com:443 DEBUG:urllib3.connectionpool:https://mapp.appsmb.com:443 "POST /v1/iot/secure/getToken HTTP/1.1" 200 None DEBUG:msmart.cloud:Response: {"result":{"tokenlist":[{"udpId":"1c75158ac50b66a65fc8071870fa18f1","key":"EA0A3A2808724E1EBD1D93931FEEAC282BD2A1F285F04E18A236DF21F96613D5","token":"CF20E321A459F18F8C1A7436F647A92D9548A6CB7806404B6375E3462B374B6BE6C22804828D09DF67EE62FEDD4078E3B9DCA3A9F993627545EE716E64818798"}]},"msg":"ok","errorCode":"0"} DEBUG:msmart.lan:Attempting new connection to 192.168.20.205:6444 DEBUG:msmart.lan:Socket 192.168.20.115:42520 -> 192.168.20.205:6444 retries: 0 time: 0.00011134147644042969 tcp_key: None DEBUG:msmart.lan:Sending 192.168.20.115:42520 -> 192.168.20.205:6444 retries: 0 time: 0.00022530555725097656 message: 8370004020000000cf20e321a459f18f8c1a7436f647a92d9548a6cb7806404b6375e3462b374b6be6c22804828d09df67ee62fedd4078e3b9dca3a9f993627545ee716e64818798 DEBUG:msmart.lan:Recv 192.168.20.115:42520 -> 192.168.20.205:6444 retries: 0 time: 0.02857804298400879 Response: 83700005200f4a904552524f52 ERROR:msmart.security:authentication failed DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): mapp.appsmb.com:443 DEBUG:urllib3.connectionpool:https://mapp.appsmb.com:443 "POST /v1/iot/secure/getToken HTTP/1.1" 200 None DEBUG:msmart.cloud:Response: {"result":{"tokenlist":[{"udpId":"8359d38eb485326706de0d9587391180","key":"481D62C9B0024730A0263A0AFCE55947B996C3601AC04611AE21AC711741E0E5","token":"52571C763F9DD66E220A3572B9E882CC93210AB3713D158EF032D954D0ECB7EEB3BBFC581AA22F89BCA20FADEE455F20A7F24CD9ECA88AA4B915C419CD459819"}]},"msg":"ok","errorCode":"0"} DEBUG:msmart.lan:Socket 192.168.20.115:42520 -> 192.168.20.205:6444 retries: 0 time: 2.5677332878112793 tcp_key: None DEBUG:msmart.lan:Sending 192.168.20.115:42520 -> 192.168.20.205:6444 retries: 0 time: 2.567786455154419 message: 837000402000000152571c763f9dd66e220a3572b9e882cc93210ab3713d158ef032d954d0ecb7eeb3bbfc581aa22f89bca20fadee455f20a7f24cd9eca88aa4b915c419cd459819 DEBUG:msmart.lan:Recv 192.168.20.115:42520 -> 192.168.20.205:6444 retries: 0 time: 3.070147752761841 Response: 837000402001304798de164205e42252d6d884442be94708d754fdcd5643ad2f8bf0541e9eadeeda6f1d898ae40d3a3196813e301208babf7e508b947040eda15c3cebd1bedf2743 INFO:msmart.lan:Got TCP key for 192.168.20.115:42520 -> 192.168.20.205:6444 retries: 0 time: 3.07094669342041 72b5d46796a5ff88898f84b55b4be0fb197ff9df7daaffafcaa894ce1049595a INFO:msmart.cli:*** Found a device: {'type': 'fa', 'support': False, 'version': 3, 'ip': '192.168.20.205', 'id': 164926747406962, 'port': 6444, 'token': '52571C763F9DD66E220A3572B9E882CC93210AB3713D158EF032D954D0ECB7EEB3BBFC581AA22F89BCA20FADEE455F20A7F24CD9ECA88AA4B915C419CD459819', 'key': '481D62C9B0024730A0263A0AFCE55947B996C3601AC04611AE21AC711741E0E5', 'ssid': 'midea_fa_2255'}

sasukebinbin commented 2 years ago

同求 Support for Midea Fan