Goal: Replace Post request "Aqara Home" app on HomeAssistant
- Requirement appid - userid - token value
note: this flow is example and was developed for Aqara Hub G3 camera (CH-H03 lumi.camera.gwpgl1)
Find your value from BurpSuite, replace your value:
appid (XXXXXXAPPIDXXXXXXXXXXX)
userid (XXXXXXUSERID.USERIDXXXXXXXXXXX) (autoconfig "userid" value, enter manual if not work)
token (XXXXXXTOKENXXXXXXXXXXX)
aqara_url ( example EU = rpc-ger.aqara.com )
lumi1.XXXXXXXXXXXX ( lumi1.MACADDRESS )
- Requirement for find your data on BurpSuite software:
BurpSuite Software PC
“Aqara Home” mod network apk on Android Phone
( https://drive.google.com/file/d/1Wfn_ynyCGvPwldjbbNGvZmYBKj5csuMy/view?usp=sharing )
-
Method 1 RestFul (without NodeRed):
-
Replace value Aqara_G3_without_nodered.txt
-
Copy and paste Aqara_G3_without_nodered.txt on configuration.yaml
-
Restart HomeAssistant
-
-
Method 2 NodeRed (recommended):
-
Install NodeRed on HomeAssistant (with "node-red-contrib-config" palette)
-
Install NodeRed Companion on HomeAssistant
-
Import flow Aqara_G3_nodered.json
-
Replace value "config" node
-
Deploy
-
Note: access internet from HomeAssistant server (for aqara URL https)
- Result
- Trick for Hub G3:
Alarm function ->
HomeKit device
Warning: the port change every reboot of device.
Scan and find with nmap, replace port into "/config/.storage/core.config_entries"
Live video ->
go2RTC with WebRTC ( required HomeKit connected )
https://github.com/AlexxIT/go2rtc
https://github.com/AlexxIT/WebRTC
Update: After many problems the best solution for live video:
hack G3:
-
open telnet
-
add post_init.sh:
#delete auth rtsp
sleep 40
killall -9 rtsp
rtsp >/dev/null 2>&1 &
-
card with webrtc-camera url: rtsp://192.168.1.52:8554/360p /720p /1080p /1296p
or you can see user and pass from agetprop sys.camera_rtsp_url command from telnet:
user=26
pass=83
(change every boot)
~ # agetprop sys.camera_rtsp_url
{"360p":"rtsp://26:83@192.168.1.4:8554/360p","720p":"rtsp://26:83@192.168.1.4:8554/720p","1080p":"rtsp://26:83@192.168.1.4:8554/1080p","1296p":"rtsp://26:83@192.168.1.4:8554/1296p"}