mezz64 / pyHik

Python wrapper for Hikvision camera event stream
MIT License
180 stars 50 forks source link

Only usable with `admin` username #86

Open nagyrobi opened 2 years ago

nagyrobi commented 2 years ago

As also described in https://github.com/mezz64/pyHik/issues/10, the library refuses to work unless we log in with full admin user rights. I have a restricted user which is able to talk to the ISAPI on the NVR via curl or any other method, but this library doesn't want to work with that.

To improve security of the environment, please allow for using this library not only with full admin username and password. ISAPI is usable from restricted user logins too.

mezz64 commented 1 year ago

As noted in #10, it seems like this may be a quirk of the requests library for some reason. I'd be open to playing with some things, but I can't replicate the behavior on my older cameras, they authenticate fine to non-admin users through the library.

Long term things should really be refactored to move away from requests and into aiohttp to better service the event stream, but it's just not something I have much time for these days.