summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
Diffstat (limited to 'bin')
-rwxr-xr-xbin/ipcam_capture.py3
-rwxr-xr-xbin/ipcam_ntp_util.py12
-rwxr-xr-xbin/ipcam_server.py3
3 files changed, 10 insertions, 8 deletions
diff --git a/bin/ipcam_capture.py b/bin/ipcam_capture.py
index 226e12e..25b101d 100755
--- a/bin/ipcam_capture.py
+++ b/bin/ipcam_capture.py
@@ -10,7 +10,8 @@ from typing import TextIO
from argparse import ArgumentParser
from socket import gethostname
from asyncio.streams import StreamReader
-from homekit.config import LinuxBoardsConfig, config as homekit_config
+from homekit.config import config as homekit_config
+from homekit.linux import LinuxBoardsConfig
from homekit.camera import IpcamConfig, CaptureType
from homekit.camera.util import get_hls_directory, get_hls_channel_name, get_recordings_path
diff --git a/bin/ipcam_ntp_util.py b/bin/ipcam_ntp_util.py
index 077b00c..0461cc2 100755
--- a/bin/ipcam_ntp_util.py
+++ b/bin/ipcam_ntp_util.py
@@ -39,7 +39,7 @@ def process_camera(host: str,
except hikvision.ResponseError as e:
print(f'[{host}] ({str(e)})')
- elif camera_type.is_ali():
+ elif camera_type.is_xmeye():
try:
client = xmeye.XMEyeCamera(hostname=host, username=login, password=password)
client.login()
@@ -56,7 +56,7 @@ def process_camera(host: str,
def main():
- camera_types = ['hikvision', 'ali']
+ camera_types = ['hikvision', 'xmeye']
parser = ArgumentParser()
parser.add_argument('--camera', type=str)
parser.add_argument('--camera-type', type=str, choices=camera_types)
@@ -100,8 +100,8 @@ def main():
if args.camera_type == 'hikvision':
camera_type = CameraType.HIKVISION_264
- elif args.camera_type == 'ali':
- camera_type = CameraType.ALIEXPRESS_NONAME
+ elif args.camera_type == 'xmeye':
+ camera_type = CameraType.XMEYE
else:
raise ValueError('invalid --camera-type')
process_camera(camera_host, action, login, password, camera_type, **kwargs)
@@ -113,10 +113,10 @@ def main():
cam_type = ipcam_config.get_camera_type(cam)
if args.all_of_type == 'hikvision' and not cam_type.is_hikvision():
continue
- if args.all_of_type == 'ali' and not ipcam_config.get_camera_type(cam).is_ali():
+ if args.all_of_type == 'xmeye' and not ipcam_config.get_camera_type(cam).is_xmeye():
continue
process_camera(ipcam_config.get_camera_ip(cam), action, login, password, cam_type, **kwargs)
if __name__ == '__main__':
- main() \ No newline at end of file
+ main()
diff --git a/bin/ipcam_server.py b/bin/ipcam_server.py
index 71d5ea1..cb2711c 100755
--- a/bin/ipcam_server.py
+++ b/bin/ipcam_server.py
@@ -13,7 +13,8 @@ from argparse import ArgumentParser
from apscheduler.schedulers.asyncio import AsyncIOScheduler
from asyncio import Lock
-from homekit.config import config as homekit_config, LinuxBoardsConfig
+from homekit.config import config as homekit_config
+from homekit.linux import LinuxBoardsConfig
from homekit.util import Addr
from homekit import http
from homekit.database.sqlite import SQLiteBase