Welcome to PyArlo’s documentation!¶
Python Arlo is a library written in Python 2.7/3x that exposes the Netgear Arlo cameras as Python objects.
Documentation for developers.
PyArlo¶
-
class
pyarlo.PyArlo(username=None, password=None, preload=True, days=30)[source]¶ Bases:
objectBase object for Netgar Arlo camera.
-
base_stations¶ Return all base stations linked on Arlo account.
-
billing_information¶ Return billing json.
-
cameras¶ Return all cameras linked on Arlo account.
-
devices¶ Return all devices on Arlo account.
-
is_connected¶ Connection status of client with Arlo system.
-
profile¶ Return user profile json.
-
query(url, method='GET', extra_params=None, extra_headers=None, retry=3, raw=False, stream=False)[source]¶ Return a JSON object or raw session.
Parameters: - url – Arlo API URL
- method – Specify the method GET, POST or PUT. Default is GET.
- extra_params – Dictionary to be appended on request.body
- extra_headers – Dictionary to be apppended on request.headers
- retry – Attempts to retry a query. Default is 3.
- raw – Boolean if query() will return request object instead JSON.
- stream – Boolean if query() will return a stream object.
Return shared users json.
-
unseen_videos_reset¶ Reset the unseen videos counter for all cameras.
-
ArloBaseStation¶
-
class
pyarlo.base_station.ArloBaseStation(name, attrs, session_token, arlo_session, refresh_rate=15)[source]¶ Bases:
objectArlo Base Station module implementation.
-
DEFAULT_TRACK_ID= '229dca67-7e3c-4a5f-8f43-90e1a9bffc38'¶
-
ambient_air_quality¶ Return the air quality property of the most recent history entry (in VOC PPM)
-
ambient_humidity¶ Return the humidity property of the most recent history entry (in percent)
-
ambient_sensor_data¶ Return _ambient_sensor_data
-
ambient_temperature¶ Return the temperature property of the most recent history entry (in degrees celsius)
-
available_modes¶ Return list of available mode names.
-
available_modes_with_ids¶ Return list of objects containing available mode name and id.
-
available_resources¶ Return list of available resources.
-
camera_extended_properties¶ Return _camera_extended_properties.
-
camera_properties¶ Return _camera_properties
-
device_id¶ Return device_id.
-
device_type¶ Return device_type.
-
get_latest_ambient_sensor_statistic(statistic)[source]¶ Gets the most recent ambient sensor history entry
-
hw_version¶ Return hardware version.
-
is_in_schedule_mode¶ Returns True if base_station is currently on a scheduled mode.
-
is_motion_detection_enabled¶ Return Boolean if motion is enabled.
-
last_refresh¶ Return last_refresh attribute.
-
mode¶ Return current mode key.
-
model_id¶ Return model_id.
-
play_track(track_id='229dca67-7e3c-4a5f-8f43-90e1a9bffc38', position=0)[source]¶ Plays a track at the given position.
-
properties¶ Return the base station info.
-
publish(action='get', resource=None, camera_id=None, mode=None, publish_response=None, properties=None)[source]¶ Run action.
Parameters: - method – Specify the method GET, POST or PUT. Default is GET.
- resource – Specify one of the resources to fetch from arlo.
- camera_id – Specify the camera ID involved with this action
- mode – Specify the mode to set, else None for GET operations
- publish_response – Set to True for SETs. Default False
-
refresh_rate¶ Return refresh_rate attribute.
-
serial_number¶ Return serial number.
-
set_camera_enabled(camera_id, is_enabled)[source]¶ Turn Arlo camera On/Off.
Parameters: mode – True, False
-
subscribe¶ Subscribe this session with Arlo system.
-
timezone¶ Return timezone.
-
unique_id¶ Return unique_id.
-
unsubscribe¶ Unsubscribe this session.
-
user_id¶ Return userID.
-
user_role¶ Return userRole.
-
xcloud_id¶ Return X-Cloud-ID attribute.
-
ArloCamera¶
-
class
pyarlo.camera.ArloCamera(name, attrs, arlo_session, min_days_vdo_cache=30)[source]¶ Bases:
objectArlo Camera module implementation.
-
attrs¶ Return device attributes.
-
audio_detection_sensitivity¶ Sensitivity level of Camera audio detection.
-
base_station¶ Return the base_station assigned for the given camera.
-
battery_level¶ Get the camera battery level.
-
brightness¶ Get the brightness property of camera.
-
capabilities¶ Get a camera’s capabilities.
-
captured_today¶ Return list of <ArloVideo> object captured today.
-
device_id¶ Return device_id.
-
device_type¶ Return device_type.
-
flip_state¶ Get the flipped state of camera image.
-
hw_version¶ Return hardware version.
-
is_camera_connected¶ Connectivity status of Cam with Base Station.
-
last_image¶ Return last image captured by camera.
-
last_image_from_cache¶ Return last thumbnail present in self._cached_images.
This is useful in Home Assistant when the ArloHub has not updated all information, but the camera.arlo already pulled the last image. Using this method, everything is kept synced.
-
last_video¶ Return the last <ArloVideo> object from camera.
-
min_days_vdo_cache¶ Return minimal days to lookup when building the video cache.
-
mirror_state¶ Get the mirror state of camera image.
-
model_id¶ Return model_id.
-
motion_detection_sensitivity¶ Sensitivity level of Camera motion detection.
-
parent_id¶ Return camera parentID.
-
powersave_mode¶ Get the power mode (stream quality) of camera.
-
properties¶ Get this camera’s properties.
-
serial_number¶ Return serial_number.
-
signal_strength¶ Get the camera Signal strength.
-
snapshot_url¶ Return the snapshot url.
-
timezone¶ Return timezone.
-
triggers¶ Get a camera’s triggers.
-
unique_id¶ Return unique_id.
-
unseen_videos¶ Return number of unseen videos.
-
user_id¶ Return userID.
-
user_role¶ Return userRole.
-
videos(days=None)[source]¶ Return all <ArloVideo> objects from camera given days range
Parameters: days – number of days to retrieve
-
xcloud_id¶ Return X-Cloud-ID attribute.
-
ArloMediaLibrary¶
-
class
pyarlo.media.ArloMediaLibrary(arlo_session, preload=True, days=30)[source]¶ Bases:
objectArlo Library Media module implementation.
-
load(days=30, only_cameras=None, date_from=None, date_to=None, limit=None)[source]¶ Load Arlo videos from the given criteria
Parameters: - days – number of days to retrieve
- only_cameras – retrieve only <ArloCamera> on that list
- date_from – refine from initial date
- date_to – refine final date
- limit – define number of objects to return
-
ArloVideo¶
-
class
pyarlo.media.ArloVideo(attrs, camera, arlo_session)[source]¶ Bases:
objectObject for Arlo Video file.
-
camera¶ Return camera object that recorded video.
-
content_type¶ Return content_type.
-
created_at¶ Return timestamp.
-
created_today¶ Return True if created today.
-
datetime¶ Return datetime when video was created.
-
download_thumbnail(filename=None)[source]¶ Download JPEG thumbnail.
Parameters: filename – File to save thumbnail. Default: stdout
-
download_video(filename=None)[source]¶ Download video content.
Parameters: filename – File to save video. Default: stdout
-
id¶ Return object id.
-
media_duration_seconds¶ Return media duration in seconds.
-
stream_video¶ Stream video.
-
thumbnail_url¶ Return thumbnail url.
-
triggered_by¶ Return the reason why video was recorded.
-
video_url¶ Return video content url.
-