diff --git a/CHANGELOG.md b/CHANGELOG.md index ddf9320cb..471066ac3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -352,7 +352,7 @@ - Fix window sizes and input field sizes for flat skin [\#381](https://github.com/ZoneMinder/ZoneMinder/pull/381) ([m-bene](https://github.com/m-bene)) - Fix reload loop on switching skins [\#380](https://github.com/ZoneMinder/ZoneMinder/pull/380) ([m-bene](https://github.com/m-bene)) - Ability to skip frames in motion detection. [\#377](https://github.com/ZoneMinder/ZoneMinder/pull/377) ([Sune1337](https://github.com/Sune1337)) -- same dvr controlls in event as in monitor [\#375](https://github.com/ZoneMinder/ZoneMinder/pull/375) ([m-bene](https://github.com/m-bene)) +- same dvr controls in event as in monitor [\#375](https://github.com/ZoneMinder/ZoneMinder/pull/375) ([m-bene](https://github.com/m-bene)) - do not quote column names in parse filter [\#374](https://github.com/ZoneMinder/ZoneMinder/pull/374) ([m-bene](https://github.com/m-bene)) - Fix 'Undefined index: filter' php warnings for filter view when [\#373](https://github.com/ZoneMinder/ZoneMinder/pull/373) ([m-bene](https://github.com/m-bene)) - Reduce window size to exclude task bar area [\#371](https://github.com/ZoneMinder/ZoneMinder/pull/371) ([m-bene](https://github.com/m-bene)) diff --git a/CMakeLists.txt b/CMakeLists.txt index 8b60dc38c..d219ac491 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -4,7 +4,7 @@ # cmake_minimum_required (VERSION 2.6) project (zoneminder) -set(zoneminder_VERSION "1.30.1") +set(zoneminder_VERSION "1.30.2") # make API version a minor of ZM version set(zoneminder_API_VERSION "${zoneminder_VERSION}.1") diff --git a/Dockerfile b/Dockerfile index 46b3dac5b..26df17d2b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -50,7 +50,7 @@ RUN chmod 755 /tmp/start.sh # give files in /usr/local/share/zoneminder/ RUN chown -R www-data:www-data /usr/local/share/zoneminder/ -# Creating SSH privledge escalation dir +# Creating SSH privilege escalation dir RUN mkdir /var/run/sshd # Adding apache virtual hosts file diff --git a/INSTALL b/INSTALL index 35deec3c4..bcb7f78df 100644 --- a/INSTALL +++ b/INSTALL @@ -18,7 +18,7 @@ Important differences --------------------- * Unlike the autotools way, the cmake way does not require any options. It attempts to detect some things by its own (system directories, libarch, web user and group) and uses defaults for others (installation paths and such). * Unlike the autotools way, which links the binaries to a fixed list of libraries, the cmake way only links to libraries that it found on the system. If a library is not found, but required, a fatal error will be shown during the configuration step. -* Unlike the autotools way, the cmake way does not modify the system in any way it shouldnt. It only does what its supposed to do: Install files to your system. Nothing else and nothing leaks out of the DESTDIR environment variable (if used). This means that depending on your configuration, there might be an extra required step after installation: to link WEB_PATH/events and WEB_PATH/images folders to the correct places. +* Unlike the autotools way, the cmake way does not modify the system in any way it shouldn't. It only does what its supposed to do: Install files to your system. Nothing else and nothing leaks out of the DESTDIR environment variable (if used). This means that depending on your configuration, there might be an extra required step after installation: to link WEB_PATH/events and WEB_PATH/images folders to the correct places. Configuration ------------- diff --git a/README.md b/README.md index 4aa63b1a6..fcd96bfd6 100644 --- a/README.md +++ b/README.md @@ -227,7 +227,7 @@ Now clone the ZoneMinder git repository: ```bash git clone https://github.com/ZoneMinder/ZoneMinder ``` -This will create a sub-folder called ZoneMinder, which will contain the latest developement. +This will create a sub-folder called ZoneMinder, which will contain the latest development. We want to turn this into a tarball, but first we need to figure out what to name it. Look here: ```bash diff --git a/configure.ac b/configure.ac index d77cc81c0..d17ce6e9b 100644 --- a/configure.ac +++ b/configure.ac @@ -3,7 +3,7 @@ # For instructions on building with cmake, please see INSTALL # AC_PREREQ(2.59) -AC_INIT(zm,1.30.1,[http://www.zoneminder.com/forums/ - Please check FAQ first],zoneminder,http://www.zoneminder.com/downloads.html) +AC_INIT(zm,1.30.2,[http://www.zoneminder.com/forums/ - Please check FAQ first],zoneminder,http://www.zoneminder.com/downloads.html) AM_INIT_AUTOMAKE AC_CONFIG_SRCDIR(src/zm.h) AC_CONFIG_HEADERS(config.h) diff --git a/db/zm_create.sql.in b/db/zm_create.sql.in index 950987104..0a56d37ac 100644 --- a/db/zm_create.sql.in +++ b/db/zm_create.sql.in @@ -227,6 +227,7 @@ CREATE TABLE `Filters` ( `AutoExecuteCmd` tinytext, `AutoDelete` tinyint(3) unsigned NOT NULL default '0', `Background` tinyint(1) unsigned NOT NULL default '0', + `Concurrent` tinyint(1) unsigned NOT NULL default '0', PRIMARY KEY (`Name`) ) ENGINE=@ZM_MYSQL_ENGINE@; @@ -608,8 +609,6 @@ INSERT INTO `Controls` VALUES (NULL,'Wanscam HW0025','Libvlc','WanscamHW0025', 1 INSERT INTO `Controls` VALUES (NULL,'IPCC 7210W','Libvlc','IPCC7210W', 1, 1, 1, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 16, 1, 1, 1, 1, 0, 1, 1, 0, 1, 0, 350, 0, 0, 1, 0, 10, 0, 0, 1, 0, 0, 0, 0, 1, 0, 10, 0, 0, 0, 0); INSERT INTO `Controls` VALUES (NULL,'Vivotek ePTZ','Remote','Vivotek_ePTZ',0,0,1,1,0,0,0,1,0,0,0,0,1,0,5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,1,1,0,0,0,0,1,0,5,0,0,1,0,0,0,0,1,0,5,0,0,0,0); - - -- -- Add some monitor preset values -- diff --git a/db/zm_update-1.30.2.sql b/db/zm_update-1.30.2.sql new file mode 100644 index 000000000..7f5e6c0a8 --- /dev/null +++ b/db/zm_update-1.30.2.sql @@ -0,0 +1,21 @@ +-- +-- This updates a 1.30.1 database to 1.30.2 +-- + +-- +-- Update Filters table to have a Concurrent Column +-- + +SET @s = (SELECT IF( + (SELECT COUNT(*) + FROM INFORMATION_SCHEMA.COLUMNS + WHERE table_name = 'Filters' + AND table_schema = DATABASE() + AND column_name = 'Concurrent' + ) > 0, +"SELECT 'Column Concurrent already exists in Filters'", +"ALTER TABLE Filters ADD COLUMN `Concurrent` tinyint(1) unsigned NOT NULL default '0' AFTER Background" +)); + +PREPARE stmt FROM @s; +EXECUTE stmt; diff --git a/distros/fedora/CMakeLists.txt b/distros/fedora/CMakeLists.txt index f49d451f1..ba1b743ba 100644 --- a/distros/fedora/CMakeLists.txt +++ b/distros/fedora/CMakeLists.txt @@ -39,7 +39,7 @@ install(CODE "execute_process(COMMAND ln -sf ../../../../../../var/lib/zoneminde # Fedora requires cambozola as a separate package so just link to it install(CODE "execute_process(COMMAND ln -sf ../../java/cambozola.jar \"\$ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_DATAROOTDIR}/zoneminder/www/cambozola.jar\")") -# Install auxillary files required to run zoneminder on Fedora +# Install auxiliary files required to run zoneminder on Fedora install(FILES zoneminder.conf DESTINATION /etc/httpd/conf.d PERMISSIONS OWNER_WRITE OWNER_READ GROUP_READ WORLD_READ) install(FILES zoneminder.logrotate DESTINATION /etc/logrotate.d RENAME zoneminder PERMISSIONS OWNER_WRITE OWNER_READ GROUP_READ WORLD_READ) install(FILES ../../misc/zoneminder-tmpfiles.conf DESTINATION /etc/tmpfiles.d RENAME zoneminder.conf PERMISSIONS OWNER_WRITE OWNER_READ GROUP_READ WORLD_READ) diff --git a/distros/opensuse/CMakeLists.txt b/distros/opensuse/CMakeLists.txt index d468c7287..10654f26d 100644 --- a/distros/opensuse/CMakeLists.txt +++ b/distros/opensuse/CMakeLists.txt @@ -38,7 +38,7 @@ install(CODE "execute_process(COMMAND ln -sf ../../../../${zm_webdir}/temp \"\$E # Opensuse cambazola? requires cambozola as a separate package so just link to it #install(CODE "execute_process(COMMAND ln -sf ../../java/cambozola.jar \"\$ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_DATAROOTDIR}/zoneminder/www/cambozola.jar\")") -# Install auxillary files required to run zoneminder on OpenSuse +# Install auxiliary files required to run zoneminder on OpenSuse install(FILES zoneminder.conf DESTINATION /etc/apache2/conf.d PERMISSIONS OWNER_WRITE OWNER_READ GROUP_READ WORLD_READ) install(FILES zoneminder.logrotate DESTINATION /etc/logrotate.d RENAME zoneminder PERMISSIONS OWNER_WRITE OWNER_READ GROUP_READ WORLD_READ) install(FILES zoneminder.tmpfiles DESTINATION /etc/tmpfiles.d RENAME zoneminder.conf PERMISSIONS OWNER_WRITE OWNER_READ OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE) diff --git a/distros/opensuse/README.OpenSuse b/distros/opensuse/README.OpenSuse index 823ccd442..27103d960 100644 --- a/distros/opensuse/README.OpenSuse +++ b/distros/opensuse/README.OpenSuse @@ -138,7 +138,7 @@ Upgrades has select, insert, update, and delete permission. 3. You will need to upgrade the ZoneMinder database as described in the - manual. Only if the previous step was succesful, may you run zmupdate like + manual. Only if the previous step was successful, may you run zmupdate like so (as root): /opt/zoneminder/bin/zmupdate.pl diff --git a/distros/redhat/CMakeLists.txt b/distros/redhat/CMakeLists.txt index 74aa5641f..849ef1073 100644 --- a/distros/redhat/CMakeLists.txt +++ b/distros/redhat/CMakeLists.txt @@ -57,7 +57,7 @@ install(CODE "execute_process(COMMAND ln -sf ../../../../../../var/lib/zoneminde # Link to Cambozola, which is now packaged in zmrepo install(CODE "execute_process(COMMAND ln -sf ../../java/cambozola.jar \"\$ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_DATAROOTDIR}/zoneminder/www/cambozola.jar\")") -# Install auxillary files required to run zoneminder on CentOS +# Install auxiliary files required to run zoneminder on CentOS install(FILES redalert.wav DESTINATION ${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_DATAROOTDIR}/zoneminder/www/sounds PERMISSIONS OWNER_WRITE OWNER_READ OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE) if(ZM_TARGET_DISTRO STREQUAL "el7") install(FILES zoneminder.el7.conf DESTINATION /etc/httpd/conf.d RENAME zoneminder.conf PERMISSIONS OWNER_WRITE OWNER_READ GROUP_READ WORLD_READ) diff --git a/distros/ubuntu1204_cmake/changelog b/distros/ubuntu1204_cmake/changelog index 124ba61d2..74cf1d0b8 100644 --- a/distros/ubuntu1204_cmake/changelog +++ b/distros/ubuntu1204_cmake/changelog @@ -525,7 +525,7 @@ zoneminder (1.22.3-7) unstable; urgency=low zoneminder (1.22.3-6) unstable; urgency=low - * Removed a similar bash only statment from zmpkg.pl + * Removed a similar bash only statement from zmpkg.pl (closes:414882) -- Peter Howard Sat, 14 Apr 2007 11:46:56 +1000 diff --git a/distros/ubuntu1410/changelog b/distros/ubuntu1410/changelog index a4b5302e7..8b68863fd 100644 --- a/distros/ubuntu1410/changelog +++ b/distros/ubuntu1410/changelog @@ -1,3 +1,21 @@ +zoneminder (1.29.111-trusty-2016020101) trusty; urgency=medium + + * Fix video download and use of Storage Areas + + -- Isaac Connor Mon, 01 Feb 2016 13:42:06 -0500 + +zoneminder (1.29.111-trusty-2016011401) trusty; urgency=medium + + * fix timeline view for storageareas + + -- Isaac Connor Thu, 14 Jan 2016 14:03:41 -0500 + +zoneminder (1.29.111-trusty-2016010801) trusty; urgency=medium + + * Add better debug and skip when event links are not just digits. Merge multi-server stuff from master. + + -- Isaac Connor Fri, 08 Jan 2016 10:37:16 -0500 + zoneminder (1.29.111-trusty-2016010401) trusty; urgency=medium * include fix to rotate image dimensions when applying a rotation diff --git a/distros/ubuntu1504_cmake/changelog b/distros/ubuntu1504_cmake/changelog index 124ba61d2..74cf1d0b8 100644 --- a/distros/ubuntu1504_cmake/changelog +++ b/distros/ubuntu1504_cmake/changelog @@ -525,7 +525,7 @@ zoneminder (1.22.3-7) unstable; urgency=low zoneminder (1.22.3-6) unstable; urgency=low - * Removed a similar bash only statment from zmpkg.pl + * Removed a similar bash only statement from zmpkg.pl (closes:414882) -- Peter Howard Sat, 14 Apr 2007 11:46:56 +1000 diff --git a/docs/faq.rst b/docs/faq.rst index 6c0bc227c..5aa736ee8 100644 --- a/docs/faq.rst +++ b/docs/faq.rst @@ -238,7 +238,7 @@ The second approach is to use diagnostic images which are saved copies of the in There are two kinds of diagnostic images which are and are written (and continuously overwritten) to the top level monitor event directory. If an event occurs then the files are additionally copied to the event directory and renamed with the appropriate frame number as a prefix. -The first set are produced by the monitor on the image as a whole. The diag-r.jpg image is the current reference image against which all individual frames are compared and the diag-d.jpg image is the delta image highlighting the difference between the reference image and the last analysed image. In this images identicial pixels will be black and the more different a pixel is the whiter it will be. Viewing this image and determining the colour of the pixels is a good way of getting a feel for the pixel differences you might expect (often more than you think). +The first set are produced by the monitor on the image as a whole. The diag-r.jpg image is the current reference image against which all individual frames are compared and the diag-d.jpg image is the delta image highlighting the difference between the reference image and the last analysed image. In this images identical pixels will be black and the more different a pixel is the whiter it will be. Viewing this image and determining the colour of the pixels is a good way of getting a feel for the pixel differences you might expect (often more than you think). The second set of diag images are labelled as diag--.jpg where zoneid is the id of the zone in question (Smile) and the stage is where in the alarm check process the image is generated from. So if you have several zones you can expect to see multiple files. Also these files are only interested in what is happening in their zone only and will ignore anything else outside of the zone. The stages that each number represents are as follows, @@ -617,14 +617,14 @@ How can I trouble shoot the hardware and/or software? ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Here are some commands to get information about your hardware. Some commands are distribution dependent. -* ``[[lspci]] -vv`` -- Returns lots of detailed info. Check for conflicting interrupts or port assignments. You can sometimes alter interrupts/ ports in bios. Try a different pci slot to get a clue if it is HW conflict (comand provided by the pciutils package). +* ``[[lspci]] -vv`` -- Returns lots of detailed info. Check for conflicting interrupts or port assignments. You can sometimes alter interrupts/ ports in bios. Try a different pci slot to get a clue if it is HW conflict (command provided by the pciutils package). * ``[[scanpci]] -v`` -- Gives you information from your hardware EPROM * ``[[lsusb]] -vv`` -- Returns lots of detail about USB devices (camand provided by usbutils package). * ``[[dmesg]]`` -- Shows you how your hardware initialized (or didn't) on boot-up. You will get the most use of this. * ``[[v4l-info]]`` -- to see how driver is talking to card. look for unusual values. * ``[[modinfo bttv]]`` -- some bttv driver stats. * ``[[zmu]] -m 0 -q -v`` -- Returns various information regarding a monitor configuration. -* ``[[ipcs]] `` -- Provides information on the ipc facilities for which the calling process has read acccess. +* ``[[ipcs]] `` -- Provides information on the ipc facilities for which the calling process has read access. * ``[[ipcrm]] `` -- The ipcrm command can be used to remove an IPC object from the kernel. * ``cat /proc/interrupts`` -- This will dispaly what interrupts your hardware is using. diff --git a/docs/index.rst b/docs/index.rst index 46713b754..46da979cf 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -13,7 +13,7 @@ ZoneMinder Documentation Welcome to ZoneMinder's documentation, the following resources are available :doc:`installationguide/index` - Many distrubution repos only hold older versions of ZoneMinder, current versions contain many bug fixes and updated functionality. Instructions here for installing updated packages or compiling from source. + Many distribution repos only hold older versions of ZoneMinder, current versions contain many bug fixes and updated functionality. Instructions here for installing updated packages or compiling from source. :doc:`userguide/index` Guide to setting up ZoneMinder for the first time and detailed guides for using the ZoneMinder front end. diff --git a/docs/userguide/definezone.rst b/docs/userguide/definezone.rst index d3eaeb8c6..0cacd3b91 100644 --- a/docs/userguide/definezone.rst +++ b/docs/userguide/definezone.rst @@ -35,7 +35,7 @@ Type Suppresses the detection of motion within it. This can be layered on top of any other zone type, preventing motion within the Inactive zone from being effective for any other zone type. Use inactive zones to cover areas in which nothing notable will ever happen or where you get false alarms that don't relate to what you are trying to monitor. Inactive zones may be overlaid on other zones to blank out areas, and are processed first (with the exception of Privacy zones, see below). As a general practice, you should try and make zones abut each other instead of overlapping to avoid repeated duplicate processing of the same area. * Privacy - Blackens the pixels within it. This can be used if you want to hide some regions in the image if the situation does not allow an other solution. This zone type is different to all the others in that it gets processed as soon as possible during capture (even before the timestamp gets into the image) and not in the analyzing process. So if you add, change or delete a Privacy zone, you don't see the changes in the image until the capture process gets restarted. This will be done automatically, but needs a few seconds. + Blackens the pixels within it. This can be used if you want to hide some regions in the image if the situation does not allow another solution. This zone type is different to all the others in that it gets processed as soon as possible during capture (even before the timestamp gets into the image) and not in the analyzing process. So if you add, change or delete a Privacy zone, you don't see the changes in the image until the capture process gets restarted. This will be done automatically, but needs a few seconds. Preset The preset chooser sets sensible default values based on computational needs (fast v. best) and sensitivity (low, medium, high.) It is not required that you select a preset, and you can alter any of the parameters after choosing a preset. For a small number of monitors with ZoneMinder running on modern equipment, Best, high sensitivity can be chosen as a good starting point. diff --git a/docs/userguide/filterevents.rst b/docs/userguide/filterevents.rst index 4d7a50fd5..bc0dcffe2 100644 --- a/docs/userguide/filterevents.rst +++ b/docs/userguide/filterevents.rst @@ -90,7 +90,7 @@ Saving filters .. image:: images/filter-save.png :width: 400px -When saving filters, if you want the filter to run in the background make sure you select the "Run filter in background" option. When checked, ZoneMinder will make sure the filter is checked regularly. For example, if you want to be notified of new events by email, you sould make sure this is checked. Filters that are configured to run in the background have a "*" next to it. +When saving filters, if you want the filter to run in the background make sure you select the "Run filter in background" option. When checked, ZoneMinder will make sure the filter is checked regularly. For example, if you want to be notified of new events by email, you should make sure this is checked. Filters that are configured to run in the background have a "*" next to it. For example: diff --git a/docs/userguide/gettingstarted.rst b/docs/userguide/gettingstarted.rst index 2bc3dcd7f..f9181a95f 100644 --- a/docs/userguide/gettingstarted.rst +++ b/docs/userguide/gettingstarted.rst @@ -65,7 +65,7 @@ own empty screen. * **B**: Click here to explore the various options of ZoneMinder and how to configure them. You already used this to enable authentication and change style above. Over time, you will find this to have many other things you will want to customize. * **C**: This link, when clicked, opens up a color coded log window of what is going on in Zoneminder and often gives you good insight into what is going wrong or right. Note that the color here is red - that is an indication that some error occurred in ZoneMinder. You should click it and investigate. * **D**: This is the core of ZoneMinder - recording events. It gives you a count of how many events were recorded over the hour, day, week, month. -* **E**: These are the "Zones". Zones are areas within the camera that you mark as 'hotspots' for motion detection. Simply put, when you first configure your monitors (cameras), by default Zoneminder uses the entire field of view of the camera to detect motion. You may not want this. You may want to create "zones" specifically for detecting motion and ignore others. For example, lets consider a room with a fan that spins. You surely don't want to consider the fan moving continously a reason for triggering a record? Probably not - in that case, you'd leave the fan out while making your zones. +* **E**: These are the "Zones". Zones are areas within the camera that you mark as 'hotspots' for motion detection. Simply put, when you first configure your monitors (cameras), by default Zoneminder uses the entire field of view of the camera to detect motion. You may not want this. You may want to create "zones" specifically for detecting motion and ignore others. For example, lets consider a room with a fan that spins. You surely don't want to consider the fan moving continuously a reason for triggering a record? Probably not - in that case, you'd leave the fan out while making your zones. * **F**: This is the "source" column that tells you the type of the camera - if its an IP camera, a USB camera or more. In this example, they are all IP cameras. Note the color red on item F ? Well that means there is something wrong with that camera. No wonder the log also shows red. Good indication for you to tap on logs and investigate * **G**: This defines how Zoneminder will record events. There are various modes. In brief Modect == record if a motion is detected,Record = always record 24x7, Mocord = always record PLUS detect motion, Monitor = just provide a live view but don't record anytime, Modect = Don't record till an externa entity via zmtrigger tells Zoneminder to (this is advanced usage). * **H**: If you click on these links you can view a "Montage" of all your configured monitors or cycle through each one diff --git a/docs/userguide/options/options_config.rst b/docs/userguide/options/options_config.rst index 7918361ba..0f419e2ab 100644 --- a/docs/userguide/options/options_config.rst +++ b/docs/userguide/options/options_config.rst @@ -25,9 +25,9 @@ FORCED_ALARM_SCORE - The 'zmu' utility can be used to force an alarm on a monito BULK_FRAME_INTERVAL - Traditionally ZoneMinder writes an entry into the Frames database table for each frame that is captured and saved. This works well in motion detection scenarios but when in a DVR situation ('Record' or 'Mocord' mode) this results in a huge number of frame writes and a lot of database and disk bandwidth for very little additional information. Setting this to a non-zero value will enabled ZoneMinder to group these non-alarm frames into one 'bulk' frame entry which saves a lot of bandwidth and space. The only disadvantage of this is that timing information for individual frames is lost but in constant frame rate situations this is usually not significant. This setting is ignored in Modect mode and individual frames are still written if an alarm occurs in Mocord mode also. -EVENT_CLOSE_MODE - When a monitor is running in a continuous recording mode (Record or Mocord) events are usually closed after a fixed period of time (the section length). However in Mocord mode it is possible that motion detection may occur near the end of a section. This option controls what happens when an alarm occurs in Mocord mode. The 'time' setting means that the event will be closed at the end of the section regardless of alarm activity. The 'idle' setting means that the event will be closed at the end of the section if there is no alarm activity occuring at the time otherwise it will be closed once the alarm is over meaning the event may end up being longer than the normal section length. The 'alarm' setting means that if an alarm occurs during the event, the event will be closed once the alarm is over regardless of when this occurs. This has the effect of limiting the number of alarms to one per event and the events will be shorter than the section length if an alarm has occurred. +EVENT_CLOSE_MODE - When a monitor is running in a continuous recording mode (Record or Mocord) events are usually closed after a fixed period of time (the section length). However in Mocord mode it is possible that motion detection may occur near the end of a section. This option controls what happens when an alarm occurs in Mocord mode. The 'time' setting means that the event will be closed at the end of the section regardless of alarm activity. The 'idle' setting means that the event will be closed at the end of the section if there is no alarm activity occurring at the time otherwise it will be closed once the alarm is over meaning the event may end up being longer than the normal section length. The 'alarm' setting means that if an alarm occurs during the event, the event will be closed once the alarm is over regardless of when this occurs. This has the effect of limiting the number of alarms to one per event and the events will be shorter than the section length if an alarm has occurred. -CREATE_ANALYSIS_IMAGES - By default during an alarm ZoneMinder records both the raw captured image and one that has been analysed and had areas where motion was detected outlined. This can be very useful during zone configuration or in analysing why events occured. However it also incurs some overhead and in a stable system may no longer be necessary. This parameter allows you to switch the generation of these images off. +CREATE_ANALYSIS_IMAGES - By default during an alarm ZoneMinder records both the raw captured image and one that has been analysed and had areas where motion was detected outlined. This can be very useful during zone configuration or in analysing why events occurred. However it also incurs some overhead and in a stable system may no longer be necessary. This parameter allows you to switch the generation of these images off. WEIGHTED_ALARM_CENTRES - ZoneMinder will always calculate the centre point of an alarm in a zone to give some indication of where on the screen it is. This can be used by the experimental motion tracking feature or your own custom extensions. In the alarmed or filtered pixels mode this is a simple midpoint between the extents of the detected pxiesl. However in the blob method this can instead be calculated using weighted pixel locations to give more accurate positioning for irregularly shaped blobs. This method, while more precise is also slower and so is turned off by default. diff --git a/docs/userguide/options/options_servers.rst b/docs/userguide/options/options_servers.rst index 4736c305a..83e146871 100644 --- a/docs/userguide/options/options_servers.rst +++ b/docs/userguide/options/options_servers.rst @@ -1,5 +1,5 @@ Options - Servers ---------------- +----------------- .. image:: images/Options_Servers.png diff --git a/docs/userguide/options/options_system.rst b/docs/userguide/options/options_system.rst index 83aa28bec..7df3d259a 100644 --- a/docs/userguide/options/options_system.rst +++ b/docs/userguide/options/options_system.rst @@ -25,9 +25,9 @@ FILTER_EXECUTE_INTERVAL - ZoneMinder allows you to save filters to the database MAX_RESTART_DELAY - The zmdc (zm daemon control) process controls when processeses are started or stopped and will attempt to restart any that fail. If a daemon fails frequently then a delay is introduced between each restart attempt. If the daemon stills fails then this delay is increased to prevent extra load being placed on the system by continual restarts. This option controls what this maximum delay is. -WATCH_CHECK_INTERVAL - The zmwatch daemon checks the image capture performance of the capture daemons to ensure that they have not locked up (rarely a sync error may occur which blocks indefinately). This option determines how often the daemons are checked. +WATCH_CHECK_INTERVAL - The zmwatch daemon checks the image capture performance of the capture daemons to ensure that they have not locked up (rarely a sync error may occur which blocks indefinitely). This option determines how often the daemons are checked. -WATCH_MAX_DELAY - The zmwatch daemon checks the image capture performance of the capture daemons to ensure that they have not locked up (rarely a sync error may occur which blocks indefinately). This option determines the maximum delay to allow since the last captured frame. The daemon will be restarted if it has not captured any images after this period though the actual restart may take slightly longer in conjunction with the check interval value above. +WATCH_MAX_DELAY - The zmwatch daemon checks the image capture performance of the capture daemons to ensure that they have not locked up (rarely a sync error may occur which blocks indefinitely). This option determines the maximum delay to allow since the last captured frame. The daemon will be restarted if it has not captured any images after this period though the actual restart may take slightly longer in conjunction with the check interval value above. RUN_AUDIT - The zmaudit daemon exists to check that the saved information in the database and on the filesystem match and are consistent with each other. If an error occurs or if you are using 'fast deletes' it may be that database records are deleted but files remain. In this case, and similar, zmaudit will remove redundant information to synchronise the two data stores. This option controls whether zmaudit is run in the background and performs these checks and fixes continuously. This is recommended for most systems however if you have a very large number of events the process of scanning the database and filesystem may take a long time and impact performance. In this case you may prefer to not have zmaudit running unconditionally and schedule occasional checks at other, more convenient, times. diff --git a/docs/userguide/options/options_upload.rst b/docs/userguide/options/options_upload.rst index 16e3f5588..da4baa076 100644 --- a/docs/userguide/options/options_upload.rst +++ b/docs/userguide/options/options_upload.rst @@ -19,7 +19,7 @@ UPLOAD_PORT - You can use filters to instruct ZoneMinder to upload events to a r UPLOAD_USER - You can use filters to instruct ZoneMinder to upload events to a remote server. This option indicates the username that ZoneMinder should use to log in for transfer. -UPLOAD_PASS - You can use filters to instruct ZoneMinder to upload events to a remote server. This option indicates the password that ZoneMinder should use to log in for transfer. If you are using certicate based logins for SFTP servers you can leave this option blank. +UPLOAD_PASS - You can use filters to instruct ZoneMinder to upload events to a remote server. This option indicates the password that ZoneMinder should use to log in for transfer. If you are using certificate based logins for SFTP servers you can leave this option blank. UPLOAD_LOC_DIR - You can use filters to instruct ZoneMinder to upload events to a remote server. This option indicates the local directory that ZoneMinder should use for temporary upload files. These are files that are created from events, uploaded and then deleted. diff --git a/docs/userguide/options/options_x10.rst b/docs/userguide/options/options_x10.rst index dc41d8dd6..0662ebe7e 100644 --- a/docs/userguide/options/options_x10.rst +++ b/docs/userguide/options/options_x10.rst @@ -5,7 +5,7 @@ Options - X10 OPT_X10 - If you have an X10 Home Automation setup in your home you can use ZoneMinder to initiate or react to X10 signals if your computer has the appropriate interface controller. This option indicates whether X10 options will be available in the browser client. -X10_DEVICE - If you have an X10 controller device (e.g. XM10U) connected to your computer this option details which port it is conected on, the default of /dev/ttyS0 maps to serial or com port 1. +X10_DEVICE - If you have an X10 controller device (e.g. XM10U) connected to your computer this option details which port it is connected on, the default of /dev/ttyS0 maps to serial or com port 1. X10_HOUSE_CODE - X10 devices are grouped together by identifying them as all belonging to one House Code. This option details what that is. It should be a single letter between A and P. diff --git a/docs/userguide/viewevents.rst b/docs/userguide/viewevents.rst index 83fa3df76..70eea0032 100644 --- a/docs/userguide/viewevents.rst +++ b/docs/userguide/viewevents.rst @@ -20,7 +20,7 @@ Here is an example of viewing an event stream: * **A**: Administrative Event options on the event including viewing individual frames * **B**: The actual image stream * **C**: Navigation control -* **D**: You can switch between watching a single event or Continous mode (where it advances to the next event after playback is complete) +* **D**: You can switch between watching a single event or Continuous mode (where it advances to the next event after playback is complete) * **E**: Event progress bar - how much of the current event has been played back You will notice for the first time that alarm images now contain an overlay outlining the blobs that represent the alarmed area. This outline is in the colour defined for that zone and lets you see what it was that caused the alarm. Clicking on one of the thumbnails will take you to a full size window where you can see the image in all its detail and scroll through the various images that make up the event. If you have the ZM_RECORD_EVENT_STATS option on, you will be able to click the 'Stats' link here and get some analysis of the cause of the event. diff --git a/scripts/ZoneMinder/lib/ZoneMinder/ConfigData.pm.in b/scripts/ZoneMinder/lib/ZoneMinder/ConfigData.pm.in index 198ff2194..703d47c30 100644 --- a/scripts/ZoneMinder/lib/ZoneMinder/ConfigData.pm.in +++ b/scripts/ZoneMinder/lib/ZoneMinder/ConfigData.pm.in @@ -1985,7 +1985,7 @@ our @options = You can use filters to instruct ZoneMinder to upload events to a remote server. This option indicates the password that ZoneMinder should use to log in for transfer. If you are using - certicate based logins for SFTP servers you can leave this + certificate based logins for SFTP servers you can leave this option blank. "), requires => [ { name => "ZM_OPT_UPLOAD", value => "yes" } ], diff --git a/scripts/ZoneMinder/lib/ZoneMinder/Control/FI9831W.pm b/scripts/ZoneMinder/lib/ZoneMinder/Control/FI9831W.pm index 4a7bab230..739ff1175 100644 --- a/scripts/ZoneMinder/lib/ZoneMinder/Control/FI9831W.pm +++ b/scripts/ZoneMinder/lib/ZoneMinder/Control/FI9831W.pm @@ -155,7 +155,7 @@ sub reset #my $cmd = "setOSDSetting%26isEnableTimeStamp%3D0%26isEnableDevName%3D1%26dispPos%3D0%26isEnabledOSDMask%3D0"; Info ("Sending reboot $cmd"); $self->sendCmd( $cmd ); - # Setup For Stream=0 Resolution=720p Bandwith=4M FPS=30 KeyFrameInterval/GOP=100 VBR=ON + # Setup For Stream=0 Resolution=720p Bandwidth=4M FPS=30 KeyFrameInterval/GOP=100 VBR=ON #$cmd = "setVideoStreamParam%26streamType%3D0%26resolution%3D0%26bitRate%3D4194304%26frameRate%3D30%26GOP%3D100%26isVBR%3D1"; #$self->sendCmd( $cmd ); # Setup For Infrared AUTO diff --git a/scripts/zmcamtool.pl.in b/scripts/zmcamtool.pl.in index eaa32edef..8d6a6321c 100644 --- a/scripts/zmcamtool.pl.in +++ b/scripts/zmcamtool.pl.in @@ -419,9 +419,9 @@ sub toPreset foreach (@data) { s/\b(?:\d{1,3}\.){3}\d{1,3}\b//; # ip address s/:(6553[0-5]|655[0-2]\d|65[0-4]\d\d|6[0-4]\d{3}|[1-5]\d{4}|[1-9]\d{0,3}|0)$/:/; # tcpip port - s/\/\/.*:.*@/\/\/:@/; # user & pwd preceeding an ip address - s/(&|\?)(user|username)=\w\w*(&|\?)/$1$2=$3/i; # username embeded in url - s/(&|\?)(pwd|password)=\w\w*(&|\?)/$1$2=$3/i; # password embeded in url + s/\/\/.*:.*@/\/\/:@/; # user & pwd preceding an ip address + s/(&|\?)(user|username)=\w\w*(&|\?)/$1$2=$3/i; # username embedded in url + s/(&|\?)(pwd|password)=\w\w*(&|\?)/$1$2=$3/i; # password embedded in url s/\w\w*:\w\w*/:/; # user & pwd in their own field s/\/dev\/video\d\d*/\/dev\/video/; # local video devices } diff --git a/scripts/zmfilter.pl.in b/scripts/zmfilter.pl.in index 8dcd5dc72..f3a8a8c83 100755 --- a/scripts/zmfilter.pl.in +++ b/scripts/zmfilter.pl.in @@ -27,7 +27,7 @@ zmfilter.pl - ZoneMinder tool to filter events =head1 SYNOPSIS - zmfilter.pl [-f ,--filter=] | -v, --version + zmfilter.pl [-f ,--filter=] [--filter_id=] | -v, --version =head1 DESCRIPTION @@ -37,7 +37,9 @@ matching events. =head1 OPTIONS + -f{filter name}, --filter={filter name} - The name of a specific filter to run + --filter_id={filter id} - The id of a specific filter to run -v, --version - Print ZoneMinder version =cut @@ -60,8 +62,6 @@ use constant START_DELAY => 5; # How long to wait before starting @EXTRA_PERL_LIB@ use ZoneMinder; -require ZoneMinder::Event; -require ZoneMinder::Filter; use DBI; use POSIX; use Time::HiRes qw/gettimeofday/; @@ -70,6 +70,24 @@ use Getopt::Long; use autouse 'Pod::Usage'=>qw(pod2usage); use autouse 'Data::Dumper'=>qw(Dumper); +my $filter_name = ""; +my $filter_id; +my $version = 0; + +GetOptions( + 'filter=s' =>\$filter_name, + 'filter_id=s' =>\$filter_id, + 'version' =>\$version +) or pod2usage(-exitstatus => -1); + +if ( $version ) { + print ZoneMinder::Base::ZM_VERSION . "\n"; + exit(0); +} + +require ZoneMinder::Event; +require ZoneMinder::Filter; + use constant EVENT_PATH => ($Config{ZM_DIR_EVENTS}=~m|/|) ? $Config{ZM_DIR_EVENTS} : ($Config{ZM_PATH_WEB}.'/'.$Config{ZM_DIR_EVENTS}) @@ -135,20 +153,6 @@ delete @ENV{qw(IFS CDPATH ENV BASH_ENV)}; my $delay = $Config{ZM_FILTER_EXECUTE_INTERVAL}; my $event_id = 0; -my $filter_parm = ""; -my $version = 0; - -# - -GetOptions( - 'filter=s' =>\$filter_parm, - 'version' =>\$version -) or pod2usage(-exitstatus => -1); - -if ( $version ) { - print ZoneMinder::Base::ZM_VERSION . "\n"; - exit(0); -} if ( ! EVENT_PATH ) { Error( "No event path defined. Config was $Config{ZM_DIR_EVENTS}\n" ); @@ -159,39 +163,42 @@ chdir( EVENT_PATH ); my $dbh = zmDbConnect(); -if ( $filter_parm ) -{ - Info( "Scanning for events using filter '$filter_parm'\n" ); -} -else -{ +if ( $filter_name ) { + Info( "Scanning for events using filter '$filter_name'\n" ); +} elsif ( $filter_id ) { + Info( "Scanning for events using filter id '$filter_id'\n" ); +} else { Info( "Scanning for events\n" ); } -if ( !$filter_parm ) -{ +if ( ! ( $filter_name or $filter_id ) ) { sleep( START_DELAY ); } my $filters; my $last_action = 0; -while( 1 ) -{ +while( 1 ) { my $now = time; - if ( ($now - $last_action) > $Config{ZM_FILTER_RELOAD_DELAY} ) - { + if ( ($now - $last_action) > $Config{ZM_FILTER_RELOAD_DELAY} ) { Debug( "Reloading filters\n" ); $last_action = $now; - $filters = getFilters( $filter_parm ); + $filters = getFilters( { Name=>$filter_name, Id=>$filter_id } ); } - foreach my $filter ( @$filters ) - { - checkFilter( $filter ); + foreach my $filter ( @$filters ) { + if ( $$filter{Concurrent} and ! ( $filter_id or $filter_name ) ) { + my ( $proc ) = $0 =~ /(\S+)/; + my ( $id ) = $$filter{Id} =~ /(\d+)/; + Debug("Running concurrent filter process $proc --filter_id $$filter{Id} => $id for $$filter{Name}"); + + system( qq`$proc --filter "$$filter{Name}" &` ); + } else { + checkFilter( $filter ); + } } - last if ( $filter_parm ); + last if ( $filter_name or $filter_id ); Debug( "Sleeping for $delay seconds\n" ); sleep( $delay ); @@ -199,16 +206,18 @@ while( 1 ) sub getFilters { - my $filter_name = shift; + my $sql_filters = @_ ? shift : {}; + my @sql_values; my @filters; my $sql = "SELECT * FROM Filters WHERE"; - if ( $filter_name ) - { + if ( $$sql_filters{Name} ) { $sql .= " Name = ? and"; - } - else - { + push @sql_values, $$sql_filters{Name}; + } elsif ( $$sql_filters{Id} ) { + $sql .= " Id = ? and"; + push @sql_values, $$sql_filters{Id}; + } else { $sql .= " Background = 1 and"; } $sql .= "( AutoArchive = 1 @@ -221,17 +230,8 @@ sub getFilters ) ORDER BY Name"; my $sth = $dbh->prepare_cached( $sql ) or Fatal( "Can't prepare '$sql': ".$dbh->errstr() ); - my $res; - if ( $filter_name ) - { - $res = $sth->execute( $filter_name ) - or Fatal( "Can't execute '$sql': ".$sth->errstr() ); - } - else - { - $res = $sth->execute() - or Fatal( "Can't execute '$sql': ".$sth->errstr() ); - } + my $res = $sth->execute( @sql_values ) + or Fatal( "Can't execute '$sql': ".$sth->errstr() ); FILTER: while( my $db_filter = $sth->fetchrow_hashref() ) { my $filter = new ZoneMinder::Filter( $$db_filter{Id}, $db_filter ); @@ -245,7 +245,12 @@ sub getFilters push( @filters, $filter ); } $sth->finish(); - Debug( "Got " . @filters . " filters" ); + if ( ! @filters ) { + Error("No filter found for $sql with values(@sql_values)"); + } else { + Debug( "Got " . @filters . " filters" ); + } + return( \@filters ); } diff --git a/src/zm_remote_camera_http.cpp b/src/zm_remote_camera_http.cpp index 440c24e05..006f80faf 100644 --- a/src/zm_remote_camera_http.cpp +++ b/src/zm_remote_camera_http.cpp @@ -199,7 +199,7 @@ int RemoteCameraHttp::ReadData( Buffer &buffer, int bytes_expected ) return( -1 ); } - // There can be lots of bytes available. I've seen 4MB or more. This will vastly inflate our buffer size unneccessarily. + // There can be lots of bytes available. I've seen 4MB or more. This will vastly inflate our buffer size unnecessarily. if ( total_bytes_to_read > ZM_NETWORK_BUFSIZ ) { total_bytes_to_read = ZM_NETWORK_BUFSIZ; Debug(3, "Just getting 32K" ); diff --git a/src/zmf.cpp b/src/zmf.cpp index 6873488ad..52fa06cf1 100644 --- a/src/zmf.cpp +++ b/src/zmf.cpp @@ -275,7 +275,7 @@ int main( int argc, char *argv[] ) Debug( 1, "Read frame header, expecting %ld bytes of image", frame_header.image_length ); static unsigned char image_data[ZM_MAX_IMAGE_SIZE]; - // Read for pipe and loop until bytes expected have been read or an error occures + // Read for pipe and loop until bytes expected have been read or an error occurs int bytes_read = 0; do { diff --git a/version b/version index 7f3c3affd..d1eaa3ba0 100644 --- a/version +++ b/version @@ -1 +1 @@ -1.30.1 +1.30.2 diff --git a/web/includes/Storage.php b/web/includes/Storage.php index 7928fe041..1820b977d 100644 --- a/web/includes/Storage.php +++ b/web/includes/Storage.php @@ -36,5 +36,14 @@ class Storage { #call_user_func_array( $this->{$fn}, $args); } } + public static function find_all() { + $storage_areas = array(); + $result = dbQuery( 'SELECT * FROM Storage ORDER BY Name'); + $results = $result->fetchALL(PDO::FETCH_CLASS | PDO::FETCH_PROPS_LATE, 'Storage' ); + foreach ( $results as $row => $obj ) { + $storage_areas[] = $obj; + } + return $storage_areas; + } } ?> diff --git a/web/includes/actions.php b/web/includes/actions.php index bd07da509..75d8b95fd 100644 --- a/web/includes/actions.php +++ b/web/includes/actions.php @@ -181,6 +181,8 @@ if ( !empty($action) ) $sql .= ", AutoDelete = ".dbEscape($_REQUEST['autoDelete']); if ( !empty($_REQUEST['background']) ) $sql .= ", Background = ".dbEscape($_REQUEST['background']); + if ( !empty($_REQUEST['concurrent']) ) + $sql .= ", Concurrent = ".dbEscape($_REQUEST['concurrent']); dbQuery( $sql ); $refreshParent = true; } diff --git a/web/lang/en_gb.php b/web/lang/en_gb.php index d7d106e1e..705505002 100644 --- a/web/lang/en_gb.php +++ b/web/lang/en_gb.php @@ -233,6 +233,7 @@ $SLANG = array( 'Close' => 'Close', 'Colour' => 'Colour', 'Command' => 'Command', + 'ConcurrentFilter' => 'Run filter concurrently', 'Config' => 'Config', 'ConfiguredFor' => 'Configured for', 'ConfirmDeleteEvents' => 'Are you sure you wish to delete the selected events?', diff --git a/web/skins/classic/views/console.php b/web/skins/classic/views/console.php index ed3ee8f61..53479787f 100644 --- a/web/skins/classic/views/console.php +++ b/web/skins/classic/views/console.php @@ -20,6 +20,9 @@ require_once('includes/Server.php'); $servers = Server::find_all(); +require_once('includes/Storage.php'); +$storage_areas = Storage::find_all(); +$show_storage_areas = count($storage_areas) > 1 and canEdit( 'System' ) ? 1 : 0; $eventCounts = array( array( @@ -212,7 +215,11 @@ if ( canView( 'Stream' ) && $cycleCount > 1 ) { $cycleGroup = isset($_COOKIE['zmGroup'])?$_COOKIE['zmGroup']:0; ?> -
 / 
+
+  /  +  /  + +
+ + + - + @@ -336,6 +350,12 @@ echo $Server->Name();   + + Name(); +?> + checked="checked"/>

+

+ checked="checked"/> +

disabled="disabled"/>
diff --git a/web/skins/classic/views/montagereview.php b/web/skins/classic/views/montagereview.php new file mode 100644 index 000000000..b9b5765fc --- /dev/null +++ b/web/skins/classic/views/montagereview.php @@ -0,0 +1,1235 @@ +0 "; + +// This program only calls itself with the time range involved -- it does all monitors (the user can see, in the called group) all the time + +if ( !empty($user['MonitorIds']) ) +{ + $monFilterSql = ' AND M.Id IN ('.$user['MonitorIds'].')'; + + $eventsSql .= $monFilterSql; + $monitorsSQL .= $monFilterSql; + $frameSql .= $monFilterSql; +} + +// Parse input parameters -- note for future, validate/clean up better in case we don't get called from self. +// Live overrides all the min/max stuff but it is still processed + +// The default (nothing at all specified) is for 1 hour so we do not read the whole database + + +if ( !isset($_REQUEST['minTime']) && !isset($_REQUEST['maxTime']) ) +{ + $maxTime=strftime("%c",time()); + $minTime=strftime("%c",time() - 3600); +} +if ( isset($_REQUEST['minTime']) ) + $minTime = validHtmlStr($_REQUEST['minTime']); + +if ( isset($_REQUEST['maxTime']) ) + $maxTime = validHtmlStr($_REQUEST['maxTime']); + +// AS a special case a "all" is passed in as an exterme interval - if so , clear them here and let the database query find them + +if ( (strtotime($maxTime) - strtotime($minTime))/(365*24*3600) > 30 ) // test years +{ + $minTime=null; + $maxTime=null; +} + +$fitMode=1; +if (isset($_REQUEST['fit']) && $_REQUEST['fit']=='0' ) + $fitMode=0; + +if ( isset($_REQUEST['scale']) ) + $defaultScale=validHtmlStr($_REQUEST['scale']); +else + $defaultScale=1; + +$speeds=[0, 0.1, 0.25, 0.5, 0.75, 1.0, 1.5, 2, 3, 5, 10, 20, 50]; + +if (isset($_REQUEST['speed']) ) + $defaultSpeed=validHtmlStr($_REQUEST['speed']); +else + $defaultSpeed=1; + +$speedIndex=5; // default to 1x +for ($i=0; $i + + +
+ +
+ + step=0.10 width=20% onchange='setScale(this.value)' oninput='showScale(this.value)'/> + x +
+
+ + value= step=1 wdth=20% onchange='setSpeed(this.value)' oninput='showSpeed(this.value)'/> + fps +
+
+ + + + + + + + + +
+
+ + + + +
+\n"; +foreach ($monitors as $m) +{ + { + echo "No Canvas Support!!\n"; + } +} +echo "
\n"; +echo "

evaluating fps

\n"; +echo " + + + +