niceboygithub / AqaraGateway

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

g2h pro Firmware 3.3.4 #179

Closed bmwcar closed 1 year ago

bmwcar commented 1 year ago

hello bro , could you provide 3.3.4 firmware with G2H Pro ? thanks !

niceboygithub commented 1 year ago

Why you need the version 3.3.4 firmware?

bmwcar commented 1 year ago

https://github.com/Wh1terat/aQRootG3#warningwarning-warning

because i wanna do this

bmwcar commented 1 year ago

my firmware is the latest , so i wanna flash the Firmware 3.3.4 , open telnet

niceboygithub commented 1 year ago

Check another repo AqaraCametaHubfw

bmwcar commented 1 year ago

thanks bro your provide !

i have new question:how the g2h pro downgrade the firmware ?

There is G3 downgrade the firmware :

https://github.com/niceboygithub/AqaraGateway

  1. Get 'rootfs.bin' of firmware version 3.3.4. (use 7z to extract the firmware bin)
  2. Copy 'rootfs.bin' to sdcard which is using FAT32 format.
  3. Power Off G3.
  4. Insert the sdcard to G3.
  5. Press the front button of G3.
  6. Power on G3.
  7. Wait three seconds and release the button.
  8. If the LED is turned to RED, it starts to flash 'rootfs.bin'.
niceboygithub commented 1 year ago

Same method

bmwcar commented 1 year ago

Dear bro , i have successed downgrade 3.3.4_0014.0004 . i connect to telnet , but show this , maybe need 3.3.4_0010.0004 ? Snipaste_2023-05-21_00-43-42

bmwcar commented 1 year ago

rtsp also could not connect

bmwcar commented 1 year ago

Dear bro , i try port:8554 ,NAS use account & password to login , could not connect rtsp , i dont know why . the reason is RTSP unavailable ?

niceboygithub commented 1 year ago

If you see the prompt "#", it is ok.

And the rtsp is not running as default.

bmwcar commented 1 year ago

If you see the prompt "#", it is ok.

And the rtsp is not running as default.

someone said use to enable rtsp :rtsp >/dev/null 2>&1 &

i try it but rtsp still failed ,bro,do you have any advice ?

niceboygithub commented 1 year ago

What do you mean with failed?

The rtsp url can be get by the command

agetprop |grep rtsp_url
bmwcar commented 1 year ago

Snipaste_2023-05-21_23-20-21

the port is 8554 ?

"What do you mean with failed?" i use synology NAS to connect the g2h pro with rtsp , but show need account and password , i try my Aqara account ID and password , failed , i dont know why.

bmwcar commented 1 year ago

Snipaste_2023-05-21_23-24-25

i use my Aqara account and password , but failed , use username "root" and password empty , also failed , i dont know what is the real account and password .

niceboygithub commented 1 year ago

The username and password are randomly generated.

Use "agetprop sys.camera_rtsp_url" to get detail.

bmwcar commented 1 year ago

所有者

thanks bro , success!

bmwcar commented 1 year ago

Snipaste_2023-05-21_23-41-40 Thanks bro !

bmwcar commented 1 year ago

And the rtsp is not running as default.

Dear bro , how to make camera rtsp auto running when restart ?

niceboygithub commented 1 year ago

create the post_init.sh scripts

mkdir -p /data/scripts
vi /data/scripts/post_init.sh
chmod a+x /data/scripts/post_init.sh

The content of post_init.sh

#!/bin/sh

/data/bin/mosquitto -d
asetprop sys.camera_ptz_moving true

fw_manager.sh -r
fw_manager.sh -t -k

cp /bin/app_monitor.sh /tmp; sed 's/ rtsp \-a / rtsp /g' -i /tmp/app_monitor.sh
killall -9 app_monitor.sh; /tmp/app_monitor.sh &
killall rtsp
[ -x /data/bin/connectivity.sh ] && /data/bin/connectivity.sh &
wizardofozzie commented 1 year ago

Same method

@niceboygithub

It seems I've successfully flashed G2HPro to 3.3.4! Big thanks! How do I telnet into the camera on a mac terminal?

Telnet to 192.168.1.101 won't work. I have copied the hostname onto the SD and then try to telnet in, no luck

Trying 192.168.1.101...
telnet: connect to address 192.168.1.101: Connection refused
telnet: Unable to connect to remote host
❯ telnet 192.168.1.101
Trying 192.168.1.101...
telnet: connect to address 192.168.1.101: Connection refused
telnet: Unable to connect to remote host
Write commented 8 months ago

create the post_init.sh scripts

mkdir -p /data/scripts
vi /data/scripts/post_init.sh
chmod a+x /data/scripts/post_init.sh

The content of post_init.sh

#!/bin/sh

/data/bin/mosquitto -d
asetprop sys.camera_ptz_moving true

fw_manager.sh -r
fw_manager.sh -t -k

cp /bin/app_monitor.sh /tmp; sed 's/ rtsp \-a / rtsp /g' -i /tmp/app_monitor.sh
killall -9 app_monitor.sh; /tmp/app_monitor.sh &
killall rtsp
[ -x /data/bin/connectivity.sh ] && /data/bin/connectivity.sh &

FYI this breaks HomeKit movement detection. The movement detector stays as always detecting something. For now my file look like this and it works :

#!/bin/sh

fw_manager.sh -r
passwd -d $USER
fw_manager.sh -t -k

pkill rtsp
rtsp &

Altough rtsp server is somewhat unresponsive sometimes. Loading 360p version seems the more reliable. Not sure why as HomeKit streaming is perfect.

Also on my G2H Pro there's no mention of rtsp in app_monitor.sh so the command would have no effect.