Skip to content
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

TargetHumidifierDehumidifierState error and most of the times I can not shut off with HA switch. #16

Closed
u20p17 opened this issue Jan 3, 2022 · 6 comments

Comments

@u20p17
Copy link

u20p17 commented Jan 3, 2022

Version of the custom_component

V0.5.0

Configuration

Where do I find this? While setting up I wrote the static IP of the humidifier as IP adress (192.168.0.14), rest was left empty/standard values.

Describe the bug

Saw this error in the logs. I can see the sensor data, but most of the times when I disable the fan/humidifier with the switch in HA it changes to on state back again (after some seconds) and does not get shut off. Not sure if this is related to the error in the log file.

Debug log

Logger: pyhap.characteristic
Source: /usr/local/lib/python3.9/site-packages/pyhap/characteristic.py:193
First occurred: 19:00:03 (1 occurrences)
Last logged: 19:00:03

TargetHumidifierDehumidifierState: value=0 is an invalid value.

@nbogojevic
Copy link
Owner

Hi @u20p17,

What model of dehumidifier do you have. Can you also get some debug logs

# ...
logger:
  # ... your regular logger conf
  logs:
    custom_components.midea_dehumidifier_lan: debug
    midea_beautiful_dehumidifier: debug
# ...

The other problem the error is coming from HomeKit Accessory Protocol pyhap. If you are able to activate and get some debug logs for that library and corresponding integration, we can try to understand why.

@u20p17
Copy link
Author

u20p17 commented Jan 3, 2022

Hi,
I am using the Comfee Luftentfeuchter, 20L/24h, Raumgröße ca.100m³(40m²), MDDF-20DEN7-WF, APP-fähig. (https://www.amazon.de/gp/product/B07MSL8YN7/ref=ppx_yo_dt_b_asin_title_o00_s00?ie=UTF8&psc=1)

Now i change the log level and restarted HA. Now i get a different error before the old error:

Dieser Fehler wurde von einer benutzerdefinierten Integration verursacht

Logger: homeassistant.config_entries
Source: custom_components/midea_dehumidifier_lan/init.py:171
Integration: Midea Dehumidifier (LAN) (documentation, issues)
First occurred: 20:34:17 (1 occurrences)
Last logged: 20:34:17

Error setting up entry Midea Dehumidifiers for midea_dehumidifier_lan
Traceback (most recent call last):
File "/usr/local/lib/python3.9/site-packages/midea_beautiful_dehumidifier/lan.py", line 778, in get_appliance_state
response = sock.recv(512)
socket.timeout: timed out

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/config_entries.py", line 313, in async_setup
result = await component.async_setup_entry(hass, self) # type: ignore
File "/config/custom_components/midea_dehumidifier_lan/init.py", line 61, in async_setup_entry
await hub.start()
File "/config/custom_components/midea_dehumidifier_lan/init.py", line 137, in start
if await self._process_appliance(data, device):
File "/config/custom_components/midea_dehumidifier_lan/init.py", line 171, in _process_appliance
appliance = await self.hass.async_add_executor_job(
File "/usr/local/lib/python3.9/concurrent/futures/thread.py", line 52, in run
result = self.fn(*self.args, **self.kwargs)
File "/usr/local/lib/python3.9/site-packages/midea_beautiful_dehumidifier/init.py", line 79, in appliance_state
return get_appliance_state(
File "/usr/local/lib/python3.9/site-packages/midea_beautiful_dehumidifier/lan.py", line 784, in get_appliance_state
raise MideaNetworkError("Could not connect to appliance %s:%d")
midea_beautiful_dehumidifier.exceptions.MideaNetworkError: Could not connect to appliance %s:%d

From the NetHomePlus App it is possible to control the humidifier.

@nbogojevic
Copy link
Owner

Hi @u20p17, I have the same dehumidifier. The error above occurs while trying to discover the device via UDP, but there is no response. Can you ping it from your home assistant machine?

@u20p17
Copy link
Author

u20p17 commented Jan 4, 2022

Hi,
it seems that the problem was that I gave the dehumidifier a static ip in my router... I now gave him a dynami ip and made a fresh install in the iOS App and HA and now it seems to work again.

regarding the homekit error attached a debug log:
debug_log.txt

Hope this helps... :)

@Bimboboy007
Copy link

Hello, I always have the problem, e.g. when I update HA or simply install something that requires a restart, that the devices say goodbye and the integration reports an error.
This can usually be remedied by deactivating the integration, then reactivating it and restarting the server.
Boy Stefan

@nbogojevic nbogojevic added this to the v0.6 milestone Jan 11, 2022
@nbogojevic
Copy link
Owner

The error you have seen is already known bug in library used by Home Assistant
home-assistant/core#60203

There is nothing that can be done in this integration to avoid it.

Good news is that is being fixed in just released https://github.com/ikalchev/HAP-python/releases/tag/v4.4.0 so it should come in one of the coming releases of Home Assistant.

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

No branches or pull requests

3 participants