-
-
Notifications
You must be signed in to change notification settings - Fork 64
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 do not work. #1715
Comments
FYI: Both of these are working as intended (reolink is part of HA core, and the card only supports using the 1st preset so far). Can you visit https://<PATH_TO_YOUR_FRIGATE_INSTANCE>/api/<FRIGATE_CAMERA_NAME>/ptz/info ... and tell me what you get back? It'll be a JSON blob. |
Perfect, thanks for the clarification.
{
"features": [
"pt",
"zoom",
"pt-r",
"zoom-r",
"zoom-a"
],
"name": "PTZ",
"presets": [
"door",
"middle",
"back",
"door_zoomed"
]
} |
I assume whichever camera has the PTZ controls (probably Looking at the config, and that JSON, it's not clear why it's not working. |
Yes, I only have one camera with PTZ controls, named Yeah, it should work, but I can't find anything that's wrong. Maybe I could install the card manually instead of via HACS to add some console logs? Is there a guide to so? More than happy to take a look at what's going on and report back with my findings |
If you're comfortable playing around in devtools, that might help us figure this out. This is the ultimate call to the Frigate integration to do the PTZ move: I'd love to know if the call gets in there. This is the code you linked to, it should call the above. Right now I can't tell if the card is not making the call and nothing is happening, or the card is messing up. The other idea would be to manually call the services from action: frigate.ptz
target:
entity_id: camera.ptz
data:
action: move
argument: left <-------------- Change this to right/left to move all the way right or left If it doesn't move calling the service manually, there's no way the card could work. If it does work when you call it manually, but doesn't via the card, something is wrong with the card... |
If you're a developer, you could download the repo, build the card yourself, and install that version. This would give you the full sourcemaps and lets you navigate the card easier. There's a video at the bottom of this that isn't exactly what you want, but would let you substitute in your "home built" version of the card: https://card.camera/#/advanced-installation?id=unreleased-versions |
There's no API call on the network tab of the devtools when I click the PTZ buttons.
Doesn't move my camera neither an API call on the devtools network tab (see attached video). ptz-not-working.mov
Sounds good, I'll give that a try later this week and report back my findings! |
Great screencap. Note that we wouldn't expect any new network traffic when you perform that action -- the browser would just be reusing a pre-existing websocket, the real call would be between your HA instance and your Frigate backend. In any case, since just manually doing the action (as per your video) doesn't work, the issue is not likely related to the card -- as the card is just calling that same action (FKA: service call). We need to figure out why HA is not doing anything when it receives that action. Once that works, the card should also work. Is there anything interesting in your Home Assistant or Frigate logs when you issue that action call? |
No logs on either of them that seem to be triggered by pressing the buttons or doing the action call on HA devtools. I do see these errors on frigate logs, which are for camera that don't have onvif setup because they aren't PTZ cameras. I found an issue on frigate talking about it, saying it's something on this card I think |
That's Frigate being overly loggy when the card simply asks what PTZ capabilities the camera has. They already fixed that in latest releases. This is not related to your problem. |
Your Frigate log should show something like this, when you call the action (manually or button):
|
[Changing this from |
same issue here. Update everything to the latest version I have tried that in two browsers, chrome and firefox. It works the same. I can control my cam over PTZ buttons in Frigate and i can see the PTZ buttons on the screen in the frigate card, but they are not working at all. I also tried to perform manual action using devtools, with the same result as in the previous comments. Nothing in any log which I can find (HA, Frigate) Can I help you somehow to investigate what is wrong? log: |
Long-shot: Have you both correctly got MQTT setup in your HA instance? Do switch entities for Frigate work correctly? I ask since MQTT is used to send the PTZ commands from HA to Frigate. If that's not the issue, I'm at a bit of a loss. A good debugging step might be to watch the MQTT traffic between HA and Frigate. On Linux, here's an annotated example of my doing that. Other OSes have similar tools:
@NickM-27 might have some other ideas (Nick -- issue best summarized in video above -- PTZ service calls not doing anything). |
I have found what is the root cause of this issue: Se attached frigate log bellow. At 3:27 I clicked on zoom in button on the frigate card: 2024-12-14 03:25:53.012963415 [2024-12-14 03:25:53] frigate.comms.dispatcher INFO : Setting ptz command to move_left for Testovaci |
Same here, after clicking zoom in or zoom out on the card, the card ptz stops working until frigate is restarted. |
This makes it very likely to be a Frigate backend problem. I suggest you file an issue in that repo with the above description: https://github.com/blakeblackshear/frigate . |
[Closing this here, as it seems pretty conclusively to not be a card issue] |
Versions:
[REQUIRED] Card diagnostic information:
[REQUIRED] Description of problem:
I can't seem to get my PTZ controls to work on the card.
[OPTIONAL] Last working release (if known):
I just installed this camera so I don't know if it's release related. I tried on beta-8 and beta-9, none worked.
[OPTIONAL] Javascript errors shown in the web inspector:
None.
[OPTIONAL] Additional information:
I tried debugging this a bit with the chrome devtools, and I noticed that at least the events that I want to do some action is getting to an executePTZAction function:
Where:
The text was updated successfully, but these errors were encountered: