niceboygithub / aqaracamerahubfw Goto Github PK
View Code? Open in Web Editor NEWAqara Camera Hub G2/G2H and Aqara Hub E1 firmwares
Aqara Camera Hub G2/G2H and Aqara Hub E1 firmwares
How can I change the gateway to the stock firmware?
Hi,
very nice work!
I have a G2 camera down for a while, and I found your work recently and it gave me hope of being able to integrate the camera into the Home-Assistant.
I have access via telnet and TTL for the camera.
I upgraded the camera to its version: G2 ota_3.5.8_0062.bin
My question is how do I run the service rtsp?
Should I copy the repository binaries to the camera's SD, and then execute them?
As I understand it at G2 it would be these commands:
h264grabber -f &
rRTSPServer -e &
Again, congratulations on the excellent work!
I apologise for the question if obvious but how does one get started to flash a G2 aqara to get a RSTP stream ?
I have hope to finally get a use for my G2 camera. .
"releaseDate": 1677577403000,
"part": "main",
"downloadUrl": "https://cdn.aqara.com/cdn/opencloud-product/mainland/product-firmware/prd/lumi.gateway.aqcn02/20230208142157_lumi.gateway.aqcn02_AIOT_V3.5.2_0010.0004_20230208_9466bf.bin",
"upgradeTakesTime": 0,
"updateLog": "1.优化设备相关功能; 2.修复已知问题;",
"updateTime": 1677577403000,
"isNecessary": 0,
"fileSize": 12963944,
"createTime": 1676454828000,
"firmwareMD5": "084bf9bf3e5acd2784eb13aa689466bf",
"state": 3,
"isForce": false,
"firmwareVersion": "3.5.2_0010.0004",
"imageType": "bin",
"firmwareCRC32": "4718D00B"
Thanks
I had firmware 3.34 on my Aqara G2H PRO out of the box and I enabled telnet using this guide: https://github.com/Wh1terat/aQRootG3
After that I used this guide: https://github.com/niceboygithub/AqaraGateway to connect my camera to Home assistant and also enable rtsp.
I edited post_init.sh script like this:
#!/bin/bash
fw_manager.sh -r
fw_manager.sh -t -k
killall -9 mosquitto; /data/bin/mosquitto -d
pkill rtsp
rtsp &
Using this configuration one of my camera works perfectly but another one doesn't boot up (stuck on yellow light after powering up).
How can I recover my camera?
I tried to flash firmware (https://github.com/niceboygithub/AqaraCameraHubfw/tree/main/stock/G2HPro) using the guide provided here: https://github.com/wizardofozzie/aqara_g2hpro_hack but no luck...
HW: lumi.camera.gwpagl01, model: AH_G3
SW version: 3.3.4_0007.0008
How to reproduce:
cd /tmp && wget -O /tmp/curl "http://master.dl.sourceforge.net/project/aqarahub/binutils/curl?viasf=1" && chmod a+x /tmp/curl
/tmp/curl -s -k -L -o /tmp/g3_update.sh https://raw.githubusercontent.com/niceboygithub/AqaraCameraHubfw/main/modified/G3/g3_update.sh
chmod a+x /tmp/g3_update.sh && /tmp/g3_update.sh
Logs:
ota progress=100
zigbee/send {"cmd":"report","id":2000000026,"did":"lumi.0","time":1706354846267,"rssi":0,"zseq":0,"params":[{"res_name":"8.0.2090","value":0}],"dev_src":"0"}
ota zigbee coordinator successful >>>>>>>>>>>>>>>
zigbee ota(ver: v1.0.0) firing up, built at Dec 16 2021 18:34:16; Author:
{"cmd":"read","id":7054,"did":"lumi.0","params":[{"res_name":"8.0.2080"}]}
zigbee/send {"cmd":"report","id":2000000027,"did":"lumi.0","time":1706354850438,"rssi":0,"zseq":0,"params":[{"res_name":"8.0.2080","value":"0008_2.06"}],"dev_src":"0"}
coor ver =0008
zigbee/send {"cmd":"report","id":2000000028,"did":"lumi.0","time":1706354850438,"rssi":0,"zseq":0,"params":[{"res_name":"8.0.2166","value":"{\"hostVer\":\"2.06\",\"coorVer\":\"0008\",\"networkUp\":1,\"panId\":\"0x7647\",\"txPower\":32,\"channel\":20}"}],"dev_src":"0"}
===Update uboot===
===Update kernel===
=== KERNEL1 ====
main:102
Erasing 128 Kibyte @ 4e0000 -- 100 % complete
/tmp/g3_update.sh: line 667: /bin/nandwrite: not found
/tmp/g3_update.sh: line 668: /bin/nanddump: not found
main:102
Erasing 128 Kibyte @ 4e0000 -- 100 % complete
/tmp/g3_update.sh: line 667: /bin/nandwrite: not found
/tmp/g3_update.sh: line 668: /bin/nanddump: not found
cat: can't open '/tmp/kernel_head': No such file or directory
main:102
Erasing 128 Kibyte @ 4e0000 -- 100 % complete
/tmp/g3_update.sh: line 667: /bin/nandwrite: not found
/tmp/g3_update.sh: line 668: /bin/nanddump: not found
cat: can't open '/tmp/kernel_head': No such file or directory
main:102
Erasing 128 Kibyte @ 4e0000 -- 100 % complete
/tmp/g3_update.sh: line 667: /bin/nandwrite: not found
/tmp/g3_update.sh: line 668: /bin/nanddump: not found
cat: can't open '/tmp/kernel_head': No such file or directory
Update failed, reason: OTA failed!
Hi. Can you help me to modify the latest fw for g3 cam? It's possible to share the instruction on that action?
Thanks.
"updateTime": 1710387835000,
"fileSize": 15564904,
"state": 3,
"releaseDate": 1710387835000,
"imageType": "bin",
"updateLog": "1.优化设备相关功能; 2.修复已知问题;",
"isNecessary": 0,
"firmwareMD5": "0791bf4f51cec98a425d38d2a2f19034",
"isForce": false,
"part": "main",
"firmwareCRC32": "CAC3AA0B",
"firmwareVersion": "4.1.0_0003.0010",
"createTime": 1709710618000,
"downloadUrl": "https://cdn.aqara.com/cdn/opencloud-product/mainland/product-firmware/prd/lumi.gateway.aqcn02/20240221150155_lumi.gateway.aqcn02_AIOT_V4.1.0_0003.0010_20240220_f19034.bin",
"upgradeTakesTime": 0
Thanks~~
Is it possible to create a login and password to protect an RTSP stream?How can I do that?
I was able to run the RTSP server in high quality on G2 firmware 3.5.8_0062, but there was a problem with RTSP starting automatically. If you try to manually run the rtsp-start.sh script, the telnet command line hangs, only rebooting the camera helps. Question: how to force the rtsp server to start?
What I've done:
Copying the rtsp_start.sh file to /system/bin, adding the contents of the rtsp_start.sh file to /etc/init.d/S90app did not autostart
P/S sorry for my english
Hello. Foolishly deleted the /tmp/out/ folder and the /etc/normal.xml file (rooted G2H). The yellow indicator is now on all the time, it does not appear on the network. What can I do?
With guide of telnet, i enable telnet successful.
change the s90app script for auto enable rtsp and image grabber when restart g2h
with rtsp_start.sh in s90app and httpd add in script, after restart the camera, it can not boot up.
sounds like it can not boot up for added script.
Now it can not be reset and connected, any solution for this case?
My M2PoE is currently running on the modified firmware version 4.0.6_0011.0004. I am attempting to upgrade to version 4.1.0_0007.0010 via Telnet, but I have encountered an error. Can you please assist me with this issue?
psvr ok,wait=1
type: lumi.gateway.iragl8, model: AH_M2
platform: aiot, path: /tmp/fw.tar.gz, sign: 0
Original OTA package :
Unpack path : /data/ota_unpack
Firmware path : /data/ota_dir
OTA packages size(kb) : 16384
Available ROM size(kb): 50868
Available RAM size(kb): 15648
Update to 4.1.0_0007.0010
Get packages, please wait...
Got package done
env right
===Update IR-Controller===
===Update zigbee-coordinator===
zb_coordinator: 0021, coor_bin_name:Network-Co-Processor.ota
Network-Co-Processor_115200_MG21_0010_20231206_FA2882.ota
rm: can't remove '/data/ota-files/*': No such file or directory
==2==zb_platform: 0021, MG21
[INFO]: exec zgb_ota success (command.c:374)
zigbee_msnger zgb_ota /data/ota-files/Network-Co-Processor.ota
[INFO]: exec get_zgb_ver failed (command.c:374)
[INFO]: exec get_zgb_ver failed (command.c:374)
[INFO]: exec get_zgb_ver failed (command.c:374)
[INFO]: exec get_zgb_ver failed (command.c:374)
[INFO]: exec get_zgb_ver failed (command.c:374)
[INFO]: exec get_zgb_ver failed (command.c:374)
[INFO]: exec get_zgb_ver failed (command.c:374)
[INFO]: exec get_zgb_ver failed (command.c:374)
[INFO]: exec get_zgb_ver failed (command.c:374)
[INFO]: exec get_zgb_ver failed (command.c:374)
[INFO]: exec get_zgb_ver failed (command.c:374)
[INFO]: exec get_zgb_ver failed (command.c:374)
[INFO]: exec get_zgb_ver failed (command.c:374)
[INFO]: exec get_zgb_ver failed (command.c:374)
[INFO]: exec get_zgb_ver failed (command.c:374)
[INFO]: exec get_zgb_ver failed (command.c:374)
[INFO]: exec get_zgb_ver failed (command.c:374)
[INFO]: exec get_zgb_ver failed (command.c:374)
[INFO]: exec get_zgb_ver failed (command.c:374)
[INFO]: exec get_zgb_ver failed (command.c:374)
[INFO]: exec get_zgb_ver failed (command.c:374)
[INFO]: exec get_zgb_ver failed (command.c:374)
[INFO]: exec get_zgb_ver failed (command.c:374)
[INFO]: exec get_zgb_ver failed (command.c:374)
[INFO]: exec get_zgb_ver failed (command.c:374)
[INFO]: exec get_zgb_ver failed (command.c:374)
[INFO]: exec get_zgb_ver failed (command.c:374)
[INFO]: exec get_zgb_ver failed (command.c:374)
coordinator ota fail
Update failed, reason: OTA failed!
Thanks for your great work.
I was wondering can I update modified/G3/4.0.7_0006.0008 firmware use sd card? Or I only can downgrade the firmware use sdcard to get rooted?(mine is 4.0.7 rightnow)
Thank you for yourtime.
"updateTime": 1704701060000,
"fileSize": 15616104,
"state": 3,
"releaseDate": 1704701060000,
"imageType": "bin",
"updateLog": "1.优化设备相关功能; 2.修复已知问题;",
"isNecessary": 0,
"firmwareMD5": "1ca63b12a3a98699c19bb2895fc7569e",
"isForce": false,
"part": "main",
"firmwareCRC32": "3B0F55A6",
"firmwareVersion": "4.0.8_0008.0010",
"createTime": 1704201545000,
"downloadUrl": "https://cdn.aqara.com/cdn/opencloud-product/mainland/product-firmware/prd/lumi.gateway.aqcn02/20231228181852_lumi.gateway.aqcn02_AIOT_V4.0.8_0008.0010_20231228_c7569e.bin",
"upgradeTakesTime": 0
Thanks!
follow telnet readme,the LED does not turn purple
Hi there,
Thank you for guide, I could telnet without any hardware modification or wiring.
Basically I could get snapshot / www cgi script from your works working. I also notice in my firmware, there is running mosquitto.
It should be handing MQTT. I wonder could I use it to integration with HASS. or could you point out some direction I might work on it.
I try to connect to MQTT (1883 port) but not working.
I found that you provide mosquitto to Aqaura Gateway (M1 or M1S).
So could I send out some status such as camera motion detection or sound detection or any event by MQTT to HASS?
Thanks,
Tim
Hi, can you explain to me how to change the firmware?
how modify roofs.bin?
I would like to modify last firmware aqara g3:
https://cdn.aqara.com/cdn/opencloud-product/mainland/product-firmware/prd/lumi.camera.gwpgl1/20231030143851_lumi.camera.gwpgl1_AIOT_V4.0.6_0011.0004_20231027_6b956f.bin
I tried with binwalk and unsquashfs without success.
Thanks
Is this orginal ota files for Aqara GH2 in this folder
AqaraCameraHubfw/original/G2H/2.2.0.0001.0515_ota/
can i use it to restore/downgrade if i put it on "sdcard/ota.bin
what is meant by this text "The folder refactor and add Aqara Hub E1 firmware"
Hi, thanks for your fw repo.
I manage to downgrad my G3 from 3.4.1 to 3.3.4, for the purpose of enabling telnet. Eventually, I integrated this downgraded G3 into ha but realized there is no way to rotate the camera at all (using aqara home app to rotate the camera.).
Is this phenomenon normal?
I've accidentally overwritten the S90app file with the hostname file. I tried getting access through UART but no luck, I can read the logs but can't write into it. It loads fine until it loads the S90app script and it gets stuck in the loop. Is there a way I can access this file and revert what I did?
"updateTime": 1686107585000,
"fileSize": 15360104,
"state": 3,
"releaseDate": 1686107585000,
"imageType": "bin",
"updateLog": "1.固件 V4.0.2 (Beta)增加了对全新智能家居连接标准Matter 的支持,种类繁多的智能家居配件可以跨生态协同工作。 首批支持的设备类型有:开关、插座、灯、窗帘、人体传感器、温湿度传感器、门窗传感器、动静贴、光照度传感器、无线开关、魔方等,可访问aqara.com获取详细的产品清单; \n2.优化设备相关功能;\n3.修复已知问题;",
"isNecessary": 0,
"firmwareMD5": "d86316a73afa044e3850378c0f537a52",
"isForce": false,
"part": "main",
"firmwareCRC32": "C86B771F",
"firmwareVersion": "4.0.2_0022.0004",
"createTime": 1685436455000,
"downloadUrl": "https://cdn.aqara.com/cdn/opencloud-product/mainland/product-firmware/prd/lumi.gateway.aqcn02/20230524141912_lumi.gateway.aqcn02_AIOT_V4.0.2_0022.0004_20230523_537a52.bin",
"upgradeTakesTime": 0
Thanks~
I see there re tool for flash the different hubs(M1s, m2, 3). But is there any tool or guide how to flash the stock or modified firmware in our g2h?
"releaseDate": 1698046431000,
"part": "main",
"downloadUrl": "https://cdn.aqara.com/cdn/opencloud-product/mainland/product-firmware/prd/lumi.gateway.aqcn02/20230926194715_lumi.gateway.aqcn02_AIOT_V4.0.6_0006.0004_20230926_ff4693.bin",
"upgradeTakesTime": 0,
"updateLog": "1.优化设备相关功能; 2.修复已知问题;",
"updateTime": 1698046431000,
"isNecessary": 0,
"fileSize": 15564904,
"createTime": 1695891551000,
"firmwareMD5": "d243dc346ea8c5e7dac3caf32eff4693",
"state": 3,
"isForce": false,
"firmwareVersion": "4.0.6_0006.0004",
"imageType": "bin",
"firmwareCRC32": "2D947A46"
Thanks!
Hello, write, please, manual how flash this firmware. Thanks.
Hello @niceboygithub
I can't install ota.bin for G2H
What's wrong?
Help me, please.
# cd /mnt/sdcard/
# ls
record log ota.bin
# cd /etc/
# . ota.sh
firmware version: 2.1.1
firmware build time: 1606803116
payload version: 2.1.1
payload type: 0x20
payload length: 3947667
Segmentation fault
check ota file fail
Can't find upgrade file
I have try to "create a file 'hostname' which its content as below and put it in sdcard" part
And is not working.
I try to telnet to ip and is not respond.
Hello,
i have a Chinese G2 which only works with xiaomi home China mainland region, I can’t add it to aqara app or apple HomeKit .
Is it possible to change region in firmware or change firmware to be able to add to homekit or aqara app? Im using it from Europe. Or probably flash G2H firmware?
The current firmware is: 3.5.8_0062.0356
See you have added the modified firmware for the M3 hub,but the rootfs.bin and kernel.bin mentioned in the description are still not found.
Hey @niceboygithub - big thanks for sharing your knowledge and hustle here with us!
I downgraded the firmware on my G2H Pro to 3.3.x using the SD card booth method discussed somewhere (custom firmware, bin 7-zip extraction).
Aqara app confirms firmware version is 3.x (not 4.1.x which it was previously).
telnet connection is refused however- is this an error because I downgraded the firmware? Or is it because I'm not using Putty (i'm using macos telnet).
Thanks man, I bought you a coffee ☕️.
Hi
I found the this link:linux.bin and rootfs.binis no longer valid. where can I download these two files?
I have downgraded the software to version 3.3.4. Reseted the camera and pressed for 10 seconds to activate pairing mode, but for some reason it won't read any QR code (aQRootg3.py generated or original QR code from Aqara home app). When I update the software back to the latest version, it starts reading again. What can I do in this situation?
Thanks for your nice work. I was successfully go through the step from Wh1terat/aQRootG3 and use your code to make my G3 intergrate into Home Assistant. Recently my Aqara Home app shows that there's a update to 3.3.9_0011.0004 and I mentioned that it dose not able to turn on telnet and mqtt at this version anymore. However my G3 is in 3.3.2 version and is there any way to manually update from 3.3.2 to 3.3.4 by the stock firmware that you provide here? I have tried the way that you provide for other Aqara device but it didn't work. Could you help me to take a look at my processes?
#cd /tmp && wget -O /tmp/curl "http://master.dl.sourceforge.net/project/aqarahub/binutils/curl?viasf=1" && chmod a+x /tmp/curl
#/tmp/curl -s -k -L -o /tmp/G3_update.bin https://raw.githubusercontent.com/niceboygithub/AqaraCameraHubfw/main/stock/G3/20211216200913_lumi.camera.gwpagl01_AIOT_V3.3.4_0007.0004_20211216_28f9c3.bin
#fw_upgrade /tmp/G3_update.bin
After I use these code it show this result.
https://i.imgur.com/T17nUVO.jpg
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.