-
-
Notifications
You must be signed in to change notification settings - Fork 62
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
Transparently call Frigate PTZ via integration #1163
Comments
You are correct, the Frigate card already supports PTZ via Home Assistant service calls. Myself and @NickM-27 discussed this briefly before, having had a similar idea. If the Frigate API exposed calls to move the camera around, we could proxy calls from the card through the integration to the backend, and the card could just support this out of the box for Frigate cameras... |
Actually, I think a better idea is to implement service calls in HA that call the backend. This would mean that the standard HA "interface" (service-calls) would support Frigate PTZ, so other non-Frigate card uses could benefit. It would also mean very little would need to change on the card, beyond populating some defaults for Frigate cameras. |
Discussed this briefly with @NickM-27 yesterday, I took a few things away:
|
Update: Nick is working on 2 in blakeblackshear/frigate-hass-integration#510 . |
I think this might be related to #1103 , which I plan to fix in the next major release as it's a breaking change. HA renamed the elements:
- type: custom:frigate-card-ptz
orientation: vertical
style:
transform: none
right: 5%
top: 50%
actions_left:
tap_action:
action: call-service
service: frigate.ptz
target:
entity_id: camera.backdoor
service_data: // <--------------- This is changed
action: move
argument: left As I understand it with the new Frigate PTZ endpoint you need to both move and stop the camera, or it'll just keep going. You should be able to use the Note that I have not tested calling the new Frigate PTZ endpoints as I'm describing, but it should work. I plan to make this work more "out of the box" for Frigate (without needing so much YAML) in future (that's what this issue is for) -- but hopefully you have enough clues to get this working with the above for now. Good luck. |
Thanks @dermotduffy for your suggestion 😃 EDIT
EDIT2
That would be great, that would save me some YAML lines 😆
I do as it works now, great thanks! |
I came to report exactly this after testing, bit I'm late to the party and happy you have found a solution to stop the movement on release. It works amazingly well, thank you! It would be amazing if this could be integrated automatically in the card though, as the YAML gets reeaally long at this point. :) Out of curiosity, where are |
They are non-standard HA actions, only supported by this card (for this usecase and other similar ones, e.g. microphone hold to speak buttons). They can be used anywhere in the card that normal actions are used -- I don't think there's a specific example about using them with the PTZ control though. They are referred to in the docs here: https://github.com/dermotduffy/frigate-hass-card#custom-action-types-start_tap-and-end_tap |
With the newly merged PR, which will be in the next release, you need no YAML whatsoever for PTZ support as long as the PTZ is setup in Frigate. |
Hi, I have the latest version (5.2.0) and I managed to make it work writing the config manually into the card, but I cannot figure out how to set it up in this 'auto' mode without the long yaml. I'm probably missing something obvious... I thought the menu options would appear in the interface under buttons or live controls but I cannot find it. They're Tapo cameras that I have setup in frigate with ONVIF. Thanks! |
it appears from the latest dev builds that frigate 0.13 will support PTZ natively via ONVIF. it would be nice to be able to configure this only within Frigate itself and have this functionality inherited by the frigate-hass-card instead of needing to add webrtc card into the mix.
it seems as though PTZ functionality has been available in frigate-hass-card since before the PR for ptz control in the frigate repo.
(please correct me if my understanding is incorrect)
The text was updated successfully, but these errors were encountered: