Home Assistant Unofficial Reference 2024.12.1
homeassistant.components.amcrest.camera.AmcrestCam Class Reference
Inheritance diagram for homeassistant.components.amcrest.camera.AmcrestCam:
[legend]
Collaboration diagram for homeassistant.components.amcrest.camera.AmcrestCam:
[legend]

Public Member Functions

None __init__ (self, str name, AmcrestDevice device, FFmpegManager ffmpeg)
 
None async_added_to_hass (self)
 
bytes|None async_camera_image (self, int|None width=None, int|None height=None)
 
None async_disable_audio (self)
 
None async_disable_motion_detection (self)
 
None async_disable_motion_recording (self)
 
None async_disable_recording (self)
 
None async_enable_audio (self)
 
None async_enable_motion_detection (self)
 
None async_enable_motion_recording (self)
 
None async_enable_recording (self)
 
None async_goto_preset (self, int preset)
 
None async_on_demand_update (self)
 
None async_ptz_control (self, str movement, float travel_time)
 
None async_set_color_bw (self, str color_bw)
 
None async_start_tour (self)
 
None async_stop_tour (self)
 
None async_turn_off (self)
 
None async_turn_on (self)
 
None async_update (self)
 
None async_will_remove_from_hass (self)
 
bool available (self)
 
str|None brand (self)
 
dict[str, Any] extra_state_attributes (self)
 
web.StreamResponse|None handle_async_mjpeg_stream (self, web.Request request)
 
bool is_on (self)
 
bool is_recording (self)
 
str|None model (self)
 
bool motion_detection_enabled (self)
 
str name (self)
 
str|None stream_source (self)
 
- Public Member Functions inherited from homeassistant.components.camera.Camera
None __init__ (self)
 
Stream|None async_create_stream (self)
 
WebRTCClientConfiguration async_get_webrtc_client_configuration (self)
 
None async_handle_async_webrtc_offer (self, str offer_sdp, str session_id, WebRTCSendMessage send_message)
 
str|None async_handle_web_rtc_offer (self, str offer_sdp)
 
None async_internal_added_to_hass (self)
 
None async_on_webrtc_candidate (self, str session_id, RTCIceCandidateInit candidate)
 
None async_refresh_providers (self, *bool write_state=True)
 
None async_update_token (self)
 
None async_write_ha_state (self)
 
CameraCapabilities camera_capabilities (self)
 
bytes|None camera_image (self, int|None width=None, int|None height=None)
 
None close_webrtc_session (self, str session_id)
 
None disable_motion_detection (self)
 
None enable_motion_detection (self)
 
str entity_picture (self)
 
float frame_interval (self)
 
StreamType|None frontend_stream_type (self)
 
web.StreamResponse handle_async_still_stream (self, web.Request request, float interval)
 
bool is_streaming (self)
 
str state (self)
 
dict[str, str|Nonestate_attributes (self)
 
CameraEntityFeature supported_features (self)
 
CameraEntityFeature supported_features_compat (self)
 
None turn_off (self)
 
None turn_on (self)
 
bool use_stream_for_stills (self)
 
- Public Member Functions inherited from homeassistant.helpers.entity.Entity
None __init_subclass__ (cls, **Any kwargs)
 
str __repr__ (self)
 
None add_to_platform_abort (self)
 
None add_to_platform_finish (self)
 
None add_to_platform_start (self, HomeAssistant hass, EntityPlatform platform, asyncio.Semaphore|None parallel_updates)
 
bool assumed_state (self)
 
None async_device_update (self, bool warning=True)
 
None async_internal_will_remove_from_hass (self)
 
None async_on_remove (self, CALLBACK_TYPE func)
 
None async_registry_entry_updated (self)
 
None async_remove (self, *bool force_remove=False)
 
None async_removed_from_registry (self)
 
None async_schedule_update_ha_state (self, bool force_refresh=False)
 
None async_set_context (self, Context context)
 
None async_update_ha_state (self, bool force_refresh=False)
 
str|None attribution (self)
 
dict[str, Any]|None capability_attributes (self)
 
str|None device_class (self)
 
DeviceInfo|None device_info (self)
 
bool enabled (self)
 
EntityCategory|None entity_category (self)
 
bool entity_registry_enabled_default (self)
 
bool entity_registry_visible_default (self)
 
bool force_update (self)
 
HassJobType get_hassjob_type (self, str function_name)
 
er.EntityOptionsType|None get_initial_entity_options (self)
 
bool has_entity_name (self)
 
str|None icon (self)
 
None schedule_update_ha_state (self, bool force_refresh=False)
 
bool should_poll (self)
 
str|None suggested_object_id (self)
 
str|None translation_key (self)
 
Mapping[str, strtranslation_placeholders (self)
 
str|None unique_id (self)
 
str|None unit_of_measurement (self)
 
bool use_device_name (self)
 
- Public Member Functions inherited from homeassistant.helpers.entity.CachedProperties
None __init__ (cls, str name, tuple[type,...] bases, dict[Any, Any] namespace, **Any kwargs)
 
Any __new__ (mcs, str name, tuple[type,...] bases, dict[Any, Any] namespace, set[str]|None cached_properties=None, **Any kwargs)
 

Private Member Functions

None _async_change_light (self)
 
None _async_change_setting (self, str|bool value, str description, str|None attr=None)
 
None _async_enable_audio (self, bool enable)
 
None _async_enable_motion_detection (self, bool enable)
 
None _async_enable_motion_recording (self, bool enable)
 
None _async_enable_recording (self, bool enable)
 
None _async_enable_video (self, bool enable)
 
bool _async_get_audio (self)
 
str _async_get_color_mode (self)
 
bytes|None _async_get_image (self)
 
bool _async_get_indicator_light (self)
 
bool _async_get_motion_detection (self)
 
bool _async_get_motion_recording (self)
 
bool _async_get_recording (self)
 
bool _async_get_video (self)
 
None _async_goto_preset (self, int preset)
 
None _async_set_audio (self, bool enable)
 
None _async_set_color_bw (self, str cbw)
 
None _async_set_color_mode (self, str cbw)
 
None _async_set_indicator_light (self, bool enable)
 
None _async_set_motion_detection (self, bool enable)
 
None _async_set_motion_recording (self, bool enable)
 
None _async_set_recording (self, bool enable)
 
None _async_set_video (self, bool enable)
 
None _async_start_tour (self, bool start)
 
None _check_snapshot_ok (self)
 

Private Attributes

 _api
 
 _attr_unique_id
 
 _auth
 
 _brand
 
 _channel
 
 _control_light
 
 _ffmpeg
 
 _ffmpeg_arguments
 
 _model
 
 _name
 
 _resolution
 
 _rtsp_url
 
 _snapshot_task
 
 _stream_source
 
 _token
 

Static Private Attributes

bool _attr_should_poll = True
 
 _attr_supported_features = CameraEntityFeature.ON_OFF | CameraEntityFeature.STREAM
 

Additional Inherited Members

- Public Attributes inherited from homeassistant.components.camera.Camera
 stream
 
- Public Attributes inherited from homeassistant.helpers.entity.Entity
 device_entry
 
 entity_id
 
 hass
 
 parallel_updates
 
 platform
 
 registry_entry
 
- Static Public Attributes inherited from homeassistant.components.camera.Camera
 bool
 
 CameraEntityFeature
 
 float
 
 None
 
- Static Public Attributes inherited from homeassistant.helpers.entity.Entity
 bool
 
 EntityPlatform
 
 HomeAssistant
 
 None
 
 StateInfo
 
 StateType
 
 str
 

Detailed Description

An implementation of an Amcrest IP camera.

Definition at line 151 of file camera.py.

Constructor & Destructor Documentation

◆ __init__()

None homeassistant.components.amcrest.camera.AmcrestCam.__init__ (   self,
str  name,
AmcrestDevice  device,
FFmpegManager  ffmpeg 
)
Initialize an Amcrest camera.

Definition at line 157 of file camera.py.

Member Function Documentation

◆ _async_change_light()

None homeassistant.components.amcrest.camera.AmcrestCam._async_change_light (   self)
private
Enable or disable indicator light.

Definition at line 600 of file camera.py.

◆ _async_change_setting()

None homeassistant.components.amcrest.camera.AmcrestCam._async_change_setting (   self,
str | bool  value,
str  description,
str | None   attr = None 
)
private

Definition at line 490 of file camera.py.

◆ _async_enable_audio()

None homeassistant.components.amcrest.camera.AmcrestCam._async_enable_audio (   self,
bool  enable 
)
private
Enable or disable audio stream.

Definition at line 579 of file camera.py.

◆ _async_enable_motion_detection()

None homeassistant.components.amcrest.camera.AmcrestCam._async_enable_motion_detection (   self,
bool  enable 
)
private
Enable or disable motion detection.

Definition at line 563 of file camera.py.

◆ _async_enable_motion_recording()

None homeassistant.components.amcrest.camera.AmcrestCam._async_enable_motion_recording (   self,
bool  enable 
)
private
Enable or disable motion recording.

Definition at line 612 of file camera.py.

◆ _async_enable_recording()

None homeassistant.components.amcrest.camera.AmcrestCam._async_enable_recording (   self,
bool  enable 
)
private
Turn recording on or off.

Definition at line 547 of file camera.py.

◆ _async_enable_video()

None homeassistant.components.amcrest.camera.AmcrestCam._async_enable_video (   self,
bool  enable 
)
private
Enable or disable camera video stream.

Definition at line 526 of file camera.py.

◆ _async_get_audio()

bool homeassistant.components.amcrest.camera.AmcrestCam._async_get_audio (   self)
private

Definition at line 569 of file camera.py.

◆ _async_get_color_mode()

str homeassistant.components.amcrest.camera.AmcrestCam._async_get_color_mode (   self)
private

Definition at line 627 of file camera.py.

◆ _async_get_image()

bytes | None homeassistant.components.amcrest.camera.AmcrestCam._async_get_image (   self)
private

Definition at line 190 of file camera.py.

◆ _async_get_indicator_light()

bool homeassistant.components.amcrest.camera.AmcrestCam._async_get_indicator_light (   self)
private

Definition at line 585 of file camera.py.

◆ _async_get_motion_detection()

bool homeassistant.components.amcrest.camera.AmcrestCam._async_get_motion_detection (   self)
private

Definition at line 556 of file camera.py.

◆ _async_get_motion_recording()

bool homeassistant.components.amcrest.camera.AmcrestCam._async_get_motion_recording (   self)
private

Definition at line 606 of file camera.py.

◆ _async_get_recording()

bool homeassistant.components.amcrest.camera.AmcrestCam._async_get_recording (   self)
private

Definition at line 537 of file camera.py.

◆ _async_get_video()

bool homeassistant.components.amcrest.camera.AmcrestCam._async_get_video (   self)
private

Definition at line 516 of file camera.py.

◆ _async_goto_preset()

None homeassistant.components.amcrest.camera.AmcrestCam._async_goto_preset (   self,
int  preset 
)
private
Move camera position and zoom to preset.

Definition at line 618 of file camera.py.

◆ _async_set_audio()

None homeassistant.components.amcrest.camera.AmcrestCam._async_set_audio (   self,
bool  enable 
)
private

Definition at line 574 of file camera.py.

◆ _async_set_color_bw()

None homeassistant.components.amcrest.camera.AmcrestCam._async_set_color_bw (   self,
str  cbw 
)
private
Set camera color mode.

Definition at line 633 of file camera.py.

◆ _async_set_color_mode()

None homeassistant.components.amcrest.camera.AmcrestCam._async_set_color_mode (   self,
str  cbw 
)
private

Definition at line 630 of file camera.py.

◆ _async_set_indicator_light()

None homeassistant.components.amcrest.camera.AmcrestCam._async_set_indicator_light (   self,
bool  enable 
)
private

Definition at line 595 of file camera.py.

◆ _async_set_motion_detection()

None homeassistant.components.amcrest.camera.AmcrestCam._async_set_motion_detection (   self,
bool  enable 
)
private

Definition at line 559 of file camera.py.

◆ _async_set_motion_recording()

None homeassistant.components.amcrest.camera.AmcrestCam._async_set_motion_recording (   self,
bool  enable 
)
private

Definition at line 609 of file camera.py.

◆ _async_set_recording()

None homeassistant.components.amcrest.camera.AmcrestCam._async_set_recording (   self,
bool  enable 
)
private

Definition at line 540 of file camera.py.

◆ _async_set_video()

None homeassistant.components.amcrest.camera.AmcrestCam._async_set_video (   self,
bool  enable 
)
private

Definition at line 521 of file camera.py.

◆ _async_start_tour()

None homeassistant.components.amcrest.camera.AmcrestCam._async_start_tour (   self,
bool  start 
)
private
Start camera tour.

Definition at line 637 of file camera.py.

◆ _check_snapshot_ok()

None homeassistant.components.amcrest.camera.AmcrestCam._check_snapshot_ok (   self)
private

Definition at line 180 of file camera.py.

◆ async_added_to_hass()

None homeassistant.components.amcrest.camera.AmcrestCam.async_added_to_hass (   self)
Subscribe to signals and add camera to list.

Reimplemented from homeassistant.helpers.entity.Entity.

Definition at line 336 of file camera.py.

◆ async_camera_image()

bytes | None homeassistant.components.amcrest.camera.AmcrestCam.async_camera_image (   self,
int | None   width = None,
int | None   height = None 
)
Return a still image response from the camera.

Reimplemented from homeassistant.components.camera.Camera.

Definition at line 203 of file camera.py.

◆ async_disable_audio()

None homeassistant.components.amcrest.camera.AmcrestCam.async_disable_audio (   self)
Call the job and disable audio.

Definition at line 441 of file camera.py.

◆ async_disable_motion_detection()

None homeassistant.components.amcrest.camera.AmcrestCam.async_disable_motion_detection (   self)
Disable motion detection in camera.

Reimplemented from homeassistant.components.camera.Camera.

Definition at line 423 of file camera.py.

◆ async_disable_motion_recording()

None homeassistant.components.amcrest.camera.AmcrestCam.async_disable_motion_recording (   self)
Call the job and disable motion recording.

Definition at line 449 of file camera.py.

◆ async_disable_recording()

None homeassistant.components.amcrest.camera.AmcrestCam.async_disable_recording (   self)
Call the job and disable recording.

Definition at line 433 of file camera.py.

◆ async_enable_audio()

None homeassistant.components.amcrest.camera.AmcrestCam.async_enable_audio (   self)
Call the job and enable audio.

Definition at line 437 of file camera.py.

◆ async_enable_motion_detection()

None homeassistant.components.amcrest.camera.AmcrestCam.async_enable_motion_detection (   self)
Enable motion detection in the camera.

Reimplemented from homeassistant.components.camera.Camera.

Definition at line 419 of file camera.py.

◆ async_enable_motion_recording()

None homeassistant.components.amcrest.camera.AmcrestCam.async_enable_motion_recording (   self)
Call the job and enable motion recording.

Definition at line 445 of file camera.py.

◆ async_enable_recording()

None homeassistant.components.amcrest.camera.AmcrestCam.async_enable_recording (   self)
Call the job and enable recording.

Definition at line 429 of file camera.py.

◆ async_goto_preset()

None homeassistant.components.amcrest.camera.AmcrestCam.async_goto_preset (   self,
int  preset 
)
Call the job and move camera to preset position.

Definition at line 453 of file camera.py.

◆ async_on_demand_update()

None homeassistant.components.amcrest.camera.AmcrestCam.async_on_demand_update (   self)
Update state.

Definition at line 332 of file camera.py.

◆ async_ptz_control()

None homeassistant.components.amcrest.camera.AmcrestCam.async_ptz_control (   self,
str  movement,
float  travel_time 
)
Move or zoom camera in specified direction.

Definition at line 469 of file camera.py.

◆ async_set_color_bw()

None homeassistant.components.amcrest.camera.AmcrestCam.async_set_color_bw (   self,
str  color_bw 
)
Call the job and set camera color mode.

Definition at line 457 of file camera.py.

◆ async_start_tour()

None homeassistant.components.amcrest.camera.AmcrestCam.async_start_tour (   self)
Call the job and start camera tour.

Definition at line 461 of file camera.py.

◆ async_stop_tour()

None homeassistant.components.amcrest.camera.AmcrestCam.async_stop_tour (   self)
Call the job and stop camera tour.

Definition at line 465 of file camera.py.

◆ async_turn_off()

None homeassistant.components.amcrest.camera.AmcrestCam.async_turn_off (   self)
Turn off camera.

Reimplemented from homeassistant.components.camera.Camera.

Definition at line 411 of file camera.py.

◆ async_turn_on()

None homeassistant.components.amcrest.camera.AmcrestCam.async_turn_on (   self)
Turn on camera.

Reimplemented from homeassistant.components.camera.Camera.

Definition at line 415 of file camera.py.

◆ async_update()

None homeassistant.components.amcrest.camera.AmcrestCam.async_update (   self)
Update entity status.

Definition at line 361 of file camera.py.

◆ async_will_remove_from_hass()

None homeassistant.components.amcrest.camera.AmcrestCam.async_will_remove_from_hass (   self)
Remove camera from list and disconnect from signals.

Reimplemented from homeassistant.helpers.entity.Entity.

Definition at line 355 of file camera.py.

◆ available()

bool homeassistant.components.amcrest.camera.AmcrestCam.available (   self)
Return True if entity is available.

Reimplemented from homeassistant.components.camera.Camera.

Definition at line 294 of file camera.py.

◆ brand()

str | None homeassistant.components.amcrest.camera.AmcrestCam.brand (   self)
Return the camera brand.

Reimplemented from homeassistant.components.camera.Camera.

Definition at line 306 of file camera.py.

◆ extra_state_attributes()

dict[str, Any] homeassistant.components.amcrest.camera.AmcrestCam.extra_state_attributes (   self)
Return the Amcrest-specific camera state attributes.

Reimplemented from homeassistant.helpers.entity.Entity.

Definition at line 280 of file camera.py.

◆ handle_async_mjpeg_stream()

web.StreamResponse | None homeassistant.components.amcrest.camera.AmcrestCam.handle_async_mjpeg_stream (   self,
web.Request   request 
)
Return an MJPEG stream.

Reimplemented from homeassistant.components.camera.Camera.

Definition at line 227 of file camera.py.

◆ is_on()

bool homeassistant.components.amcrest.camera.AmcrestCam.is_on (   self)
Return true if on.

Reimplemented from homeassistant.components.camera.Camera.

Definition at line 325 of file camera.py.

◆ is_recording()

bool homeassistant.components.amcrest.camera.AmcrestCam.is_recording (   self)
Return true if the device is recording.

Reimplemented from homeassistant.components.camera.Camera.

Definition at line 301 of file camera.py.

◆ model()

str | None homeassistant.components.amcrest.camera.AmcrestCam.model (   self)
Return the camera model.

Reimplemented from homeassistant.components.camera.Camera.

Definition at line 316 of file camera.py.

◆ motion_detection_enabled()

bool homeassistant.components.amcrest.camera.AmcrestCam.motion_detection_enabled (   self)
Return the camera motion detection status.

Reimplemented from homeassistant.components.camera.Camera.

Definition at line 311 of file camera.py.

◆ name()

str homeassistant.components.amcrest.camera.AmcrestCam.name (   self)
Return the name of this camera.

Reimplemented from homeassistant.helpers.entity.Entity.

Definition at line 275 of file camera.py.

◆ stream_source()

str | None homeassistant.components.amcrest.camera.AmcrestCam.stream_source (   self)
Return the source of the stream.

Reimplemented from homeassistant.components.camera.Camera.

Definition at line 320 of file camera.py.

Member Data Documentation

◆ _api

homeassistant.components.amcrest.camera.AmcrestCam._api
private

Definition at line 161 of file camera.py.

◆ _attr_should_poll

bool homeassistant.components.amcrest.camera.AmcrestCam._attr_should_poll = True
staticprivate

Definition at line 154 of file camera.py.

◆ _attr_supported_features

homeassistant.components.amcrest.camera.AmcrestCam._attr_supported_features = CameraEntityFeature.ON_OFF | CameraEntityFeature.STREAM
staticprivate

Definition at line 155 of file camera.py.

◆ _attr_unique_id

homeassistant.components.amcrest.camera.AmcrestCam._attr_unique_id
private

Definition at line 384 of file camera.py.

◆ _auth

homeassistant.components.amcrest.camera.AmcrestCam._auth
private

Definition at line 167 of file camera.py.

◆ _brand

homeassistant.components.amcrest.camera.AmcrestCam._brand
private

Definition at line 371 of file camera.py.

◆ _channel

homeassistant.components.amcrest.camera.AmcrestCam._channel
private

Definition at line 166 of file camera.py.

◆ _control_light

homeassistant.components.amcrest.camera.AmcrestCam._control_light
private

Definition at line 168 of file camera.py.

◆ _ffmpeg

homeassistant.components.amcrest.camera.AmcrestCam._ffmpeg
private

Definition at line 162 of file camera.py.

◆ _ffmpeg_arguments

homeassistant.components.amcrest.camera.AmcrestCam._ffmpeg_arguments
private

Definition at line 163 of file camera.py.

◆ _model

homeassistant.components.amcrest.camera.AmcrestCam._model
private

Definition at line 378 of file camera.py.

◆ _name

homeassistant.components.amcrest.camera.AmcrestCam._name
private

Definition at line 160 of file camera.py.

◆ _resolution

homeassistant.components.amcrest.camera.AmcrestCam._resolution
private

Definition at line 165 of file camera.py.

◆ _rtsp_url

homeassistant.components.amcrest.camera.AmcrestCam._rtsp_url
private

Definition at line 389 of file camera.py.

◆ _snapshot_task

homeassistant.components.amcrest.camera.AmcrestCam._snapshot_task
private

Definition at line 201 of file camera.py.

◆ _stream_source

homeassistant.components.amcrest.camera.AmcrestCam._stream_source
private

Definition at line 164 of file camera.py.

◆ _token

homeassistant.components.amcrest.camera.AmcrestCam._token
private

Definition at line 167 of file camera.py.


The documentation for this class was generated from the following file: