Open rfg81 opened 3 years ago
i don't see any problem in your config file, and it seems the camera is correctly mounting the NFS share and storing logs already. Those reboot_XX files are expected to show you when the camera has rebooted. The latest wyze hack is very sensitive to the running firmware version so beta firmwares are not well supported. I'd suggest you reflash your camera firwmare using SD card recovery method and then try it again.
@rfg81 can you sd recover the firmware to latest version (241) and try hack version 0.5.04?
I'm seeing the same thing as rfg81 using a v2 camera on firmware 241 with 0.5.06. Constant reboots when it connects to the NFS share. When the camera doesn't find the NFS share it actually doesn't reset so quickly so I am able to telnet into the camera.
Partial boot log written to NFS drive
Line 1: WyzeHack: WyzeApp version: 4.9.6.241 Line 2: WyzeHack: WyzeHack version: 0.5.06 Line 4: WyzeHack: wlan0 not ready yet... Line 12: WyzeHack: wlan0 not ready yet... Line 15: WyzeHack: wlan0 not ready yet... Line 17: WyzeHack: Trying to ping gateway 192.168.0.1... Line 18: WyzeHack: 192.168.0.142:/camera not mounted, try mounting to /mnt... Line 19: WyzeHack: Mounting directory /mnt/WyzeCams/2CAA8EA0017D as SD card Line 20: WyzeHack: Creating data directory [/mnt/WyzeCams/2CAA8EA0017D] Line 21: WyzeHack: Mounting camera directory 192.168.0.142:/camera//mnt/WyzeCams/2CAA8EA0017D on /media/mmcblk0p1 Line 23: WyzeHack: Mounting camera directory 192.168.0.142:/camera//mnt/WyzeCams/2CAA8EA0017D on /media/mmc Line 25: WyzeHack: Notifying iCamera about SD card insertion event... Line 27: WyzeHack: Custom script not found: Line 392: May 11 21:04:09 syslog: [SDK-DEVICE]dbg: Found dev: /dev/mmcblk0p1, mpoint: /media/mmc Line 393: May 11 21:04:09 syslog: [SDK-DEVICE]dbg: /dev/mmcblk0p1 mount success! point: /media/mmc Line 408: May 11 21:04:12 iCamera: mount(/dev/mmcblk0p1, /media/mmc, vfat) ==> 0 Line 409: May 11 21:04:12 iCamera: [SDK-DEVICE]dbg: /dev/mmcblk0p1 mount success! point: /media/mmc Line 434: WyzeHack: NFS no longer mounted as /media/mmcblk0p1 Line 435: WyzeHack: Rebooting...
[root@WyzeCam-017D:~]# ifconfig lo Link encap:Local Loopback inet addr:127.0.0.1 Mask:255.0.0.0 UP LOOPBACK RUNNING MTU:65536 Metric:1 RX packets:6 errors:0 dropped:0 overruns:0 frame:0 TX packets:6 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:450 (450.0 B) TX bytes:450 (450.0 B)
wlan0 Link encap:Ethernet HWaddr 2C:AA:8E:A0:01:7D inet addr:192.168.0.146 Bcast:192.168.0.255 Mask:255.255.255.0 UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:621 errors:0 dropped:32 overruns:0 frame:0 TX packets:578 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:189916 (185.4 KiB) TX bytes:91829 (89.6 KiB)
[root@WyzeCam-017D:~]# mount rootfs on / type rootfs (rw) /dev/root on / type squashfs (ro,relatime) tmpfs on /dev type tmpfs (rw,relatime) proc on /proc type proc (rw,relatime) devpts on /dev/pts type devpts (rw,relatime,gid=5,mode=620,ptmxmode=000) tmpfs on /tmp type tmpfs (rw,relatime) tmpfs on /run type tmpfs (rw,nosuid,nodev,relatime,mode=755) sysfs on /sys type sysfs (rw,relatime) media on /media type tmpfs (rw,relatime) /dev/mtdblock3 on /driver type squashfs (ro,relatime) /dev/mtdblock4 on /system type jffs2 (rw,relatime) /dev/mtdblock7 on /backupa type jffs2 (rw,relatime) /dev/mtdblock8 on /configs type jffs2 (rw,relatime) /dev/mtdblock9 on /params type jffs2 (rw,relatime) 192.168.0.142:/camera on /mnt type nfs (rw,noatime,nodiratime,vers=3,rsize=32768,wsize=32768,namlen=255,hard,nolock,proto=tcp,timeo=600,retrans=2,sec=sys,mountaddr=192.168.0.142,mountvers=3,mountproto=tcp,local_lock=all,addr=192.168.0.142) 192.168.0.142:/camera/WyzeCams/2CAA8EA0017D on /media/mmcblk0p1 type nfs (rw,noatime,nodiratime,vers=3,rsize=32768,wsize=32768,namlen=255,hard,nolock,proto=tcp,timeo=600,retrans=2,sec=sys,mountaddr=192.168.0.142,mountvers=3,mountproto=tcp,local_lock=all,addr=192.168.0.142) 192.168.0.142:/camera/WyzeCams/2CAA8EA0017D on /media/mmc type nfs (rw,noatime,nodiratime,vers=3,rsize=32768,wsize=32768,namlen=255,hard,nolock,proto=tcp,timeo=600,retrans=2,sec=sys,mountaddr=192.168.0.142,mountvers=3,mountproto=tcp,local_lock=all,addr=192.168.0.142)
Camera says "Cannot connect to local network" right before it reboots
Ok, switched to running a different NFS and that seems to have corrected the constant reboots.
I followed this guide to setup a NFS: https://pimylifeup.com/raspberry-pi-nfs/
However, videos were still not being saved. Only jpgs in the "alarm" folder were being saved. The permissions for the "record" folder were different than the "alarm" folder. The "alarm" folder was drwxrwxrwx while the "record folder was drw-r--r--.
I did a
cd /media/mmc
chmod 777 record
from the camera via telnet and now it saves the mp4s. I have a v2 running WyzeHacks 0.5.06
I confirmed that it is a permissions issue. The permissions are set as drw-r--r-- when the camera makes a new folder for the next hour.
If I change the permissions via the raspberry pi GUI:
or issue the following commands via telnet to the camera:
cd /media/mmc
chmod 777 record
the mp4s are saved as expected.
I thought of running a script on the pi to change the permissions of the newly created folders, but I think it would be a better fix to have the camera create the folder with the drwxrwxrwx permissions.
Might be something issue with the umask. Can you try if the follow command fixes the issue?
Telnet into your camera Run "echo 'umask 000' >> /configs/wyze_hack.cfg"
On Fri, May 14, 2021, 08:18 ZuluSpl0it @.***> wrote:
I confirmed that it is a permissions issue. The permissions are set as drw-r--r-- when the camera makes a new folder for the next hour. [image: image] https://user-images.githubusercontent.com/55359362/118290835-7eca0a00-b49c-11eb-8332-edd5b01e4905.png
My if I change the permissions via the raspberry pi GUI: [image: image] https://user-images.githubusercontent.com/55359362/118291163-e41dfb00-b49c-11eb-8bb2-0ab6c679225b.png or issue the following commands via telnet to the camera: cd /media/mmc chmod 777 record [image: image] https://user-images.githubusercontent.com/55359362/118291806-9a81e000-b49d-11eb-9583-55aeaf25c062.png
the mp4s are saved as expected.
I thought of running a script on the pi to change the permissions of the newly created folders, but I think it would be a better fix to have the camera create the folder with the drwxrwxrwx permissions.
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/HclX/WyzeHacks/issues/91#issuecomment-841309250, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAZNWD4LQPXJLVTZSWBJ2WLTNU5NTANCNFSM4YKTMTNQ .
The permissions are now:
Still not writing mp4s to the NFS until I chmod 777 on the folder
@ZuluSpl0it wait, your directory owner/group is not root but 1000?
My NFS options used are:
/mnt/nfsshare *(rw,all_squash,insecure,async,no_subtree_check,anonuid=1000,anongid=1000)
So the anonymous login from the camera should use pi's UID and GID (1000).
I did also try changing the directory's owner to root. That makes the mp4 files show up but they are all zero bytes:
I'm running an NFS server on a virtual pi (running in vmware). I'm going to try running it on actual hardware, but I can't see why that would be different.
How are others running the NFS server?
How are others running the NFS server?
I'm not. Like you, it never worked, either via windows NFS or a physical PI that I set up. Gave up...
Given the improved resources on the v3, I'd advocate for adding SMB to the v3 install.
I ran the NFS server on a real raspberry pi 3 (unlike the virtualized Raspberry Pi Desktop for PC above) and the camera records without any permissions issues. The folders and mp4 get created as expected. Does anyone know what causes the difference between the Raspberry Pi Desktop for PC and the armhf version for the real hardware?
I had this issue on a freenas system when I had set export permissions to mapall group and mapall user. Once I removed those settings at the server, the issue went away.
How are others running the NFS server?
I'm not. Like you, it never worked, either via windows NFS or a physical PI that I set up. Gave up...
I have a post, that I made with info on getting the Hanewin NFS Server working on Windows:
Hi, I'm probably doing something wrong but please bare with me. I can see files being saved on the NFS share folder. I'm using a windows 10 NFS share by using this command:
The camera is Wyze V2 running 4.9.6.199 and depending on my luck sometimes I can see SD card memory available as 0MB/ 0MB and sometimes it doesn't detect an sd card. I tried multiple reboots and multiple remote_install (version 0.5.03).
I can see a config.inc file on the windows machine with this information:
In the log folder I see several reboot_XX files but all have 0 kb.
Could you please tell me what I did wrong?