Open mrlt8 opened 3 years ago
Interesting, I'll take a look. I assume this V2 with the software that requires the wyzehacks install?
Yup, V2 latest stream_hack.
I'm still looking at this, it's a tricky memory overrun issue in the wyze code or wyzehacks code. Could even be a compiler bug but I doubt it. The wyzehacks C code is triggering it, but it's not clear yet where or why exactly.
You bring up a very good point @FiveLeavesLeft I was wondering why I was not encountering a lot of the same issues you guys were as far as events not logging and this possible issue, but it might be because I don’t use the Wyze hacks. Some of these issues may have to do with the library that wyze_hacks main.sh loads on start up.
Thanks for the update @FiveLeavesLeft!
@endertable Are you running stream_hack without wyze_hacks?
Yes, Mostly because I don’t used NFS recording saving. I use SD cards and access videos remotely as needed.
Same here. I only have STREAM_HACK enabled in my wyze_hack.cfg. Everything else is commented out.
Are your events being recorded to the /record directory on your SD card?
I have all events recorded to SD card and to the cloud. If you are using wyze hacks did you disable the wyze hacks .so library file from being loaded?
I haven't seen the weird characters at the end, but I did notice that the mp4s were not being saved. The permissions for the "record" folder were different than the alarm folder. I did a
chmod 755 record
from the Camera via telnet and now it saves the mp4s. I have a v2 running WyzeHacks 0.5.06
I can fix the record directory and funny characters issue, but it would mean disabling the wyzehacks NFS functionality. So far I've been avoiding that but I'm curious how many people are using the stream hack and the wyzehacks NFS functionality.
very interested in maintaining NFS support, we have 6 cameras that all record to NFS, no local storage in the cameras, working well. since the cameras are exterior, I'd hate to lose footage of they were stolen or damaged. and the rtsp streaming means I don't have to use the wyze app or tinycam too.
I personally don’t use the NFS option, but know it’s a popular hack.
Maybe you could disable wyze hacks if none of the NFS options are enabled? Would that break anything else?
@FiveLeavesLeft Could you work with HclX/WyzeHacks to fix the permissions issue there? That might be able to keep the NFS working.
Please refer to: https://github.com/HclX/WyzeHacks/issues/91#issuecomment-841309250
If you are using NFS v4 you may get strange chmods on directories if users are different. You are using rooot on the camera, but it seems like you are using pi on the Linux server. Try using the root user on your Linux NFS server to see what it does
I believe WyzeFirmwareTool also ran into some compatibility issues with NFS and WyzeHacks and had to drop support for both.
I haven't seen the weird characters at the end, but I did notice that the mp4s were not being saved. The permissions for the "record" folder were different than the alarm folder. I did a
chmod 755 record
from the Camera via telnet and now it saves the mp4s. I have a v2 running WyzeHacks 0.5.06
Is your /record on the SD card or on an NFS server? All the folders in my /media/mmc are drwxr-xr-x root root by default.
The record folder is on the NFS which is running v3. What's weird is that the other folders have the correct permissions when created.
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 ran the NFS server on a real raspberry pi 3 (unlike the virtualized Raspberry Pi Desktop for PC i was using earlier) and the camera records without any permissions issues. The folders and mp4 get created as expected.
It is pretty much purely an NFS server issue and not an issue of stream hacks. iCamera does not have to worry about changing permissions on an SD card because default permissions for Linux for a vfat filesystem are 755 no matter what. You couldn’t change permissions on an SD card if you wanted. Because of security, some NFS servers don’t like those loose permissions and use stricter default unmasks, others don’t care. Either way, I don’t believe iCamera issues a chmod command for SD card IO operations and therefore won’t issue them on the NFS mount either. It’s good you found an NFS with a good umask.
I have all events recorded to SD card and to the cloud. If you are using wyze hacks did you disable the wyze hacks .so library file from being loaded?
Are you disabling the Wyzehacks in /tmp/wyze_hack/run/main.sh?
I don’t use WyzeHacks per se so I am only guessing that may be why I am not having a lot of the same issues as some. But I did dabble with it last year and I remember he used a custom .so file to load app_init.sh and I am guessing he is still using it somewhere in the main.sh file. I imagine its main purpose is to prevent iCamera from screwing around with the /media directory for the NFS mount hack to work.
Here's a bash script that temporarily fixes the issue by creating a folder for today and removing all the junk folders:
#!/bin/sh
while : ; do
[[ $(ls -d /media/mmc/record/*w | wc -w) -ge 1 ]] && rm -r /media/mmc/record/*w/
[[ ! -d /media/mmc/record/$(date +'%Y%m%d') ]] && mkdir /media/mmc/record/$(date +'%Y%m%d')
sleep 3600
done
This obviously needs to be run at least once a day to cleanup and create the dir for today, so I have it sleep and run every hour since the camera doesn't have cron.
Not sure if this is related to wyzehacks or just the way vanilla wyze works, but I noticed that the camera continuously writes a new file every min (record/<day>/<hour>/<min>.mp4
) regardless of motion, THEN deletes the file IF there was no motion..
I always assumed the "Events Only" record option in the Wyze app only wrote to the SD card IF there was motion, but it seems like it will continuously write which could have an impact on the life of the SD card.
Hi Charlie, found another SD related bug.
I noticed that I wasn't getting any recording under the "View Playback" section of the wyze app, so I took a look at the SD card and could see the folders for each of the days in
/media/mmc/recordings/
were being created, but had some weird characters at the end:Got the same result after formatting the card:
Replicated the issue on a couple of other cameras as well. The folders normally have a
%Y%m%d
format, but for some reason they are getting a random character +w
at the end of the directory name.The files in
/alarm
and/time_lapse
seem unaffected and are getting created normally.