Skip to content

Commit

Permalink
Fixing RTSP firmware support, and broken NFS mount detection
Browse files Browse the repository at this point in the history
  • Loading branch information
HclX committed Feb 9, 2021
1 parent 177f8d9 commit fe639cf
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 3 deletions.
2 changes: 1 addition & 1 deletion wyze_hack/hack_ver.inc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export WYZEHACK_VER=0.5.01
export WYZEHACK_VER=0.5.02
20 changes: 18 additions & 2 deletions wyze_hack/main.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,14 @@ case $WYZEAPP_VER in
export MMC_GPIO=50
;;

4.28.*)
# Cam V2 RTSP
export DEVICE_ID=$(grep -oE "NETRELATED_MAC=[A-F0-9]{12}" /params/config/.product_config | sed 's/NETRELATED_MAC=//g')
export DEVICE_MODEL="V2"
export SPEAKER_GPIO=63
export MMC_GPIO=50
;;

4.10.*)
# Cam PAN
export DEVICE_ID=$(grep -oE "NETRELATED_MAC=[A-F0-9]{12}" /params/config/.product_config | sed 's/NETRELATED_MAC=//g')
Expand All @@ -37,6 +45,14 @@ case $WYZEAPP_VER in
export MMC_GPIO=50
;;

4.29.*)
# Cam PAN RTSP
export DEVICE_ID=$(grep -oE "NETRELATED_MAC=[A-F0-9]{12}" /params/config/.product_config | sed 's/NETRELATED_MAC=//g')
export DEVICE_MODEL="PAN"
export SPEAKER_GPIO=63
export MMC_GPIO=50
;;

4.25.*)
# Doorbell
export DEVICE_ID=$(grep -E -o CONFIG_INFO=[0-9A-F]+ /params/config/.product_config | cut -c 13-24)
Expand Down Expand Up @@ -376,9 +392,9 @@ check_nfs() {
return 1
fi

if ( timeout -t 5 df -h 2>&1| grep -q 'Stale NFS');
if ! timeout -t 20 df /media/mmcblk0p1;
then
echo "WyzeHack: Stale NFS handle detected"
echo "WyzeHack: NFS no longer mounted as /media/mmcblk0p1"
return 1
fi

Expand Down

0 comments on commit fe639cf

Please sign in to comment.