- Notifications
You must be signed in to change notification settings - Fork1
Ruby library for interacting with Netgear's Arlo camera system
License
kevinelliott/arlo-ruby
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
A client library written in Ruby to interact with the Netgear Arlo camera system.
Netgear notoriously keeps a closed system around the Arlo API. They do not publish the API specifications publicly, and if it was up to them you would never be able to access your devices directly. This is because they rely on the revenue from cloud-based subscriptions to store and manage your equipment and it is not in their interests to open it up to you.
For those of us who want to backup our videos to our own NAS for backup, sync to a different cloud provider, or otherwise integrate the system into our existing home automation platforms, this library was written.
While this is functional, it is still incomplete. Contributions of any kind at this time are welcome and encouraged!
Add this line to your application's Gemfile:
gem'arlo-ruby'
And then execute:
$ bundle
Or install it yourself as:
$ gem install arlo-ruby
client=Arlo::Client.new
response=client.login(email:'YOUR EMAIL',password:'YOUR PASSWORD')
Retrieves all of the devices associated with your account.
devices=client.devices
+---------------+----------------------+| Login |+---------------+----------------------+| Variable | Value |+---------------+----------------------+| User ID | NZ69AUK-336-51372586 || Email | kevin+dev@phunc.com || Valid Email | true || Token | xxxxxxxxxxxxxx || Authenticated | 1566062204 || Created | 1565912809854 |+---------------+----------------------++---------------+---------------+----------------------------------+-------------+---------------+-----------+---------------------+-------------+----------------------+| Devices |+---------------+---------------+----------------------------------+-------------+---------------+-----------+---------------------+-------------+----------------------+| ID | Parent ID | Unique ID | Type | Model | HW | Name | State | Connectivity |+---------------+---------------+----------------------------------+-------------+---------------+-----------+---------------------+-------------+----------------------+| 4R036C71A22F2 | | Z92W-336-6644878_4R036C71A22F2 | basestation | VMB4000 | VMB4000r3 | Beatty Base Station | provisioned | ethernet / connected || 4XH16C71A8A5C | 4R036C71A22F2 | Z92W-336-6644878_4XH16C71A8A5C | camera | VMC4030 | H8 | Office | provisioned | || 4XH16C7EAA32C | 4R036C71A22F2 | Z92W-336-6644878_4XH16C7EAA32C | camera | VMC4030 | H8 | Family Room | provisioned | || 4R036C71A22F2 | 4R036C71A22F2 | Z92W-336-6644878_4R036C71A22F2#1 | siren | VMB4000-siren | | Beatty Base Station | provisioned | |+---------------+---------------+----------------------------------+-------------+---------------+-----------+---------------------+-------------+----------------------+
This allows you to operate directly on a basestation.
basestation=Arlo::Basestation.new(devices.detect{ |device|device.deviceType =='basestation'},client)
basestation.system_mode(:disarm)basestation.system_mode(:arm)
Valid modes::disarm
,:arm
Returns an array of OpenStruct that contain details about the captured videos associated with your basestation.
videos=basestation.library(2.weeks.ago,Time.current)
This is useful in order to backup your captured videos to local storage, or perhaps a NAS on your network.
basestation.library_download('arlo_videos')Downloading1566061318696toarlo_videos/1566061318696.mp4...
After checking out the repo, runbin/setup
to install dependencies. Then, runrake spec
to run the tests. You can also runbin/console
for an interactive prompt that will allow you to experiment.
To install this gem onto your local machine, runbundle exec rake install
. To release a new version, update the version number inversion.rb
, and then runbundle exec rake release
, which will create a git tag for the version, push git commits and tags, and push the.gem
file torubygems.org.
Bug reports and pull requests are welcome on GitHub athttps://github.com/kevinelliott/arlo. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to theContributor Covenant code of conduct.
The gem is available as open source under the terms of theMIT License.