nbogojevic / homeassistant-midea-air-appliances-lan

This Home Assistant custom component adding support for controlling Midea air conditioners and dehumidifiers on local network.
MIT License
303 stars 31 forks source link

Does this library support multiple devices? #2

Closed HVPereira closed 2 years ago

HVPereira commented 2 years ago

Hello I'm thinking on changing to this library but i have 4 dehumidifiers, so i was wondering if I can change.

nbogojevic commented 2 years ago

Yes this library supports multiple dehumidifiers at the same time - I actually have two and can control both.

HVPereira commented 2 years ago

Great news, does this mean i can block internet access to my Humidifiers after installing your component?

Best Regards, HP

nbogojevic commented 2 years ago

It should be so. Cloud access is only needed during discovery phase and to retrieve local access tokens. I don't think that tokens expire, so there should not be need for internet access. However I'm not sure what happens if local IP addresses change - my devices usually have reserved DHCP address.

HVPereira commented 2 years ago

I have the same scenario as you. I will test this integration and come back to you. My preliminary test showed me that I was able to add only 2 of my dehumidifiers and it is failing to call service whenever i try to turn them on or off :( I will try to return with more details thank you so much for the support.

HVPereira commented 2 years ago

I have the following error:

image

HVPereira commented 2 years ago

I've also noticed that I'm not able to turn on or off the dehumidifier with the custom package it seems it is having some timeouts with the connections. Just some logs I've captured:

2021-12-22 14:42:44 ERROR (SyncWorker_1) [midea_beautiful_dehumidifier.lan] Connection error: id=31885837508275 ip=192.168.2.211:6444 version=3 for timed out Traceback (most recent call last): File "/usr/local/lib/python3.9/site-packages/midea_beautiful_dehumidifier/lan.py", line 345, in _connect self._socket.connect((self.ip, self.port)) socket.timeout: timed out 2021-12-22 14:42:45 ERROR (SyncWorker_1) [midea_beautiful_dehumidifier.lan] Connection error: id=31885837508275 ip=192.168.2.211:6444 version=3 for [Errno 113] Host is unreachable Traceback (most recent call last): File "/usr/local/lib/python3.9/site-packages/midea_beautiful_dehumidifier/lan.py", line 345, in _connect self._socket.connect((self.ip, self.port)) OSError: [Errno 113] Host is unreachable 2021-12-22 14:42:48 ERROR (SyncWorker_1) [midea_beautiful_dehumidifier.lan] Connection error: id=31885837508275 ip=192.168.2.211:6444 version=3 for [Errno 113] Host is unreachable Traceback (most recent call last): File "/usr/local/lib/python3.9/site-packages/midea_beautiful_dehumidifier/lan.py", line 345, in _connect self._socket.connect((self.ip, self.port)) OSError: [Errno 113] Host is unreachable 2021-12-22 14:42:52 ERROR (SyncWorker_1) [midea_beautiful_dehumidifier.lan] Failed to perform handshake 2021-12-22 14:42:54 ERROR (SyncWorker_1) [midea_beautiful_dehumidifier.lan] Connection error: id=31885837508275 ip=192.168.2.211:6444 version=3 for timed out Traceback (most recent call last): File "/usr/local/lib/python3.9/site-packages/midea_beautiful_dehumidifier/lan.py", line 345, in _connect self._socket.connect((self.ip, self.port)) socket.timeout: timed out 2021-12-22 14:42:55 ERROR (SyncWorker_1) [midea_beautiful_dehumidifier.lan] Connection error: id=31885837508275 ip=192.168.2.211:6444 version=3 for [Errno 113] Host is unreachable Traceback (most recent call last): File "/usr/local/lib/python3.9/site-packages/midea_beautiful_dehumidifier/lan.py", line 345, in _connect self._socket.connect((self.ip, self.port)) OSError: [Errno 113] Host is unreachable 2021-12-22 14:42:58 ERROR (SyncWorker_1) [midea_beautiful_dehumidifier.lan] Connection error: id=31885837508275 ip=192.168.2.211:6444 version=3 for [Errno 113] Host is unreachable Traceback (most recent call last): File "/usr/local/lib/python3.9/site-packages/midea_beautiful_dehumidifier/lan.py", line 345, in _connect self._socket.connect((self.ip, self.port)) OSError: [Errno 113] Host is unreachable 2021-12-22 14:43:01 ERROR (SyncWorker_1) [midea_beautiful_dehumidifier.lan] Failed to perform handshake

HVPereira commented 2 years ago

Ok I rebooted my dehumidifier and it worked back :)

However another point! Sorry for being so many queries. I saw that the status of the humidifier is always set to true shouldn't it update according to the state of the dehumidifier? It is able to turn on and off according the humidifier.turn_on and humidifier.turn_off. But the state of the humidifier never reflects that as the example below:

image

Thanks a lot for your work it works flawlessly

nbogojevic commented 2 years ago

I will publish new version today, so you may test that one. There is indeed bug with turn_on/turn_off. And thanks a lot for testing.

HVPereira commented 2 years ago

Thanks a lot! I will keep you posted by the way it works with 4 dehumidifiers 👍 well done!

nbogojevic commented 2 years ago

New release has been published (v0.3.0) and it should support correctly turn_on, turn_off.

HVPereira commented 2 years ago

Hi, yes it fixed! :) There is a small delay till Home assistant acknowledges the machine state but it is fine for me! You are a machine! :) Thanks a lot really!

nbogojevic commented 2 years ago

Fixed in v0.3.0