Home Assistant Unofficial Reference 2024.12.1
homeassistant.components.onvif.parsers Namespace Reference

Functions

str _normalize_video_source (str source)
 
Event|None async_parse_backup_last (str uid, msg)
 
Event|None async_parse_cell_motion_detector (str uid, msg)
 
Event|None async_parse_count_aggregation_counter (str uid, msg)
 
Event|None async_parse_detected_sound (str uid, msg)
 
Event|None async_parse_digital_input (str uid, msg)
 
Event|None async_parse_dog_cat_detector (str uid, msg)
 
Event|None async_parse_face_detector (str uid, msg)
 
Event|None async_parse_field_detector (str uid, msg)
 
Event|None async_parse_human_shape_detect (str uid, msg)
 
Event|None async_parse_image_too_blurry (str uid, msg)
 
Event|None async_parse_image_too_bright (str uid, msg)
 
Event|None async_parse_image_too_dark (str uid, msg)
 
Event|None async_parse_jobstate (str uid, msg)
 
Event|None async_parse_last_clock_sync (str uid, msg)
 
Event|None async_parse_last_reboot (str uid, msg)
 
Event|None async_parse_last_reset (str uid, msg)
 
Event|None async_parse_linedetector_crossed (str uid, msg)
 
Event|None async_parse_motion_alarm (str uid, msg)
 
Event|None async_parse_motion_region_detector (str uid, msg)
 
Event|None async_parse_person_detector (str uid, msg)
 
Event|None async_parse_processor_usage (str uid, msg)
 
Event|None async_parse_relay (str uid, msg)
 
Event|None async_parse_scene_change (str uid, msg)
 
Event|None async_parse_storage_failure (str uid, msg)
 
Event|None async_parse_tamper_detector (str uid, msg)
 
Event|None async_parse_vehicle_detector (str uid, msg)
 
Event|None async_parse_visitor_detector (str uid, msg)
 
tuple[str, Any] extract_message (Any msg)
 
datetime.datetime|None local_datetime_or_none (str value)
 

Variables

dictionary VIDEO_SOURCE_MAPPING
 

Detailed Description

ONVIF event parsers.

Function Documentation

◆ _normalize_video_source()

str homeassistant.components.onvif.parsers._normalize_video_source ( str  source)
private
Normalize video source.

Some cameras do not set the VideoSourceToken correctly so we get duplicate
sensors, so we need to normalize it to the correct value.

Definition at line 29 of file parsers.py.

◆ async_parse_backup_last()

Event | None homeassistant.components.onvif.parsers.async_parse_backup_last ( str  uid,
  msg 
)
Handle parsing event message.

Topic: tns1:Monitoring/Backup/Last

Definition at line 583 of file parsers.py.

◆ async_parse_cell_motion_detector()

Event | None homeassistant.components.onvif.parsers.async_parse_cell_motion_detector ( str  uid,
  msg 
)
Handle parsing event message.

Topic: tns1:RuleEngine/CellMotionDetector/Motion

Definition at line 230 of file parsers.py.

◆ async_parse_count_aggregation_counter()

Event | None homeassistant.components.onvif.parsers.async_parse_count_aggregation_counter ( str  uid,
  msg 
)
Handle parsing event message.

Topic: tns1:RuleEngine/CountAggregation/Counter

Definition at line 685 of file parsers.py.

◆ async_parse_detected_sound()

Event | None homeassistant.components.onvif.parsers.async_parse_detected_sound ( str  uid,
  msg 
)
Handle parsing event message.

Topic: tns1:AudioAnalytics/Audio/DetectedSound

Definition at line 167 of file parsers.py.

◆ async_parse_digital_input()

Event | None homeassistant.components.onvif.parsers.async_parse_digital_input ( str  uid,
  msg 
)
Handle parsing event message.

Topic: tns1:Device/Trigger/DigitalInput

Definition at line 449 of file parsers.py.

◆ async_parse_dog_cat_detector()

Event | None homeassistant.components.onvif.parsers.async_parse_dog_cat_detector ( str  uid,
  msg 
)
Handle parsing event message.

Topic: tns1:RuleEngine/MyRuleDetector/DogCatDetect

Definition at line 324 of file parsers.py.

◆ async_parse_face_detector()

Event | None homeassistant.components.onvif.parsers.async_parse_face_detector ( str  uid,
  msg 
)
Handle parsing event message.

Topic: tns1:RuleEngine/MyRuleDetector/FaceDetect

Definition at line 399 of file parsers.py.

◆ async_parse_field_detector()

Event | None homeassistant.components.onvif.parsers.async_parse_field_detector ( str  uid,
  msg 
)
Handle parsing event message.

Topic: tns1:RuleEngine/FieldDetector/ObjectsInside

Definition at line 198 of file parsers.py.

◆ async_parse_human_shape_detect()

Event | None homeassistant.components.onvif.parsers.async_parse_human_shape_detect ( str  uid,
  msg 
)
Handle parsing event message.

Topic: tns1:UserAlarm/IVA/HumanShapeDetect

Definition at line 717 of file parsers.py.

◆ async_parse_image_too_blurry()

Event | None homeassistant.components.onvif.parsers.async_parse_image_too_blurry ( str  uid,
  msg 
)
Handle parsing event message.

Topic: tns1:VideoSource/ImageTooBlurry/*

Definition at line 74 of file parsers.py.

◆ async_parse_image_too_bright()

Event | None homeassistant.components.onvif.parsers.async_parse_image_too_bright ( str  uid,
  msg 
)
Handle parsing event message.

Topic: tns1:VideoSource/ImageTooBright/*

Definition at line 122 of file parsers.py.

◆ async_parse_image_too_dark()

Event | None homeassistant.components.onvif.parsers.async_parse_image_too_dark ( str  uid,
  msg 
)
Handle parsing event message.

Topic: tns1:VideoSource/ImageTooDark/*

Definition at line 98 of file parsers.py.

◆ async_parse_jobstate()

Event | None homeassistant.components.onvif.parsers.async_parse_jobstate ( str  uid,
  msg 
)
Handle parsing event message.

Topic: tns1:RecordingConfig/JobState

Definition at line 630 of file parsers.py.

◆ async_parse_last_clock_sync()

Event | None homeassistant.components.onvif.parsers.async_parse_last_clock_sync ( str  uid,
  msg 
)
Handle parsing event message.

Topic: tns1:Monitoring/OperatingTime/LastClockSynchronization

Definition at line 607 of file parsers.py.

◆ async_parse_last_reboot()

Event | None homeassistant.components.onvif.parsers.async_parse_last_reboot ( str  uid,
  msg 
)
Handle parsing event message.

Topic: tns1:Monitoring/OperatingTime/LastReboot

Definition at line 538 of file parsers.py.

◆ async_parse_last_reset()

Event | None homeassistant.components.onvif.parsers.async_parse_last_reset ( str  uid,
  msg 
)
Handle parsing event message.

Topic: tns1:Monitoring/OperatingTime/LastReset

Definition at line 560 of file parsers.py.

◆ async_parse_linedetector_crossed()

Event | None homeassistant.components.onvif.parsers.async_parse_linedetector_crossed ( str  uid,
  msg 
)
Handle parsing event message.

Topic: tns1:RuleEngine/LineDetector/Crossed

Definition at line 653 of file parsers.py.

◆ async_parse_motion_alarm()

Event | None homeassistant.components.onvif.parsers.async_parse_motion_alarm ( str  uid,
  msg 
)
Handle parsing event message.

Topic: tns1:VideoSource/MotionAlarm

Definition at line 51 of file parsers.py.

◆ async_parse_motion_region_detector()

Event | None homeassistant.components.onvif.parsers.async_parse_motion_region_detector ( str  uid,
  msg 
)
Handle parsing event message.

Topic: tns1:RuleEngine/MotionRegionDetector/Motion

Definition at line 261 of file parsers.py.

◆ async_parse_person_detector()

Event | None homeassistant.components.onvif.parsers.async_parse_person_detector ( str  uid,
  msg 
)
Handle parsing event message.

Topic: tns1:RuleEngine/MyRuleDetector/PeopleDetect

Definition at line 374 of file parsers.py.

◆ async_parse_processor_usage()

Event | None homeassistant.components.onvif.parsers.async_parse_processor_usage ( str  uid,
  msg 
)
Handle parsing event message.

Topic: tns1:Monitoring/ProcessorUsage

Definition at line 513 of file parsers.py.

◆ async_parse_relay()

Event | None homeassistant.components.onvif.parsers.async_parse_relay ( str  uid,
  msg 
)
Handle parsing event message.

Topic: tns1:Device/Trigger/Relay

Definition at line 470 of file parsers.py.

◆ async_parse_scene_change()

Event | None homeassistant.components.onvif.parsers.async_parse_scene_change ( str  uid,
  msg 
)
Handle parsing event message.

Topic: tns1:VideoSource/GlobalSceneChange/*

Definition at line 146 of file parsers.py.

◆ async_parse_storage_failure()

Event | None homeassistant.components.onvif.parsers.async_parse_storage_failure ( str  uid,
  msg 
)
Handle parsing event message.

Topic: tns1:Device/HardwareFailure/StorageFailure

Definition at line 491 of file parsers.py.

◆ async_parse_tamper_detector()

Event | None homeassistant.components.onvif.parsers.async_parse_tamper_detector ( str  uid,
  msg 
)
Handle parsing event message.

Topic: tns1:RuleEngine/TamperDetector/Tamper

Definition at line 292 of file parsers.py.

◆ async_parse_vehicle_detector()

Event | None homeassistant.components.onvif.parsers.async_parse_vehicle_detector ( str  uid,
  msg 
)
Handle parsing event message.

Topic: tns1:RuleEngine/MyRuleDetector/VehicleDetect

Definition at line 349 of file parsers.py.

◆ async_parse_visitor_detector()

Event | None homeassistant.components.onvif.parsers.async_parse_visitor_detector ( str  uid,
  msg 
)
Handle parsing event message.

Topic: tns1:RuleEngine/MyRuleDetector/Visitor

Definition at line 424 of file parsers.py.

◆ extract_message()

tuple[str, Any] homeassistant.components.onvif.parsers.extract_message ( Any  msg)
Extract the message content and the topic.

Definition at line 24 of file parsers.py.

◆ local_datetime_or_none()

datetime.datetime | None homeassistant.components.onvif.parsers.local_datetime_or_none ( str  value)
Convert strings to datetimes, if invalid, return None.

Definition at line 38 of file parsers.py.

Variable Documentation

◆ VIDEO_SOURCE_MAPPING

dictionary homeassistant.components.onvif.parsers.VIDEO_SOURCE_MAPPING
Initial value:
1 = {
2  "vsconf": "VideoSourceToken",
3 }

Definition at line 19 of file parsers.py.