Any Support for Midea A/C?

I see similar errors after a few hours running this component… I works perfectly for a few hours. I have tried to change the scan_interval to 180 to slow down the polling however it did not help. I think that the server wants a new login after some time so I think that if we could somehow reload / restart just this component it would be ok.
Maybe someone here knows how to do this…
I can write some VB code but I had never even looked at python prior to HA. Old school I know :slight_smile:

Thank you very much!
Working perfect :slight_smile:

I have an open issue in git for the stop responding issue: https://github.com/NeoAcheron/midea-ac-py/issues/13

Sorry to say Im not sure it will be fixed since the developer have moved and probably wont keep working on the project :frowning:

EDIT:
If anyone is interested I’ve made a work around that re-initiate the connection when session expires after 240 min, its quick and dirty, will look into how to make this better when I’ve time, also contains a throttle option to limit the amount of requests during testing, that perhaps you would like to remove…

1 Like

@yodi I will try your mod and give feedback here. It is a shame that the developer left so close to having a 100% working version. I think he no longer had the AC units to test due to moving house. The best would be to cut out the cloud part and talk directly to the units but I have seen some attempts posted on the internet but without much success. :frowning:

@cliffdude, please do, as mention its just an ugly workaround, I have not had time to work on this, it should however works fine since it does for me, its been running for 7+ days now and responds without issues to commands. The original code can create a race condition (or will) when the session time out, flooding the public api (if you have pihole or any other local dns cache you could probably observe this also)

@cliffdude what component are you using ? I will have HTW AC too and i’m searching what component to use. Thanks

Hi,

I am using @yodi’s fork of @NeoAcheron’s component.
It is working well by the way, I do get errors every now and then but the component does not flood HA like the original did after a while, quick and dirty sometimes is good enough! Thanks for that @yodi. I had tried to do something like that myself but lacked the python knowledge and failed miserably!
Install instructions are on Github but if you need help getting setup let me know. You need to have the APP working before trying it with HA as you will need to provide the same credentials.

1 Like

@Igor_Jurisic I have the same AC and the same errors in the log. Guess our AC doesn’t work with this :confused:

Seems so. I ended up using broadlink IR transmitter that works perfectly with Home Assistant, combined with this component: https://github.com/smartHomeHub/SmartIR

Hi,

somebody is using this component in hassio 0.90.1? I’m trying to install it but I receive an error about something “Unable to install pycryptodome…”. As much as I know this is a problem with the custom components.

i have the exact same problem Not initializing midea.climate because could not install requirement pycryptodome==3.7.0 maybe @yodi can help ?

Hi, I’ve not updated my system yet, will see if I can try it soon, how do you install the component?

it works fine now on 0.90.2. happy again !

The “pycryptodome” error disappeared with 0.90.2 for me also but now I received another error:

2019-03-29 22:27:24 ERROR (MainThread) [homeassistant.helpers.entity] Update for climate.midea_17592186080584 fails
Traceback (most recent call last):
File “/usr/local/lib/python3.7/site-packages/homeassistant/helpers/entity.py”, line 220, in async_update_ha_state
await self.async_device_update()
File “/usr/local/lib/python3.7/site-packages/homeassistant/helpers/entity.py”, line 377, in async_device_update
await self.async_update()
File “/config/custom_components/midea/climate.py”, line 101, in async_update
await self.hass.async_add_executor_job(self._device.apply)
File “/usr/local/lib/python3.7/concurrent/futures/thread.py”, line 57, in run
result = self.fn(*self.args, **self.kwargs)
File “/config/deps/lib/python3.7/site-packages/midea/device.py”, line 165, in apply
data = self._cloud_service.appliance_transparent_send(self.id, data)
File “/config/deps/lib/python3.7/site-packages/midea/cloud.py”, line 171, in appliance_transparent_send
‘applianceId’: id
File “/config/deps/lib/python3.7/site-packages/midea/cloud.py”, line 89, in api_request
return self.api_request(endpoint, args)
File “/config/deps/lib/python3.7/site-packages/midea/cloud.py”, line 89, in api_request
return self.api_request(endpoint, args)
File “/config/deps/lib/python3.7/site-packages/midea/cloud.py”, line 91, in api_request
raise RecursionError()
RecursionError

Does it really mean that my AC is not supported? My AC is Midea Ultimate Comfort. Somebody is using this version with this component?

Any chance to also support Midea EVA II PRO WI-FI Dehumidifier ?

@tupac looks like a timeout issue, you can try my build that resets it every 240 min when session timeouts

@yodi I’m using your build but I receive the error above. In my opinion maybe it is a problem with the cloud authentication because I get the same error in HA when I login into the Midea IOS application.
Do you know what does it mean the next lines in the cloud.py?

CLIENT_TYPE =   1             # Android
LANGUAGE = 'en_EU'

Should I change the language to hu_HU (using the app in Hungary)? And should I change the CLIENT_TYPE to something other due to using IOS Ap?

Thanks!

From my experience the cloud service only support one active session so you cant use the App and plugin at the same time, the settings you describe just build the session, I dont think it will have any impact on the issue

Thanks @yodi
Other info that nothing happens when I change the air condition settings in the HA.

I have been using your files with great success for quite some time , i have updated to Hassio 0.91.0 and i get again the error

Not initializing midea.climate because could not install requirement pycryptodome==3.7.0

any thoughts ?