AqaraGateway icon indicating copy to clipboard operation
AqaraGateway copied to clipboard

Integration causing Homeassistant to crash.

Open hxdx9527 opened this issue 9 months ago • 16 comments

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.

hxdx9527 avatar May 05 '24 08:05 hxdx9527

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.

niceboygithub avatar May 05 '24 10:05 niceboygithub

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

hxdx9527 avatar May 05 '24 10:05 hxdx9527

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.

hxdx9527 avatar May 05 '24 10:05 hxdx9527

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 avatar May 10 '24 19:05 lihuohuo9527

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.

lihuohuo9527 avatar May 10 '24 19:05 lihuohuo9527

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

notabene00 avatar May 17 '24 20:05 notabene00

Please take this issue seriously and resolve it

lihuohuo9527 avatar May 25 '24 10:05 lihuohuo9527

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

image image

Please have a try on master branch.

niceboygithub avatar May 25 '24 12:05 niceboygithub

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

lihuohuo9527 avatar May 25 '24 13:05 lihuohuo9527

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

niceboygithub avatar May 25 '24 15:05 niceboygithub

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

lihuohuo9527 avatar May 25 '24 16:05 lihuohuo9527

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

lihuohuo9527 avatar Jun 01 '24 15:06 lihuohuo9527

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 avatar Jun 01 '24 15:06 lihuohuo9527

Please take this issue seriously and resolve it

lihuohuo9527 avatar Jun 12 '24 06:06 lihuohuo9527

Did you try the latest version of this integration?

niceboygithub avatar Jun 12 '24 12:06 niceboygithub

@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"

arcsur avatar Sep 02 '24 07:09 arcsur