tchellomello / python-amcrest

A Python 2.7/3.x module for Amcrest and Dahua Cameras using the SDK HTTP API.
GNU General Public License v2.0
216 stars 76 forks source link

Dahua & Amcrest API's the same? #114

Closed GaryOkie closed 5 years ago

GaryOkie commented 5 years ago

I have both Amcrest IPC and Dahua IPC cameras, and the latter seem to be working great via the Home Assistant Amcrest component - including motion detection!

There currently isn't a Dahua component in HA, and I had been using the generic and ffmpeg camera components to support them. Not great, since no other camera features are supported except snapshot and streaming. Some users have gone to great lengths with Python scripts and MQTT to get motion alerts from Dahua cameras via HA.

Are you able to confirm if the Amcrest HTTP API is essentially the same as for Dahua IPC cameras ? Are you aware of any differences or issues? I am wanting to get my facts straight before publicly announcing on the HA forums that the existing Amcrest support is fully compatible with Dahua.

Thanks!

dougsland commented 5 years ago

Hi @GaryOkie , a quick look here ftp://ftp.wintel.fi/drivers/dahua/SDK-HTTP_ohjelmointi/DAHUA_IPC_HTTP_API_V1.00x.pdf and in the source code of python-amcrest it seems all commands are equal. They might be using the same firmware. @tchellomello @pnbruckner please take a look.

GaryOkie commented 5 years ago

Thanks @dougsland for the advice!

I already had a copy of the "Dahua HTTP API for IPC" (V1.56) and closely compared it with the Amcrest HTTP API for IP Cameras (v1.5) and you're right - the API calls do indeed look to be identical.

So this fact seems to reinforce that both the python-amcrest and HA amcrest component are fully compatible with Dahua IPC cameras.

I wonder if the authors of each would be willing to include Dahua IPC cam support in their docs - at least with a provisional caveat that it has seen only limited use? I can't tell you how much time I've wasted on trying to implement Dahua camera features via custom scripts before I discovered Amcrest support already supported all the key bits and works far better than any of the other generic IP cam components.

dougsland commented 5 years ago

If it is working for you, I would suggest to add into README Supportability Matrix. Looks like none of us have this camera.

GaryOkie commented 5 years ago

ok, that sounds reasonable. will do.