Repository navigation
Conversation
PtzControl (18) moves and stops, PtzPreset (19) goes to a saved position, the preset list is read with 190 and the pan/tilt counters with 433. Checked on a Reolink E1: each command moved the pan counter and the opposite one brought it back; a diagonal is answered 200 and ignored. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
The controller keeps its own Baichuan session, opened on the first command and closed after 30s idle, and stops a move nobody stopped. The ONVIF handler serves what Frigate's client needs: discovery, one profile with a PTZ configuration, continuous move, stop, status and presets, with optional WS-Security login. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Adds onvif, onvif_user and onvif_password to [[camera]], keeps them across edits on the camera page, flags a changed endpoint as needing a restart, and documents it in docs/ptz.md. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Owner
|
Thanks a ton for putting this together, it's a great idea! I won't be merging outside code due to licensing, but PTZ for Frigate is on my list now and I'll ping you here when it's in so you can test it on your E1. Thanks! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds pan/tilt for cameras that only speak Baichuan, so Frigate can move them. Follows up on #6, where PTZ was listed as not done yet.
What it does
Frigate steers cameras over ONVIF. A Reolink E1 has no ONVIF of its own, so reostream now serves a small ONVIF endpoint per camera and turns Frigate's requests into Baichuan messages.
internal/baichuan/ptz.go:PtzControl(18) move/stop,PtzPreset(19) go to preset, preset list (190), pan/tilt counters (433).internal/ptz: a controller with its own Baichuan session, opened on the first command and closed after 30 s idle. A move nobody stops is stopped after 15 s.internal/onvif: discovery, one profile with a PTZ configuration, ContinuousMove, Stop, GetStatus, GetPresets, GotoPreset, optional WS-Security login (digest or text).onvif,onvif_user,onvif_passwordon[[camera]]; kept across edits on the camera page; a changed endpoint is reported as needing a restart. Docs indocs/ptz.md.Video is untouched; PTZ uses a separate session.
Tested on a real Reolink E1
Reolink E1, firmware v3.2.0.4858, running next to a live reostream and Frigate:
onvif-zeep-async(the library Frigate uses), run inside the Frigate container against the full reostream binary: profile selection, presets, ContinuousMove, Stop, GetStatus (IDLE/MOVING/IDLE) and GotoPreset all worked, with no login and with a digest login (a wrong password is refused).leftmoved the pan counter (ptzcurpos) from 1938 to 1601,rightbrought it back to 1937,up/downmoved tilt, and go-to-preset 0 returned the camera to its starting position.Findings worth knowing
leftUpetc.) and does nothing, so a velocity with both axes set moves along the stronger one.<speed>: speeds 1 to 100 moved it the same distance in the same time.Not covered
ptz_test.go), without reading or copying Neolink source. There is no.pcapfixture; if you want one forinternal/baichuan/testdataI can capture it.go test ./...passes except sixdiscover_test.gotests ininternal/controlthat need127.0.0.2, which macOS doesn't allow to bind; unrelated to this change.trackmix-lenslands first there are two adjacent-line conflicts (config_test.go,camform.go) that keep both sides.🤖 Generated with Claude Code