summaryrefslogtreecommitdiff
path: root/smart_home/cameras.py
diff options
context:
space:
mode:
authorScott <[email protected]>2022-01-06 12:13:34 -0800
committerScott <[email protected]>2022-01-06 12:13:34 -0800
commit5f75cf834725ac26b289cc5f157af0cb71cd5f0e (patch)
treef31baf4247a7d29eb1457a74f75d373d10539237 /smart_home/cameras.py
parentba223f821df1e9b8abbb6f6d23d5ba92c5a70b05 (diff)
A bunch of changes...
Diffstat (limited to 'smart_home/cameras.py')
-rw-r--r--smart_home/cameras.py9
1 files changed, 7 insertions, 2 deletions
diff --git a/smart_home/cameras.py b/smart_home/cameras.py
index 8137012..51a95e9 100644
--- a/smart_home/cameras.py
+++ b/smart_home/cameras.py
@@ -16,6 +16,7 @@ class BaseCamera(dev.Device):
'outside_driveway_camera': 'driveway',
'outside_doorbell_camera': 'doorbell',
'outside_front_door_camera': 'front_door',
+ 'crawlspace_camera': 'crawlspace',
}
def __init__(self, name: str, mac: str, keywords: str = "") -> None:
@@ -23,5 +24,9 @@ class BaseCamera(dev.Device):
self.camera_name = BaseCamera.camera_mapping.get(name, None)
def get_stream_url(self) -> str:
- assert self.camera_name is not None
- return f'http://10.0.0.226:8080/Umtxxf1uKMBniFblqeQ9KRbb6DDzN4/mp4/GKlT2FfiSQ/{self.camera_name}/s.mp4'
+ name = self.camera_name
+ assert name is not None
+ if name == 'driveway':
+ return f'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'