Since this thing is on the innerwebs I suppose it should have a
[python_utils.git] / smart_home / cameras.py
index 51a95e9304acc86ead7025bb65dae6851a0022b6..e7705b29ab9d5b1ced6723bb94418e0062c259c5 100644 (file)
@@ -1,5 +1,7 @@
 #!/usr/bin/env python3
 
+# © Copyright 2021-2022, Scott Gasch
+
 """Utilities for dealing with the webcams."""
 
 import logging
@@ -10,10 +12,13 @@ logger = logging.getLogger(__name__)
 
 
 class BaseCamera(dev.Device):
+    """A base class for a webcam device."""
+
     camera_mapping = {
         'cabin_drivewaycam': 'cabin_driveway',
         'outside_backyard_camera': 'backyard',
-        'outside_driveway_camera': 'driveway',
+        'outside_driveway_camera_wired': 'driveway',
+        'outside_driveway_camera_wifi': 'driveway',
         'outside_doorbell_camera': 'doorbell',
         'outside_front_door_camera': 'front_door',
         'crawlspace_camera': 'crawlspace',
@@ -27,6 +32,8 @@ class BaseCamera(dev.Device):
         name = self.camera_name
         assert name is not None
         if name == 'driveway':
-            return f'http://10.0.0.226:8080/Umtxxf1uKMBniFblqeQ9KRbb6DDzN4/mjpeg/GKlT2FfiSQ/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'
+            )