-
Notifications
You must be signed in to change notification settings - Fork 31
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
Bug(AC): AC设备No Query Protocol循环导致High CPU #421
Comments
Title: Read the json file and enter the loop |
@justmagic7211 这个是HAOS 的warning message,不会影响任何东西,仅仅是需要随后替换为async模式的异步IO而已。 请明确你使用的HAOS版本,HA core版本,我之前也遇到一个老版本的HA Core自身有问题,会有high cpu问题,但是升级最新版HA core,恢复正常。 |
@justmagic7211 This is a warning message of HAOS. It will not affect anything. It just needs to be replaced with asynchronous IO in async mode later. Please be clear about the HAOS version and HA core version you are using. I also encountered an old version of HA Core that had problems with itself and high cpu problems. However, after upgrading to the latest version of HA core, it returned to normal. |
I have upgraded to the latest haos, version number 2014.12.5. As soon as I try to enable the above entities, the cpu usage will increase and the log will repeat indefinitely. |
@justmagic7211 先不说cpu上升的问题,最后的日志无限重复是什么意思? 因为这段json文件的读或写,只会是启动discover向导,发现设备,添加新设备,才会执行。 如果HA 正常启动,加载midea_ac_lan,原则上也是不会进入这个读取json的流程,也不会触发这个warning message,所以您到底是什么问题呢? |
@justmagic7211 Let’s not talk about the problem of CPU increase. What does the last log repeating infinitely mean? Because the reading or writing of this **json file will only be executed when the discover wizard is started, the device is discovered, and the new device is added. ** If HA starts normally and loads midea_ac_lan, in principle it will not enter the process of reading json, nor will this warning message be triggered, so what is your problem? |
home-assistant.log |
home-assistant.log |
@justmagic7211 你就传了1秒钟的log,后面的都没了。
具体问题看不出来,log只有1秒钟的数据,没法确认。这个设备要么是不支持,要么是有其它问题,可能需要更多log,以及设备SN等信息进一步确认。 如果重启空调,重启HA,仍然还是midea_ac_lan导致cpu利用率高,并且禁用midea_ac_lan可以解决问题,那么可以尝试擅长这台设备,看看是否是这台设备的问题(原则上也是不应该的)。而且目前也没有遇到任何人反馈有cpu高的情况。 |
后面基本都是循环的日志,然后也就很奇怪,只需要禁用掉这个设备,另两个是没问题的,也尝试过删除设备,甚至重装插件也还是这样 |
The following are basically circular logs, and then it is very strange. I only need to disable this device, and the other two are no problem. I have also tried deleting the device, and even reinstalling the plug-in still has the same problem. |
ok, 确认禁用这个设备以后没有high cpu的问题就好办了,我随后改一些地方,你如果可以修改pip库的源,可以自行测试是否解决问题。 |
Ok, it will be easier to solve after confirming that after disabling this device, there will be no high CPU problem. I will change some places later. If you can modify the source of the pip library, you can test whether the problem is solved by yourself. |
临时加了一个修复,解决这种有异常的设备导致的high cpu问题,可以直接修改pip库的源码,自行测试是否解决,理论上应该问题不大。 具体修改源码的steps如下,之前发的英文格式的,你参考一下: brief step:
below is the detail steps:
|
很奇怪,按道理来讲另两台设备是一样的,有可能是由于网络信号不好?另两台的设备连接wifi的标准是wifi4,但是这台是wifi1。设备SN是0000005112239640934260310749Q2P7,然后我看到你修改的不是 |
It's strange. Logically speaking, the other two devices are the same. Maybe it's because the network signal is not good? The standard for connecting the other two devices to wifi is wifi4, but this one is wifi1. The device SN is 0000005112239640934260310749Q2P7. Then I saw that what you modified was not the file in |
@justmagic7211 多谢确认,
|
@justmagic7211 Thanks for confirming,
|
@justmagic7211 修复cpu利用率以后,这台设备应该是没有任何支持的数据或功能可用。 |
@justmagic7211 After fixing the CPU utilization, there should be no supported data or functions available on this device. |
但是事实上这台设备可以控制,只是日志会发生那种情况 |
But in fact this device can be controlled, but what happens to the logs |
@justmagic7211 你可以控制? 那行吧,AC空调的传感器数据倒是不多,主要是控制。 |
@justmagic7211 Can you control that? That's okay, the AC air conditioner doesn't have much sensor data, it's mainly about control. |
HA版本
2024.12.5
集成版本
0.6.5
之前可正常使用的集成版本
v0.6.5
设备类型及型号
Air Conditioner 22396409 (44204)
使用的App
美的美居
问题/Bug详细描述
中央空调,未进行任何操作,多次出现HASS cpu占用过高,
![image](https://private-user-images.githubusercontent.com/40380983/397986601-d0f078fb-048c-4059-9ea5-97d4ed96b63e.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzk1NTMzNTcsIm5iZiI6MTczOTU1MzA1NywicGF0aCI6Ii80MDM4MDk4My8zOTc5ODY2MDEtZDBmMDc4ZmItMDQ4Yy00MDU5LTllYTUtOTdkNGVkOTZiNjNlLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTQlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjE0VDE3MTA1N1omWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWNlYzlmN2UyYTMyMTlmOWQzMTIzMWQ1OTg3NTFkMWM3OTQxNWQzZTBkMWYwYjcxZTZmMWU3YTUxODljYTQ3NWUmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.4tljJpF9tZLwMb4KN1ETpDAX06PnbjnjSiY8zeq662E)
当我尝试禁用实体后,cpu占用下降,查看日志发现,进入循环
2024-12-22 20:58:58.377 WARNING (MainThread) [homeassistant.util.loop] Detected blocking call to open with args ('/config/.storage/midea_ac_lan/210006726902963.json',) inside the event loop by custom integration 'midea_ac_lan' at custom_components/midea_ac_lan/config_flow.py, line 156: return load_json(f.name, default={}) (offender: /usr/src/homeassistant/homeassistant/util/json.py, line 72: with open(filename, mode="rb") as fdesc:), please create a bug report at https://github.com/wuwentao/midea_ac_lan/issues
midea_lan.log
The logs
...
The text was updated successfully, but these errors were encountered: