Support Controlling PTZ Cameras Via WebUI (#4715)

* Add support for ptz commands via websocket

* Fix startup issues

* Fix bugs

* Set config manually

* Add more commands

* Add presets

* Add zooming

* Fixes

* Set name

* Cleanup

* Add ability to set presets from UI

* Add ability to set preset from UI

* Cleanup for errors

* Ui tweaks

* Add visual design for pan / tilt

* Add pan/tilt support

* Support zooming

* Try to set wsdl

* Fix duplicate logs

* Catch auth errors

* Don't init onvif for disabled cameras

* Fix layout sizing

* Don't comment out

* Fix formatting

* Add ability to control camera with keyboard shortcuts

* Disallow user selection

* Fix mobile pressing

* Remove logs

* Substitute onvif password

* Add ptz controls ot birdseye

* Put wsdl back

* Add padding

* Formatting

* Catch onvif error

* Optimize layout for mobile and web

* Place ptz controls next to birdseye view in large layout

* Fix pt support

* Center text titles

* Update tests

* Update docs

* Write camera docs for PTZ

* Add MQTT docs for PTZ

* Add ptz info docs for http

* Fix test

* Make half width when full screen

* Fix preset panel logic

* Fix parsing

* Update mqtt.md

* Catch preset error

* Add onvif example to docs

* Remove template example from main camera docs
This commit is contained in:
Nicolas Mowen
2023-04-26 05:08:53 -06:00
committed by GitHub
parent 0d16bd0144
commit 43ade86796
21 changed files with 769 additions and 16 deletions

View File

@@ -114,7 +114,13 @@ class TestHttp(unittest.TestCase):
def test_get_event_list(self):
app = create_app(
FrigateConfig(**self.minimal_config), self.db, None, None, None, PlusApi()
FrigateConfig(**self.minimal_config),
self.db,
None,
None,
None,
None,
PlusApi(),
)
id = "123456.random"
id2 = "7890.random"
@@ -143,7 +149,13 @@ class TestHttp(unittest.TestCase):
def test_get_good_event(self):
app = create_app(
FrigateConfig(**self.minimal_config), self.db, None, None, None, PlusApi()
FrigateConfig(**self.minimal_config),
self.db,
None,
None,
None,
None,
PlusApi(),
)
id = "123456.random"
@@ -157,7 +169,13 @@ class TestHttp(unittest.TestCase):
def test_get_bad_event(self):
app = create_app(
FrigateConfig(**self.minimal_config), self.db, None, None, None, PlusApi()
FrigateConfig(**self.minimal_config),
self.db,
None,
None,
None,
None,
PlusApi(),
)
id = "123456.random"
bad_id = "654321.other"
@@ -170,7 +188,13 @@ class TestHttp(unittest.TestCase):
def test_delete_event(self):
app = create_app(
FrigateConfig(**self.minimal_config), self.db, None, None, None, PlusApi()
FrigateConfig(**self.minimal_config),
self.db,
None,
None,
None,
None,
PlusApi(),
)
id = "123456.random"
@@ -185,7 +209,13 @@ class TestHttp(unittest.TestCase):
def test_event_retention(self):
app = create_app(
FrigateConfig(**self.minimal_config), self.db, None, None, None, PlusApi()
FrigateConfig(**self.minimal_config),
self.db,
None,
None,
None,
None,
PlusApi(),
)
id = "123456.random"
@@ -204,7 +234,13 @@ class TestHttp(unittest.TestCase):
def test_set_delete_sub_label(self):
app = create_app(
FrigateConfig(**self.minimal_config), self.db, None, None, None, PlusApi()
FrigateConfig(**self.minimal_config),
self.db,
None,
None,
None,
None,
PlusApi(),
)
id = "123456.random"
sub_label = "sub"
@@ -232,7 +268,13 @@ class TestHttp(unittest.TestCase):
def test_sub_label_list(self):
app = create_app(
FrigateConfig(**self.minimal_config), self.db, None, None, None, PlusApi()
FrigateConfig(**self.minimal_config),
self.db,
None,
None,
None,
None,
PlusApi(),
)
id = "123456.random"
sub_label = "sub"
@@ -255,6 +297,7 @@ class TestHttp(unittest.TestCase):
None,
None,
None,
None,
PlusApi(),
)
@@ -270,6 +313,7 @@ class TestHttp(unittest.TestCase):
None,
None,
None,
None,
PlusApi(),
)
id = "123456.random"
@@ -288,6 +332,7 @@ class TestHttp(unittest.TestCase):
None,
None,
None,
None,
PlusApi(),
)
mock_stats.return_value = self.test_stats