Pelco Developer Network (PDN)

500 Internal Server Error when trying to subscribe to events

500 Internal Server Error when trying to subscribe to events

I am building new application to get video analytics events from a IME 229 camera.
I am using Pelco API, along with some source code in c# provided by Pelco.
When I am trying to subscribe to Camera event using urn:pelco-com:serviceId:VideoAnalytics-2 API.
When I send the SUBSCRIBE command, I get from the camera "(500) Internal Server Error".
Please note the I tested the code with other Pelco Cameras (IME319, IMS0C10) with no problems (I sucessfully subscribe to events on those cameras).
I upgraded the IME229 firmware to v6.2.2.26 (Dated 8/17/2017: yesterday).
No luck, I am still getting the error.
Could somebody may give me a light on how to go ahead with this? I may provide details if needed.
Thank you!
Mario

Thanks for your post, I'm sorry to hear that you're having some trouble.

Sadly I don't have that model camera around handy to test with; I can still offer some guidelines and help that might resolve things for you. If you navigate to the camera's Device XML page, you can verify that the VideoAnalytics service is running at the URN you're expecting. To check this, navigate to the following URL in a web browser:

[camera_ip]/Device.xml

Note that Device must be capitalized or the GET request will fail. YOu should get a display of XML that you can search through to locate the various web services running on the camera, including VideoAnalytics. You can use that information to verify the URN value. It might be using a service ID of "1" instead of "2" at the end of the string there (maybe).

If the same code works on other cameras, it must be something with that camera itself, either the service (running or not or some problem), or the string is different / incorrect/ changed. You can also investigate using Wireshark to see what the SUBSCRIBE request looks like to the camera (which should be OK since it's working on the other cameras) and try to get better details from the response that the camera is sending back to the request. If you need help reading Wireshark - and the XML trick I mentioned doesn't work to fix it - please capture a filtered Wireshark network trace (filter by the camera IP only, please! large captures are giant haystacks to look through ...). You can provide a download link URL here on the forum and I can download it and look through it. Alternatively you could copy/paste just the response XML that you see in Wireshark, too.

I hope that helps!

Thank you for your support

Chris:
My apologies for such a late reply.
Few months ago, I abandoned this integration to focused on other urgent things. I retook this problem a week ago.
I got your comments and I figured out that the camera I was using actually got implemented VideoAnalytics-1, not -2. I changed and it worked!! I manager to build a software code which allows to connect to both -1 and -2 cameras concurrently. Code is still under tests, but seems to be working, subscribing and receiving alarms from both cameras.
Thank you for your support.
Regards,
Mario

No problem at all, thank you very much for the follow up. I'm happy to hear that with that information you were able to discover what the problem was. that service ID at the end of VideoAnalytics is often "-2", but can be other values as well.

Glad it's working now!