EnvironmentManager.Instance.SendMessagefailing

I am trying to send a PTZ command to a camera using

EnvironmentManager.Instance.SendMessage(new Message(MessageId.Control.PTZMoveStartCommand, data), cameraFQID);

but it isn’t working and no exception is being thrown

I’ve checked the XProtect logs and it seems like the PTZ message is not being received

I am initializing the environment using:

VideoOS.Platform.SDK.Environment.Initialize();   
 
 
 
        VideoOS.Platform.SDK.UI.Environment.Initialize();    // Initialize UI
 
        VideoOS.Platform.SDK.Export.Environment.Initialize();
 
      Uri uri = new Uri("ipAddress");
 
 
 
      CredentialCache cc = VideoOS.Platform.Login.Util.BuildCredentialCache(uri, "username", password", "Basic");
 
 
 
      VideoOS.Platform.SDK.Environment.AddServer(uri, cc);

on startup. Is there any reason a message would fail to send?

Can you move the same camera from the Smart Client testing with the same user?

This PTZ and Presets sample might be helpful -

https://doc.developer.milestonesys.com/html/index.html?base=samples/ptzandpresets_sample.html&tree=tree_2.html

Does this sample unmodified show the same failing?

Yes, I think the PTZ message is not being received by Milestone since I cannot see a PTZ request in the Milestone Management client logs

How about Smart Client? Can you move the same camera from the Smart Client testing with the same user?

If not, it could be a general issue. (maybe connection issue or something) In that case, please ask again in the support community, you should get better help from the partners using the support community. https://supportcommunity.milestonesys.com

If you can move the camera from the Smart Client, please get back to us.

Yes, I can move the camera from the Smart Client

We are wondering why you checked Management Client logs, because the PTZ and Presets sample is component sample which is not related to Management Client. Are you developing an Admin plugin or component integration? Have you tried to move with the PTZ and Presets sample?

Which product and version of the XProtect VMS are you using? Which version of the MIP SDK are you using?

Component integration. I’m checking the Management client logs since I was trying to troubleshoot the problem and noticed that new entries were created when I performed a successful action within my application, is that not right?

If so, is there another location where logs for component integration are stored?

I have tried moving with the PTZ sample and it works

I am using MIPS version 2020 R3

Milestone logs are here - [C:\ProgramData\Milestone\(service](file:C:/ProgramData/Milestone/(service) name) \Log.

Please note that ProgramData is a hidden folder.

Hi Rie, within the MIPSDK folder I’m able to see 2 types of logs - Mobile & MIP.

Within the MIP log I only see a series of messages

“2021-02-22 00:24:30.250 Error: SDKConfiguration.Logout(Uri) ():Unable to find URI=”

This is updated every few seconds with the same message

within Mobile I see the following message “2021-02-22 12:09:46.320 Debug: SDKConfiguration ():System configuration reloaded: CCTV-XPC”

Just to follow up:

I noticed that the Environment Manager Instance “CurrentSite” field in my application looks like this

{Server:XP:192.168.5.121 Id:00000000-0000-0000-0000-000000000000, ObjectId:00000000-0000-0000-0000-000000000000, Type:3b25fe94-7c2f-499a-86df-2fa68aa3e1b5}

As opposed to the following within the test application

{Server:XPCO:192.168.5.121 Id:“GUID VALUE”, ObjectId:00000000-0000-0000-0000-000000000000, Type:3b25fe94-7c2f-499a-86df-2fa68aa3e1b5}

In addition I can see that several of the Fields in the LicenseManager property are null or Incorrect

I am calling VideoOS.Platform.SDK.Environment.Initialize(); within the application on startup

You mentioned that the PTZ and Presets sample worked so if the sample does not cause the same issue, please compare your code to that of the sample and debug them. I hope you will be able to figure out differences and the cause of the issue.