Skip to content

Commit

Permalink
Bump down push events to debug log level
Browse files Browse the repository at this point in the history
  • Loading branch information
starkillerOG committed Nov 12, 2024
1 parent a84444c commit 83bd032
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions reolink_aio/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -5794,7 +5794,7 @@ async def pull_point_request(self):
_LOGGER.debug("Reolink %s received ONVIF pull point message without event", self.nvr_name)
return []

_LOGGER.info("Reolink %s received ONVIF pull point event", self.nvr_name)
_LOGGER.debug("Reolink %s received ONVIF pull point event", self.nvr_name)

return await self.ONVIF_event_callback(response, root)

Expand Down Expand Up @@ -5924,7 +5924,7 @@ async def ONVIF_event_callback(self, data: str, root: XML.Element | None = None)
self._onvif_only_motion[sub_type] = False

state = data_element.attrib["Value"] == "true"
_LOGGER.info("Reolink %s ONVIF event channel %s, %s: %s", self.nvr_name, channel, rule, state)
_LOGGER.debug("Reolink %s ONVIF event channel %s, %s: %s", self.nvr_name, channel, rule, state)

if rule == "Motion":
self._motion_detection_states[channel] = state
Expand Down
10 changes: 5 additions & 5 deletions reolink_aio/baichuan/baichuan.py
Original file line number Diff line number Diff line change
Expand Up @@ -339,17 +339,17 @@ def _parse_xml(self, cmd_id: int, xml: str) -> None:
motion_state = "MD" in states
visitor_state = "visitor" in states
if motion_state != self.http_api._motion_detection_states.get(channel, motion_state):
_LOGGER.info("Reolink %s TCP event channel %s, motion: %s", self.http_api.nvr_name, channel, motion_state)
_LOGGER.debug("Reolink %s TCP event channel %s, motion: %s", self.http_api.nvr_name, channel, motion_state)
if visitor_state != self.http_api._visitor_states.get(channel, visitor_state):
_LOGGER.info("Reolink %s TCP event channel %s, visitor: %s", self.http_api.nvr_name, channel, visitor_state)
_LOGGER.debug("Reolink %s TCP event channel %s, visitor: %s", self.http_api.nvr_name, channel, visitor_state)
self.http_api._motion_detection_states[channel] = motion_state
self.http_api._visitor_states[channel] = visitor_state

if ai_types is not None:
for ai_type_key in self.http_api._ai_detection_states.get(channel, {}):
ai_state = ai_type_key in ai_types
if ai_state != self.http_api._ai_detection_states[channel][ai_type_key]:
_LOGGER.info("Reolink %s TCP event channel %s, %s: %s", self.http_api.nvr_name, channel, ai_type_key, ai_state)
_LOGGER.debug("Reolink %s TCP event channel %s, %s: %s", self.http_api.nvr_name, channel, ai_type_key, ai_state)
self.http_api._ai_detection_states[channel][ai_type_key] = ai_state

ai_type_list = ai_types.split(",")
Expand All @@ -363,7 +363,7 @@ def _parse_xml(self, cmd_id: int, xml: str) -> None:
state = self._get_value_from_xml_element(event, "mode")
if state is not None:
self._day_night_state = state
_LOGGER.info("Reolink %s TCP event channel %s, day night state: %s", self.http_api.nvr_name, channel, state)
_LOGGER.debug("Reolink %s TCP event channel %s, day night state: %s", self.http_api.nvr_name, channel, state)
else:
if f"TCP_event_tag_{event.tag}" not in self._log_once:
self._log_once.append(f"TCP_event_tag_{event.tag}")
Expand All @@ -380,7 +380,7 @@ def _parse_xml(self, cmd_id: int, xml: str) -> None:
state = self._get_value_from_xml_element(event, "status")
if state is not None:
self.http_api._whiteled_settings[channel]["WhiteLed"]["state"] = int(state)
_LOGGER.info("Reolink %s TCP event channel %s, Floodlight: %s", self.http_api.nvr_name, channel, state)
_LOGGER.debug("Reolink %s TCP event channel %s, Floodlight: %s", self.http_api.nvr_name, channel, state)

elif cmd_id == 623: # Sleep status
pass
Expand Down

0 comments on commit 83bd032

Please sign in to comment.