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)¶ Bases:
object
Base 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.
-
cleanup_headers
()¶ Reset the headers and params.
-
devices
¶ Return all devices on Arlo account.
-
is_connected
¶ Connection status of client with Arlo system.
-
login
()¶ Login to the Arlo account.
-
lookup_camera_by_id
(device_id)¶ Return camera object by device_id.
-
profile
¶ Return user profile json.
-
query
(url, method='GET', extra_params=None, extra_headers=None, retry=3, raw=False, stream=False)¶ 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.
-
refresh_attributes
(name)¶ Refresh attributes from a given Arlo object.
Return shared users json.
-
unseen_videos_reset
¶ Reset the unseen videos counter for all cameras.
-
update
(update_cameras=False, update_base_station=False)¶ Refresh object.
-
ArloBaseStation¶
-
class
pyarlo.base_station.
ArloBaseStation
(name, attrs, session_token, arlo_session, refresh_rate=15)¶ Bases:
object
Arlo 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_ambient_sensor_data
()¶ Refresh ambient sensor history
-
get_audio_playback_status
()¶ Gets the current playback status and available track list
-
get_available_modes
()¶ Return a list of available mode objects for an Arlo user.
-
get_camera_extended_properties
()¶ Return camera extended properties.
-
get_cameras_battery_level
()¶ Return a list of battery levels of all cameras.
-
get_cameras_properties
()¶ Return camera properties.
-
get_cameras_rules
()¶ Return the camera rules.
-
get_cameras_schedule
()¶ Return the schedule set for cameras.
-
get_cameras_signal_strength
()¶ Return a list of signal strength of all cameras.
-
get_latest_ambient_sensor_statistic
(statistic)¶ Gets the most recent ambient sensor history entry
-
get_night_light_brightness
()¶ Return the brightness (0-255) of the night light.
-
get_night_light_state
()¶ Return the state of the night light (on/off).
-
get_speaker_muted
()¶ Return whether or not the speaker is muted.
-
get_speaker_volume
()¶ Return the volume setting of the speaker.
-
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.
-
pause_track
()¶ Pauses the currently playing track.
-
play_track
(track_id='229dca67-7e3c-4a5f-8f43-90e1a9bffc38', position=0)¶ 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)¶ 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
-
publish_and_get_event
(resource)¶ Publish and get the event from base station.
-
refresh_rate
¶ Return refresh_rate attribute.
-
serial_number
¶ Return serial number.
-
set_camera_enabled
(camera_id, is_enabled)¶ Turn Arlo camera On/Off.
Parameters: mode – True, False
-
set_music_loop_mode_continuous
()¶ Sets the music loop mode to repeat the entire playlist.
-
set_music_loop_mode_single
()¶ Sets the music loop mode to repeat the current track.
-
set_night_light_brightness
(brightness=200)¶ Sets the brightness of the night light (0-255).
-
set_night_light_off
()¶ Turns off the night light.
-
set_night_light_on
()¶ Turns on the night light.
-
set_shuffle_off
()¶ Sets playback to sequential.
-
set_shuffle_on
()¶ Sets playback to shuffle.
-
set_volume
(mute=False, volume=50)¶ Sets the music volume (0-100)
-
skip_track
()¶ Skips to the next track in the playlist.
-
subscribe
¶ Subscribe this session with Arlo system.
-
thread_function
()¶ Thread function.
-
timezone
¶ Return timezone.
-
unique_id
¶ Return unique_id.
-
unsubscribe
¶ Unsubscribe this session.
-
update
()¶ Update object properties.
-
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)¶ Bases:
object
Arlo 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.
-
live_streaming
()¶ Return live streaming generator.
-
make_video_cache
(days=None)¶ Save videos on _cache_videos to avoid dups.
-
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.
-
play_last_video
()¶ Play last <ArloVideo> recorded from camera.
-
powersave_mode
¶ Get the power mode (stream quality) of camera.
-
properties
¶ Get this camera’s properties.
-
schedule_snapshot
()¶ Trigger snapshot to be uploaded to AWS. Return success state.
-
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.
-
unseen_videos_reset
()¶ Reset the unseen videos counter.
-
update
()¶ Update object properties.
-
user_id
¶ Return userID.
-
user_role
¶ Return userRole.
-
videos
(days=None)¶ 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)¶ Bases:
object
Arlo Library Media module implementation.
-
load
(days=30, only_cameras=None, date_from=None, date_to=None, limit=None)¶ 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)¶ Bases:
object
Object for Arlo Video file.
-
camera
¶ Return camera object that recorded video.
-
content_type
¶ Return content_type.
-
created_at
¶ Return timestamp.
-
created_at_pretty
(date_format=None)¶ Return pretty timestamp.
-
created_today
¶ Return True if created today.
-
datetime
¶ Return datetime when video was created.
-
download_thumbnail
(filename=None)¶ Download JPEG thumbnail.
Parameters: filename – File to save thumbnail. Default: stdout
-
download_video
(filename=None)¶ Download video content.
Parameters: filename – File to save video. Default: stdout
-
id
¶ Return object id.
-
media_duration_seconds
¶ Return media duration in seconds.
-
motion_type
¶ Returns the type of motion that triggered the camera. Requires subscription.
-
stream_video
¶ Stream video.
-
thumbnail_url
¶ Return thumbnail url.
-
triggered_by
¶ Return the reason why video was recorded.
-
video_url
¶ Return video content url.
-