Camera username seems to be visible from hardware.GetProperty(“UserName”), but I’m having trouble finding the password.
In the Management Client you can read the password from the Properties dictionary on the camera MIP item (not the hardware).
Alternatively you can use Config API to retrieve it (primarily if you are not in Management Client and do have proper rights to access it). Or even easier use the strongly typed ConfigurationItems.Hardware class – it has a method called ReadPasswordHardware(): http://doc.developer.milestonesys.com/html/index.html?base=miphelp/class_video_o_s_1_1_platform_1_1_configuration_items_1_1_hardware.html&tree=tree_search.html?search=configurationitems
Peter,
I tried string password = camera.GetProperty(“Password”), but returns a null. I also tried the ReadPasswordHardware(), but the results didn’t seem to contain the password.
I’ve been searching all morning on this and coming up blank. I even retrieved all the Property keys and both camera and hardware and found nothing. I’m really having difficulties with this. I saw that JF reached out to you separately on this one as well.
Matt
Please make sure you are not confusing the Configuration API and the MIP Configuration class. The “Password” property is in the Properties dictionary of the camera Item returned by e.g. the Configuration.Instance.GetItem(…) method.
The ReadPasswordHardware is a method on the Hardware items in the Configuration API (either on the ‘raw’ API which it seems like you are using or on the ConfigurationItems.Hardware strongly typed class). I just tested with Config API client sample and it worked fine. Maybe you can have a look at the code of that sample if you are still having problems?
If you are implementing a Management Client plugin I recommend that you explore the Config Dump tool sample. Running that sample in the management Client you will see the password. Using the method and code from that sample will be the easiest way forward if you are in a Management Client plugin. (MIP Configuration)
This did the trick. Thanks!
Hardware hardware = new Hardware(camera.ServerId, camera.ParentItemPath);
ServerTask st = hardware.ReadPasswordHardware();
string password = st.GetProperty("Password");
Generally, please don’t post unrelated questions on old threads, but create new question instead.
Also I don’t understand what SQL commands you are referring to as none of the above is above SQL, but rather our SDK: https://doc.developer.milestonesys.com/html/index.html