Commit Graph

2463 Commits

Author SHA1 Message Date
Isaac Connor aff081ad41 Must commit after COpyTo to release locks 2019-07-24 11:23:13 -04:00
Isaac Connor afa02e436d Upgrade Storage perl object to use parent Object::find 2019-07-24 10:53:56 -04:00
Isaac Connor 99f78c50af Add Updating SecondaryStorageId when using CopyTo 2019-07-24 09:37:38 -04:00
Isaac Connor 98922b6788 Add SecondaryStorageId to Event so that we can update it 2019-07-24 09:37:16 -04:00
Isaac Connor bb653b172c Use hires time to give better bandwidth reporitng 2019-07-23 14:34:26 -04:00
Isaac Connor d4eae18055 Merge branch 'master' into filter_add_copy 2019-07-23 13:06:17 -04:00
Isaac Connor 49621bf652 Only parse Sql if there is a Query in the filter 2019-07-23 12:58:03 -04:00
Isaac Connor fd95ab23e9 Add AutoCopy support 2019-07-23 09:55:27 -04:00
Isaac Connor f9b5c8a1f4 If query is empty don't bother parsing it 2019-07-23 09:55:14 -04:00
Isaac Connor e821553265 Split MoveTo into CopyTo and MoveTo. 2019-07-23 09:54:39 -04:00
Isaac Connor 52e7cde66d If Email has EIMOD, not only attach the image if it exists, but replace %EIMOD% with the link to it 2019-07-11 19:04:51 -04:00
Isaac Connor 44e4d93445 Merge branch 'master' into storageareas 2019-06-24 11:35:36 -04:00
Isaac Connor ad1df8f80a log the response if command fails, and add missing uthentication sections 2019-06-21 11:40:46 -04:00
Isaac Connor 36995de96f Alter option help for EVENT_CLOSE_MODE to reflect that alarm will end the continuous event and start a new one 2019-06-20 15:11:49 -04:00
Isaac Connor db7362dbcb Merge branch 'master' into storageareas 2019-06-20 14:18:47 -04:00
Isaac Connor 3bae7a5432 spaces and parenthesis 2019-06-20 13:28:12 -04:00
Isaac Connor b068428bbc zmcontrol complains about unfinished statement handles. This is because we aren't finishing them in functions in Database.pm 2019-06-20 13:27:42 -04:00
Isaac Connor 9a33e55efc Bump log level to warning if we are restarting any daemons. Daemons should NOT need to be restarted in a healthy system. 2019-06-13 11:53:26 -04:00
Isaac Connor 1928d1153f spacing and quotes 2019-06-11 13:32:15 -04:00
Isaac Connor 2e624522c7
fixes #2294 (#2637) 2019-06-10 09:43:56 -04:00
Isaac Connor 983da41c7a Reduce log level for filter execution from Info to Debug 2019-06-03 09:46:28 -04:00
Isaac Connor 3be0b774bd better error logging 2019-05-23 16:26:21 -04:00
Isaac Connor 4466ef13fd Merge branch 'pliablepixels-crypt-replacement3' into storageareas 2019-05-23 15:21:58 -04:00
Isaac Connor 2bf022d69c Merge branch 'crypt-replacement' of https://github.com/pliablepixels/ZoneMinder into pliablepixels-crypt-replacement3 2019-05-23 14:26:05 -04:00
Isaac Connor bdbbab0d3e Handle no results from get_ProbeMatch() 2019-05-21 17:15:08 -04:00
Isaac Connor 93aeceecfc Merge branch 'crypt-replacement' of https://github.com/pliablepixels/ZoneMinder into pliablepixels-crypt-replacement 2019-05-17 10:18:15 -04:00
Isaac Connor 3888d140a8 Merge branch 'master' into storageareas 2019-05-17 10:16:29 -04:00
Pliable Pixels 915e9f05a9 merged fifo changes 2019-05-16 16:14:06 -04:00
Mitch Capper eb005e8b9c FIFO support for zoneminder zone debugging (#2594)
Adds fifo options for diagnostic images for much lower impact diagnostics mode.  Diagnostic images are only written when there is a client listening for them (otherwise they are skipped).  Also added a json stream for the detection data so you can see in real time the pixels or blobs detected for the motion.  This allows for easy real time stream of both delta and reference images (as video streams) along with the detection numbers.
2019-05-16 15:37:03 -04:00
Pliable Pixels 0e72080c4a Migrate from libdigest to crypt-eks-blowfish due to notice 2019-05-16 09:37:11 -04:00
Pliable Pixels e9f843f297 bulk overlay hash mysql encoded passwords 2019-05-13 14:29:24 -04:00
Pliable Pixels 87e407aa90 forgot to checkin update file 2019-05-13 10:31:09 -04:00
Jonathan Meredith 74d9f4f1aa Spelling and grammar fixes in help (#2603)
* Edit Help array to make it match others below. This should not affect the results

* Misc. grammer and spelling fixes along with removing some duplicated words.  This should not affect compilation.

* More grammer and spelling errors

* Replace Javascript with ZoneMinder because it did not make sense there.

* More spelling and grammar edits
2019-05-13 07:58:18 -04:00
Isaac Connor 74095963cc Merge branch 'master' into storageareas 2019-05-12 19:39:09 -04:00
Pliable Pixels 881d531fe9 make old API auth optional, on by default 2019-05-12 18:19:19 -04:00
Pliable Pixels c1891e35b9 moved API enable back to system 2019-05-12 12:15:08 -04:00
Pliable Pixels e6b7af4583 initial baby step for api tab 2019-05-10 15:11:35 -04:00
Isaac Connor d9f7e93df3 Fix typo gegress to degrees. Fixes #2601 2019-05-10 14:27:51 -04:00
Isaac Connor 1498027f12 Add option to attach the objdetect image in emails 2019-05-08 22:45:04 -04:00
Isaac Connor f0e5a435cf spacing and quotes, but the main change is using aud_print instead of Info 2019-05-06 10:04:53 -04:00
Isaac Connor 25614bb75e Merge branch 'master' into storageareas 2019-05-01 08:57:20 -04:00
Rémi Da Costa 16697565bf Netcat ONVIF: adding ONVIF authentication 2019-04-30 07:48:47 +02:00
cnighswonger dfa997a989
Add camera relative iris control methods
This set of methods invoke realtive iris size in the direction indicated by
    the <Large/Small> portion of their name. They accept no arguments.

    NOTE:

    This only just does work. The Dahua API specifies "multiples" as the input.
    We pass in a 1 for that as it does not seem to matter what number (0-8) is
    provided, the camera iris behaves the same.
2019-04-29 16:05:44 -04:00
redaco 76dd411341 Netcat ONVIF: Added support for "profile token" (#2589) 2019-04-29 15:56:55 -04:00
Isaac Connor 077ad75516 Merge branch 'storageareas' into origin/zma_to_thread 2019-04-25 12:41:48 -04:00
Isaac Connor 9421c0208d Add instructions for enabling the web user to run shutdown 2019-04-12 14:48:47 -04:00
Isaac Connor 0dd4a23770 Add Config for showing a system shutdown/restart option 2019-04-12 09:36:30 -04:00
Isaac Connor 3abf263e7a fixup half-merged changes to filter to view in montagereview 2019-04-08 16:57:41 -04:00
Isaac Connor aa83239069 rework zmcontrol.pl. If command is given and server is not up, use zmdc.pl to start it. Give up after 10 seconds. 2019-04-05 15:18:03 -04:00
Isaac Connor e1873b1693 debug response content 2019-04-05 15:17:13 -04:00
Isaac Connor aaef151815 ZM_VERSION is a constant not a scalar variable 2019-04-05 13:18:06 -04:00
Andrew Bauer 2bb15c4f90 daemonize zmcontrol (#2563) 2019-04-01 17:26:24 -04:00
Isaac Connor d579faa291 attr in modern ZM should be StartWeekday. Continue to support legacy filters 2019-03-28 15:13:53 -04:00
Isaac Connor 9a70dff143 to single quotes, include monitor Id when logging the closing of an event 2019-03-28 09:43:17 -04:00
Isaac Connor 7b878a4c64 Sync up quotes and space differences frmo zma_to_thread 2019-03-19 17:15:32 -04:00
Isaac Connor 3f9564c10a Merge branch 'master' into storageareas 2019-03-19 10:37:35 -04:00
Isaac Connor 18f1881ffd spacing 2019-03-18 17:13:19 -04:00
Chris ad5f6a8729 Camera reboot function (#2554)
* Adding a button for camera reboot function

This series of commits will add a camera reboot function to the
control interface if supported by the camera configuration.

* Adding reboot function option to contorl configuration

This patch adds a reboot option to the camera control configuration
view.

* Adding Reboot field to Controls table

This patch adds a Reboot field to the Controls table to support
a camera reboot control option.

* Correcting button value to match reset

* Updating language files

I'm not sure of the proper procedure to trigger updating of
non-english language files so I'm updating them all with English
hoping that that will draw attention to the changes and others
will translate accordingly.

* Add missing forward slash
2019-03-18 14:49:05 -04:00
Isaac Connor 63982a6282 Disable PRIVACY enable 2019-03-18 14:42:05 -04:00
Isaac Connor 520c41da23 Merge ../ZoneMinder.connortechnology.bad into storageareas 2019-03-18 14:40:03 -04:00
Isaac Connor e486b035f0 Revert "Implement a date filter to zmaudit so that it only looks in directories by date."
This reverts commit d86b1ea49c.
2019-03-18 13:50:00 -04:00
Isaac Connor d86b1ea49c Implement a date filter to zmaudit so that it only looks in directories by date. 2019-03-18 13:48:55 -04:00
Chris 6ee689f4bf Dahua control improvements (#2552)
* Adding a presetHome method

The Dahua protocol does not appear to support a preset Home feature. We could
allow the user to assign a preset slot as the "home" slot. Dahua does appear
to support naming presets which may lend itself to this sort of thing. At
this point, we'll just send the camera back to center and zoom wide. (0°,0°,0)

* Adjusting naming of private methods and adding POD

* Adding relative focus methods

This patch also adds the return value of the get request used to
send the command to the camera.

Furthermore, it fixes a small bug in the authentication of requests
sent to the camera after the connection is opened. I really have no
idea why the problem occurred and it appeared to have no practical
effect on the execution of the command. It showed up when I enabled
debug, so this attempts to fix it or at least quiet it.

* Adding POD for the new relative focus methods

Also doing a bit of cleanup on POD in general.

* Adding some documentation to demystify control motion types

This was not clear to me at the outset, and I could not locate existing
documentation which explained the prioritization and exclusion aspects.

Maybe it will help someone else.

* Renaming private methods and adding more POD

This patch renames private methods by prefixing an underscore to
them. This at least helps visually distinguish them as private
when reading through the code.

It also adds more documentation on public methods.

* Grouping all relative motion methods together

This makes for easier reading.

* Adding in a reset method from Issue #2414

This method was supplied by kobold81 who got it from
bobylapointe69300 who posted it in the following forum post:

https://forums.zoneminder.com/viewtopic.php?f=9&t=27000&p=104601&hilit=dahua#p104601

This patch also includes some POD cleanup.

* Adding continuous movement methods and fixing reset

This patch adds the continuous movement methods provided in the patch
for Issue #2414. Note that these are not truly continuous as they
result in movement for less than a ms. Adapting the code to support
truly continuous movement would invovle some considerable work.

This patch also correct the reset method and adds a reboot method.
The two are different creatures with different effects.

POD added as well.

* Removing redundant get request code

Two slightly different versions of code are currently used to post
the get request to the camera in order to execute commands. This
patch modifies the open method in order to allow its re-use and
removes redundant code.

Note: This is the first installment on changes towards improving
the way the HTTP transactions are handled.

* Making authenication failures fatal

Authentication failures result in camera commands not being executed.
They may as well be fatal and return the general reason to the user
directly.

* Work on persistent sessions

I think this will have to wait since it appears that the camera expects
some sort of keepalive/heartbeat signal to keep the session open.

* Restoring accidentally deleted code
2019-03-12 11:09:57 -04:00
Isaac Connor 016fda22ce reduce duplicated db code from Config. Use fully namespace'd variables so we can use require instead of use 2019-03-01 12:31:41 -05:00
Isaac Connor 1828ea2d6f small cleanup of zmstats 2019-03-01 10:26:55 -05:00
Isaac Connor af9c87a112 Merge branch 'master' into storageareas 2019-02-27 10:53:19 -05:00
Isaac Connor 849442502c add support for server based zmeventnotification 2019-02-27 09:28:15 -05:00
Isaac Connor 279e0d8bcf Merge branch 'storageareas' into zma_to_thread 2019-02-22 11:39:58 -05:00
Isaac Connor fd310c0f0a Merge branch 'master' into storageareas 2019-02-22 11:33:47 -05:00
Isaac Connor 2b90bf15a6
Improve session (#2487)
* Introduce ZM_COOKIE_LIFETIME which sets the life of the SESSION cookie, instead of using what is in php.ini

* Use zm specific session functions, which are now located in includes/session.php.  Be more agressive about clearing session on logout.

* Move session code to includes/session.php

* remove duplicate line

* Move is_session_open to session.php.  Move code to clear a session into session.php

* improve debug line when there is a problem updating config entry

* split description into description and help text for COOKIE_LIFETIME

* Remove redirect on line.  We do it in javascript on postlogin view so that we can say logging in before switching to console

* If there is a username in the session, then we are logged in, but we need to load the user object from the db.  We can't just trust it from the session. The user may have been deleted and having that data in the session can be a security risk. So load the user object on every request.

* Use session_regenerate_id instead of our broken code to do the same

* Move auth code to includes/auth.php

* add autocomplete tags to username and password inputs

* Don't redirect to login if we are already viewing login.  Put auth before including skin includes

* need to include session.php in auth.php

* update to php namespace
2019-02-22 09:43:38 -05:00
Chris b8117f7fc9 Add support for control of Amcrest cameras (#2536)
* Add a control module to support the current Amcrest HTTP API

This patch adds ZoneMinder::Control::Amcrest_HTTP

This module is adapted and improved from one available on the ZoneMinder
forums.[1] It appears that a number of individuals have contributed to
it. This is an attempt to correct some of its interactions with ZM::Control
and friends as well as enhance and extend supported control features
for Amcrest cameras.

This work is based on Amcrest HTTP Protocol API Specifications
Rev. 2.12 2017-03-15

[1]https://forums.zoneminder.com/download/file.php?id=1878

* Fixing zoom methods

* Misc. cleanup of comments, etc.

* Fixing up POD, etc.

* Converting line endings to Unix

* Fixing up preset methods

The current Amcrest HTTP API does not support a Home command per se. So this
method is set up to send the camera to the first preset position. Of course,
this presupposes that the user will setup a preset #1 otherwise the command
will fail on a bad preset error.

If a future version of the API supports a true Home command, we'll adjust
at that point. For now this seems to be a useful workaround.

* Removing duplicate home method

* Adding moveAbs method

I'm putting this in, but absolute camera movement does not seem to be well
supported in the classic skin ATM. Reading
www/skins/classic/include/control_functions.php seems to indicate
a faulty implementation, unless I'm reading it wrong. I see nowhere
where the user is able to specify the absolute location to move to. Rather,
the call is passed back movement in increments of 1 unit. At least with the
Amcrest/Duhua API this would result in the camera moving to the 1* or 0* etc.
position.

moveAbsUp, Down, Left, Right, etc. Doesn't make sense given the definition
of Absolute movement.

* Adding a note about the moveMap method

This method does not appear to be implemented in the classic skin,
but we'll leave it here for future implementation. Caveat: It may
or may not work as-is.

* Fixing up zoomConTele/Wide methods

* Adding a vanilla control type for the Amcrest HTTP API

Please note that this control type matches (mostly) the currently
available control options in Amcrest_HTTP.pm. It does not match
all (or possibly any) of the control options available on a specific
Amcrest camera. The user may need to create their own control type
specific to the camera model they are using.

* Removing misplaced comment

Thanks to connortechnology for pointing this out!
2019-02-22 09:17:28 -05:00
Isaac Connor 7d6286d517 Merge branch 'storageareas' into zma_to_thread 2019-02-18 16:23:17 -05:00
Isaac Connor 24845e0457 Merge branch 'master' into storageareas 2019-02-14 15:40:52 -05:00
Isaac Connor 62bf7d54f1 close sth's on Fatal to prevent error message 2019-02-14 15:40:42 -05:00
Isaac Connor a9e2011727 Merge branch 'storageareas' into zma_to_thread 2019-02-13 12:24:38 -05:00
Isaac Connor a3374aa26c Merge branch 'reload_zmfilter_on_filter_save' into storageareas 2019-02-11 13:26:53 -05:00
Steve Gilvarry 87413d447d Set CSRF on as the default for new installs. Fixes #2507 (#2508)
* Set CSRF on as the default for new installs. Not sure we can impact config on existing installations.

* Fix the spelling mistake that I noticed after editing this.
2019-02-10 13:08:58 -05:00
Isaac Connor 555cb4780d Merge branch 'master' into storageareas 2019-02-10 12:37:45 -05:00
Isaac Connor e2fc0ea25d Increase navbar refresh times. 5 seconds is way too fast 2019-02-08 10:22:42 -05:00
Isaac Connor d121ecab75 Merge branch 'improve_session' into storageareas 2019-02-05 15:48:42 -05:00
Isaac Connor 5b288d3b67 split description into description and help text for COOKIE_LIFETIME 2019-02-05 11:39:50 -05:00
Isaac Connor a176c9bbd2 improve debug line when there is a problem updating config entry 2019-02-05 11:39:21 -05:00
Isaac Connor 4e10e6f0ae Merge branch 'improve_session' into storageareas 2019-01-30 15:26:37 -05:00
Isaac Connor 1e56e750cf Introduce ZM_COOKIE_LIFETIME which sets the life of the SESSION cookie, instead of using what is in php.ini 2019-01-30 11:04:38 -05:00
Isaac Connor cc8de69eba Merge branch 'master' into storageareas 2019-01-22 11:44:42 -05:00
Isaac Connor e60e3666d5 Fix comment 2019-01-22 10:53:53 -05:00
Matt N 0619a4a161 Validate cnj, obr, and cbr arguments in parseFilter (#2434) 2019-01-22 08:03:25 -05:00
Isaac Connor b8d065275b Merge branch 'master' into storageareas 2019-01-04 15:22:18 -05:00
techrockedge 571daec8fc Merge branch 'master' of git://github.com/ZoneMinder/zoneminder
refresh with master
2019-01-03 15:02:57 -05:00
techrockedge e21b8dc1f9 changed to ZM db functions 2019-01-02 16:01:33 -05:00
techrockedge 51d3e6b2cd changed to ZM db functions 2019-01-02 14:09:35 -05:00
Andrew Bauer bd2b761bcd change configdata.pm.in defaults 2018-12-31 09:54:48 -06:00
techrockedge f25e176b88 added create table if not exist 2018-12-29 20:57:46 -05:00
techrockedge 60d5880694 Merge branch 'master' of git://github.com/ZoneMinder/zoneminder 2018-12-29 19:36:20 -05:00
techrockedge 2cac25d353 removed unused preset code 2018-12-29 19:35:16 -05:00
Isaac Connor 5060358870 Merge branch 'master' into storageareas 2018-12-29 09:56:53 -05:00
Andrew Bauer 3258d8e590 remove ZM_DIR_IMAGES (#2374) 2018-12-29 09:52:58 -05:00
techrockedge bcbe9075f9 fixed preset delete and set 2018-12-28 21:11:52 -05:00
techrockedge 826201a3f9 Merge branch 'master' of git://github.com/ZoneMinder/zoneminder 2018-12-28 20:32:04 -05:00
Isaac Connor 1a1231fdaa Merge branch 'master' into storageareas 2018-12-28 10:47:27 -05:00
Jonathan Meredith 265a73ab29
Spelling mistake fix
Changed his to this
2018-12-27 22:26:07 -05:00
Isaac Connor 3e06bbcef8 Merge branch 'master' into storageareas 2018-12-27 13:50:29 -05:00
Isaac Connor 08e5166bcb remove quotes around state in command documentation. 2018-12-27 12:24:50 -05:00
Isaac Connor c017219a1e use do instead of many lines of dbi. Cleanup logic around command detection 2018-12-27 12:22:06 -05:00
Isaac Connor e15227d53e remove zma restarts 2018-12-26 18:18:22 -05:00
Isaac Connor 28dafd5931 Merge branch 'storageareas' into zma_to_thread 2018-12-26 12:02:00 -05:00
techrockedge f815aaa5f5 Merge branch 'master' of git://github.com/ZoneMinder/zoneminder 2018-12-21 19:46:45 -05:00
Isaac Connor 7a8beffdcc Merge branch 'master' into storageareas 2018-12-20 15:10:52 -05:00
Isaac Connor e626049f6b Merge branch 'swresample' into storageareas 2018-12-20 14:08:40 -05:00
Isaac Connor 0c09616059 put back privacy notice update 2018-12-20 13:58:09 -05:00
Isaac Connor 88e148068e Logging and whitespace 2018-12-20 13:56:57 -05:00
Isaac Connor 6af8f0d419 Logging and whitespace 2018-12-20 13:55:18 -05:00
Isaac Connor 64bdf40e86 Logging and whitespace changes. No logical changes 2018-12-20 13:50:55 -05:00
Isaac Connor eccfdb8a6a Logging and whitespace changes. No logical changes 2018-12-20 13:50:07 -05:00
Isaac Connor 3a068ae6a3 Merge branch 'master' into swresample 2018-12-16 16:15:28 -05:00
techrockedge 180a4b07b1 foscam r2c ptz 2018-12-14 19:13:41 -05:00
techrockedge 51b4c27b27 foscam r2c ptz 2018-12-14 17:30:45 -05:00
Isaac Connor 0bfe1007c8 Merge branch 'master' into storageareas 2018-12-14 10:16:08 -05:00
Pliable Pixels ebaafef607 Ffmpeg logs optional (#2345)
* make ffmpeg logs configurable via web

* fix Info
2018-12-14 08:01:23 -05:00
Isaac Connor b61eb7d4fc Merge branch 'master' of github.com:ZoneMinder/ZoneMinder 2018-12-13 10:53:56 -05:00
Isaac Connor 0c5eead929 Merge branch 'master' into fix_startup_db_connection 2018-12-13 10:53:34 -05:00
Andrew Bauer db81465fa2 allow one to set manpage destination 2018-12-07 09:47:00 -06:00
Isaac Connor 0c7f91c38a Merge branch 'master' into storageareas 2018-12-03 16:25:28 -05:00
Isaac Connor f2f1e230d1 put back missing ! 2018-12-03 16:25:03 -05:00
Isaac Connor 14272a42b4 fix use of getcwd in delete_empty_subdirs. We use absolute paths 2018-12-03 11:08:24 -05:00
Isaac Connor 7d90a56561 Merge branch 'master' into storageareas 2018-11-30 14:46:42 -05:00
Isaac Connor f9139f2d98 Use the word skipped instead of aborted 2018-11-30 10:48:20 -05:00
Isaac Connor df0b600431 Merge branch 'master' into storageareas 2018-11-29 10:49:06 -05:00
Isaac Connor 45a9f9158d spelling mistakes 2018-11-29 10:45:30 -05:00
Isaac Connor 1a85e282e2 use find_one instead of new. We seem to be comparing against unfound event objects 2018-11-29 10:09:49 -05:00
Isaac Connor 4625f7c879 Merge branch 'master' into storageareas 2018-11-28 10:46:49 -05:00
Isaac Connor 6de704922c Set scheme to '' if undefined to quiet warnings 2018-11-27 17:01:49 -05:00
Isaac Connor e15bbba090 Make debug line more useful by printing out the containing directory 2018-11-26 15:45:05 -05:00
Isaac Connor b3703a5eed Check in db a second time for the event. Long running zmaudits can find an event in the fs that was created after we loaded all the db events. 2018-11-26 15:16:10 -05:00
Isaac Connor 3f4e918b9e Merge branch 'zmaudit_check_other_storageareas' into storageareas 2018-11-26 15:09:14 -05:00
Isaac Connor d6fb4e1910 Add StorageId function to clear Storage when you set a new StorageId. Clear Path when assigning a new StorageArea 2018-11-26 15:09:04 -05:00
Isaac Connor 7fb0e1eaf7 Cache All StorageAreas and just to next event if we find the event somewhere other than where it should be. 2018-11-26 15:02:34 -05:00
Isaac Connor 1c45f98a65 Merge branch 'zmaudit_check_other_storageareas' into storageareas 2018-11-23 15:16:15 -05:00
Isaac Connor 1b74aa959b Have to refresh the Path in the Event when updating Storage Area 2018-11-23 15:15:51 -05:00
Isaac Connor 32337c5dbb fix prompt when updating StorageArea 2018-11-23 15:13:47 -05:00
Isaac Connor d16981365f Merge branch 'zmaudit_check_other_storageareas' into storageareas 2018-11-23 12:16:21 -05:00
Isaac Connor 6d19280069 Set Scheme when Shallow. Improve debug message. Fix spacing 2018-11-23 12:16:11 -05:00
Isaac Connor dea5db9dd9 Merge branch 'zmaudit_check_other_storageareas' into storageareas 2018-11-23 11:11:39 -05:00
Isaac Connor 73d27f5095 Add code to see if a db event is stored at the wrong storage area 2018-11-23 10:10:50 -05:00
Isaac Connor b16cd7ec84 Merge branch 'h265' into zma_to_thread 2018-11-20 12:38:17 -05:00
Isaac Connor 62e511cfd1 Merge branch 'master' into h265 2018-11-17 10:41:20 -05:00
Andrew Bauer b4f77077e9
Update zmdc.pl.in
temporary fix to #2292
2018-11-16 18:33:54 -06:00
Andrew Bauer e5f2212a32 fix gpl mailing address 2018-11-15 20:00:53 -06:00
Isaac Connor e24a308481 Merge branch 'master' into h265 2018-11-14 17:15:37 -05:00
Isaac Connor 35b439629c Merge branch 'master' of github.com:ZoneMinder/ZoneMinder 2018-11-13 18:14:35 -05:00
Isaac Connor 381071eb0f Fix log message to say recovering instead of auditing 2018-11-13 16:36:39 -05:00
Isaac Connor d2dc23b4e9 fixes, better logging 2018-11-13 16:35:09 -05:00
Isaac Connor 73c52705f2 Merge branch 'fix_32bit_alignment' into storageareas 2018-11-13 14:22:06 -05:00
Isaac Connor e8ed1367d7 Merge branch 'master' into storageareas 2018-11-13 14:22:00 -05:00
Isaac Connor ca87936cd7 add function time_of_youngest_file to determine the youngest file in an event dir, so as to guess the starttime of the event. 2018-11-13 14:13:41 -05:00
Isaac Connor 798bf68df1 add function time_of_youngest_file to determine the youngest file in an event dir, so as to guess the starttime of the event. 2018-11-13 14:13:32 -05:00
Isaac Connor 31b0ed107d remove epadding2, to restore the 64bit alignment of startup_time. A proper fix instead of #2258 2018-11-13 14:02:44 -05:00
Isaac Connor 07d6d799ce Merge branch 'master' of github.com:ZoneMinder/ZoneMinder 2018-11-13 10:30:58 -05:00
Isaac Connor 993da131f1 tidy up and use Error instead of Carp::croak 2018-11-13 10:29:19 -05:00
Isaac Connor 967fe14b22 Add ability to update incorrect starttime. 2018-11-11 10:17:32 -05:00
Isaac Connor 1e98ecb595 Sort keys in to_string 2018-11-09 12:14:39 -05:00
Isaac Connor 5f81e9111f Add Scheme and SaveJPEGs to Event fields, and fix setting Scheme 2018-11-09 12:14:05 -05:00
Isaac Connor abada5c95c Merge branch 'master' of github.com:ZoneMinder/ZoneMinder 2018-11-09 10:47:00 -05:00
Isaac Connor 4ddd328c61 Check and Fix Scheme and StorageArea 2018-11-09 10:39:57 -05:00
Andrew Bauer d6877b763d
Merge pull request #2298 from connortechnology/log_use_global_dbh
Use the global dbh in ZoneMinder::Database instead of keeping our own…
2018-11-07 12:29:11 -06:00
Isaac Connor 0e3eb0df17 remove extra quotes, google code style, update pod docs 2018-11-07 11:26:48 -05:00
Isaac Connor 4107082845 Don't delete default states if there are none 2018-11-07 11:01:49 -05:00
Isaac Connor 0ebcef7324 in poddoc and over needs a =back 2018-11-07 11:01:12 -05:00
Isaac Connor 56bdd53757 Use the global dbh in ZoneMinder::Database instead of keeping our own copy of it in Logger 2018-11-07 10:40:44 -05:00
Isaac Connor 93bf05be4e Merge branch 'zmrecover' into storageareas 2018-11-06 20:37:35 -05:00
Isaac Connor 9a96785fa4 Add in Frame.php 2018-11-06 20:37:00 -05:00
Isaac Connor 5495ab8036 Fix package for Event 2018-11-06 16:15:27 -05:00
Isaac Connor c60bd3af1e Need to new an Event 2018-11-06 15:43:22 -05:00
Isaac Connor 5a6ffe758a Merge branch 'zmrecover' into storageareas 2018-11-06 15:29:02 -05:00
Isaac Connor f86ed5c66c allow interactive=0 and use Inf for log lines about resurecting events 2018-11-06 15:28:56 -05:00
Isaac Connor 181a8c29e1 Add SaveJPEGs to Event 2018-11-06 15:28:37 -05:00
Isaac Connor 6d6d25261f Merge branch 'zmrecover' into storageareas 2018-11-06 12:14:54 -05:00
Isaac Connor 3cd1887d54 Cleanup POSIX use. Fix conflict between POSIX and Date::Format. 2018-11-06 12:14:42 -05:00
Isaac Connor aa9bb81b61 Merge branch 'zmrecover' into storageareas 2018-11-06 09:57:01 -05:00
Isaac Connor e0bc0484d4 Add empty string default for DefaultVideo 2018-11-06 09:56:29 -05:00
Isaac Connor 18b327b4ac Turn off massive debugging 2018-11-06 09:55:53 -05:00
Isaac Connor e1a5940254 Merge branch 'zmrecover' into storageareas 2018-11-05 16:53:01 -05:00
Isaac Connor 451c42ddf5 Implement rmrecover script. Flush out Object code to support find, find_one, find_sql, improve to_string, etc. 2018-11-05 16:52:34 -05:00
Isaac Connor 4b24bf4e36 merge from storageareas, fully specify Module for zmDbDisconnect as we havn't 'used' it 2018-11-02 11:48:35 -04:00
Isaac Connor 461ce3c1f8 Merge branch 'master' into storageareas 2018-10-29 12:52:06 -04:00
Isaac Connor aaeb30a72f Move license down to perldocs at bottom. Remove unecessary line feeds and spaces 2018-10-28 17:50:22 -04:00
Isaac Connor 349693e27d Add a missing comma 2018-10-25 11:24:23 -04:00
Isaac Connor a8329465fb Merge branch 'master' into h265 2018-10-22 10:30:01 -04:00
Isaac Connor 5ab1126260 Merge branch 'storageareas' into zma_to_thread 2018-10-20 17:31:14 -04:00
Isaac Connor 88b9a1b259 Don't auto enable show privacy 2018-10-18 08:49:13 -04:00
Isaac Connor 372c6b7f69 explicitly call ZoneMinder::Database::zmDbDisconnect 2018-10-17 20:57:24 -04:00
Isaac Connor c2af380e29 Merge branch 'master' into storageareas 2018-10-16 11:39:26 -04:00
Isaac Connor 7149576a7c Merge branch 'smarter_packetqueue' into storageareas 2018-10-15 10:59:50 -04:00
Andy Bauer 5b964ba3d5 create the upload folder if it does not exist 2018-10-11 15:57:25 -05:00
Andrew Bauer 71e150daae
add missing brackets around second expression in archImagePath 2018-10-11 14:32:40 -05:00
Isaac Connor ad71b0c626 Merge branch 'master' of github.com:ZoneMinder/ZoneMinder 2018-10-11 11:28:17 -04:00
Isaac Connor 428b2506ec Add .mp4 and snapshot files to glob for upload archive 2018-10-11 11:28:07 -04:00
Andrew Bauer 7ffc5ab266
Merge branch 'master' into control_plugin_psia 2018-10-11 09:32:06 -05:00
Isaac Connor e4de623537 Merge branch 'master' into storageareas 2018-10-10 14:53:51 -04:00
Isaac Connor 8e053aa04b Merge branch 'master' into storageareas 2018-10-10 14:51:52 -04:00
Andrew Bauer 2fbe1be02b implement loadMonitor sub (#2244)
* implement loadMonitor sub

* remove carriabe returns from Info, Warning, Debug statements
2018-10-10 14:27:05 -04:00
Isaac Connor b84234cdf1 Remove debug line at INF level 2018-10-10 14:22:48 -04:00
Isaac Connor 1958351a13 Merge branch 'master' into storageareas 2018-10-09 10:24:24 -04:00
Andrew Bauer c1de20a081 use $Event rather than $event (#2240) 2018-10-08 09:25:17 -04:00
Isaac Connor 4a642e1a9d pass Event instead of event to executeCommand 2018-10-08 08:31:16 -04:00
Isaac Connor 9275a1d046 fix missing spaces after 'to' and some spacing and quotes 2018-10-05 09:45:47 -04:00
Isaac Connor 56b31becb2 Add explicit db disconnect in Fatal(). If we don't disconnect then we leave sockets hanging around in TIME_WAIT (I think). 2018-10-04 10:47:38 -04:00
Isaac Connor 015890a509 Merge branch 'master' into storageareas 2018-10-02 15:27:12 -04:00
Isaac Connor c94367c7ad The uploadArchFile takes an Event object now 2018-09-29 08:32:57 -04:00
Isaac Connor 33bd30fbbd Merge branch 'master' into storageareas 2018-09-28 13:40:18 -04:00
Andrew Bauer b533c8b257 don't zmMemInvalidate when reloading monitors (#2225)
* remove call to zmMemVerify when reloading monitors

* need to call zmMemVerify to attach to the mem handle
2018-09-28 13:35:42 -04:00
Isaac Connor d45406bce7 ode style and some more debug 2018-09-28 11:50:34 -04:00
Isaac Connor e6f366c5cb Merge branch 'master' of github.com:zoneminder/ZoneMinder 2018-09-28 09:48:37 -04:00
Isaac Connor e0dc8a5f6b Merge branch 'master' into storageareas 2018-09-27 13:54:53 -04:00
Isaac Connor 66f11435b9 perhaps fix memory corruption due to libx264 writing to stderr which may be closed. 2018-09-27 13:50:11 -04:00
Isaac Connor 8f6db1c279 Merge branch 'master' into storageareas 2018-09-25 13:54:44 -04:00
Isaac Connor 5fd1034b0b Add ServerId to perl Logging to DB 2018-09-25 13:53:50 -04:00
Isaac Connor af69dab9c5 Merge branch 'master' of github.com:zoneminder/ZoneMinder 2018-09-22 14:58:28 -04:00
Isaac Connor 5dba17e1fc Merge branch 'master' into storageareas 2018-09-21 10:50:10 -04:00
Isaac Connor 3f0336e63e Fix event_id detection from link (re was wrong). Add extra check for db event when we find an event dir without identifying id info in Deep mode 2018-09-21 10:31:54 -04:00
Isaac Connor 6aa71dfc11 Fix calculation of LinkPath, as it was using RelativePath instead of Path 2018-09-21 10:31:11 -04:00
Isaac Connor a568948eab Merge branch 'master' of github.com:ZoneMinder/ZoneMinder 2018-09-20 12:31:36 -04:00
Isaac Connor 884eb48420 fix the section that deletes events that have lost their event links. 2018-09-20 12:31:19 -04:00
Jonathan Lassoff c7e1e7b901 Control plugin for Dahua PTZ cameras (#2192)
* Control plugin for Dahua PTZ cameras

* Update http/https protocol handling

* Update doc and license

* Remove license from top of file

* Use named regex capture groups for ControlAddress parsing

* Remove trailing whitespace in Trendnet.pm
2018-09-20 12:29:54 -04:00
Isaac Connor 7abe4c40d5 Merge branch 'fix_2213' into storageareas 2018-09-19 20:02:27 -04:00
Isaac Connor 95bcac4c5a Implement delete_empty_subdirs that uses delete_empty_directories. The idea is to use it on the monitor dir so that the monitor dir gets left behind and not deleted when there are no events 2018-09-19 20:00:26 -04:00
Isaac Connor 3a9f96e8e8 Skip deleting event if event is archived. And event not having a scheme is now an error 2018-09-19 12:03:51 -04:00
Isaac Connor 34c7ee32ee Merge branch 'master' into storageareas 2018-09-14 15:13:57 -04:00
Isaac Connor f2a117c85b fix undefined $event 2018-09-14 11:06:08 -04:00
Isaac Connor 4528a043c5 fixtypo 2018-09-14 11:04:52 -04:00
Isaac Connor ca3fd5ddf8 get rid of deleteEventFiles function. People should use the object method 2018-09-14 10:08:35 -04:00
Isaac Connor 11137d271e Create utility functions in event for creating linkPath and idPath. Replace the code in Generate::createEventPath with using these nice new functions 2018-09-14 10:06:36 -04:00
Isaac Connor 63bed3af10 replace all uses of getEventPath with object function event->Path(). Remove getEventPath 2018-09-14 09:23:09 -04:00
Isaac Connor 60b952ab86 Merge branch 'master' into storageareas 2018-09-13 16:20:36 -04:00
Isaac Connor 0ec391354c Merge branch 'fix_zms_from_mp4' into h265 2018-09-13 16:18:28 -04:00
Jonathan Lassoff 7bcf9d59e1 Use named regex capture groups. 2018-09-12 12:55:31 +00:00
Isaac Connor 684f48979a Merge branch 'master' of github.com:ZoneMinder/ZoneMinder 2018-09-11 14:30:19 -04:00
Isaac Connor b545528bb0 If DefaultVideo is set, use the passthrough mp4 instead of generating and mp4 from jpegs 2018-09-11 08:49:42 -04:00
Isaac Connor 042d4c3099 Default to auditing all Storage Areas. Add a Server flag to audit only areas on a specific server. 2018-09-09 18:32:00 -04:00
Isaac Connor 5eec7e00c5 Merge branch 'master' into storageareas 2018-09-09 14:09:52 -04:00
Isaac Connor 882e47c9ab Fix deleting empty directories 2018-09-09 13:28:24 -04:00
Isaac Connor 9e8a876101 Fix finding Storage by ServerId 2018-09-09 13:28:11 -04:00
Isaac Connor e4c87ce256 Merge branch 'master' into storageareas 2018-09-09 11:36:52 -04:00
Isaac Connor fa690826a3 clean up zmstats, add db reconnect 2018-09-07 16:30:47 -04:00
Isaac Connor b7aa11f109 Fix infinite loop reconnecting to db in Logging 2018-09-07 16:30:24 -04:00
Isaac Connor def72b8e66 tidy up license 2018-09-07 16:29:59 -04:00
Isaac Connor 426aeea95b add db reconnects to zmwatch. 2018-09-07 16:29:23 -04:00
Isaac Connor 4b69f520d5 Merge branch 'master' into storageareas 2018-09-05 12:08:23 -04:00
Isaac Connor 730e1fda37 We only use File::Slurp when moving files to s3fs so only require it if doing that 2018-09-05 10:14:45 -04:00
Isaac Connor c34f899d31 eliminate warning when no Storage area is set. 2018-09-04 13:57:35 -04:00
Isaac Connor 8245d193e2 Merge branch 'master' into storageareas 2018-09-04 09:48:47 -04:00
Andrew Bauer 13558b2c12
convert existing http urls in help text to markdown 2018-09-04 07:39:46 -05:00
Jonathan Lassoff 4deaa49048 Remove license from top of file 2018-09-04 10:48:28 +00:00
Andy Bauer ce48343d1a embed link to privacy statment in telemetry help text 2018-09-03 13:55:11 -05:00
Isaac Connor f4c2d8adea Merge branch 'master' of github.com:ZoneMinder/ZoneMinder 2018-09-03 12:29:09 -04:00
Jonathan Lassoff b3a0b0e731 Update doc and license. 2018-09-03 14:08:59 +00:00
Jonathan Lassoff a3baf2c371 Update protocol selection handling 2018-09-03 14:08:52 +00:00
Jonathan Lassoff 2074e1ccc3 use strict and remove base class methods 2018-09-03 13:51:33 +00:00
Isaac Connor 672b4affe1 Merge branch 'storageareas' into zma_to_thread 2018-08-31 19:05:22 -04:00
Isaac Connor b1fe80a0bd Add JSON/MaybeXS to dependencies, replacing JSON/Any 2018-08-30 18:30:33 -04:00
Isaac Connor df3da6dd93 Merge branch 'storageareas' of github.com:ConnorTechnology/ZoneMinder into storageareas 2018-08-30 14:53:39 -04:00
Andrew Bauer 8f0fb0843a Add Privacy Statement (#2194)
* initial implementation of privacy popup

* split the privacy text and run it through translate

* change style of toggle button, validate the form

* fix copy/paste error

* fix typos

* display privacy view inline rather than popup

* display privacy inline if show_privacy flag set

* redirect to console after selection is made

* typo

* css formatting

* update privacy verbiage

* create and load default.php

* fix typos

* fix erroneous copy/paste
2018-08-30 13:25:02 -04:00
Jonathan Lassoff c605769fc9 Add Control plugin for PTZ cameras supporting the PSIA IP Media Device API 2018-08-28 15:28:52 +00:00
Isaac Connor f2d4739838 Merge branch 'storageareas' of github.com:connortechnology/ZoneMinder into storageareas 2018-08-24 17:11:39 -04:00
Isaac Connor 627d47980a prevent killall zombies by ignoring SIGCHLD at startup 2018-08-22 16:33:11 -04:00
Isaac Connor 1fa78c5aa8 Fix up licensing and copyright 2018-08-17 08:14:13 -04:00
Isaac Connor 15a6eb7e78
Revert "Add Privacy Statement (#2176)" (#2179)
This reverts commit 56f4d768c2.
2018-08-13 15:33:43 -04:00
Andrew Bauer 56f4d768c2 Add Privacy Statement (#2176)
* initial implementation of privacy popup

* split the privacy text and run it through translate

* change style of toggle button, validate the form

* fix copy/paste error

* fix typos

* display privacy view inline rather than popup

* display privacy inline if show_privacy flag set

* redirect to console after selection is made

* typo

* css formatting

* update privacy verbiage

* push privacy text to all language files
2018-08-13 15:23:44 -04:00
Isaac Connor e6d1a9447e rename TVIP862 to Trendnet and delete TVIP672WI 2018-08-13 11:12:15 -04:00
Isaac Connor 67a3ff392b Merge branch 'master' of github.com:ZoneMinder/ZoneMinder 2018-08-13 11:07:13 -04:00
Isaac Connor 70ba0ad342 Merge https://github.com/michaelbarkdoll/ZoneMinder into trendnet 2018-08-13 11:05:50 -04:00
Andrew Bauer 3dc424282b Support quoting config variables (#2175)
* allow handling of quotes in config files

* copy paste error

* surround zm_arptool in quotes
2018-08-11 12:56:16 -04:00
Isaac Connor 979b31ffc3 Merge branch 'storageareas' into zma_to_thread 2018-08-11 10:08:30 -04:00
Isaac Connor 3962c52288 Merge branch 'storageareas' of github.com:connortechnology/ZoneMinder into storageareas 2018-08-09 11:23:37 -04:00
Isaac Connor dbdb9680c0 exit on HUP to free up memory. 2018-08-07 11:32:17 -04:00
Isaac Connor 683789eb41 Merge branch 'master' into storageareas 2018-08-03 10:27:48 -04:00
Isaac Connor 82833a152e exit on HUP to free up memory. 2018-08-02 06:53:18 -04:00
Isaac Connor 50c7eec0ff Merge branch 'storageareas' of github.com:connortechnology/ZoneMinder into storageareas 2018-08-02 05:25:53 -04:00
Andrew Bauer 6ad732e419 retrieve greip data rather than the ip (#2173) 2018-07-31 14:01:01 -04:00
Roman Dissertori 48b91c5544 Bugfix in Control and added new Camera (#2171)
* fixed control typos

missing word "s" for "Controls" Table for database queries

* added Dericam P2 camera Control

* fixed missing CanReset column

* Update DericamP2.pm

* added some more missing controls

CanSleep, CanWake

* Update DericamP2.pm

* Update DericamP2.pm

* Update DericamP2.pm

* Update DericamP2.pm

* Update DericamP2.pm

* Update DericamP2.pm

* Update DericamP2.pm

* Update zm_create.sql.in
2018-07-28 09:26:02 -04:00
Isaac Connor 7e63b322c1 Merge branch 'master' of github.com:zoneminder/ZoneMinder 2018-07-22 09:58:15 -04:00
Daedilus 26d6b99018 Added new control script for iPhone ip camera software (#2161)
https://itunes.apple.com/ca/app/ipcamera-high-end-network-camera/id570912928?mt=8

See https://forums.zoneminder.com/viewtopic.php?f=9&t=27386 for details.
2018-07-17 08:09:15 -04:00
Andrew Bauer 455204135d
fail if zm_path_ffmpeg not set 2018-07-17 06:57:38 -05:00
Isaac Connor d3034670a0 Merge branch 'master' into storageareas 2018-07-10 11:03:33 -04:00
Dmitry Smirnov 756369f2d8 JSON::Any --> JSON::MaybeXS (Closes: #770). (#2151) 2018-07-10 10:27:03 -04:00
Andrew Bauer add3682128
fix spelling 2018-07-05 08:00:24 -05:00
Isaac Connor 76abad0a96 escape {} in regexp 2018-07-01 18:19:11 -04:00
Isaac Connor e98a4b1562 Merge branch 'master' into storageareas 2018-06-25 14:31:00 -04:00
Isaac Connor c285d5ebb1 spacing. Add code to delete events that huse the deep storage scheme and have lost their symlinks. 2018-06-25 13:41:19 -04:00
Andrew Bauer 422d2d6dba
set telemetry default to NO
This is the first step for GDPR compliance. A future pr will add a prompt which explains what the telemetry pr is for and whether they want to turn it on.
2018-06-22 08:10:48 -05:00
Isaac Connor fd72689182 Spacing, quotes. Main thing is to delete Object cache on HUP 2018-06-21 10:49:51 -04:00
Isaac Connor 3cb5ef6a94 Spacing 2018-06-21 10:00:54 -04:00
Andrew Bauer 3ffd30ffbd Allow selection of different source column filtering on the console (#2132) 2018-06-20 11:12:43 -04:00
Isaac Connor a594a1b6f1 Merge branch 'master' into storageareas 2018-06-15 09:45:11 -04:00
Isaac Connor fef88107e1 Close the db before forking in start() 2018-06-14 14:54:00 -04:00
Isaac Connor f5026542f8 retest STDERR for terminal output on reinit. Simplify databaseLevel code to clear dbh always when not NOLOG. 2018-06-11 16:05:57 -04:00
Isaac Connor d5d206f00a Force disconnect when reinitialize Logging 2018-06-11 15:57:38 -04:00
Isaac Connor 65a5af6f92 remove extra space 2018-06-11 15:49:39 -04:00
Isaac Connor e32b432fea Always re-connect to the db on initialize 2018-06-11 14:35:54 -04:00
Isaac Connor a4ade03e6f Merge branch 'master' of github.com:ZoneMinder/ZoneMinder 2018-06-11 14:08:19 -04:00
Isaac Connor d1f658bf30 minor spacing changes, remove unused Server lookup 2018-06-11 14:07:49 -04:00
Isaac Connor 48f8118e5a put back logReInit 2018-06-10 15:01:20 -04:00
Isaac Connor 578efb3a76 Need to do reaper in shutdownALl 2018-06-10 14:21:09 -04:00
Andrew Bauer 982f5e2442
fix typo 2018-06-10 12:15:26 -05:00
Andrew Bauer 9da5759063
Merge pull request #2117 from connortechnology/simplify_reaper
rework reaper
2018-06-09 20:20:07 -05:00
Isaac Connor c7a85e37f8 rework reaper making it simply add the pid and status data into a hash of children to reap and due the reaping/restarting in the main loop. 2018-06-09 18:52:01 -04:00
Isaac Connor 934ce654f9 Merge branch 'storageareas' of github.com:connortechnology/ZoneMinder into storageareas 2018-06-08 15:21:43 -04:00
Isaac Connor f5f4649886 Fix #2100 2018-06-08 15:14:11 -04:00
Isaac Connor 524c18eb4c Don't print to STDERR when can't log to db and recheck hasTerm on logging reinit 2018-06-08 15:13:48 -04:00
Isaac Connor be26f14566 put back zmsystemctl.pl 2018-06-08 14:59:14 -04:00
Isaac Connor 374123f9c2 get rid of debugging and turn of extra logReInit 2018-06-08 14:21:27 -04:00
Isaac Connor 5cdbc85dcc Slightly more efficient logPrint. Don't create the message string unless it is going to be used 2018-06-08 14:18:38 -04:00
Andrew Bauer 74a44869cf
Merge pull request #2116 from connortechnology/fix_perl_logging
when detecting a down db connection, need to clear the stored sth as …
2018-06-08 08:44:22 -05:00
Isaac Connor d589d31f74 Merge branch 'master' into storageareas 2018-06-08 09:30:21 -04:00
Isaac Connor e88c73195d Merge branch 'fix_perl_logging' into storageareas 2018-06-08 09:30:16 -04:00
Isaac Connor d30d8efaf0 clear stored sth on initialize and re-initialize 2018-06-08 09:17:25 -04:00
Isaac Connor 7c32e4d86c Move zmDbConnect up before logInit because the db handle got closed 2018-06-08 09:15:19 -04:00
Isaac Connor fc0369b9a4 when detecting a down db connection, need to clear the stored sth as it is no longer valid. 2018-06-08 09:04:31 -04:00
Andrew Bauer 61445620aa create the pid file before doing anything else (#2114)
* create the pid file before doing anything else

* update comment
2018-06-08 08:53:23 -04:00
Isaac Connor be61c50efa Fix setting Debug option when ZM_LOG_DEBUG_TARGET is empty and fix setting effectiveLevel 2018-06-07 17:25:02 -04:00
Isaac Connor 20bef5f381 Remove unused Server loading and debug statements 2018-06-07 09:57:54 -04:00
Isaac Connor 5b38585071 add a --daemon command line option to zmfilter.pl to tell it to run as a daemon even when --filter_id is specified.
Use this command line option in zmpkg.pl to make zmfilter.pl's stick around.
This reduces the impact of the memork leak in zmdc.pl
2018-06-06 14:05:58 -04:00
Isaac Connor 2b00f1d166 Merge ../ZoneMinder.master into storageareas 2018-06-06 13:06:41 -04:00
Isaac Connor b3c9f508f4 Remove debugging line that is causing systemd to fail 2018-06-06 11:40:12 -04:00
Isaac Connor 627ee8aeb3 close syslog in order to not leak ram 2018-06-04 14:59:42 -04:00
Isaac Connor 21e26c8c14 Spacing and parenthesis and some debug lines 2018-05-31 10:25:16 -04:00
Isaac Connor 2eb3c8ef6d use a stored prepared sth instead of re-preparing it 2018-05-31 10:24:54 -04:00
Isaac Connor c98339e152 Google code style, list monitor in debug line listing LastWriteTime 2018-05-24 10:49:20 -04:00
Isaac Connor 13e11a1e7f Fix potention div vy zero 2018-05-22 15:52:12 -04:00
Isaac Connor da8a232f01 Merge branch 'storageareas' into zma_to_thread 2018-05-12 19:45:48 -04:00
Isaac Connor b445ddc981 typo fix 2018-05-12 14:36:53 -07:00
Isaac Connor 4bbd8d6ab9 Use zmDbConnect in Database instead of duplicating all the connect code 2018-05-12 14:36:38 -07:00
Isaac Connor 5071fd1ba1 Add mysql_auto_reconnect and force autocommit on 2018-05-12 14:35:43 -07:00
Isaac Connor 1fed8f3428 finish handling a change of Realm. Actually makes it unneccessary to specify the Realm in ControlDevice 2018-05-11 13:14:54 -04:00
Isaac Connor 16e63f81df fully specify ZoneMinder::Database::ZmDbConnect 2018-05-11 12:42:56 -04:00
Isaac Connor c3053a2f8a Merge branch 'storageareas' into zma_to_thread 2018-05-10 17:51:38 -04:00
Isaac Connor a86b81d12e Only set term_sent_at if we don't already have one, we may send the stop signal many times 2018-05-08 16:08:24 -04:00
Isaac Connor e6d11bf147 block CHLD signals in send_stop, to prevent race condition 2018-05-08 15:52:33 -04:00
Isaac Connor 593167dee6 remove extra code killing processes after KILL_DELAY. check_for_processes_to_kill will kill everything off. 2018-05-08 15:29:34 -04:00
Isaac Connor 62b9662b48 Handle when process is not in cmd_hash 2018-05-08 14:12:53 -04:00
Isaac Connor 6bff8811e7 put back logReinit after forko 2018-05-08 12:52:40 -04:00
Isaac Connor 5242b17b03 Done restartPending message should be a debug, not Info 2018-05-08 10:30:12 -04:00
Isaac Connor 94377a4652 Merge branch 'storageareas' into zma_to_thread 2018-05-05 12:57:50 -04:00
Isaac Connor f6139d33ed Merge branch 'storageareas' into zma_to_thread 2018-05-05 12:25:11 -04:00
Isaac Connor d9b6f4bd85 test for value in DBI::errstr 2018-05-04 16:00:55 -04:00
Isaac Connor dbdf937a56 Merge branch 'storageareas' of github.com:connortechnology/ZoneMinder into storageareas 2018-05-04 06:47:23 -07:00
Isaac Connor 8f45b50947 handle null and include errstr 2018-05-04 06:46:24 -07:00
Isaac 84c94efaa8 Move redunddant close methods into parent. Use Fatal instead of croak. Croak is not defined so it causes an infinite loop 2018-05-04 02:26:25 +02:00
Isaac Connor 769d4a8693 DB connect can die, so put it in an eval 2018-05-03 09:50:54 -07:00
Isaac Connor 62f6e4a78a Cleanup lock_and_load add some debug 2018-05-03 09:30:44 -07:00
Isaac Connor 095f4614da don't move event if there are no files. Add some more debug 2018-05-03 09:30:06 -07:00
Isaac Connor a1fb944afe google code style and increase the logging level when reporting that the ControlDevice is wrong. 2018-05-02 11:45:52 -04:00
Isaac Connor 1f5c2e2ff7 show ping value when not connected to db 2018-05-02 11:38:48 -04:00
Isaac Connor 59d5297b4b fix wrong order calculating time we have waited for process to die. 2018-05-01 12:08:31 -04:00
Isaac Connor 04198aa381 Log valu of dbh if not connected 2018-04-30 15:09:13 -04:00
Isaac Connor f4b6bde3c2 Put print to STDERR before logging to db because it is more reliable than db 2018-04-30 13:02:43 -04:00
Isaac Connor 8e5ee94420 If we fail to connect, the dbh->trace will crash 2018-04-30 13:02:13 -04:00
Isaac Connor d3a611ae49 google code style. sth does not have a errstr() method. 2018-04-30 07:56:51 -07:00
Isaac Connor 3f05d46012 Merge zmdc.pl fixes. We can now handle database disconnects gracefully. 2018-04-30 07:09:23 -07:00
Isaac Connor a4da624f4c break out of loops when zm-terminate is set 2018-04-27 13:20:38 -07:00
Isaac Connor 348468a98d Merge branch 'storageareas' of github.com:ConnorTechnology/ZoneMinder into storageareas 2018-04-26 22:09:48 -04:00
Isaac Connor 8a80cf686b Merge branch 'master' into storageareas 2018-04-26 21:58:34 -04:00
Isaac Connor a35412f71d Merge ../ZoneMinder.master 2018-04-26 21:58:01 -04:00
Andrew Bauer 86b2f6a12e New Monitor Type - Website (#2065)
* implement website monitor

* don't check certain fields when using website monitor

* continue to fix javascript errors for website monitors

* check $monitor, not $new_monitor here

* add website monitor documentation

was somehow left out of the initial commit

* fix corruption of functions.php

* add missing comma

* remove errors by testing for existence of key.  If it's a new monitor, then none of the keys will be valid

* If the monitor type is WebSite, then default Status to Running.

* put back start function that got lost in merge.  Don't start StreamCmd's if it's a WebSite

* Add midding comma

* Hide unrelated tabs when type is WebSite. Put back input fields for Type=WebSite

* Don't show control or any of the status fields for WebSite type monitors

* add some parenthesis to ensure order of operations, seems to fix fps and status fields not being shown for regular monitors
2018-04-26 17:18:36 -04:00
Isaac Connor 356badf21d Merge branch 'master' of github.com:ZoneMinder/ZoneMinder 2018-04-26 11:57:46 -04:00
Isaac Connor 00e82fb751 Implement MonitoServerId,StorageServerId,FilterServerID in Filters 2018-04-25 13:05:19 -07:00
Isaac Connor f2073c958f more debug 2018-04-25 10:33:42 -07:00
Isaac Connor 27531750a4 Google code style 2018-04-25 10:48:50 -04:00
Isaac Connor 93ad25e124 rework zmdc.pl to better handle killing processes 2018-04-24 11:41:04 -04:00
Isaac Connor cc77561826 fix last_event being uint64 2018-04-24 11:40:38 -04:00
Isaac Connor a68ed3a305 watchfeed => watch. Fixes #2086 2018-04-23 11:38:25 -04:00
Isaac Connor e3161687ba google code style 2018-04-23 11:16:37 -04:00
Isaac Connor f752b3077a add the # of seconds before kill to the log line 2018-04-23 11:16:24 -04:00
Isaac Connor a868bb70ed Better debug when fail to attach images 2018-04-20 15:56:14 -04:00
Isaac Connor 1d4e79feb1 Update filters a bit, using Event as an object to get the Path, etc 2018-04-20 15:22:31 -04:00
Isaac Connor 5a93458441 add StartTime to Filters 2018-04-20 15:22:12 -04:00
Isaac Connor 64c3c21564 Merge branch 'storageareas' of github.com:/connortechnology/ZoneMinder into storageareas 2018-04-19 14:22:23 -04:00
Isaac Connor 2516846176 only update DiskSpace if new DiskSpace is defined 2018-04-19 14:22:19 -04:00
Isaac Connor e6525ce59e Introduce a level param, and use it to turn on checks that shouldn't need to be done anymore, due to foreign keys 2018-04-19 08:18:23 -07:00
Isaac Connor 5fe7b3f55f increase process kill time to 100 secs. zma can sometimes take this long 2018-04-19 08:17:37 -07:00
Isaac Connor 477e96a4a6 Merge branch 'storageareas' of github.com:connortechnology/ZoneMinder into storageareas 2018-04-19 07:46:28 -07:00
Isaac Connor d9a035a45d Remove commit that is unneccesary 2018-04-19 07:38:39 -07:00
Isaac Connor 696b17e92e include path to where we are not deleting from in teh debug output 2018-04-19 07:37:11 -07:00
Isaac Connor c7f672fabd SIGNAL_CHECK_POINTS is now a per-monitor setting 2018-04-19 09:59:10 -04:00
Isaac Connor d01682f3ad remove second use 2018-04-18 21:46:55 -04:00
Isaac Connor c27aa5efea Need to actually export CpuLoad 2018-04-18 21:44:37 -04:00
Isaac Connor 6dae6d8949 fix doubled use 2018-04-18 21:29:35 -04:00
Isaac Connor fcaac016b5 Merge ../ZoneMinder.connortechnology 2018-04-18 21:12:14 -04:00
Isaac Connor 70b8188cc1 make MoveTo more efficient by bailing early if it has already been moved. Also add a check for it's Old storage area changing. 2018-04-18 13:48:01 -07:00
Isaac Connor 00b7ae9006 put in missing my 2018-04-18 10:07:50 -04:00
Isaac Connor 1040afbda4 change message about not deleting files for speed 2018-04-18 09:27:11 -04:00
Isaac Connor bfe82e297a Default an empty Storage to doing Deletes 2018-04-18 09:26:36 -04:00
Andrew Bauer 04cb1f9300 use ZoneMinder::Server::CpuLoad rather than Sys:CpuLoad (#2080) 2018-04-17 21:09:41 -04:00
Isaac Connor 7e7e353a8c Use a more efficient SQL when finding Orphaned Frames 2018-04-17 08:47:11 -07:00
Isaac Connor 3221473038 Merge branch 'storageareas' into zma_to_thread 2018-04-14 16:57:50 -04:00
Isaac Connor 05fdc51be0 Fix Sql caching 2018-04-14 15:05:05 -04:00
Isaac Connor c7deb91319 Merge branch 'zma_to_thread' of github.com:ConnorTechnology/ZoneMinder into zma_to_thread 2018-04-14 14:58:25 -04:00
Isaac Connor 41c52f25b7 Merge branch 'storageareas' into zma_to_thread 2018-04-14 11:57:18 -04:00
Isaac Connor 925f640118 Fix Filters using a cached SQL 2018-04-14 11:09:01 -04:00
Isaac Connor cd3046abb3 Merge branch 'storageareas' into zma_to_thread 2018-04-14 11:03:08 -04:00