niceboygithub / AqaraGateway

Aqara Gateway/Hub integration for Home Assistant
505 stars 66 forks source link

Integration causing Homeassistant to crash. #258

Open hxdx9527 opened 4 months ago

hxdx9527 commented 4 months ago

Environments:  1. M2_POE gateway with the latest mofified firmware. (static IP adress).  2. Asus router AX88U PRO  3. Homeasssitant Green with software version 2024.5.1. (static IP address)

Timeline:

  1. After rebooting my router, I cannot visit hass web ui. Ping to the host is ok.
  2. Plug in a hdmi cable to the HASS Green and disabled the aqara_gateway custom component by removing the folder.
  3. Reboot and the system works fine. I checked the core logs and supervisor logs, no thing related to this integration is printed.

Please let me know if any more infomation is needed.

niceboygithub commented 4 months ago

If the ip of gateway was changed, the integration can not connecting the mqtt of gateway, the HA will become busy and slow. Suggest that use fixed IP of the gateway.

hxdx9527 commented 4 months ago

@niceboygithub The IP of the gateway has not changed. I've maunually set it manually the day I purchased it.

hxdx9527 commented 4 months ago

I jsut did a test. If it is ip problem you mentioned. There is a error log in ha core log. But when it happened to me, there was no such error log.

lihuohuo9527 commented 4 months ago

I have the same problem as him, the same device, the same version. After my testing, after disabling aqara_gateway, the web returned to normal. I have been searching for where the problem lies, hoping that the author can solve it.

lihuohuo9527 commented 4 months ago

I jsut did a test. If it is ip problem you mentioned. There is a error log in ha core log. But when it happened to me, there was no such error log.

Can it be an issue with the Asus Merlin firmware? I am using Merlin firmware, the same issue, but I don't see anyone else responding to the issue.

notabene00 commented 4 months ago

Stock firmware, 3.3.4, telnet enabled (qr-code method, where bind_key swapped with payload) Home Assistant crashed every time I'm trying to add my G2H Pro to it

lihuohuo9527 commented 4 months ago

Please take this issue seriously and resolve it

niceboygithub commented 4 months ago

There are several gateways using AqaraGateway integration in my HA without any problems.

image image

Please have a try on master branch.

lihuohuo9527 commented 4 months ago

我并没有使用MQTT 这有影响吗?

niceboygithub commented 4 months ago

This integration is using mqtt of the gateway to send/receive the info of zigbee devices.

lihuohuo9527 commented 4 months ago

这个问题困扰我太久了,我使用的是aqara的开关、小燕的灯具,但我并没有将灯线接入开关内,而是在HA内做自动化将灯具和开关进行联动。但是HA webUI经常崩溃,导致开关和灯具无法联动,删除文件夹禁用 aqara_gateway 自定义组件后WEB UI恢复。等下次出现同样问题的时候我会将su logs提供给你,真的太痛苦了....

lihuohuo9527 commented 4 months ago

This problem has occurred again, and I have recorded the logs

lihuohuo9527 commented 4 months ago

If you need any other information, please let me know and I will add it The gateway IP address is static, but I don't know why it is converted to IPV6 here core logs {8B1BF8CF-65B7-4dd5-8DE7-B9EBE2F9A271} su logs {EBA2AF85-68C5-4518-A9C4-9D6262AE0B8F}

lihuohuo9527 commented 3 months ago

Please take this issue seriously and resolve it

niceboygithub commented 3 months ago

Did you try the latest version of this integration?

arcsur commented 4 weeks ago

@niceboygithub I have this same issue with an E1 using the custom firmware. It is due to the rather basic checks for the public mosquitto and the code that tries to download and run code not being able to write to the location on the E1 custome firmware.

This is where the issue came from: https://github.com/niceboygithub/AqaraGateway/commit/7ac6367d83e20ffea987424579e19f7c92aeb7c9#diff-025149aecea77572624873e6c5b62d5b22e94f7ad71df347be60bd1f4ff91335R88-R101

Adding a check to see if public mosquitto is running from /tmp/mosquitto would be a good basic check before even attempting this. Validating if you can actually write to the directory and returning immediately with an error (instead of hanging up HA waiting for connection repeatedly) would also improve matters.

Note I am using: https://github.com/zvldz/aqcn02_fw/tree/main/update as per your README.md instructions for "Not Flash E1 modified firmware method"