Add Pan/Tilt (PTZ) support for Arlo pan-tilt cameras#105
Open
dw5304 wants to merge 1 commit into
Open
Conversation
Adds the Scrypted PanTiltZoom interface to ArloCamera, capability-gated on Capabilities.PanTiltZoom.pan (e.g. VMC2083A). Arlo PTZ is velocity-based continuous motion: action 'continuousMove' with velocityGenericSpace, then 'stop' — over the existing device notify channel. ptzCommand maps nonzero pan/tilt velocity to continuousMove and zero to stop, matching how ONVIF clients (UniFi Protect) drive PTZ via ContinuousMove + Stop. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
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.
Summary
Adds
PanTiltZoomsupport toArloCamerafor Arlo's pan/tilt models (e.g. VMC2083A – Essential Indoor 2nd-gen Pan & Tilt). Previously the plugin exposed no movement controls for these cameras.The Scrypted
PanTiltZoominterface is added capability-gated (only cameras whose Arlo capabilities advertisePanTiltZoom.pan), so no other models are affected.How Arlo PTZ actually works (the non-obvious part)
Arlo pan/tilt is velocity-based continuous motion, not absolute positioning. I captured the official web client (my.arlo.com) driving the camera and found it sends, on the device notify channel:
Key findings:
continuousMove(move untilstop), notset. Anaction:"set"withpositionGenericSpaceis accepted by the cloud (success:true) but the camera never moves.velocityGenericSpace(x=pan velocity, y=tilt velocity, each −1..1), notpositionGenericSpace.instantMessageproxy during a live stream, but the existing HTTP/notifychannel works identically — no in-band/SIP changes needed. The camera reports live position back oncameras/<id>/ptz(action:"is") as it moves.cameras/<id>/ptz(position,homePosition,defaultPTZSpeed,presets[]).Changes
arlo/arlo_async.py:PTZContinuous(basestation, camera, x, y)(continuousMove) andPTZStop(basestation, camera)(stop).camera.py:ArloCameranow mixes inPanTiltZoom.has_ptzproperty gated onCapabilities.PanTiltZoom.pan.arlo_presetshelper (exposes Arlo presets as Scrypted PTZ presets metadata).get_applicable_interfacesadvertisesPanTiltZoomwhenhas_ptz.ptzCapabilitiesis published indelayed_init(needs to run after the device is registered — setting it duringget_applicable_interfacesis too early and the state write is lost).ptzCommandmaps Scrypted PTZ → Arlo: nonzero pan/tilt velocity →continuousMove; zero →stop. This lines up exactly with ONVIF/clients that drive PTZ via ContinuousMove + Stop.Testing
interfaceVersioni007.continuousMove, release →stop.Notes / follow-ups
ptzCommandyet (clients using ONVIF ContinuousMove/Stop — incl. UniFi — only need continuous + stop, which this covers). Preset metadata is exposed viaptzCapabilities.presets; honoring a goto-preset command could be a follow-up (Arlo has a presetToken-based move).🤖 Generated with Claude Code