From f34a9573cc984429dafaa3abf990f283df0c016b Mon Sep 17 00:00:00 2001 From: starkillerOG Date: Sat, 16 Nov 2024 18:23:48 +0100 Subject: [PATCH] Skip checking RTSP url for battery cameras to not wake them --- reolink_aio/api.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/reolink_aio/api.py b/reolink_aio/api.py index e0e97ea..2ea0699 100644 --- a/reolink_aio/api.py +++ b/reolink_aio/api.py @@ -3057,9 +3057,15 @@ async def get_rtsp_stream_source(self, channel: int, stream: Optional[str] = Non _LOGGER.debug("Checking RTSP urls host %s:%s, channel %s, stream %s", self._host, self._port, channel, stream) if self.api_version("rtsp") >= 3 and stream == "main" and channel in self._rtsp_mainStream: + if self.supported(channel, "battery"): + _LOGGER.debug("Checking RTSP url host %s, channel %s, stream %s skipped because it is a battery camera", self._host, channel, stream) + return self._rtsp_mainStream[channel] if await self._check_rtsp_url(self._rtsp_mainStream[channel], channel, stream): return self._rtsp_mainStream[channel] if self.api_version("rtsp") >= 3 and stream == "sub" and channel in self._rtsp_subStream: + if self.supported(channel, "battery"): + _LOGGER.debug("Checking RTSP url host %s, channel %s, stream %s skipped because it is a battery camera", self._host, channel, stream) + return self._rtsp_subStream[channel] if await self._check_rtsp_url(self._rtsp_subStream[channel], channel, stream): return self._rtsp_subStream[channel]