BaQs / pyEzviz

Python package for ezviz cameras
Apache License 2.0
103 stars 45 forks source link

Alarm picture #102

Open maxmontgmx opened 1 year ago

maxmontgmx commented 1 year ago

Hi all,

I use command : >pyezviz -u USER-p PW camera --serial SERIAL status it'sworking like a charm. but I'd like to get the image of the detection by using element : last_alarm_pic but when I download the link, I get anythink (just a small white square in the web browser) encrypted element is false.

How can I get the image linked to the alarm?

Thanks

RenierM26 commented 1 year ago

Hi @maxmontgmx,

Is encryption enabled on your camera? The url should work if encryption is not enabled, if it is, you'll need to decode the binary string via the Function stored in utility.

maxmontgmx commented 1 year ago

Hi @RenierM26 , thanks for information. I will try it asap. What is the format of the output image?

RenierM26 commented 1 year ago

It's jpeg but the URL header returns binary (so most browsers will just download the file instead of trying to process).

maxmontgmx commented 1 year ago

Hi @RenierM26 , I try the decrypt function but it's not working. In the buffer , I have some bytes before "hikencodepicture" keyword : image

Thanks for your help

maxmontgmx commented 1 year ago

@RenierM26 , I try to investigate. In fact encryption was disable but the image wasn't not in jpg format. I enable encryption, and the new images have the same format. But each image have a different buffer from 16 to 48 (password range). So I think it's not the password field. The file format doesn't match with your algorithm. The beginning of the buffer is like that : image