Commit Graph

13011 Commits

Author SHA1 Message Date
Isaac Connor 8417230690 debug where the comms sock is 2019-03-18 10:55:08 -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
Matthew Noorenberghe 3c31dd63ce Use zm_session_start() for API auth. Fixes #2547 2019-03-11 00:27:46 -07:00
Matthew Noorenberghe abb6ef1688 API: Escape 'named' params for SQLi in two more Event endpoints.
Fixes #2099
2019-03-11 00:21:51 -07:00
Matthew Noorenberghe 056b96f7fc API: Monitor and Event 'index' SQLi. Fixes #2099 2019-03-11 00:21:51 -07:00
Matthew Noorenberghe ac547e0d5d Don't scroll to the top of the page when force/cancel alarm is clicked 2019-03-10 20:58:24 -07:00
Matthew Noorenberghe e6220e9d07 Fix eslint issues in cycle.js 2019-03-10 20:56:08 -07:00
Isaac Connor d737e81e21 bump version for DefaultCodec in monitors 2019-03-06 14:57:05 -05:00
Isaac Connor 9b713a489d fix sleep time by using a comparison between the frame display time and the distance between now and when we started playing.
handle infinite fps
2019-03-06 14:50:36 -05:00
Isaac Connor 6c8eac1ac8 Merge branch 'storageareas' into h265 2019-03-06 11:10:01 -05:00
Isaac Connor abfb5642c8 cleanup and document updateFrameRate 2019-03-06 09:46:28 -05:00
Isaac Connor 24665264a2 Merge branch 'storageareas' of github.com:/ConnorTechnology/ZoneMinder into storageareas 2019-03-05 20:16:05 -05:00
Isaac Connor e59eb510e3 update and fix the donate popup 2019-03-05 13:10:04 -05:00
Isaac Connor 73ae3f49ed Merge branch 'master' into storageareas 2019-03-05 11:35:55 -05:00
Isaac Connor b1838de701 test turning off frag_custom 2019-03-05 11:35:16 -05:00
Isaac Connor 991727a728 Merge branch 'master' of github.com:ZoneMinder/ZoneMinder 2019-03-05 11:03:10 -05:00
Isaac Connor 36b00d09e3 fix destination view on the monitors view 2019-03-05 11:02:58 -05:00
Isaac Connor 7779edb485 Fix saving multiple monitors at once by moving the relevant code to includes/actions/monitors.php 2019-03-05 11:02:37 -05:00
Isaac Connor 8053f61a08 fix eslint missing {} 2019-03-05 11:02:09 -05:00
Isaac Connor 76ee31bf68 fix eslint missing {} 2019-03-05 11:01:58 -05:00
Isaac Connor 49a1954f96 fix typo and remove deprecated DefaultView 2019-03-05 11:01:39 -05:00
Isaac Connor 8b29c5f54c Fix typo: Ineterval to Interval 2019-03-05 10:58:23 -05:00
Isaac Connor f446e73ff7 Typo: AnalysisUpdateDelete to AnalysisUpdateDelay 2019-03-05 10:55:27 -05:00
rpdrewes 0bf001be3c Fix for file and curl camera sources (#2545) 2019-03-05 09:59:36 -05:00
Isaac Connor 778707c8df Merge branch 'master' into storageareas 2019-03-04 14:33:28 -05:00
Isaac Connor 7cee8356bd Fix setting frame width when changing from fixed width to scaled 2019-03-04 13:43:03 -05:00
Isaac Connor 96e29c0299 fix up remaining issues with cycle updates 2019-03-04 13:35:40 -05:00
Isaac Connor 903f5af1ef invalid parameters should be a debug not a warning 2019-03-04 13:35:36 -05:00
Isaac Connor e9a6eee2bb Merge branch 'storageareas' of github.com:/ConnorTechnology/ZoneMinder into storageareas 2019-03-01 17:47:50 -05:00
Isaac Connor 190142b24c Merge branch 'master' into storageareas 2019-03-01 17:47:07 -05:00
Isaac Connor ff8c5c5db8 remove debug 2019-03-01 17:28:00 -05:00
Isaac Connor 78513e22fd When doing an OPTIONS just do CORS and exit. if xmlHttpRequest don't do a redirect login. Do a failed auth header and quit 2019-03-01 17:27:08 -05:00
Isaac Connor 7703661cb1 Don't use streaming port in UrlToIndex because xmlHttpRequest won't send cookies to a different port 2019-03-01 17:25:17 -05:00
Isaac Connor 520bd4e7a7 Add ZM namespace to Logger 2019-03-01 14:42:05 -05:00
Isaac Connor 05bc57e245 Merge branch 'storageareas' of github.com:/ConnorTechnology/ZoneMinder into storageareas 2019-03-01 14:27:30 -05:00
Isaac Connor 466c379e94 Merge branch 'master' into storageareas 2019-03-01 14:03:49 -05:00
Isaac Connor 675b4975b0 Fix control presets 2019-03-01 13:37:34 -05: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 2d75ab50af Implement deleting from Logs based on line count instead of interval 2019-02-28 16:12:34 -05:00
Isaac Connor 20fe502ca4 Add ZM to ErrorHandler. Spacing and quotes 2019-02-27 12:02:40 -05:00
Isaac Connor 2db030265b Merge branch 'master' into storageareas 2019-02-27 11:08:04 -05:00
Isaac Connor a1f1c19c0f fix missing ZM namepsace 2019-02-27 11:07:52 -05:00
Isaac Connor af9c87a112 Merge branch 'master' into storageareas 2019-02-27 10:53:19 -05:00
Isaac Connor 6e4444099b Only populate session with user info on successful login. Use parameters in sql when loading users in getAuthUser. Fixes #2542 2019-02-27 09:57:50 -05:00
Isaac Connor 92ded81e26 bump version 2019-02-27 09:29:27 -05:00
Isaac Connor 804c384b4c add Event Notification support to server 2019-02-27 09:29:11 -05:00
Isaac Connor a7ca75758b add Event Notification label 2019-02-27 09:29:00 -05:00
Isaac Connor c0ae7820bb add zmeventnotification to Server object 2019-02-27 09:28:36 -05:00
Isaac Connor 849442502c add support for server based zmeventnotification 2019-02-27 09:28:15 -05:00