uiprotect 3.8.0__tar.gz → 4.1.0__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.
Potentially problematic release.
This version of uiprotect might be problematic. Click here for more details.
- {uiprotect-3.8.0 → uiprotect-4.1.0}/PKG-INFO +1 -1
- {uiprotect-3.8.0 → uiprotect-4.1.0}/pyproject.toml +1 -1
- {uiprotect-3.8.0 → uiprotect-4.1.0}/src/uiprotect/data/bootstrap.py +6 -13
- {uiprotect-3.8.0 → uiprotect-4.1.0}/src/uiprotect/data/devices.py +0 -11
- {uiprotect-3.8.0 → uiprotect-4.1.0}/LICENSE +0 -0
- {uiprotect-3.8.0 → uiprotect-4.1.0}/README.md +0 -0
- {uiprotect-3.8.0 → uiprotect-4.1.0}/src/uiprotect/__init__.py +0 -0
- {uiprotect-3.8.0 → uiprotect-4.1.0}/src/uiprotect/__main__.py +0 -0
- {uiprotect-3.8.0 → uiprotect-4.1.0}/src/uiprotect/api.py +0 -0
- {uiprotect-3.8.0 → uiprotect-4.1.0}/src/uiprotect/cli/__init__.py +0 -0
- {uiprotect-3.8.0 → uiprotect-4.1.0}/src/uiprotect/cli/backup.py +0 -0
- {uiprotect-3.8.0 → uiprotect-4.1.0}/src/uiprotect/cli/base.py +0 -0
- {uiprotect-3.8.0 → uiprotect-4.1.0}/src/uiprotect/cli/cameras.py +0 -0
- {uiprotect-3.8.0 → uiprotect-4.1.0}/src/uiprotect/cli/chimes.py +0 -0
- {uiprotect-3.8.0 → uiprotect-4.1.0}/src/uiprotect/cli/doorlocks.py +0 -0
- {uiprotect-3.8.0 → uiprotect-4.1.0}/src/uiprotect/cli/events.py +0 -0
- {uiprotect-3.8.0 → uiprotect-4.1.0}/src/uiprotect/cli/lights.py +0 -0
- {uiprotect-3.8.0 → uiprotect-4.1.0}/src/uiprotect/cli/liveviews.py +0 -0
- {uiprotect-3.8.0 → uiprotect-4.1.0}/src/uiprotect/cli/nvr.py +0 -0
- {uiprotect-3.8.0 → uiprotect-4.1.0}/src/uiprotect/cli/sensors.py +0 -0
- {uiprotect-3.8.0 → uiprotect-4.1.0}/src/uiprotect/cli/viewers.py +0 -0
- {uiprotect-3.8.0 → uiprotect-4.1.0}/src/uiprotect/data/__init__.py +0 -0
- {uiprotect-3.8.0 → uiprotect-4.1.0}/src/uiprotect/data/base.py +0 -0
- {uiprotect-3.8.0 → uiprotect-4.1.0}/src/uiprotect/data/convert.py +0 -0
- {uiprotect-3.8.0 → uiprotect-4.1.0}/src/uiprotect/data/nvr.py +0 -0
- {uiprotect-3.8.0 → uiprotect-4.1.0}/src/uiprotect/data/types.py +0 -0
- {uiprotect-3.8.0 → uiprotect-4.1.0}/src/uiprotect/data/user.py +0 -0
- {uiprotect-3.8.0 → uiprotect-4.1.0}/src/uiprotect/data/websocket.py +0 -0
- {uiprotect-3.8.0 → uiprotect-4.1.0}/src/uiprotect/exceptions.py +0 -0
- {uiprotect-3.8.0 → uiprotect-4.1.0}/src/uiprotect/py.typed +0 -0
- {uiprotect-3.8.0 → uiprotect-4.1.0}/src/uiprotect/release_cache.json +0 -0
- {uiprotect-3.8.0 → uiprotect-4.1.0}/src/uiprotect/stream.py +0 -0
- {uiprotect-3.8.0 → uiprotect-4.1.0}/src/uiprotect/test_util/__init__.py +0 -0
- {uiprotect-3.8.0 → uiprotect-4.1.0}/src/uiprotect/test_util/anonymize.py +0 -0
- {uiprotect-3.8.0 → uiprotect-4.1.0}/src/uiprotect/utils.py +0 -0
- {uiprotect-3.8.0 → uiprotect-4.1.0}/src/uiprotect/websocket.py +0 -0
|
@@ -464,13 +464,6 @@ class Bootstrap(ProtectBaseObject):
|
|
|
464
464
|
if TYPE_CHECKING:
|
|
465
465
|
assert isinstance(obj, Event)
|
|
466
466
|
self.process_event(obj)
|
|
467
|
-
elif model_type is ModelType.CAMERA:
|
|
468
|
-
if TYPE_CHECKING:
|
|
469
|
-
assert isinstance(obj, Camera)
|
|
470
|
-
if "last_ring" in data and (last_ring := obj.last_ring):
|
|
471
|
-
if is_recent := last_ring + RECENT_EVENT_MAX >= utc_now():
|
|
472
|
-
obj.set_ring_timeout()
|
|
473
|
-
_LOGGER.debug("last_ring for %s (%s)", obj.id, is_recent)
|
|
474
467
|
elif model_type is ModelType.SENSOR:
|
|
475
468
|
if TYPE_CHECKING:
|
|
476
469
|
assert isinstance(obj, Sensor)
|
|
@@ -499,9 +492,7 @@ class Bootstrap(ProtectBaseObject):
|
|
|
499
492
|
capture_ws_stats = self.capture_ws_stats
|
|
500
493
|
action = packet.action_frame.data
|
|
501
494
|
data = packet.data_frame.data
|
|
502
|
-
if capture_ws_stats
|
|
503
|
-
action = deepcopy(action)
|
|
504
|
-
data = deepcopy(data)
|
|
495
|
+
keys = list(data) if capture_ws_stats else None
|
|
505
496
|
|
|
506
497
|
new_update_id: str | None = action["newUpdateId"]
|
|
507
498
|
if new_update_id is not None:
|
|
@@ -512,11 +503,13 @@ class Bootstrap(ProtectBaseObject):
|
|
|
512
503
|
)
|
|
513
504
|
|
|
514
505
|
if capture_ws_stats:
|
|
506
|
+
if TYPE_CHECKING:
|
|
507
|
+
assert keys is not None
|
|
515
508
|
self._ws_stats.append(
|
|
516
509
|
WSStat(
|
|
517
|
-
model=
|
|
518
|
-
action=
|
|
519
|
-
keys=
|
|
510
|
+
model=action["modelKey"],
|
|
511
|
+
action=action["action"],
|
|
512
|
+
keys=keys,
|
|
520
513
|
keys_set=[] if message is None else list(message.changed_data),
|
|
521
514
|
size=len(packet.raw),
|
|
522
515
|
filtered=message is None,
|
|
@@ -977,7 +977,6 @@ class Camera(ProtectMotionDeviceModel):
|
|
|
977
977
|
last_smart_detect_event_ids: dict[SmartDetectObjectType, str] = {}
|
|
978
978
|
last_smart_audio_detect_event_ids: dict[SmartDetectAudioType, str] = {}
|
|
979
979
|
talkback_stream: TalkbackStream | None = None
|
|
980
|
-
_last_ring_timeout: datetime | None = PrivateAttr(None)
|
|
981
980
|
|
|
982
981
|
@classmethod
|
|
983
982
|
@cache
|
|
@@ -1845,12 +1844,6 @@ class Camera(ProtectMotionDeviceModel):
|
|
|
1845
1844
|
# endregion
|
|
1846
1845
|
# endregion
|
|
1847
1846
|
|
|
1848
|
-
@property
|
|
1849
|
-
def is_ringing(self) -> bool:
|
|
1850
|
-
if self._last_ring_timeout is None:
|
|
1851
|
-
return False
|
|
1852
|
-
return utc_now() < self._last_ring_timeout
|
|
1853
|
-
|
|
1854
1847
|
@property
|
|
1855
1848
|
def chime_type(self) -> ChimeType:
|
|
1856
1849
|
if self.chime_duration.total_seconds() == 0.3:
|
|
@@ -1935,10 +1928,6 @@ class Camera(ProtectMotionDeviceModel):
|
|
|
1935
1928
|
|
|
1936
1929
|
return False
|
|
1937
1930
|
|
|
1938
|
-
def set_ring_timeout(self) -> None:
|
|
1939
|
-
self._last_ring_timeout = utc_now() + EVENT_PING_INTERVAL
|
|
1940
|
-
self._event_callback_ping()
|
|
1941
|
-
|
|
1942
1931
|
def get_privacy_zone(self) -> tuple[int | None, CameraZone | None]:
|
|
1943
1932
|
for index, zone in enumerate(self.privacy_zones):
|
|
1944
1933
|
if zone.name == PRIVACY_ZONE_NAME:
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|