niceboygithub / AqaraGateway

Aqara Gateway/Hub integration for Home Assistant
470 stars 62 forks source link

Aqara n100 door lock sensors are in unknow state #253

Open AlexBokhankovich opened 2 months ago

AlexBokhankovich commented 2 months ago

I've enabled telnet on my EU m2 hub and set up environment. I see it is connected via telnet and MQTT image but aqara lock sensors are in unknown state

image

core-2024.4.3 Aqara Gateway 0.2.4

niceboygithub commented 2 months ago

You need to open or close the door then door state will be report.

AlexBokhankovich commented 2 months ago

I have done that many times, also tried to restart HA and m2 hub several times. Still no sensors data available

niceboygithub commented 2 months ago

Can you enable mqtt log to check if there is any lock info ?

AlexBokhankovich commented 2 months ago

2024-04-22 17:28:50.042 DEBUG (MainThread) [custom_components.aqara_gateway.core.gateway] 192.168.88.39: mosquitto is not running as public! 2024-04-22 17:28:54.749 DEBUG (MainThread) [custom_components.aqara_gateway.core.gateway] 192.168.88.39: mosquitto is not running as public! 2024-04-22 17:28:54.761 ERROR (MainThread) [custom_components.aqara_gateway.core.gateway] Failed to connect to MQTT server 192.168.88.39 due to exception: [Errno 111] Connection refused

AlexBokhankovich commented 2 months ago

I tried to connect to MQTT broker via MQTTExplorer and had no luck. After I run /data/scripts/post_init.sh manually I was able to connect MQTT, tried to lock\unlock doorlock and statuses were updated. So, I think something went wrong during broker startup... IDK why but for some reason restarting it helped to get statuses

luyueyi commented 1 month ago

Hello, could you please explain your troubleshooting process in detail? I'm a newbie and I don't quite understand what I'm looking at. My A100 Pro at home is encountering the same issue. After the E1 gateway loses power and restarts, it fails to retrieve status information again. Additionally, attempting to open and close the door multiple times hasn't worked either.

Here is the content of my logs:

2024-05-05 15:46:42 DEBUG main SysInfo: {'installation_type': 'Home Assistant Supervised', 'version': '2024.5.1', 'dev': False, 'hassio': True, 'virtualenv': False, 'python_version': '3.12.2', 'docker': True, 'arch': 'aarch64', 'os_name': 'Linux', 'os_version': '5.15.93-rockchip64', 'user': 'root', 'supervisor': '2024.04.4', 'host_os': 'Debian GNU/Linux 11 (bullseye)', 'docker_version': '24.0.6', 'chassis': ''} 2024-05-05 15:46:52 DEBUG gateway 10.88.1.5: mosquitto is not running as public! 2024-05-05 15:46:54 DEBUG gateway 10.88.1.5: mosquitto is not running as public! 2024-05-05 15:46:54 ERROR gateway Failed to connect to MQTT server 10.88.1.5 due to exception: [Errno 111] Connection refused 2024-05-06 11:16:23 DEBUG gateway 10.88.1.5: mosquitto is not running as public! 2024-05-06 11:16:24 DEBUG gateway 10.88.1.5: mosquitto is not running as public! 2024-05-06 11:16:24 ERROR gateway Failed to connect to MQTT server 10.88.1.5 due to exception: [Errno 111] Connection refused

AlexBokhankovich commented 1 month ago

telnet to your hub and run /data/scripts/post_init.sh then restart HA and try to lock\unlock your doorlock.