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" />
<PackageReference Include="JEwaldt.PtzOptics" />
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
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#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
#tool nuget:?package=JEwaldt.PtzOptics&version=1.1.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
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/tilt —
Move(Visca.Direction)(Up/Down/Left/Right + 4 diagonals + Stop) withPanSpeed/TiltSpeed;StopMove();Home(). - Zoom —
ZoomIn(speed)/ZoomOut(speed)/ZoomStop(). - Focus —
FocusAuto()/FocusManual()/FocusNear(speed)/FocusFar(speed)/FocusStop()/FocusOnePush(). - Presets —
RecallPreset(n)/SavePreset(n)(0–254). - Power —
PowerOn()/PowerOff()(standby) /PollPower(). - Raw —
SendCommand(params byte[] body)— any VISCA command (header +0xFFadded).
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;
FeedbackChangedfires on a Crestron worker thread — marshal if a handler touches shared state.
License
MIT.
| Product | Versions 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.
-
.NETFramework 4.7.2
- Crestron.SimplSharp.SDK.ProgramLibrary (>= 2.21.252)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.