Toggle Camera Not working
See original GitHub issueplatform : Windows
Arlo hardware info : Arlo Pro with Pro Basestation
Please include your code (don’t include your user/password or any sensitive info)
from Arlo import Arlo
USERNAME = 'myuser@mydomain.com'
PASSWORD = 'mypassword'
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')
basestation = arlo.GetDevices('basestation')
# Turn camera off.
print(arlo.ToggleCamera(basestation[0], cameras[0]['deviceId'], False))
# Turn camera on.
#print(arlo.ToggleCamera(cameras[0], False))
except Exception as e:
print(e)
Code output:
Python 3.6.2 (v3.6.2:5fd33b5, Jul 8 2017, 04:57:36) [MSC v.1900 64 bit (AMD64)] on win32 Type “copyright”, “credits” or “license()” for more information.
======= RESTART: arlo-checkcamera.py ======= {‘resource’: ‘cameras/XXXXXXXXXXX’, ‘action’: ‘set’, ‘error’: {‘code’: 4000, ‘message’: ‘Resource not found.’}, ‘properties’: {‘privacyActive’: False}, ‘transId’: ‘web!8ac12345d.d77f!123456789102832’, ‘to’: ‘2224XX-222-1234567_web’, ‘from’: ‘XXXXXXXXXXXXXX’}
Run the following command and include the output: certifi==2017.11.5 chardet==3.0.4 idna==2.6 monotonic==1.4 requests==2.18.4 six==1.11.0 sseclient==0.0.18 urllib3==1.22
I have tried to toggle the camera with deviceId, deviceName, uniqueId and nothing seems to work.
Issue Analytics
- State:
- Created 6 years ago
- Comments:12 (7 by maintainers)
Top GitHub Comments
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.
Happy to help! Glad to hear you figured it out.