python arlo是一个用python 2.7/3x编写的库,它将netgear arlo摄像头公开为python对象。

pyarlo的Python项目详细描述


Python爱洛

https://badge.fury.io/py/pyarlo.svghttps://travis-ci.org/tchellomello/python-arlo.svg?branch=masterhttps://coveralls.io/repos/github/tchellomello/python-arlo/badge.svg?branch=masterhttps://img.shields.io/pypi/pyversions/pyarlo.svg

Python Arlo是一个用Python 2.7/3x编写的库,它将Netgear Arlo摄像头公开为Python对象

开发人员文档:http://python-arlo.readthedocs.io/

安装

$ pip install pyarlo

# Install latest development
$ pip install git+https://github.com/tchellomello/python-arlo

用法

# connectingfrompyarloimportPyArloarlo=PyArlo('foo@bar','secret')# listing devicesarlo.devices# listing base stationsarlo.base_stations# get base station handle# assuming only 1 base station is availablebase=arlo.base_stations[0]# get the current base station modebase.mode# 'disarmed'# listing Arlo modesbase.available_modes# ['armed', 'disarmed', 'schedule', 'custom']# Updating the base station modebase.mode='custom'# listing all camerasarlo.cameras# showing camera preferencescam=arlo.cameras[0]# check if camera is connected to base stationcam.is_camera_connected# True# printing camera attributescam.serial_numbercam.model_idcam.unseen_videos# get brightness value of cameracam.brightness# get signal strength of camera with base stationcam.signal_strength# get flip property from cameracam.flip_state# get mirror property from cameracam.mirror_state# get power save mode value from cameracam.powersave_mode# get current battery level of cameracam.battery_level92# get boolean result if motion detection# is enabled or notbase.is_motion_detection_enabled# True# get battery levels of all cameras# prints serial number and battery level of each camerabase.get_cameras_battery_level# {'4N71235T12345': 92, '4N71235T12345': 90}# get base station propertiesbase.properties# get camera propertiesbase.get_camera_properties# get camera rulesbase.get_camera_rules# get camera schedulebase.get_camera_schedule# get camera motion detection sensitivitycam.get_motion_detection_sensitivity# refreshing camera propertiescam.update()# gathering live_streaming URLcam.live_streaming()# rtmps://vzwow72-z2-prod.vz.netgear.com:80/vzmodulelive?egressToken=b723a7bb_abbXX&userAgent=web&cameraId=48AAAAA# gather last recorded video URLcam.last_video.video_url

加载视频

# by default, all videos recorded within# the last 30 days will be pre-loadedarlo.ArloMediaLibrary.videos# Or you can load Arlo videos directlyfrompyarlo.mediaimportArloMediaLibrarylibrary=ArloMediaLibrary(arlo,days=2)len(library.videos)# showing a video propertiesmedia=library.videos[0]# printing video attributesmedia.cameramedia.content_typemedia.media_duration_seconds# displaying thumbnail to stdoutmedia.download_thumbnail()# downloading videomedia.download_video('/home/user/demo.mp4')

环境传感器数据使用情况(爱洛婴儿监视器)

# Get the base_station instance corresponding to the Arlo Babybase_station=arlo.base_stations[0]# Store all ambient sensor history in self._ambient_sensor_data# All of the accessor properties will call this if values are not cached.base_station.get_ambient_sensor_data()# Get cached sensor history (property)base_station.ambient_sensor_data# Get most recent temperature reading in degrees celsius (property)base_station.ambient_temperature# Get most recent humidity reading in relative humidity percentage (property)base_station.ambient_humidity# Get most recent air quality reading (property)# Not 100% sure on the unit of measure, but would assume it's VOC PPMbase_station.ambient_air_quality

音乐播放使用(爱洛婴儿监视器)

# Get the current playback status and available track listbase_station.get_audio_playback_status()# Play a track, optionally specify the track and seek time in secondsbase_station.play_track(track_id='229dca67-7e3c-4a5f-8f43-90e1a9bffc38',position=0)# Pause the currently playing trackbase_station.pause_track()# Skip to the next track in the playlistbase_station.skip_track()# Set the music loop mode to repeat the entire playlistbase_station.set_music_loop_mode_continuous()# Set the music loop mode to repeat the current trackbase_station.set_music_loop_mode_single()# Sets playback to shufflebase_station.set_shuffle_on()# Sets playback to sequentialbase_station.set_shuffle_off()# Change the playback volumebase_station.set_volume(100)

夜间照明使用(爱洛婴儿显示器)

# Turn on the night lightbase_station.set_night_light_on()# Turn off the night lightbase_station.set_night_light_off()# Set the brightness of the night lightbase_station.set_night_light_brightness(200)

支持的设备

如果您有不同的模式,请随时报告您的结果。

ModelTested byStatusResults/Issues
Arlo 1st Generation@tchellomelloworking/okN/A
Arlo 2st Generation@tchellomelloworking/okN/A

贡献

详见CONTRIBUTING.rst

欢迎加入QQ群-->: 979659372 Python中文网_新手群

推荐PyPI第三方库


热门话题
Java:字符串。RTL设备语言用标志“+”格式化,数字后加符号   java GAE作为桌面应用程序(Swing)的服务提供商   java将InputStream转换为FileInputStream不适用于Apache POI   java外部Voronoi库“网格”:什么是草图和处理?   重载重写的泛型方法java   java显示组织上设置的错误。springframework。验证。jsp中的错误对象   java一些Spring模型属性没有显示在我的JSP中   java无法编译Guava 23的SimpleTimeLimiter示例   java如何更改JTree中的“根”目录名?   java如何在安卓中对相对布局产生连锁反应?   java错误:org。冬眠例外SQLGrammarException:无法提取结果集,dateAccessed是未知列   如何使用java监听JSON文件更新   由抽象封闭类创建的匿名内部类能否通过反射确定实现类?