All Projects → jeffreydwalter → Arlo

jeffreydwalter / Arlo

Licence: apache-2.0
Python module for interacting with Netgear's Arlo camera system.

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Arlo

Mycontroller V1 Legacy
The Open Source Controller
Stars: ✭ 135 (-66.33%)
Mutual labels:  automation, iot
Homeassistant
Example Home Assistant Configs
Stars: ✭ 168 (-58.1%)
Mutual labels:  automation, iot
Gladys
A privacy-first, open-source home assistant
Stars: ✭ 1,874 (+367.33%)
Mutual labels:  automation, iot
Home Assistant Config
🏠 My Home Assistant configuration, a bit different that others :) Be sure to 🌟 this repository for updates!
Stars: ✭ 1,050 (+161.85%)
Mutual labels:  automation, iot
Homeassistant Config
Stars: ✭ 211 (-47.38%)
Mutual labels:  automation, iot
Home Assistant Configuration
My Home Assistant Config. For more Information visit ->
Stars: ✭ 102 (-74.56%)
Mutual labels:  automation, iot
Adaptive Lighting
Adaptive Lighting custom component for Home Assistant
Stars: ✭ 151 (-62.34%)
Mutual labels:  automation, iot
Addons
➕ Docker add-ons for Home Assistant
Stars: ✭ 548 (+36.66%)
Mutual labels:  automation, iot
Ohsce
PHP HI-REL SOCKET TCP/UDP/ICMP/Serial .高可靠性PHP通信&控制框架SOCKET-TCP/UDP/ICMP/硬件Serial-RS232/RS422/RS485 AND MORE!
Stars: ✭ 206 (-48.63%)
Mutual labels:  automation, iot
Platypush
A versatile and extensible platform for home and life automation with hundreds of supported integrations
Stars: ✭ 192 (-52.12%)
Mutual labels:  automation, iot
Homeassistant
Example Home Assistant Configs
Stars: ✭ 846 (+110.97%)
Mutual labels:  automation, iot
Tasmota
Alternative firmware for ESP8266 with easy configuration using webUI, OTA updates, automation using timers or rules, expandability and entirely local control over MQTT, HTTP, Serial or KNX. Full documentation at
Stars: ✭ 16,624 (+4045.64%)
Mutual labels:  automation, iot
Home Assistant Config
Home Assistant config files, rewritten to use the latest features, 100+ documented automations, automatically generated ToC 🏠 🤖
Stars: ✭ 926 (+130.92%)
Mutual labels:  automation, iot
Walkoff Apps
WALKOFF-enabled applications. #nsacyber
Stars: ✭ 125 (-68.83%)
Mutual labels:  automation, iot
Openrpa
Free Open Source Enterprise Grade RPA
Stars: ✭ 596 (+48.63%)
Mutual labels:  automation, iot
Smarthome Homeassistant Config
🏠 My Home Assistant configuration. This repo will be archived 🗄️ in the future
Stars: ✭ 152 (-62.09%)
Mutual labels:  automation, iot
Aquila
IPCamera, aim to support V4L2/UVC/RaspberryPi/Hisi/XXX SDK production
Stars: ✭ 173 (-56.86%)
Mutual labels:  camera, iot
Automated Irrigation System
This is the software of an open source automated irrigation system. The complete setup including hardware can be found in the README.
Stars: ✭ 442 (+10.22%)
Mutual labels:  automation, iot
Home Assistant
Home-Assistant-Config
Stars: ✭ 182 (-54.61%)
Mutual labels:  automation, iot
Terrariumpi
Home automated terrarium/aquarium or other enclosed environment with a Raspberry Pi
Stars: ✭ 249 (-37.91%)
Mutual labels:  automation, iot

arlo

Python module for interacting with Netgear's Arlo camera system.

Now in Golang!

If you love the Go programming language, check out arlo-golang. My goal is to bring parity to the Python version asap. If you know what you're doing in Go, I would appreciate any feedback on the >general structure of the library, and contributions, etc.


GETTING STARTED

Check out the API DOCS

IMPORTANT: There is a regression in sseclient 0.0.24 that breaks this package. Please ensure you have seeclient 0.0.22 installed.

IMPORTANT: Please ensure you don't have ANY other sseclient packages installed in addition to sseclient 0.0.22! This may cause this package to fail in unexpected ways. A common one that is known to cause issues is the sseclient-py 1.7 package. If you have a hard requirement to have more than one, please let me know and we can look into making that work.

IMPORTANT: my.arlo.com requires TLS 1.2 for their API. So, if you're getting ssl errors, it's most likely related to your version of openssl. You may need to upgrade your openssl library. If you're running this library on OSX or macOS, they ship with openssl v0.9.x which does not support TLS 1.2. You should follow the instructions found here to upgrade your openssl library.


Filing an Issue

Please read the Issue Guidelines and Policies wiki page BEFORE you file an issue. Thanks.


Install

# Install latest stable package
$ pip install arlo

--or--

# Install from master branch
$ pip install git+https://github.com/jeffreydwalter/arlo

This just a personal utility that I created out of necessity. It is by no means complete, although it does expose quite a bit of the Arlo interface in an easy to use Python package. As such, this package does not come with unit tests (feel free to add them) or guarantees. All contributions are welcome and appreciated!

If you have a specific Arlo device that you want to improve support for, please consider sending me one! Since this project is solely maintained by yours truely and I don't have unlimited funds to support it, I can only really test and debug the code with the first gen Arlo cameras and basestation that I have. I also highly encourage and appreciate Pull Requests!

Please, feel free to contribute to this repo or buy Jeff a beer! Donate


Generous Benefactors (Thank you!)


Awesomely Smart Contributors (Thank you!)

  • timgates42 - Mar 3, 2021 - Fixed crappy spelling in README.
  • Kerl1310 - Jan 11, 2020 - Added automated unit tests. THANK YOU!
  • Kerl1310 - Jan 8, 2020 - Added comments and a method to get account information.
  • fleicher - Mar 29, 2020 - Added a helper method to get devices by name.
  • apsteinmetz - Feb 12, 2020 - Added an example of timestamping Arlo snapshots to the wiki.
  • alvin-chang - Dec 15, 2019 - Updated some print statements to work with Python 3 in an example script.
  • pabloNZ - Jun 4, 2019 - Added the Arlo doorbell, Ultra camera and basestation schemas to the wiki.
  • m3ntalsp00n - May 18, 2019 - Expanded ArloQ device support.
  • burken- - Apr 17, 2019 - Fixed arming/disarming ArloQ devices.
  • m0urs - Apr 16, 2019 - Updated fqdn to new Arlo domain.
  • kimc78 - Aug 16, 2018 - Added method to get CVR recording list.
  • jurgenweber - Apr 25, 2018 - Added Arlo Baby APIs!
  • pliablepixels - Apr 3, 2018 - Fixed up issues with the README.
  • manluk - Mar 2, 2018 - Squashed a couple of bugs.
  • notalifeform - Feb 10, 2018 - Fixed bug and formatting in example script.
  • erosen - Jan 27, 2018 - Added the ArloQ camera schema to the wiki.
  • deanmcguire - Dec 7, 2017 - Unravelled the mysteries of RTSP streaming video.
  • andijakl - Jul 24, 2017 - Added Python 3 support and cleaned up examples.
  • cemeyer2 - Nov 26, 2016 - Fixed setup issues.
  • LenShustek - Sep 14, 2016, - Added Logout().

If You'd like to make a difference in the world and get your name on this most prestigious list, have a look at our help wanted section!

After installing all of the required libraries, you can import and use this library like so:

from arlo import Arlo

from datetime import timedelta, date
import datetime
import sys

USERNAME = '[email protected]'
PASSWORD = 'supersecretpassword'

try:
	# Instantiating the Arlo object automatically calls Login(), which returns an oAuth token that gets cached.
	# Subsequent successful calls to login will update the oAuth token.
	arlo = Arlo(USERNAME, PASSWORD)
	# At this point you're logged into Arlo.

	today = (date.today()-timedelta(days=0)).strftime("%Y%m%d")
	seven_days_ago = (date.today()-timedelta(days=7)).strftime("%Y%m%d")

	# Get all of the recordings for a date range.
	library = arlo.GetLibrary(seven_days_ago, today)

	# Iterate through the recordings in the library.
	for recording in library:

		videofilename = datetime.datetime.fromtimestamp(int(recording['name'])//1000).strftime('%Y-%m-%d %H-%M-%S') + ' ' + recording['uniqueId'] + '.mp4'
		##
		# The videos produced by Arlo are pretty small, even in their longest, best quality settings,
		# but you should probably prefer the chunked stream (see below). 
		###    
		#    # Download the whole video into memory as a single chunk.
		#    video = arlo.GetRecording(recording['presignedContentUrl'])
		#	 with open('videos/'+videofilename, 'wb') as f:
		#        f.write(video)
		#        f.close()
		# Or:
		#
		# Get video as a chunked stream; this function returns a generator.
		stream = arlo.StreamRecording(recording['presignedContentUrl'])
		with open('videos/'+videofilename, 'wb') as f:
			for chunk in stream:
				f.write(chunk)
			f.close()

		print('Downloaded video '+videofilename+' from '+recording['createdDate']+'.')

	# Delete all of the videos you just downloaded from the Arlo library.
	# Notice that you can pass the "library" object we got back from the GetLibrary() call.
	result = arlo.BatchDeleteRecordings(library)

	# If we made it here without an exception, then the videos were successfully deleted.
	print('Batch deletion of videos completed successfully.')

except Exception as e:
    print(e)

For more code examples check out the wiki

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].