python-aidot-cameras 0.5.12__tar.gz → 0.5.14__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (32) hide show
  1. {python_aidot_cameras-0.5.12/src/python_aidot_cameras.egg-info → python_aidot_cameras-0.5.14}/PKG-INFO +1 -1
  2. {python_aidot_cameras-0.5.12 → python_aidot_cameras-0.5.14}/pyproject.toml +1 -1
  3. {python_aidot_cameras-0.5.12 → python_aidot_cameras-0.5.14}/src/aidot/device_client.py +27 -25
  4. {python_aidot_cameras-0.5.12 → python_aidot_cameras-0.5.14/src/python_aidot_cameras.egg-info}/PKG-INFO +1 -1
  5. {python_aidot_cameras-0.5.12 → python_aidot_cameras-0.5.14}/LICENSE +0 -0
  6. {python_aidot_cameras-0.5.12 → python_aidot_cameras-0.5.14}/README.md +0 -0
  7. {python_aidot_cameras-0.5.12 → python_aidot_cameras-0.5.14}/setup.cfg +0 -0
  8. {python_aidot_cameras-0.5.12 → python_aidot_cameras-0.5.14}/src/aidot/__init__.py +0 -0
  9. {python_aidot_cameras-0.5.12 → python_aidot_cameras-0.5.14}/src/aidot/aes_utils.py +0 -0
  10. {python_aidot_cameras-0.5.12 → python_aidot_cameras-0.5.14}/src/aidot/client.py +0 -0
  11. {python_aidot_cameras-0.5.12 → python_aidot_cameras-0.5.14}/src/aidot/const.py +0 -0
  12. {python_aidot_cameras-0.5.12 → python_aidot_cameras-0.5.14}/src/aidot/credentials.py +0 -0
  13. {python_aidot_cameras-0.5.12 → python_aidot_cameras-0.5.14}/src/aidot/discover.py +0 -0
  14. {python_aidot_cameras-0.5.12 → python_aidot_cameras-0.5.14}/src/aidot/exceptions.py +0 -0
  15. {python_aidot_cameras-0.5.12 → python_aidot_cameras-0.5.14}/src/aidot/g711.py +0 -0
  16. {python_aidot_cameras-0.5.12 → python_aidot_cameras-0.5.14}/src/python_aidot_cameras.egg-info/SOURCES.txt +0 -0
  17. {python_aidot_cameras-0.5.12 → python_aidot_cameras-0.5.14}/src/python_aidot_cameras.egg-info/dependency_links.txt +0 -0
  18. {python_aidot_cameras-0.5.12 → python_aidot_cameras-0.5.14}/src/python_aidot_cameras.egg-info/requires.txt +0 -0
  19. {python_aidot_cameras-0.5.12 → python_aidot_cameras-0.5.14}/src/python_aidot_cameras.egg-info/top_level.txt +0 -0
  20. {python_aidot_cameras-0.5.12 → python_aidot_cameras-0.5.14}/tests/test_alarm_event.py +0 -0
  21. {python_aidot_cameras-0.5.12 → python_aidot_cameras-0.5.14}/tests/test_highport_nomination.py +0 -0
  22. {python_aidot_cameras-0.5.12 → python_aidot_cameras-0.5.14}/tests/test_motion_poll.py +0 -0
  23. {python_aidot_cameras-0.5.12 → python_aidot_cameras-0.5.14}/tests/test_no_undefined_names.py +0 -0
  24. {python_aidot_cameras-0.5.12 → python_aidot_cameras-0.5.14}/tests/test_sdes_idle_release.py +0 -0
  25. {python_aidot_cameras-0.5.12 → python_aidot_cameras-0.5.14}/tests/test_sdes_sprop.py +0 -0
  26. {python_aidot_cameras-0.5.12 → python_aidot_cameras-0.5.14}/tests/test_sdes_talk.py +0 -0
  27. {python_aidot_cameras-0.5.12 → python_aidot_cameras-0.5.14}/tests/test_sdes_watchdog.py +0 -0
  28. {python_aidot_cameras-0.5.12 → python_aidot_cameras-0.5.14}/tests/test_speak.py +0 -0
  29. {python_aidot_cameras-0.5.12 → python_aidot_cameras-0.5.14}/tests/test_stream_cap.py +0 -0
  30. {python_aidot_cameras-0.5.12 → python_aidot_cameras-0.5.14}/tests/test_talk.py +0 -0
  31. {python_aidot_cameras-0.5.12 → python_aidot_cameras-0.5.14}/tests/test_terminal_ack.py +0 -0
  32. {python_aidot_cameras-0.5.12 → python_aidot_cameras-0.5.14}/tests/test_token_refresh.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: python-aidot-cameras
3
- Version: 0.5.12
3
+ Version: 0.5.14
4
4
  Summary: Control AiDot/Leedarson WiFi lights and cameras (WebRTC streaming, two-way audio, PTZ, controls)
5
5
  Author-email: cbrightly <chris.brightly@gmail.com>
6
6
  License-Expression: MIT
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "python-aidot-cameras"
7
- version = "0.5.12"
7
+ version = "0.5.14"
8
8
  description = "Control AiDot/Leedarson WiFi lights and cameras (WebRTC streaming, two-way audio, PTZ, controls)"
9
9
  readme = "README.md"
10
10
  license = "MIT"
@@ -3799,21 +3799,20 @@ class DeviceClient(object):
3799
3799
  """
3800
3800
  import aiohttp
3801
3801
 
3802
- await self._async_get_smarthome_auth()
3802
+ _body = {
3803
+ "deviceIds": [self.device_id],
3804
+ "pageNum": page,
3805
+ "pageSize": page_size,
3806
+ "recordSta": start_ts,
3807
+ "recordEnd": end_ts,
3808
+ }
3809
+ _LOGGER.debug("eventRecordingList request for %s: %s", self.device_id, _body)
3803
3810
  async def _fetch():
3804
3811
  async with aiohttp.ClientSession() as session:
3805
3812
  async with session.post(
3806
- f"{self._smarthome_base}/api/ipc/playback/eventRecordingList",
3807
- json={
3808
- "deviceIds": [self.device_id],
3809
- "eventCodes": [],
3810
- "areaIds": [],
3811
- "pageNum": page,
3812
- "pageSize": page_size,
3813
- "recordSta": start_ts,
3814
- "recordEnd": end_ts,
3815
- },
3816
- headers=self._leedarson_headers(),
3813
+ f"{self._aidot_v32_base}/playback/eventRecordingList",
3814
+ json=_body,
3815
+ headers=self._aidot_headers(),
3817
3816
  timeout=aiohttp.ClientTimeout(total=30),
3818
3817
  ) as resp:
3819
3818
  return await resp.json(content_type=None)
@@ -3862,12 +3861,12 @@ class DeviceClient(object):
3862
3861
  try:
3863
3862
  async with aiohttp.ClientSession() as session:
3864
3863
  async with session.post(
3865
- f"{self._smarthome_base}/api/ipc/playback/getEventVideoUrl",
3864
+ f"{self._aidot_v32_base}/playback/getEventVideoUrl",
3866
3865
  json={
3867
3866
  "deviceId": self.device_id,
3868
3867
  "eventList": [{"eventUuid": event_uuid}],
3869
3868
  },
3870
- headers=self._leedarson_headers(),
3869
+ headers=self._aidot_headers(),
3871
3870
  timeout=aiohttp.ClientTimeout(total=15),
3872
3871
  ) as resp:
3873
3872
  body = await resp.json(content_type=None)
@@ -3905,24 +3904,21 @@ class DeviceClient(object):
3905
3904
  """
3906
3905
  import aiohttp, time
3907
3906
 
3908
- await self._async_get_smarthome_auth()
3909
3907
  end_ts = int(time.time() * 1000)
3910
3908
  start_ts = end_ts - 30 * 86_400_000 # look back 30 days
3911
3909
 
3912
3910
  try:
3913
3911
  async with aiohttp.ClientSession() as session:
3914
3912
  async with session.post(
3915
- f"{self._smarthome_base}/api/ipc/playback/eventRecordingList",
3913
+ f"{self._aidot_v32_base}/playback/eventRecordingList",
3916
3914
  json={
3917
- "deviceIds": [self.device_id],
3918
- "eventCodes": [],
3919
- "areaIds": [],
3920
- "pageNum": 1,
3921
- "pageSize": 1,
3922
- "recordSta": start_ts,
3923
- "recordEnd": end_ts,
3915
+ "deviceIds": [self.device_id],
3916
+ "pageNum": 1,
3917
+ "pageSize": 1,
3918
+ "recordSta": start_ts,
3919
+ "recordEnd": end_ts,
3924
3920
  },
3925
- headers=self._leedarson_headers(),
3921
+ headers=self._aidot_headers(),
3926
3922
  timeout=aiohttp.ClientTimeout(total=15),
3927
3923
  ) as resp:
3928
3924
  body = await resp.json(content_type=None)
@@ -4196,6 +4192,7 @@ class DeviceClient(object):
4196
4192
  self,
4197
4193
  rtsp_push_url: Optional[str] = None,
4198
4194
  fast_connect: Optional[bool] = None,
4195
+ sdes_audio: Optional[bool] = None,
4199
4196
  ) -> None:
4200
4197
  """Start a persistent stream that keeps the camera session alive.
4201
4198
 
@@ -4217,6 +4214,8 @@ class DeviceClient(object):
4217
4214
  """
4218
4215
  if fast_connect is not None:
4219
4216
  self._fast_connect_opt = fast_connect
4217
+ if sdes_audio is not None:
4218
+ self._sdes_audio_opt = sdes_audio
4220
4219
  if self._stream_task is not None and not self._stream_task.done():
4221
4220
  return
4222
4221
  self._keepalive_rtsp_url = rtsp_push_url
@@ -11952,7 +11951,10 @@ class DeviceClient(object):
11952
11951
  # via AIDOT_SDES_AUDIO_GAIN_DB). Dynamic normalizers (dynaudnorm/
11953
11952
  # loudnorm) and `-max_interleave_delta 0` are avoided - both regressed
11954
11953
  # the pipe (buffering / ~100 ms audio cutouts) in earlier live tests.
11955
- if os.environ.get("AIDOT_SDES_SERVE_AUDIO", "0") == "1":
11954
+ _sdes_audio = getattr(self, "_sdes_audio_opt", None)
11955
+ if _sdes_audio is None:
11956
+ _sdes_audio = os.environ.get("AIDOT_SDES_SERVE_AUDIO", "0") == "1"
11957
+ if _sdes_audio:
11956
11958
  try:
11957
11959
  _sdes_gain_db = float(
11958
11960
  os.environ.get("AIDOT_SDES_AUDIO_GAIN_DB", "-8")
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: python-aidot-cameras
3
- Version: 0.5.12
3
+ Version: 0.5.14
4
4
  Summary: Control AiDot/Leedarson WiFi lights and cameras (WebRTC streaming, two-way audio, PTZ, controls)
5
5
  Author-email: cbrightly <chris.brightly@gmail.com>
6
6
  License-Expression: MIT