projects
/
python_utils.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Since this thing is on the innerwebs I suppose it should have a
[python_utils.git]
/
smart_home
/
cameras.py
diff --git
a/smart_home/cameras.py
b/smart_home/cameras.py
index 712d73f18f5b82db0de4fd9fdebaaafd3ec71182..e7705b29ab9d5b1ced6723bb94418e0062c259c5 100644
(file)
--- a/
smart_home/cameras.py
+++ b/
smart_home/cameras.py
@@
-1,5
+1,7
@@
#!/usr/bin/env python3
#!/usr/bin/env python3
+# © Copyright 2021-2022, Scott Gasch
+
"""Utilities for dealing with the webcams."""
import logging
"""Utilities for dealing with the webcams."""
import logging
@@
-10,6
+12,8
@@
logger = logging.getLogger(__name__)
class BaseCamera(dev.Device):
class BaseCamera(dev.Device):
+ """A base class for a webcam device."""
+
camera_mapping = {
'cabin_drivewaycam': 'cabin_driveway',
'outside_backyard_camera': 'backyard',
camera_mapping = {
'cabin_drivewaycam': 'cabin_driveway',
'outside_backyard_camera': 'backyard',
@@
-30,4
+34,6
@@
class BaseCamera(dev.Device):
if name == 'driveway':
return 'http://10.0.0.226:8080/Umtxxf1uKMBniFblqeQ9KRbb6DDzN4/mjpeg/GKlT2FfiSQ/driveway'
else:
if name == 'driveway':
return 'http://10.0.0.226:8080/Umtxxf1uKMBniFblqeQ9KRbb6DDzN4/mjpeg/GKlT2FfiSQ/driveway'
else:
- return f'http://10.0.0.226:8080/Umtxxf1uKMBniFblqeQ9KRbb6DDzN4/mp4/GKlT2FfiSQ/{name}/s.mp4'
+ return (
+ f'http://10.0.0.226:8080/Umtxxf1uKMBniFblqeQ9KRbb6DDzN4/mp4/GKlT2FfiSQ/{name}/s.mp4'
+ )