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

Network timeout, No response from host. #283

Open
tacomaguy20 opened this issue Jan 8, 2025 · 29 comments
Open

Network timeout, No response from host. #283

tacomaguy20 opened this issue Jan 8, 2025 · 29 comments
Labels
device issue Issue is due to device limitation

Comments

@tacomaguy20
Copy link

tacomaguy20 commented Jan 8, 2025

I've tried setting my max connection time but that doesn't seem to be helping. It seems I get random disconnects and then immediate reconnects but it seems to be a different intervals of anywhere from 13 seconds to minutes or longer. I have a mini split (this one at IP address 192.168.0.56:6444) and a window unit which doesn't seem to be having this issue.

I noticed the issue when I updated today but when I loaded my previous configuration it was still doing it. I'm guessing it wasn't the update but these logs are on the previous version. I can update again if you think it will help but I don't think that's the issue.

home-assistant_2025-01-08T06-26-09.394Z.log

config_entry-midea_ac-01JCAVG644TYAHMV5SMS3EC1DS.json

@mill1000 mill1000 added the need more info Further information is requested label Jan 15, 2025
@mill1000
Copy link
Owner

Thanks for the logs. Your device does seem to be all over the place.

I see you might be running midea_ac_lan as well. I would recommend only running 1 integration for the device as multiple connections can cause issues.

It might be general network connectivity issues.

You could also try hacking the integration to set the maximum connection lifetime to < 15 seconds. This would effectively cause the integration to create a new connection each time.

@tacomaguy20
Copy link
Author

tacomaguy20 commented Jan 16, 2025

Thanks for the logs. Your device does seem to be all over the place.

I see you might be running midea_ac_lan as well. I would recommend only running 1 integration for the device as multiple connections can cause issues.

It might be general network connectivity issues.

You could also try hacking the integration to set the maximum connection lifetime to < 15 seconds. This would effectively cause the integration to create a new connection each time.

I think when I first set up home assistant I had installed midea_ac_lan because I wasn't sure which to use but I'm not using it anymore... It doesn't show up in the devices and services and when I go to Hacs it asks me if I want to download and install it. It's possible I didn't remove it properly before.. any suggestions on how to do that?

Also, I tried reducing maximum connection lifetime to 15 seconds and it says the minimum is 30.

@mill1000
Copy link
Owner

I think when I first set up home assistant I had installed midea_ac_lan because I wasn't sure which to use but I'm not using it anymore... It doesn't show up in the devices and services and when I go to Hacs it asks me if I want to download and install it. It's possible I didn't remove it properly before.. any suggestions on how to do that?

Ok, that's fine. Just wanted to make sure it wasn't still in there.

Also, I tried reducing maximum connection lifetime to 15 seconds and it says the minimum is 30.

Yes hence the "hack" part of it. You'd have to open up __init__.py in custom_components/midea_ac/ and alter these lines:

    # Configure the connection lifetime
    if (lifetime := config_entry.options.get(CONF_MAX_CONNECTION_LIFETIME)) is not None:
        _LOGGER.info(
            "Setting maximum connection lifetime to %s seconds for device ID %s.", lifetime, device.id)
        device.set_max_connection_lifetime(lifetime)

@mihaitaiosub
Copy link

How should these lines be modified? What is the modification that needs to be made so that we can set the maximum connection life time to 15 seconds?

@LeeroysHub
Copy link

in config-flow.py there is a min=30 for the setup.of the configuration value. I changed that to 15, and put 15 in the settings.

I'm loving it, now I don't have my Air-con go off-line all the time. Mine seemed to only stay connected up to 20 seconds!

@mill1000
Copy link
Owner

I'll reduce the minimum value in the next release so you don't have to hack around

@mihaitaiosub
Copy link

Reducing it to 15 seconds didn't work for me, I'll try 20.

@mill1000
Copy link
Owner

I doubt that will have any impact.

@tacomaguy20
Copy link
Author

tacomaguy20 commented Jan 27, 2025

So I changed maximum timeout to 15 seconds this morning and I'm still getting disconnects. Not as often as before. I seem to be getting Read Timout: Resending to IP address, then Disconnect from IP address, then Network timeout, no response from host. Here is a sequence from connection to disconnect. It happened in 8 seconds or so it seems. I've put the full log here as well. Is there something else going on here?

2025-01-27 12:15:34.959 INFO (MainThread) [custom_components.midea_ac] Starting midea-ac-py for device ID 150633093546674 (192.168.0.56:6444). Using msmart-ng version 2024.12.0.
2025-01-27 12:15:34.960 INFO (MainThread) [custom_components.midea_ac] Setting maximum connection lifetime to 15 seconds for device ID 150633093546674.
2025-01-27 12:15:34.960 INFO (MainThread) [msmart.lan] Creating new connection to 192.168.0.56:6444.
2025-01-27 12:15:34.978 DEBUG (MainThread) [msmart.lan] Connected to 192.168.0.56:6444.
2025-01-27 12:15:34.978 INFO (MainThread) [msmart.lan] Authenticating with 192.168.0.56:6444.
2025-01-27 12:15:34.978 DEBUG (MainThread) [msmart.lan] Sending data to 192.168.0.56:6444: 83700040200000000ca0fbb5e1c61152b639d48bdc948ad37a73309656db51c1c1b8488501d7cc457d4ab049e2a66d29c8b7e97ca4fc2124620a647b0515a934fa08f8dc62d27b74
2025-01-27 12:15:35.029 DEBUG (MainThread) [msmart.lan] Received data from 192.168.0.56:6444: 8370004020015946c531c820c41b06652d7244a221fff65a007ca4a524882250ff698e3fa52014232ca54a38f32a37121cb86dd87dea8410f600c2b3d2e150cba760b068bb57450f
2025-01-27 12:15:35.031 INFO (MainThread) [msmart.lan] Authentication with 192.168.0.56:6444 successful. Expiration: 2025-01-28T07:15:35+00:00, Local key: bb618affcf24844b746f977dc6e7c382ddd863a26f4e864fbab89dda2af311f1
2025-01-27 12:15:36.032 INFO (MainThread) [custom_components.midea_ac] Querying capabilities for device ID 150633093546674.
2025-01-27 12:15:36.033 DEBUG (MainThread) [msmart.base_device] Sending command to 192.168.0.56:6444: aa0fac00000000000003b5010001e5a6
2025-01-27 12:15:36.034 DEBUG (MainThread) [msmart.lan] Sending packet to 192.168.0.56:6444: 5a5a0111580020000000000003240f131b011914b2420800008900000000000000000000000000000542065231b95b9123b7f675b1de90ae915c618b02ed2747fad73f2ffa0db1d3c2423e3e9a8ac34569d303fc3ececbd7
2025-01-27 12:15:36.034 DEBUG (MainThread) [msmart.lan] Sending data to 192.168.0.56:6444: 8370007e206655a7bab97c7c143b6c6080ee559d1ed61216bef0c6da57aabcb59a13e2a9e99dcab052299a123841c0172166e95e3ba85ecff60cb770db2bb1f9e006444a8413bf001d71b71df75828f6cc4bebc8e0b7916e8b88d86e5e65713a915f481d9704475cdf4c5cd442922cf65e287afb5c1e746a0095da20b6d4cff411ee96c02ecd
2025-01-27 12:15:36.654 DEBUG (MainThread) [msmart.lan] Received data from 192.168.0.56:6444: 8370008e20639a7322edfb9398ed4267147f47f8d1fe2ad7df78c9ee20e8d06f00131a2da3247447ebe623254e9890fe47a944ac69e041fbbe50196f9e72171a402d2be1801631a6a256dafff3464c5a5e509d6e11a477ae38c4849e16882171a2cca2afce067cc0efd1083d421082d770692d200d11b88c0de30238d40a546d4942c9fd540b3120794ed70010ac19d5d56e3c32d5d0
2025-01-27 12:15:36.655 DEBUG (MainThread) [msmart.lan] Received packet from 192.168.0.56:6444: 5a5a011168002080000000007a650f131b011914b2420800008900000000000000000180000000002ed30f7318deb2150985a069e6df704fc6c5350d624b48edff5254e941e2aad1eb8d98ade0f90bb5f67d9331fb42c16d2cb3c721679cc7882d72522f1b480c96
2025-01-27 12:15:36.655 DEBUG (MainThread) [msmart.lan] Received response from 192.168.0.56:6444: aa29ac00000000000303b5071202010113020101140201011502010116020101170201001a020101dedb
2025-01-27 12:15:36.655 DEBUG (MainThread) [msmart.base_device] Response from 192.168.0.56:6444 in 0.620000 seconds.
2025-01-27 12:15:36.655 DEBUG (MainThread) [msmart.device.AC.command] Capabilities response payload: b5071202010113020101140201011502010116020101170201001a020101
2025-01-27 12:15:36.656 DEBUG (MainThread) [msmart.device.AC.command] Raw capabilities: {'eco': True, 'freeze_protection': True, 'heat_mode': True, 'cool_mode': True, 'dry_mode': True, 'auto_mode': True, 'swing_horizontal': True, 'swing_vertical': True, 'energy_stats': False, 'energy_setting': False, 'energy_bcd': False, 'filter_notice': False, 'filter_clean': False, 'turbo_heat': True, 'turbo_cool': True}
2025-01-27 12:15:36.656 DEBUG (MainThread) [msmart.base_device] Sending command to 192.168.0.56:6444: aa21ac00000000000003418100ff03ff00020000000000000000000000000305085b
2025-01-27 12:15:36.656 DEBUG (MainThread) [msmart.lan] Sending packet to 192.168.0.56:6444: 5a5a0111680020000000000041240f131b011914b24208000089000000000000000000000000000065cd8728fc6a5d31e6464235e81fa3b36a2496698f54e23033e012109731f93dc6be20c19674d4c970ec45aff30c4d433cd31f522a1e361a5b39e27e6a2faf72
2025-01-27 12:15:36.656 DEBUG (MainThread) [msmart.lan] Sending data to 192.168.0.56:6444: 8370008e20666f862d20ee03e67ed8ae2a07e98a544394b32d077c3b70b96c9e856524755a817236e90c47db0845c03dde2fbe01568a3363d0ea70a53a7a9103165dd3f95fe863569c47d3a9921be8c5a9a67d16cc7e73e3786551327f229dee96580b6f0289b638b0cc8170df10c17b36801a7314fd6f78f48d4e22596a2aac7f31a249212ff8f29cf74db5f5aa238e3a6cfb2e6cec
_**2025-01-27 12:15:38.659 DEBUG (MainThread) [msmart.lan] Read timeout. Resending to 192.168.0.56:6444.**_
2025-01-27 12:15:38.659 DEBUG (MainThread) [msmart.lan] Sending packet to 192.168.0.56:6444: 5a5a0111680020000000000041240f131b011914b24208000089000000000000000000000000000065cd8728fc6a5d31e6464235e81fa3b36a2496698f54e23033e012109731f93dc6be20c19674d4c970ec45aff30c4d433cd31f522a1e361a5b39e27e6a2faf72
2025-01-27 12:15:38.659 DEBUG (MainThread) [msmart.lan] Sending data to 192.168.0.56:6444: 8370008e20661424125314ef8b360314a76e1afa68def7bc40c83654dbcbec812890ea4fcd69924b4c1dbb711eb806fa99a057745ec4e07106f0a80e60809d341bacfb86bf8d237584d8e9646bdfbbee57792af49940ace8aca4b720c972bd76536c105cf1b1d431910aeb55149b0efd5b069ed8da223a6c34661374f99aba542713eb4c023a44a78fe829277ae23801ba0451abe412
_**2025-01-27 12:15:40.661 DEBUG (MainThread) [msmart.lan] Read timeout. Resending to 192.168.0.56:6444.**_
2025-01-27 12:15:40.661 DEBUG (MainThread) [msmart.lan] Sending packet to 192.168.0.56:6444: 5a5a0111680020000000000041240f131b011914b24208000089000000000000000000000000000065cd8728fc6a5d31e6464235e81fa3b36a2496698f54e23033e012109731f93dc6be20c19674d4c970ec45aff30c4d433cd31f522a1e361a5b39e27e6a2faf72
2025-01-27 12:15:40.661 DEBUG (MainThread) [msmart.lan] Sending data to 192.168.0.56:6444: 8370008e206617dafa418be716af25bf16b1b180be68cb837d0655906def44f9133a033e121d7f3fdb885c78eab1ef6662a0c690afb1a666c798be5f03780bf4a0f11d53485c042a706413e214ec3a9a9839b6fcb2a211738babf00a73b20eb06f84d73546c8564a8bd578e66a5013535dd22b1060b7f53c1f1523ca6c90976dfba75ffd7a6765581d71cab6614f97ac2a3cf9e07e1a
_**2025-01-27 12:15:42.664 DEBUG (MainThread) [msmart.lan] Disconnecting from 192.168.0.56:6444.
2025-01-27 12:15:42.664 WARNING (MainThread) [msmart.base_device] Network timeout 192.168.0.56:6444: No response from host.**_
2025-01-27 12:15:42.664 WARNING (MainThread) [msmart.base_device] No response from 192.168.0.56:6444 in 6.010000 seconds.

home-assistant_2025-01-27T20-00-45.526Z.log

@mill1000
Copy link
Owner

Sorry, I don't have a solution for you. Your device just stops responding sporadically.

Maybe the device is being overloaded? You could trying increasing the update_interval here:

update_interval=datetime.timedelta(seconds=15),

Maybe something is wrong with the packet format and your device is picky? I have no real means of testing that unless you can find an integration that doesn't cause disconnects.

@tacomaguy20
Copy link
Author

I'll try updating that. Any suggestions on what I should set it to?

Additionally, I feel like I didn't get these disconnects when I originally set up the software but that was before several of the updates and I don't think it's possible to revert back to previous versions. But that was back before the filter change entity was removed.

@mill1000
Copy link
Owner

HACs can install any version you want, but likely they'll be incompatibilities with the underlying library.

Try doubling the interval for now.

@tacomaguy20
Copy link
Author

Thanks I'll do and see what happens.

@mill1000
Copy link
Owner

Good luck, sorry I don't have a better answer for you.

@tacomaguy20
Copy link
Author

tacomaguy20 commented Feb 1, 2025

Good luck, sorry I don't have a better answer for you.

So I doubled that and then I started having problems with my other AC unit disconnecting. So I tried a few different numbers but those didn't help. So I put that back to normal and reverted to a previous version of the software. It was still disconnecting until I found a setting that was a slider that said "Enable polling for changes" and I turned it off for my mini split. Now it doesn't go unavailable. I'm not sure if that was a setting that I should leave on but it doesn't seem to cause any problems. Since I am using an older version, there are some entities that are available that are not in the new version... mostly filter status (lets you know when your filter is dirty). And there are some messages about certain terms being depreciated. So my question is if I install the latest version, will I still have the option to turn off the "enable polling for changes" and how can I get my filter status entities back? Should I create another Issue?

Edit, I figured out turning off the polling will not fix the issue. My mini split still works without disconnecting but it doesn't update the temperature and so continues to heat when it should turn off and vice versa.

@tacomaguy20
Copy link
Author

tacomaguy20 commented Feb 5, 2025

I thought I'd give an update since I seem to have figured something out just in case anyone else has a similar problem. Since my Mini Split was disconnecting regularly (Senville Leto 24K) and my MideaU 12k window unit was not, I figured maybe I could swap the wifi dongles. I had the US-OSK105 in the Mini Split (this is not the Alexa dongle, it's the older one, but it's the one that's been disconnecting and giving me the network errors). I also had a US-SK105 in the MideaU. I swapped them and the Mini Split now stays connected and the Window unit disconnects with similar errors. So it must have something to do with the US-OSK105 wifi dongle... although I don't seem to notice any problem with that dongle when using the Nethome plus app so I'll disable the window unit in home assistant and use Nethome plus with the window unit for the time being (since it gets used less often) and keep the US-SK105 in the mini split and keep using that with home assistant and this app. Hopefully this helps someone else figure out the issue (or perhaps my wifi dongle is failing, which could be a possibility).

@mill1000
Copy link
Owner

mill1000 commented Feb 7, 2025

Enable polling for changes

I don't ever recall having an option like that. Can you provide a screenshot?

@mill1000 mill1000 added device issue Issue is due to device limitation and removed need more info Further information is requested labels Feb 7, 2025
@tacomaguy20
Copy link
Author

Sure, I also wanted to let you know that I installed the latest version and that option is still available. I assume the polling is what detects the current status of the mini split. But what confused me is that I am only able to connect to these midea units by first connecting to Nethome plus and I don't know why the mini split didn't seem to be adjusting the temp on it's own. For example, my mini split was set to auto and it was heating and it went way above the temperature after I turned the polling off.. It's like the status was locked in and didn't recognize the indoor temp was too high. I don't know why this option would have that effect though.

Image

@mill1000
Copy link
Owner

Oh that's an option provided by Home Assistant, not by the integration itself. I'm not actually sure what that option will do. I'd leave it at it's default value (presumably On).

@ryanandres
Copy link

ryanandres commented Feb 23, 2025

I was hoping today's release would resolve similar issues I've been seeing (see logs below). Eventually it will count up into the thousands after a day or two. Now that I've found this ticket, perhaps it has something to do with running as midea_ac_lan.

I initially used the Carrier app to control my mini split then uninstalled it when I discovered this integration. Now I don't know how, if even possible, to NOT use midea_ac_lan. Thoughts?

I've already tried setting the timeout to 15-60 seconds. I haven't noticed any improvements

Logger: homeassistant.helpers.entity
Source: helpers/entity.py:1288
First occurred: 7:24:30 PM (7 occurrences)
Last logged: 7:49:08 PM

Update of climate.midea_ac_10995116336084 is taking over 10 seconds

This error originated from a custom integration.

Logger: msmart.base_device
Source: custom_components/midea_ac/coordinator.py:42
integration: Midea Smart AC (documentation, issues)
First occurred: 7:24:28 PM (76 occurrences)
Last logged: 7:54:48 PM

No response from 192.168.3.249:6444 in 6.040000 seconds.
Network timeout 192.168.3.249:6444: No response from host.
No response from 192.168.3.249:6444 in 6.050000 seconds.
No response from 192.168.3.249:6444 in 6.000000 seconds.
No response from 192.168.3.249:6444 in 7.070000 seconds.

@mill1000
Copy link
Owner

Now that I've found this ticket, perhaps it has something to do with running as midea_ac_lan.

Yes running both integrations against a device can cause problems.

I initially used the Carrier app to control my mini split then uninstalled it when I discovered this integration. Now I don't know how, if even possible, to NOT use midea_ac_lan. Thoughts?

I don't follow? Is there a functionality missing that you need from midea_ac_lan?

I need full debug log to help. The summary provided by HA is useless.

@ryanandres
Copy link

Now that I've found this ticket, perhaps it has something to do with running as midea_ac_lan.

Yes running both integrations against a device can cause problems.

I initially used the Carrier app to control my mini split then uninstalled it when I discovered this integration. Now I don't know how, if even possible, to NOT use midea_ac_lan. Thoughts?

I don't follow? Is there a functionality missing that you need from midea_ac_lan?

I'm running only this integration. Sorry, disregard the midea_ac_lan comments. I thought that meant a LAN configuration rather than Carrier's cloud configuration, which I have not used for a very long time.

I need full debug log to help. The summary provided by HA is useless.

See attached

home-assistant_2025-02-23T03-25-10.248Z.log

@tacomaguy20
Copy link
Author

Now that I've found this ticket, perhaps it has something to do with running as midea_ac_lan.

Yes running both integrations against a device can cause problems.

I initially used the Carrier app to control my mini split then uninstalled it when I discovered this integration. Now I don't know how, if even possible, to NOT use midea_ac_lan. Thoughts?

I don't follow? Is there a functionality missing that you need from midea_ac_lan?

I'm running only this integration. Sorry, disregard the midea_ac_lan comments. I thought that meant a LAN configuration rather than Carrier's cloud configuration, which I have not used for a very long time.

I need full debug log to help. The summary provided by HA is useless.

See attached

home-assistant_2025-02-23T03-25-10.248Z.log

Not an ideal solution but when I swapped my dongle for the US-SK105, my disconnect issues stopped. Although these dongles are not cheap. Might be cheaper to go with the ESP32 dongle but I haven't tried that myself.

@ryanandres
Copy link

Not an ideal solution but when I swapped my dongle for the US-SK105, my disconnect issues stopped. Although these dongles are not cheap. Might be cheaper to go with the ESP32 dongle but I haven't tried that myself.

Thanks! I'm open to that if this can't be fixed in software. Just curious though, how do you configure the wifi dongle to connect to your wifi network? I did this with the Carrier app I no longer use.

@tacomaguy20
Copy link
Author

Not an ideal solution but when I swapped my dongle for the US-SK105, my disconnect issues stopped. Although these dongles are not cheap. Might be cheaper to go with the ESP32 dongle but I haven't tried that myself.

Thanks! I'm open to that if this can't be fixed in software. Just curious though, how do you configure the wifi dongle to connect to your wifi network? I did this with the Carrier app I no longer use.

With these two dongles I've been having to connect to Nethome plus before it will be detected on my network by home assistant. ESP32 is different I believe and you don't need to connect to cloud services if I remember correctly.

@ryanandres
Copy link

I have the KSAIF0301AAA kit with US-OSK102. Would I be able to swap just the dongle to US-OSK105?

@tacomaguy20
Copy link
Author

I have the KSAIF0301AAA kit with US-OSK102. Would I be able to swap just the dongle to US-OSK105?

I honestly don't know. I have the MideaU window unit and the Senville 24kbtu Leto mini split and it works for both.

@mill1000
Copy link
Owner

@ryanandres Your device is particularly slow to respond to requests. I wonder if perhaps a longer read timeout is necessary for your device. Unfortunately it's not current a setting that is exposed and easy to change.

@mill1000
Copy link
Owner

@ryanandres I've created another issue specific to your case here: #315

@tacomaguy20 I'm thinking I'll be closing this issue as it appears your devices are working well now. Even thought I had nothing to do with that :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
device issue Issue is due to device limitation
Projects
None yet
Development

No branches or pull requests

5 participants