Comments (12)
Jeff - Thank you for pointing me in the right side. After some debugging i was able to find out that some of the camera's that i added and removed from the account still exists in the account. That was the reason i was getting Resource Not Found error. Now it all makes sense not sure why the removed devices still show up in the camera list. Any ways thank you for your help, i will be setting up rest of the things this week that best suit my needs. Will contact you if i run in to any trouble. The only flip side is i am new to Python but have been a developer in C# and other languages for a long time. Thanks again for your time and assistance.
from arlo.
Hi @skrisk, thank you for filing the issue.
Try this code:
from Arlo import Arlo
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.
# Get the list of devices and filter on device type to only get the cameras.
# This will return an array of cameras, including all of the cameras' associated metadata.
cameras = arlo.GetDevices('camera')
# Turn camera on.
print(arlo.ToggleCamera(cameras[0], True)))
# Turn camera off.
print(arlo.ToggleCamera(cameras[0], False)))
except Exception as e:
print(e)
from arlo.
I tried that to begin with then only ended up passing the basestation as i was able to do a little reading in to the Arlo class. This is the error i got when i try the example code.
must be str, not bool
from arlo.
Okay, great! Looks like I neglected to fix the example code when I update the API. I also made a small tweak to the ToggleCamera function.
Pull the latest code git pull
and try this:
from Arlo import Arlo
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.
# Get the list of devices and filter on device type to only get the basestations.
# This will return an array of basestations, including all of the basestations' associated metadata.
basestations = arlo.GetDevices('basestation')
# Get the list of devices and filter on device type to only get the cameras.
# This will return an array of cameras, including all of the cameras' associated metadata.
cameras = arlo.GetDevices('camera')
# Turn camera on.
print(arlo.ToggleCamera(basestations[0], cameras[0], True)))
# Turn camera off.
print(arlo.ToggleCamera(basestations[0], cameras[0], False)))
except Exception as e:
print(e)
from arlo.
Resolved in 4210b59
from arlo.
Thank you Jeff, after applying the change i still get the same error "Resource Not Found".
from arlo.
Did you try with the code I posted for you in my last comment? It works fine for me.
from arlo.
Yes i did try with the code you posted. I also did a git pull to the latest changes. Not sure why i am getting 'Resource Not Found'.
this is the call i make: print(arlo.ToggleCamera(basestation[0],cameras[0],False))
Error: {'resource': 'cameras/XXXXXXXXXXXXXX', 'action': 'set', 'error': {'code': 4000, 'message': 'Resource not found.'}, 'properties': {'privacyActive': False}, 'transId': 'web!XXXXXXXXXX.XXX!XXXXXXXXXXXXXX', 'to': 'XXXXXXXXXXXXXX_web', 'from': 'XXXXXXXXXXXXXX'}
from arlo.
from arlo.
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.
basestation = arlo.GetDevices('basestation')
# Get the list of devices and filter on device type to only get the cameras.
# This will return an array of cameras, including all of the cameras' associated metadata.
cameras = arlo.GetDevices('camera')
# Turn camera off.
#print(arlo.ToggleCamera(basestation[0], cameras[0], False))
print(arlo.ToggleCamera(basestation[0],cameras[0], True))
# Turn camera off.
#print(arlo.ToggleCamera(cameras[0], False))
except Exception as e:
print(e)
This above is my code. It was able to establish a connection, query the stream then getting an error resource not found. Thanks.
from arlo.
Please print the basestation and cameras arrays and send me the output.
from arlo.
Happy to help! Glad to hear you figured it out.
from arlo.
Related Issues (20)
- Support for the multiple verification emails HOT 1
- localhost:7788 not found error after "Arlo wants access to your Google Account" screen HOT 52
- Feature Request - Local Storage file download HOT 5
- Arm/Disarm Throws an error - Validated Auth/MFA was successful HOT 20
- Feature Request - Doorbell HOT 1
- How to get the current status (Armed or Disarmed) HOT 2
- 413 Client Error: Request Entity Too Large for url: https://myapi.arlo.com/hmsweb/users/library/recycle HOT 2
- Error on login API - Forbidden for url: https://ocapi-app.arlo.com/api/auth -
- Error on login API - Forbidden for url: https://ocapi-app.arlo.com/api/auth HOT 19
- 401 Client Error: for url: https://my.arlo.com/hmsweb/users/devices HOT 3
- Support for Docker? HOT 1
- 'Origin': f'https://{self.BASE_URL}', SyntaxError: invalid syntax HOT 1
- Feature ? HOT 1
- email factorRole SECONDARY throws StopIteration HOT 4
- Mode Changing no longer works / other functions work with same credentials HOT 7
- [Arlo Pro 4] is basestation required for python interaction
- GetRules() hangs, seemingly, forever
- oauthlib.oauth2.rfc6749.errors.MismatchingStateError: (mismatching_state) CSRF Warning! State not equal in request and response. HOT 3
- 403 Client Error: Forbidden for url: https://ocapi-app.arlo.com/api/auth HOT 19
- Feature request: move away from Arlo's cloud/use cameras as standalone
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from arlo.