Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

'FI9816P' snap_picture_2() doesn't return an image #1

Open
superm1 opened this issue Oct 31, 2018 · 0 comments
Open

'FI9816P' snap_picture_2() doesn't return an image #1

superm1 opened this issue Oct 31, 2018 · 0 comments

Comments

@superm1
Copy link

superm1 commented Oct 31, 2018

I use home-assistant which uses this project for supporting Foscam cameras. I have two cameras, a FI9816P and FI9821P+V3. On the FI9821P+V3 everything works properly, but on the FI9816P I have a broken image in home-assistant.

I directly tried to interact with the python library to figure out what is wrong.

I find on the FI9816P that the snap_picture_2() function is return an HTML page with the snapshot rather than the snapshot itself.

My test run:

from libpyfoscam import FoscamCamera
cam = FoscamCamera("192.168.2.33", 88, REDACTED, REDACTED)
>>> cam.snap_picture_2()
Send Foscam command: http://192.168.2.33:88/cgi-bin/CGIProxy.fcgi?usr=REDACTED&pwd=REDACTED&cmd=snapPicture2
Returning raw Foscam response: len=74
(0, b'<html><body><img src="../snapPic/Snap_20180715-194322.jpg"/></body></html>')

However trying this on a FI9821P+V3 I get actual image data in the response.

I also notice that the JPG URL referred by the FI9816P is not ephemeral however and expires very quickly. If I try to do this from my browser I can see the same thing happens and trying to open the image directly fails after it loaded the webpage and image together results in an HTTP 404.

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

No branches or pull requests

1 participant