The All-Seeing Eye |
|
Keeping an eye on your staff has never been so easy or so much fun ..
We were recently asked to provide a CCTV facility for an existing customer who needed something setting up in a hurry. So after seeing many cameras above and previously fiddling with an Axis Camers, we had a crack an Azis PTZ running with "Zoneminder", which looked like a really cool open source project.
After (finally) making it do something moderately useful, it became apparent that although possibly useful under certain circumstances it really wasn't going to make a great CCTV system. So being a bit of a sucker, I set about writing one from scratch.
Guess what ...
It works!
We're running 1 daemon for each camera, this streams information from the camera and stores it in a local MySQL database at a given frequency, for example we're currently using 5 frames a second. This is using about 2% of the CPU on the local Linux server.
Then we run another optional daemon for each camera which logs begin/end events from the camera according to it's motion sensor, which is probably a little redundant in the daytime, but you never know - the functionality is there.
Then we get the fun part, a GTK application running on your local workstation allows you to configure and connect to a number of remote databases (which are being logged to by the camera daemons) and watch play, revese play etc etc stored pictures from the camera.
After a little experimentation I've opted to embed camera thumbnails (320x240) on the desktop and provide a full-size snapshot or recording on demand. This method means you can run as many cameras as you like and hide / unhide them from the gadget in the tooltray.
The tool-tray also shows you the current streaming bandwidth in use so you've half a chance of not saturating cameras located on remote sites. Overall, enough to get a fairly substantial CCTV configuration set up, and as soon as GNOME/X11 allow applications to migrate between virtual screens we should be able to run a panel of camera views across multiple screens .. although I might add this functionality sooner myself as they've been dragging their heels on this for years.
The Technology ...
Sounds like it might have been difficult, however end-to-end it was probably only a week's coding in between other stuff. The key to this is a system called GAMBAS. At first sight the web page can be a little off-putting as it doesn't look "that" professional, however once you get into the application itself, you have a Visual basic variant for Linux which is pretty damn solid and certainly something which has the potential to rival Borland Delphi.
When it comes to it, application development in GAMBAS is generally
faster than in Delphi (or Kylix) , it's just missing some of the finer
points with regards to component extensions.
Anyway, with any luck there should be some GAMBAS .deb's flying around in the not-too-distant future, if anyone's interested that is. If not, it should make a good demo ..
Another method would be to use something like PEtALS ...