AqaraGateway icon indicating copy to clipboard operation
AqaraGateway copied to clipboard

Aqara_gateway can't read device.info

Open ouyangjingqian opened this issue 3 years ago • 22 comments

My M2 can't load all device. All device are offline.

ouyangjingqian avatar Jun 18 '22 03:06 ouyangjingqian

I have updated custom_component but all devices are still offline

ouyangjingqian avatar Jun 18 '22 06:06 ouyangjingqian

which version you are using?

niceboygithub avatar Jun 21 '22 00:06 niceboygithub

I have updated to the latest version

ouyangjingqian avatar Jun 21 '22 07:06 ouyangjingqian

Can you provide the logs?

niceboygithub avatar Jun 21 '22 12:06 niceboygithub

Where can i get the logs?

ouyangjingqian avatar Jun 26 '22 03:06 ouyangjingqian

Can you provide the logs?

Where can i get the logs?

ouyangjingqian avatar Jun 30 '22 06:06 ouyangjingqian

I have the same issue, after accidentally upgrading the firmware to version 4.0.2_0006, all child devices went offline.

I tried to enable telnet and it was working, however, it last only less than 10 sec then the connection dropped, no longer able to ping and i have to restart the m1s CN to make it back to pingable.

miiocli device --ip <gateway_id> --token <gateway_token> raw_command set_ip_info '{"ssid":"""","pswd":"123123 ; passwd -d admin ; echo enable > /sys/class/tty/tty/enable; telnetd"}'

I suspect Aqara enable some blockage with the latest firmware, can anyone help with this issue?

I can telnet in but it last for 10 sec only and i have no time to enter the command below for Update M1S to work with Home Assistant, please help, thanks millions

kdir /data/bin cd /data/bin wget -O /data/bin/curl "http://master.dl.sourceforge.net/project/mgl03/bin/curl?viasf=1" chmod +x /data/bin/curl /data/bin/curl -s -k -L -o /data/bin/mosquitto https://raw.githubusercontent.com/niceboygithub/AqaraM1SM2fw/main/binutils/mosquitto chmod a+x /data/bin/mosquitto

mkdir /data/scripts cd /data/scripts /data/bin/curl -s -k -L -o /data/scripts/post_init.sh https://raw.githubusercontent.com/niceboygithub/AqaraM1SM2fw/main/binutils/post_init.sh chmod +x /data/scripts/post_init.sh

terenceng81 avatar Aug 11 '22 12:08 terenceng81

@niceboygithub dont mind to take a look? i will online for the next few hours just in case u need my input, thanks.

I am using M1S CN version

terenceng81 avatar Aug 11 '22 12:08 terenceng81

What can I look into without any logs?

The version of my M1S CN is 4.0.2_0006 and have no problem to enable telnet. After enabled telnet, it still works.

Another method, you can try to flash custom firmware to M1S.

niceboygithub avatar Aug 11 '22 13:08 niceboygithub

My

What can I look into without any logs?

The version of my M1S CN is 4.0.2_0006 and have no problem to enable telnet. After enabled telnet, it still works.

Another method, you can try to flash custom firmware to M1S.

Hi niceboy,

Yes, I can enable telnet, however once I enabled it, the device will drop the connection and I no longer able to ping it.

the connection last for about 10sec only after the telnet is enabled.

terenceng81 avatar Aug 11 '22 13:08 terenceng81

Error log as shown below:

Failed to connect to MQTT server 192.168.5.4 due to exception: [Errno 111] Connection refused Failed to connect to MQTT server 192.168.5.4 due to exception: [Errno 113] Host is unreachable Failed to connect to MQTT server 192.168.5.4 due to exception: timed out

terenceng81 avatar Aug 11 '22 13:08 terenceng81

i tried several time, no luck :=/

Can help? I may order a new M1S or I could actually downgrade to the lower version?

Any hyperlink to brief me how to downgrade or flash the firmware? thanks.

terenceng81 avatar Aug 11 '22 15:08 terenceng81

still not working

terenceng81 avatar Aug 17 '22 14:08 terenceng81

Can you try enter the command after telnet?

setprop persist.app.tty_enable true; setprop persist.app.debug_log true

niceboygithub avatar Aug 17 '22 15:08 niceboygithub

Can you try enter the command after telnet?

setprop persist.app.tty_enable true; setprop persist.app.debug_log true

The behaviour is strange.

The first time I tried with the command to stop the freeze seems working, and I then perform what I supposed to perform with commands below:

mkdir /data/bin cd /data/bin wget -O /data/bin/curl "http://master.dl.sourceforge.net/project/mgl03/bin/curl?viasf=1"; chmod +x /data/bin/curl /data/bin/curl -s -k -L -o /data/bin/mosquitto https://raw.githubusercontent.com/niceboygithub/AqaraM1SM2fw/main/binutils/mosquitto; chmod a+x /data/bin/mosquitto

mkdir /data/scripts cd /data/scripts /data/bin/curl -s -k -L -o /data/scripts/post_init.sh https://raw.githubusercontent.com/niceboygithub/AqaraM1SM2fw/main/binutils/post_init.sh chmod +x /data/scripts/post_init.sh

and I enter 'reboot' to reboot it.

terenceng81 avatar Aug 20 '22 02:08 terenceng81

@niceboygithub

After it rebooted, the Aqara component in HomeAssistant is still not working, and I realize that telnet is still not enabled by default.

I perform a second try to enable telnet with the 'Stop Freeze' command and no longer working, where I did it wrong? :-/

The firmware seems doesn't be flashed.

terenceng81 avatar Aug 20 '22 02:08 terenceng81

any idea? the firmware seems unable to flash to custom.

terenceng81 avatar Aug 21 '22 17:08 terenceng81

I have a friend who have the same problem on two M1S CN. He flashed the cfw before telnet drop and have no problem to use AqaraGateway in HA. Maybe you have to enter the command faster before telnet drop.

cd /tmp && wget -O /tmp/curl "http://master.dl.sourceforge.net/project/mgl03/bin/curl?viasf=1" && chmod a+x /tmp/curl; /tmp/curl -s -k -L -o /tmp/m1s_update.sh https://raw.githubusercontent.com/niceboygithub/AqaraM1SM2fw/main/modified/M1S/m1s_update.sh; chmod a+x /tmp/m1s_update.sh && /tmp/m1s_update.sh

niceboygithub avatar Aug 22 '22 03:08 niceboygithub

`BusyBox v1.22.1 (2022-06-24 14:47:35 CST) built-in shell (ash) Enter 'help' for a list of built-in commands.

cd /tmp && wget -O /tmp/curl "http://master.dl.sourceforge.net/project/mgl03/b

in/curl?viasf=1" && chmod a+x /tmp/curl Connecting to master.dl.sourceforge.net (216.105.38.12:80)

curl 100% |*******************************| 2271k 0:00:00 ETA

/tmp/curl -s -k -L -o /tmp/m1s_update.sh; https://raw.githubusercontent.com/ni

ceboygithub/AqaraM1SM2fw/main/modified/M1S/m1s_update.sh; chmod a+x /tmp/m1s_upd ate.sh && /tmp/m1s_update.sh curl: no URL specified! curl: try 'curl --help' for more information -sh: https://raw.githubusercontent.com/niceboygithub/AqaraM1SM2fw/main/modified/M1S/m1s_update.sh: not found chmod: /tmp/m1s_update.sh: No such file or directory`

terenceng81 avatar Aug 22 '22 16:08 terenceng81

i tried several times, still no luck

terenceng81 avatar Aug 22 '22 17:08 terenceng81

sorry there is a typo, try again.

niceboygithub avatar Aug 23 '22 05:08 niceboygithub

sorry there is a typo, try again.

sigh, I need at least 10 sec but the telnet drop within 6-8 secs...

no matter how fast I can complete it, the time is still not enough

Screenshot 2022-08-25 at 10 13 40 PM

terenceng81 avatar Aug 25 '22 14:08 terenceng81