Pelco Developer Network (PDN)

Basic Help with Pelco API webservices

Basic Help with Pelco API webservices

I’ve been trying to use the PelcoAPI web services and actually get information from the camera we got (Sarix IME319).

1. My confusion is specifically regarding the Video Analytics Events. Reading the wsdl documentation, I found that trying to get event information from the camera is “deprecated” and the “Event Library” is suggested to be used. In other words, I understood I need to “subscribe” to events and get those events in an asynchronous way. That’s fine, as long I understand how to use it.
2. I browsed all the sample files available @ PDN. I found this one: ManagedEventArbiterSample.cs. That is exactly what I need. It interfaces with the camera using ws and “subscribes” to events. However, this sample code refers to an assembly named “PelcoAPI” which I couldn’t find where I should download it from. Please take a look at line 19: class MyEventAgentNet : PelcoAPI.IEventAgentNet
PelcoAPI reference is what I am looking for.

Could you point me please where to solve that specific issue? Maybe it is quite simple to solve. I trust that, once I get that, I would be able to continue using the PelcoAPI ws.
Thank you

Thanks for your post. I'll comment here with similar information as what was relayed in the email...

We do not recommend that you use this old Pelco SDK code for event notification and subscription. We recommend that you write an implementation of event subscription and notification to receive events. There is code available that has been done available here: Thermography Integration (I know you are aware of this code already, I comment for other partners so they are aware as well). If you have trouble unzipping the file, please use 7-zip as one person did report issues trying to unzip the file with Windows 10, though in Windows 7 it unzipped just fine.

Subscription models are what most of our partners use for event notification, and it is what Pelco SDK used in the past as well. The concern is that Pelco SDK code that did this has not been updated nor tested in years, meaning that newer Pelco products might have unforeseen problems with it. That is a big reason why we recommend writing an event subscription model that you could use the code from the Thermography page as a basis for.

If you really want to go against our recommendation and continue to use the outdated Pelco SDK tools, please refer to Pelco SDK 3.5.2. That is the last version of Pelco SDK that included the Event Arbiter tools. Look at the "Samples" directory there and review the sample for the event arbiter and you will find the Event Agent code you are looking for.

Again -- PLEASE do not use Pelco SDK code for this as you will need a lot more installed and working on a client in order to have old versions of Pelco SDK operate on systems. A must simpler event based subscription implementation -- like the Thermography code sample used without Pelco SDK -- would mean a lot less of a headache to install and run on a client PC.


Pelco API GetPosition()


I'm using Pelco API PositioningControlV1 webservice and not sure why I always getting Zoom level is 0?
Tested with EspritHD, P1220 and S6230L but Zoom always 0.

Here are my codes:

PositioningControlV1.PositioningControl m_pc = new PositioningControlV1.PositioningControl();
m_pc.Timeout = 3000;
string socketRegex = string.Format("{0}[:0-9]*", "localhost");
m_pc.Url = Regex.Replace(m_pc.Url, socketRegex, "");

NetworkCredential credentials = new NetworkCredential("admin","admin");
m_pc.Credentials = credentials.GetCredential(new Uri(m_pc.Url), "Basic");
var position = m_pc.GetPosition();


I found to get Zoom value, I need to use LensControl webservice. It's working now.
I found the Esprit HD ES5230, the ZoomMagnification() value from 1.19 to 36 when Image stabilization is enabled. When it's disabled, value is correct from 1 to 30. Is the value 1.19 to 36 is correct?
I feel like incorrect as the camera should end 30 instead of 36?

I'm glad to see that you did properly locate the correct service for dealing with Zoom actions.

Sadly, I don't have additional information about your question ... I don't have a camera available to test this with. One comment I would make is to ensure that you are using the most current firmware for the camera, just to be safe.

I have a sorta similar Spectra Enhanced 6230 camera - under LensControl I see GetMag, GetMaxAOV, GetMaxDigitalMag, GetMaxMag, and GetMaxOpticalMag. For this camera, I see under the Web GUI Imaging tab an option for Electronic Image Stabilization -- I presume this is the setting you are describing enabling or disabling. This camera is the closest one that I have available right now.

For my camera, GetMaxMag returns 36000 whether I have Electronic Image Stabilization On or Off. GetMaxOpticalMag returns 3000 in either case as well. If you are changing the setting and getting different values for these, that doesn't seem like it should be the case.

Which request are you sending that returns these values? Have you reached out to Pelco Product Support - just in case? It may be a good idea to reach out to them in case they have any recorded issues about the camera, or to report the problem if one exists.

Hi Chris,

I'm using lensCtrl.GetMag() and lensCtrl.SetMag() for getting/setting zoom value and using firmware.
The value is fine, because when I setMag(), I just need to make sure position is correct as before trigger any preset.
Basically, customer required washer sequence like analog exsite has it long time ago, and not available in Esprit HD/Enhanced/Enhanced Low Light firmware.

I'm creating external software to deal with it, any chance I could implement a script in the camera software itself?
Example, monitor and receive preset X and trigger preset + wiper + aux 2.


Oh, sure.

To activate the Wiper, use the ScriptControl API web service. You can use ExecuteScript with either PRESET86 or AUXON1.

Here are some links where I found this information:
Script Preset and Pattern Naming Formats
and also here:
How to activate the wiper-blade on an ExSite or Esprit Positioning System from an Endura Workstation or VCD.

Please give that a try and let me know how that works out. I'm glad to see that you are using on the Esprit HD. The release notes for that version specifically indicate fixes for activating the camera's wiper and washer from aux commands.