Skip to content
This repository has been archived by the owner on Jul 30, 2021. It is now read-only.

Updating the Camera Snapshot #19

Closed
chaddotson opened this issue Jun 5, 2017 · 7 comments
Closed

Updating the Camera Snapshot #19

chaddotson opened this issue Jun 5, 2017 · 7 comments

Comments

@chaddotson
Copy link
Contributor

I'm wanting to script grabbing an image from each of my cameras. Is there anyway to update each camera's current snapshot?

@chaddotson
Copy link
Contributor Author

I figured out the endpoint and payload for taking a manual snapshot but unfortunately that does not update the "lastImage".

@tchellomello
Copy link
Owner

tchellomello commented Jun 7, 2017

@chaddotson did you try to run camera.update() to refresh the object? Could you share your script?

from pyarlo import PyArlo
arlo = PyArlo('user, 'password')
for camera in arlo.cameras:
    camera.update()
    name = "pic-{0}.jpg".format(camera.name)
    camera.last_video.download_thumbnail(name)

@tchellomello
Copy link
Owner

@chaddotson did it work for you?

@chaddotson
Copy link
Contributor Author

Sorry got distracted by something else. I believe it worked to a point. Seems I had trouble making sure it always worked. I can't remember the details, will verify this week.

@chaddotson
Copy link
Contributor Author

chaddotson commented Jun 28, 2017

@tchellomello negatory.

from logging import basicConfig, getLogger,  DEBUG, INFO
from pyarlo import PyArlo

logger = getLogger(__name__)

logging_config = dict(level=INFO, format='[%(asctime)s - %(filename)s:%(lineno)d - %(funcName)s - %(levelname)s] %(message)s')
basicConfig(**logging_config)

arlo = PyArlo(username, password)
for camera in arlo.cameras:
    camera.update()

    name = "{0}.jpg".format(camera.name)
    logger.info('Camera updated, saving \"%s\" to \"%s\"', camera.name, name)
    camera.last_video.download_thumbnail(name)`

It grabs the last thumbnail but does not grab the current live snapshot.

@tchellomello
Copy link
Owner

@chaddotson correct that is the current behavior. We are working to get a way to capture the live streaming as you can see at #8

@tchellomello
Copy link
Owner

Closing this in reference to #8

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants