question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Toggle Camera Not working

See original GitHub issue

platform : 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:closed
  • Created 6 years ago
  • Comments:12 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
skriskcommented, Nov 21, 2017

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.

0reactions
jeffreydwaltercommented, Nov 21, 2017

Happy to help! Glad to hear you figured it out.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Camera doesn't work in Windows - Microsoft Support
Learn how to troubleshoot when the camera is not working in Windows or you see ... If your laptop has a switch or...
Read more >
[HELP] Camera toggle action not working : r/tasker - Reddit
i am trying to use the camera action in tasker to disable the phones camera..i have tasker settings installed..but on running the task, ......
Read more >
How to fix a camera not working on Microsoft Teams
Open Settings. Click on Privacy. Click on Camera. Under the "Allow access to the camera on this device" section, click the Change button....
Read more >
Troubleshoot camera & presentation issues in a meeting
“Camera failed” error is often due to the browser not having access to the camera. ... You can change the setting to allow...
Read more >
How to Fix Zoom Camera Not Working: 5 Ways - MakeUseOf
Next, locate the Allow apps to access your camera option and make sure that the switch is toggled on. If it isn't, switch...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found