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

PTZ control to move the camera :) #17

Closed
mabusdogma opened this issue Nov 15, 2022 · 11 comments
Closed

PTZ control to move the camera :) #17

mabusdogma opened this issue Nov 15, 2022 · 11 comments
Labels
enhancement New feature or request want user input Wait for user input

Comments

@mabusdogma
Copy link

Hello, I have an Imou Ranger 2 camera and it works well on Home Assistant, even more since this integration, but I would like to ask for PTZ control.
There are some camera integrations that allow to add PTZ controls and move it at will from HA.
(example: https://github.com/AlexxIT/WebRTC/wiki/PTZ-Config-Examples)

Now I can open and close the camera from Home Assistant, and that's a big step to automate the cameras.
Would you consider to add PTZ control to imou based cameras?

Thanks in advance

@user2684 user2684 added the enhancement New feature or request label Nov 15, 2022
@user2684
Copy link
Owner

Hi, yes, theoretically is possible, Imou esposes API for controlling the camera. Adding it to the roadmap. Out of curiosity, does the onvif integration already support it? Just to avoid duplicated functionalities :-)

@mabusdogma
Copy link
Author

I've been trying to have a PTZ control and as far as I know... No, it's not supported, at least not for the Imou Ranger 2.

@rogodra
Copy link
Contributor

rogodra commented Nov 15, 2022

From what I tested, with onvif PTZ control is not possible.
Now I can get my two Imou Ranger 2 out of the drawer.
Thanks for the work!

@user2684
Copy link
Owner

Ok, let me then have a look at this in the medium term. Do you have by chance any examples of other webcams in HA which has this PTZ control capability? Just to understand how to then represent it in HA :-)
THanks

@rogodra
Copy link
Contributor

rogodra commented Nov 16, 2022

I also have Tapo brand cameras, and they allow you to move the camera with arrows. These cameras allow from the official app to mark fixed positions, which from HA you can tell to go to the current PTZ position at a preset value.

I don't know if there would also be an option to tell the camera to go to a preset PTZ position.

I leave you the integration link.
https://github.com/JurajNyiri/HomeAssistant-Tapo-Control

Thanks

@user2684
Copy link
Owner

Thanks, I will have a look at it so to have a consistent implementation in HA :-)

@Andreastap
Copy link

integrate the ptz would be a great thing, I hope you succeed thanks to the work you've done so far.

@user2684
Copy link
Owner

Hi, what's your view on https://community.home-assistant.io/t/imou-life-cloud-integration/462439/106? Thanks :-)

@user2684 user2684 added the want user input Wait for user input label Nov 26, 2022
@user2684
Copy link
Owner

Implemented in 1.0.9

@mabusdogma
Copy link
Author

mabusdogma commented Nov 26, 2022

Works great! Thanks a lot @user2684! I use the WebRTC Integration for the Imou camera (no lag, no ONVIF integration needed) so if you want to add PTZ control inside the camera image, you can do this after you update this Imou_life integration to 1.0.9

a) Install the WebRTC integration
b) create a new configuration card
c) add this (replacing with your device ID, secretkey and IP)

type: custom:webrtc-camera
url: rtsp://admin:secretkey@IP:554/cam/realmonitor?channel=1&subtype=1
muted: false
intersection: 1
ui: true
device_id: <your device ID>
ptz:
  service: imou_life.ptz_move
  data_left:
    device_id: <your device ID>
    duration: 100
    operation: LEFT
  data_right:
    device_id: <your device ID>
    duration: 100
    operation: RIGHT
  data_up:
    device_id: <your device ID>
    duration: 100
    operation: UP
  data_down:
    device_id: <your device ID>
    duration: 100
    operation: DOWN
  data_zoom_in:
    device_id: <your device ID>
    duration: 100
    operation: ZOOM_IN
  data_zoom_out:
    device_id: <your device ID>
    duration: 100
    operation: ZOOM_IN


@user2684
Copy link
Owner

Thanks the the tip, didn't know that! I will add it to the documentation as an option :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request want user input Wait for user input
Projects
Archived in project
Development

No branches or pull requests

4 participants