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 controls with the official HASS Reolink integration #609

Open
threnbo opened this issue Nov 22, 2023 · 3 comments
Open

PTZ controls with the official HASS Reolink integration #609

threnbo opened this issue Nov 22, 2023 · 3 comments
Labels
question Further information is requested

Comments

@threnbo
Copy link

threnbo commented Nov 22, 2023

Is it possible to use PTZ controls when using the official Relink integration (camera model E1 Zoom)?

The integrations adds button entities for PTZ controls. I tried using the example posted here #167 but it doesn't work.

When adding the camera with the official Onvif integration the above mentioned example works, but I want to use several entites only added by the Reolink integration.

Thank you!

@threnbo
Copy link
Author

threnbo commented Nov 23, 2023

It seems to work with this code:

type: custom:webrtc-camera
entity: camera.e1_zoom_main
ui: true
ptz:
  service: button.press
  data_left:
    entity_id: button.e1_zoom_ptz_left
  data_right:
    entity_id: button.e1_zoom_ptz_right
  data_up:
    entity_id: button.e1_zoom_ptz_up
  data_down:
    entity_id: button.e1_zoom_ptz_down
  data_zoom_in:
    entity_id: button.e1_zoom_ptz_zoom_in
  data_zoom_out:
    entity_id: button.e1_zoom_ptz_zoom_out

Remaining problem is that one button press means full movement in each direction.

@AlexxIT AlexxIT added the question Further information is requested label Nov 23, 2023
@muzzy124
Copy link

muzzy124 commented Dec 11, 2023

I see in the reolink integration docs that: "PTZ left, right, up, down, zoom in and zoom out will continually move the camera in the respective position until the PTZ stop is called or the hardware limit is reached."

So the issue could be solved with calling script like this:

e1_zoom_ptz_up_with_stop:
  alias: e1_zoom_ptz_up_with_stop
  sequence:
  - service: button.press
    target:
      entity_id: button.e1_zoom_ptz_up
  - delay:
      seconds: 0.5
  - service: button.press
    target:
      entity_id: button.e1_zoom_ptz_stop

The question is how to call that script from webrtc camera card?

@tunip
Copy link

tunip commented Feb 8, 2024

You can use an automation for that.

Bildschirmfoto 2024-02-08 um 21 24 56

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

4 participants