richard-austin / security-cam Goto Github PK
View Code? Open in Web Editor NEWCCTV Security cam NVR accessible via web directly or through Cloud. service. Run on Raspberry pi
License: MIT License
CCTV Security cam NVR accessible via web directly or through Cloud. service. Run on Raspberry pi
License: MIT License
Putting something like https://https://86.23.20.240/rambo starts a loop where there are multiple redirects and logins.
Not sure what was going on when I originally tested this, but it correctly gives a 403 now.
No problem found.
If an error message is shown (correctly displaying red), and is not dismissed before re-doing the operation with correct info so the message is a success message, the box will remain red.
Try uploading a non pgm file as a mask file, then uploading a correct one without dismissing the box in between.
Haven't seen this with the SV3C cameras.
Sometimes also a white page is shown.
The test case was with them disabled because of there being only one camera or stream.
Need something more concise and to the point. The HTTP error messages can be quite confusing. See in particular the error message on camera config when the credentials are wrong.
Error box is briefly shown when multi cam view first selected. It looks like the "No camera specified" box which seems to appear before getCameras has returned its data.
2022-11-08 12:11:49.486 ERROR CAM [emailTimer] - invoke:-1 - java.io.FileNotFoundException in getSavedIP: /etc/security-cam/myip (No such file or directory)
2022-11-08 12:11:50.001 ERROR CAM [emailTimer] - invoke:-1 - java.lang.NullPointerException in emailTask: Cannot invoke "String.length()" because "s" is null: Caused by: null
2022-11-08 12:33:07.009 ERROR CAM [ipCheckTimer] - invoke0:-2 - java.io.FileNotFoundException in getSavedIP: /etc/security-cam/myip (No such file or directory)
2022-11-08 12:33:10.127 ERROR CAM [emailTimer] - invoke0:-2 - java.io.FileNotFoundException in getSavedIP: /etc/security-cam/myip (No such file or directory)
2022-11-08 12:33:10.951 ERROR CAM [emailTimer] - invoke0:-2 - java.lang.NullPointerException in emailTask: Cannot invoke "String.length()" because "s" is null: Caused by: null
2022-11-08 12:36:25.272 ERROR CAM [ipCheckTimer] - invoke0:-2 - java.io.FileNotFoundException in getSavedIP: /etc/security-cam/myip (No such file or directory)
2022-11-08 12:36:25.970 ERROR CAM [emailTimer] - invoke0:-2 - java.io.FileNotFoundException in getSavedIP: /etc/security-cam/myip (No such file or directory)
2022-11-08 12:36:26.289 ERROR CAM [emailTimer] - invoke0:-2 - java.lang.NullPointerException in emailTask: Cannot invoke "String.length()" because "s" is null: Caused by: null
2022-11-08 13:36:25.958 ERROR CAM [emailTimer] - invoke0:-2 - java.io.FileNotFoundException in getSavedIP: /etc/security-cam/myip (No such file or directory)
2022-11-08 13:36:26.542 ERROR CAM [emailTimer] - invoke0:-2 - java.lang.NullPointerException in emailTask: Cannot invoke "String.length()" because "s" is null: Caused by: null
We shouldn't need to use these references to controls in the component code. I'm changing this in the Cloud service.
@ViewChild('oldPassword') oldPasswordEl!: ElementRef;
@ViewChild('newPassword') newPassword!: ElementRef;
@ViewChild('confirmNewPassword') confirmNewPassword!: ElementRef;
Handle 400 errors which cause a crash on tomcat (such as when malicious attempts send something like http://86.23.20.240//index.php?s=/Index/\x5Cthink\x5Capp/invokefunction&function=call_user_func_array&vars[0]=md5&vars[1][]=HelloThinkPHP21).
Set up a valve to give a 400 error without these details.
Tomcat currently responds with:-
HTTP Status 400 โ Bad Request
Type Exception Report
Message Invalid character found in the request target [/index.php?s=/Index/\x5Cthink\x5Capp/invokefunction&function=call_user_func_array&vars[0]=md5&vars[1][]=HelloThinkPHP21]. The valid characters are defined in RFC 7230 and RFC 3986
Description The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing).
Exception
java.lang.IllegalArgumentException: Invalid character found in the request target [/index.php?s=/Index/\x5Cthink\x5Capp/invokefunction&function=call_user_func_array&vars[0]=md5&vars[1][]=HelloThinkPHP21]. The valid chara
Instead the other page remains displayed with the session ended so that further actions on that page result in errors.
Previously worked but now broken.
Happened since the work on sc_processes.service where the processes are run from Java rather than the sc_processes.sh bash script.
Update 29/07/2022
This was due to uploading the mask file without saving the config. Perhaps uploading a mask file could automatically save the config? Only problem is, it's possible to upload a mask file while the config table is not fully complete which would preclude saving it.
Cameras Configuration should enforce entry of the Onvif base address if PTZ controls are enabled. Onvif base address is required for their operation. The Onvif base address validation should determine if the PTZ checkbox is enabled, and when empty should unset the PTZ checkbox.
I've found it timed out a couple of times. This is probably since the reworking of the display along with incorporating the fmp4 streams. Should check single cam display too.
Following change to sending from Java/Groovy process.
Fix FileNotFoundException in ipCheckTimer and emailTimer when no file initially set up (perhaps automatically add it). No email sent even when myip file is present.
Error status: 0
See logs for more information.
Shown if a recording page is refreshed.
Seems like the isGuest flag is being left true. Seen also on PC browser too.
Recording pages have poor layout on mobile. The title of the video is in a bad position next to the motion event selection card..
It may improve things is the background of the card which contains the title is made the same colour as the general body background colour.
See https://www.w3.org/blog/2022/07/redirecting-to-https-on-www-w3-org/
w3.org is planning to redirect http to https on all od w3.org. Their tests caused issues with the Onvif discovery (Exception Premature end of file). Need to look into updating Onvif code to deal with this (libxml has been implicated in the online discussions)
The myip call sometimes sets the current IP blank resulting in erroneous changed public IP emails being sent.
There is a warning panel set up for this purpose, but doesn't come up when the recordings directory is empty, so the original functionality may be broken,
It's possible to deselect all streams for a camera on the multi-cam display. In fact you can deselect all stream for all cameras!
If you are navigating from another component (say the cameras config component) to selecting a live stream, the "No camera has been specified" message flashes up briefly before the video proceeds.
Specifically the connection was through the Angular express proxy on port 4200, then through Cloud and CloudProxy to pi 2. The Urls being used looked to be the redirect URL's in the nginx.conf on pi 2.
Set up a camera configuration then save it.
Modify the Camera IP address, and Netcam URI IP addresses
Update Camera Name accordingly.
Save new configuration.
Click on camera ID, the snapshot for the original IP settings will be shown.
Restating tomcat on the NVR restores functionality. Uploading seems to work OK from an NVR direct session.
Need to have a generic error message extraction service.
Must deal with the mapped validation errors as well as 500 errors etc.
Make sure errors are raised by the server in a consistent format.
Currently they look like this:-
Validation Error: 400
0: F
1: a
2: i
3: l
4: e
5: d
6:
7: t
8: o
9:
10: g
11: e
12: t
13:
14: c
15: a
16: m
17: e
18: r
19: a
20:
21: p
22: a
23: r
24: a
25: m
26: e
27: t
28: e
29: r
30: s
Couldn't get local hosting of material font to work very well so have reverted
If there is no pre-existing config file, a 500 error is shown on going into the set up page.
This doesn't prevent setup but is inappropriate in this instance.
This seems to be because tomcat is added to the sec-cam group without restarting it. ON the last fresh install there was also a problem with vcgencmd measure_temp not working, most likely due to the same issue with tomcat being added to the video group.
Restarting tomcat at the end of the install should fix this.
Maybe a permission problem but could be something else as the following error is given when trying to execute the command as user tomcat:-
pi@raspberrypi:/home/www-data $ sudo -u tomcat vcgencmd measure_temp
VCHI initialization failed
Update
tomcat can now execute the command after adding tomcat to the video group (see https://chewett.co.uk/blog/258/vchi-initialization-failed-raspberry-pi-fixed/#:~:text=If%20when%20running%20vcgencmd%20on,video%20group%20to%20your%20user.&text=This%20command%20adds%20the%20video,will%20run%20the%20command%20successfully.
Then with a restart of tomcat the problem is fixed
Cameras being invisible to OnVif discovery is due to active connections from motion and ffmpeg. The ffmpeg live stream connections are now stopped during OnVif discovery but now thatmotion is running as a service, it's not shut down by stopProcesses. We can do this from the wifimanagement service (runs as root) by adding API calls to stop and start the motion service.
If the camera credentials are set incorrectly, getSnapshot and camera settings return very bad error messages (camera settings returns HTML). Display a proper bad credentials error and sort out the HTML.
Mobile menu does not autoclose after live multicam view selected.
Also toggling the audio out button off too early in these instances can cause the teardown to not be effective (or not be sent, whatever) leaving the blue light on, which goes off only after it's scheduled timeout.
Not sure if the slow start is fixable, looks like something is needing to be cached on the first use of this function.
An entry appears under Camera Settings for cameras where no control URI was entered
This should be on each stream row and, like the motion sensing selector, only one should be allowed to be set on any one camera.
The streams were in consistent order in cameras.json.
Seems to be from typing in the command with the wrong focus.
To reproduce:-
Try again if it doesn't happen, but it's occurred fairly reliably like this.
With the config set up so that both streams on 1 camera are used, there were 2 instances of ffmpeg for each stream.
**Update
This is probably not a problem. htop was showing the bash command line (including the ffmpeg invocation) and ffmpeg as a child process of bash, so I think this is as expected.
This could be a problem with the NVR, Cloud or both.
Smaller buffer sizes (like 125) prevent even logon working.
Stage 4</>
Use "new config" functionality when config file is absent, empty or invalid.
This call in ngAfterViewInit causes the page to ask for microphone access when the backchannel option is not present for the device.
Found existing installation: pytz 2022.1
Not uninstalling pytz at /usr/lib/python3/dist-packages, outside environment /usr
Can't uninstall 'pytz'. No files were found to uninstall.
Improve the low res/HD selector box on multi cam view. There seems to be a card-content tag which stands out from the underlying card making it look bad.
Object Object which appears on the recordings pages in the live deployment.
This was due to spring security session timeout.
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.