JEwaldt.PtzOptics 1.1.0

dotnet add package JEwaldt.PtzOptics --version 1.1.0
                    
NuGet\Install-Package JEwaldt.PtzOptics -Version 1.1.0
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="JEwaldt.PtzOptics" Version="1.1.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="JEwaldt.PtzOptics" Version="1.1.0" />
                    
Directory.Packages.props
<PackageReference Include="JEwaldt.PtzOptics" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add JEwaldt.PtzOptics --version 1.1.0
                    
#r "nuget: JEwaldt.PtzOptics, 1.1.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package JEwaldt.PtzOptics@1.1.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=JEwaldt.PtzOptics&version=1.1.0
                    
Install as a Cake Addin
#tool nuget:?package=JEwaldt.PtzOptics&version=1.1.0
                    
Install as a Cake Tool

JEwaldt.PtzOptics

A Crestron SIMPL# Pro driver for PTZOptics PTZ cameras over VISCA-over-IP (raw VISCA on a TCP socket, PTZOptics default port 5678). Built for the Move 4K.

Install

dotnet add package JEwaldt.PtzOptics

Use

using JEwaldt.PtzOptics;

var cam = new PtzCamera("192.168.1.90", 5678, address: 1, name: "Sit Room Cam");
cam.Connect();

cam.PanSpeed = 12;              // 1-24
cam.TiltSpeed = 10;            // 1-20
cam.Move(Visca.Direction.UpLeft);   // hold-to-move: drive...
cam.StopMove();                     // ...then stop on button release

cam.ZoomIn(5);                 // speed 0-7
cam.RecallPreset(3);
cam.Home();

Call cam.Dispose() on teardown.

Control surface

  • Pan/tiltMove(Visca.Direction) (Up/Down/Left/Right + 4 diagonals + Stop) with PanSpeed / TiltSpeed; StopMove(); Home().
  • ZoomZoomIn(speed) / ZoomOut(speed) / ZoomStop().
  • FocusFocusAuto() / FocusManual() / FocusNear(speed) / FocusFar(speed) / FocusStop() / FocusOnePush().
  • PresetsRecallPreset(n) / SavePreset(n) (0–254).
  • PowerPowerOn() / PowerOff() (standby) / PollPower().
  • RawSendCommand(params byte[] body) — any VISCA command (header + 0xFF added).

Feedback

PowerIsOn (from PollPower()) and the FeedbackChanged event. PTZ position isn't tracked — control is fire-and-forget by design.

Design notes

  • Hold-to-move: pan/tilt/zoom/focus are start-on-press, stop-on-release. Commands are sent immediately (no reply-gated queue), so movement stays responsive.
  • The TCP transport auto-reconnects every 5 seconds.
  • Standby handling: PowerOff() sends standby, then disconnects cleanly and reconnects after 15 s — PTZOptics cameras drop their TCP server in standby and a rapid reconnect otherwise gets stuck.
  • VISCA acknowledgements are parsed only to log errors and read power state; FeedbackChanged fires on a Crestron worker thread — marshal if a handler touches shared state.

License

MIT.

Product Compatible and additional computed target framework versions.
.NET Framework net472 is compatible.  net48 was computed.  net481 was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.1.0 102 7/27/2026
1.0.0 109 7/24/2026