Git Product home page Git Product logo

richard-austin / security-cam Goto Github PK

View Code? Open in Web Editor NEW
6.0 6.0 2.0 85.22 MB

CCTV Security cam NVR accessible via web directly or through Cloud. service. Run on Raspberry pi

License: MIT License

JavaScript 0.05% TypeScript 4.45% HTML 2.15% CSS 0.54% SCSS 0.78% Groovy 4.48% Shell 0.29% Batchfile 0.04% Java 86.28% Python 0.46% Go 0.46%
angular cctv-monitoring dpkg dpkg-deb ffmpeg golang grails groovy java nvr onvif onvif-discovery ptz python raspberry-pi rtsp security-camera spring-security ubuntu webapp

security-cam's People

Contributors

richard-austin avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

ryan99alero

security-cam's Issues

Success message can be displayed in a red box

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.

Error messages need improvement

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.

Errors occur in security-cam.log when myip file is absent

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

Improve on change password form

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.

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

Mask files stop being visible in the camera config after moving away from and back to the config page.

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.

It's possible to set PTZ controls on with the Onvif base address empty

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.

Session timeout doesn't seem to be blocked on multi cam display

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.

Fixed the initial problem, but the timeout may not be being restored after navigating away from a live stream page.

Warning emails on public IP change not getting sent

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.

Recording pages have poor layout on mobile

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.

Set up error handling

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.

Tomcat cannot write to logs on initial installation

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.

Temperature not returned by getTemperature when running in tomcat

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

Need to stop motion as well as all ffmpeg processes during OnVif camera discovery.

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.

Slow set up of backchannel and no audio out on first use after starting Raspberry pi

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.

Rapid reading of .ts files can follow viewing a recording

To reproduce:-

  • Show recording
  • View camera parameters
  • Show recording again
  • Select another motion event and let the .ts files load
  • View Camera parameters again.

Try again if it doesn't happen, but it's occurred fairly reliably like this.

sc_procesess.service runs too many ffmpeg instances.

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.

Fix Error 200 Object Object

Object Object which appears on the recordings pages in the live deployment.

This was due to spring security session timeout.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.