platypush.plugins.camera.android.ipcam

class platypush.plugins.camera.android.ipcam.CameraAndroidIpcamPlugin(host: Optional[str] = None, port: Optional[int] = 8080, username: Optional[str] = None, password: Optional[str] = None, timeout: int = 10, ssl: bool = True, cameras: Optional[Dict[str, Dict[str, Any]]] = None, **kwargs)[source]

Plugin to control remote Android cameras over IPCam.

__init__(host: Optional[str] = None, port: Optional[int] = 8080, username: Optional[str] = None, password: Optional[str] = None, timeout: int = 10, ssl: bool = True, cameras: Optional[Dict[str, Dict[str, Any]]] = None, **kwargs)[source]
Parameters:
  • host – Camera host name or address
  • port – Camera port
  • username – Camera username, if set
  • password – Camera password, if set
  • timeout – Connection timeout
  • ssl – Use HTTPS instead of HTTP
  • cameras – Alternatively, you can specify a list of IPCam cameras as a name->dict mapping. The keys will be unique names used to identify your cameras, the values will contain dictionaries containing host, `port, username, password, timeout and ssl attributes for each camera.
change_setting(key: str, value: Union[str, int], camera: Union[int, str] = None) → bool[source]

Change a setting. :param key: Setting name :param value: Setting value :param camera: Camera index or configured name :return: True on success, False otherwise

set_focus(activate: bool = True, camera: Union[int, str] = None) → bool[source]

Enable/disable the focus.

set_front_facing_camera(activate: bool = True, camera: Union[int, str] = None) → bool[source]

Enable/disable the front-facing camera.

set_gps(activate: bool = True, camera: Union[int, str] = None) → bool[source]

Enable/disable GPS.

set_motion_detect(activate: bool = True, camera: Union[int, str] = None) → bool[source]

Enable/disable motion detect.

set_night_vision(activate: bool = True, camera: Union[int, str] = None) → bool[source]

Enable/disable night vision.

set_orientation(orientation: str = 'landscape', camera: Union[int, str] = None) → bool[source]

Set video orientation.

set_overlay(activate: bool = True, camera: Union[int, str] = None) → bool[source]

Enable/disable video overlay.

set_quality(quality: int = 100, camera: Union[int, str] = None) → bool[source]

Set video quality.

set_scenemode(scenemode: str = 'auto', camera: Union[int, str] = None) → bool[source]

Set video orientation.

set_torch(activate: bool = True, camera: Union[int, str] = None) → bool[source]

Enable/disable the torch.

set_zoom(zoom: float, camera: Union[int, str] = None) → bool[source]

Set the zoom level.

start_recording(tag: Optional[str] = None, camera: Union[int, str] = None) → bool[source]

Start recording.

status(camera: Union[int, str] = None) → platypush.message.response.camera.android.AndroidCameraStatusListResponse[source]
Parameters:camera – Camera index or name (default: status of all the cameras)
Returns:True if the camera is available, False otherwise
stop_recording(camera: Union[int, str] = None) → bool[source]

Stop recording.

take_picture(image_file: str, camera: Union[int, str] = None) → platypush.message.response.camera.android.AndroidCameraPictureResponse[source]

Take a picture and save it on the local device.