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:
object
Base object for Netgar Arlo camera.
- property base_stations¶
Return all base stations linked on Arlo account.
- property billing_information¶
Return billing json.
- property cameras¶
Return all cameras linked on Arlo account.
- property devices¶
Return all devices on Arlo account.
- property is_connected¶
Connection status of client with Arlo system.
- property 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.
- property 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:
object
Arlo Base Station module implementation.
- DEFAULT_TRACK_ID = '229dca67-7e3c-4a5f-8f43-90e1a9bffc38'¶
- property ambient_air_quality¶
Return the air quality property of the most recent history entry (in VOC PPM)
- property ambient_humidity¶
Return the humidity property of the most recent history entry (in percent)
- property ambient_sensor_data¶
Return _ambient_sensor_data
- property ambient_temperature¶
Return the temperature property of the most recent history entry (in degrees celsius)
- property available_modes¶
Return list of available mode names.
- property available_modes_with_ids¶
Return list of objects containing available mode name and id.
- property available_resources¶
Return list of available resources.
- property camera_extended_properties¶
Return _camera_extended_properties.
- property camera_properties¶
Return _camera_properties
- property device_id¶
Return device_id.
- property device_type¶
Return device_type.
- get_latest_ambient_sensor_statistic(statistic)[source]¶
Gets the most recent ambient sensor history entry
- property hw_version¶
Return hardware version.
- property is_in_schedule_mode¶
Returns True if base_station is currently on a scheduled mode.
- property is_motion_detection_enabled¶
Return Boolean if motion is enabled.
- property last_refresh¶
Return last_refresh attribute.
- property mode¶
Return current mode key.
- property model_id¶
Return model_id.
- play_track(track_id='229dca67-7e3c-4a5f-8f43-90e1a9bffc38', position=0)[source]¶
Plays a track at the given position.
- property 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
- property refresh_rate¶
Return refresh_rate attribute.
- property serial_number¶
Return serial number.
- set_camera_enabled(camera_id, is_enabled)[source]¶
Turn Arlo camera On/Off.
- Parameters
mode – True, False
- property subscribe¶
Subscribe this session with Arlo system.
- property timezone¶
Return timezone.
- property unique_id¶
Return unique_id.
- property unsubscribe¶
Unsubscribe this session.
- property user_id¶
Return userID.
- property user_role¶
Return userRole.
- property xcloud_id¶
Return X-Cloud-ID attribute.
ArloCamera¶
- class pyarlo.camera.ArloCamera(name, attrs, arlo_session, min_days_vdo_cache=30)[source]¶
Bases:
object
Arlo Camera module implementation.
- property attrs¶
Return device attributes.
- property audio_detection_sensitivity¶
Sensitivity level of Camera audio detection.
- property base_station¶
Return the base_station assigned for the given camera.
- property battery_level¶
Get the camera battery level.
- property brightness¶
Get the brightness property of camera.
- property capabilities¶
Get a camera’s capabilities.
- property captured_today¶
Return list of <ArloVideo> object captured today.
- property device_id¶
Return device_id.
- property device_type¶
Return device_type.
- property flip_state¶
Get the flipped state of camera image.
- property hw_version¶
Return hardware version.
- property is_camera_connected¶
Connectivity status of Cam with Base Station.
- property last_image¶
Return last image captured by camera.
- property 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.
- property last_video¶
Return the last <ArloVideo> object from camera.
- property min_days_vdo_cache¶
Return minimal days to lookup when building the video cache.
- property mirror_state¶
Get the mirror state of camera image.
- property model_id¶
Return model_id.
- property motion_detection_sensitivity¶
Sensitivity level of Camera motion detection.
- property parent_id¶
Return camera parentID.
- property powersave_mode¶
Get the power mode (stream quality) of camera.
- property properties¶
Get this camera’s properties.
- property serial_number¶
Return serial_number.
- property signal_strength¶
Get the camera Signal strength.
- property snapshot_url¶
Return the snapshot url.
- property timezone¶
Return timezone.
- property triggers¶
Get a camera’s triggers.
- property unique_id¶
Return unique_id.
- property unseen_videos¶
Return number of unseen videos.
- property user_id¶
Return userID.
- property user_role¶
Return userRole.
- videos(days=None)[source]¶
Return all <ArloVideo> objects from camera given days range
- Parameters
days – number of days to retrieve
- property xcloud_id¶
Return X-Cloud-ID attribute.
ArloMediaLibrary¶
- class pyarlo.media.ArloMediaLibrary(arlo_session, preload=True, days=30)[source]¶
Bases:
object
Arlo 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:
object
Object for Arlo Video file.
- property camera¶
Return camera object that recorded video.
- property content_type¶
Return content_type.
- property created_at¶
Return timestamp.
- property created_today¶
Return True if created today.
- property 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
- property id¶
Return object id.
- property media_duration_seconds¶
Return media duration in seconds.
- property motion_type¶
Returns the type of motion that triggered the camera. Requires subscription.
- property stream_video¶
Stream video.
- property thumbnail_url¶
Return thumbnail url.
- property triggered_by¶
Return the reason why video was recorded.
- property video_url¶
Return video content url.