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

Add support for PTZ #42

Open
MiAutomations opened this issue Jul 2, 2021 · 10 comments
Open

Add support for PTZ #42

MiAutomations opened this issue Jul 2, 2021 · 10 comments

Comments

@MiAutomations
Copy link

MiAutomations commented Jul 2, 2021

Hello and thank you for your work with this costume component !!

Just to share with you that I have tested successfully this models:

IPC-HFW1230S
https://s.click.aliexpress.com/e/_AaZ6Mt
IMOU IPC-K22A / Cube PoE-322A
https://s.click.aliexpress.com/e/_AotOJr
IMOU IPC-A26Z / Ranger Pro Z
https://s.click.aliexpress.com/e/_9xkY6V

And i also have a request to improve this, can you please add the PTZ commands to the models that support this feature please like this one Please if possible at right a saved position and a left the commands to move the cameras

image

Thank you and best regards

@rroller
Copy link
Owner

rroller commented Jul 3, 2021

Awesome, thank you! It's so weird that some IMOU's work and some don't. Interesting that you have two that work.

I will def add the PTZ. It's a little hard since I don't have a PTZ camera yet. I'm going to order one so I can easily add the PTZ. I'll edit the title of this issue and keep it open to track PTZ support. Thanks again!

@rroller rroller changed the title Sharring new devices supported and tested Add support for PTZ Jul 3, 2021
@GaryOkie
Copy link

Hi Ronnie/@rroller - I just this morning discovered this integration exists from an ipcamtalk reference. Great work! I've been trying to make do with the Amcrest integration for Dahua cameras for a long time, along with the amcrest2mqtt to handle events. It's so much better to have event handling integrated.

My first code contribution to HA was adding PTZ support to the Amcrest integration. if it helps, just refer to the source https://github.com/home-assistant/core/blob/dev/homeassistant/components/amcrest/camera.py and search for "ptz".

The documentation for the PTZ services : https://www.home-assistant.io/integrations/amcrest/#service-ptz_control

I'll get started today installing your custom integration and will be happy to start help testing.

@rroller
Copy link
Owner

rroller commented Aug 28, 2021

@GaryOkie wow that's awesome, thank you! Testing would be great since I don't have a PTZ camera. I'll try to add support for this soon.

@MiAutomations
Copy link
Author

@GaryOkie grate work and thank you for sharing!!

But i think that some of models from Dahua/Imou doesn't support the ONVIF commands for the PTZ movements.
I have 2 models that I can't move using the HA service ONVIF PTZ, and I don't understand why ...

But the same code changing the device ID I'm abale to move other camera brands/models

Perhaps the api commands are in my option the best way...

cheers

@GaryOkie
Copy link

GaryOkie commented Sep 1, 2021

The PTZ service code I contributed to HASS was for the Amcrest Integration. It's using the Dahua/Amcrest API PTZ commands. The ONVIF service is completely different, and I had no hand in that.

@MiAutomations
Copy link
Author

The PTZ service code I contributed to HASS was for the Amcrest Integration. It's using the Dahua/Amcrest API PTZ commands. The ONVIF service is completely different, and I had no hand in that.

I'm using this, I think that is the correct way to use the PTZ commands over the HA. Can you confirm ?
But this one is not working with the Dahua/Imou cameras that I have ... I think that perhaps the API commands can help in this ...
But the strange is I can move the camera over the Onvif manager software that I think use the onvif commands also...
IMG_20210902_141945

Thank you

@GaryOkie
Copy link

GaryOkie commented Sep 2, 2021

The OP enhancement request is to add PTZ to the Dahua custom component. Reporting an issue or enhancement request with this Dahua custom component regarding ONVIF support is not the correct place.

I don't use ONVIF, but my understanding is that these PTZ services are only activated through the ONVIF Camera integration. That would be a core Home Assistant issue if Imou ONVIF PTZ doesn't work.

Meanwhile, you could try using the HASS Amcrest integration to see if that works for Imou. It works fine for most Dahua cameras, including those with PTZ.

@MiAutomations
Copy link
Author

The OP enhancement request is to add PTZ to the Dahua custom component. Reporting an issue or enhancement request with this Dahua custom component regarding ONVIF support is not the correct place.

I don't use ONVIF, but my understanding is that these PTZ services are only activated through the ONVIF Camera integration. That would be a core Home Assistant issue if Imou ONVIF PTZ doesn't work.

Meanwhile, you could try using the HASS Amcrest integration to see if that works for Imou. It works fine for most Dahua cameras, including those with PTZ.

Great thank you for the Information, I will open request enhancement regarding the Imou/Dahua ONVIF Camera integration.

I also try the Amcrest integration without success in this case :(

image

I'm available to test any other suggestion or improvement to this

Thank you

@MiAutomations
Copy link
Author

MiAutomations commented Dec 13, 2021

@rroller rroller

Just to share other model of the camera tested in this integration that work without any issue :)

IPC-A26HI
https://s.click.aliexpress.com/e/_A3XGE2

And By the way is there any news about the PTZ function available in this integration?

Thank you

@rbtying
Copy link

rbtying commented Jun 11, 2023

@rroller any interest in adding the PTZ controls? I think Dahua / Amcrest cameras usually expose this via ONVIF, so it's probably not too much work

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

4 participants