Closed pauln closed 1 month ago
I like the idea but maybe removing motors
output under -v
flag would be a better solution to silence the app? @gtxaspec please chime in.
Silencing the motors
output (either by default or via a new flag - maybe -q
for "quiet") would definitely be tidier - and if that's happening, adding a new flag to get the position in simple x,y
format would save us from using sed
to extract them from the JSON output. This PR was just the result of a quick attempt at enabling PTZ in Frigate by adjusting onvif.conf
- if we can improve motors
to make this cleaner, I'm definitely in favour of that.
I've popped in a PR for the motors
tool to add a -q
flag to suppress output and a -p
flag to get the plain x,y
position output. If that gets merged (or an alternative), I'll update this PR to use the new commands.
@pauln i merged your pr in the motors repo, i think you can refactor this a bit. check the latest commits i pushed also regarding onvif.
@gtxaspec Since you've already added get_position
, I've rebased and replaced the redirection to /dev/null
with the new -q
option on the move commands.
Adds getposition command and redirects move* output to /dev/null to prevent their output being injected as HTTP headers in ONVIF responses.
move_*
commands gets dumped into the HTTP response (before/in the HTTP headers), which leads to errors being logged by Frigate whenever it requests PTZ moves as it sees them as invalid/malformed headers