EcoStruxure IT forum
Schneider Electric support forum about installation and configuration for DCIM including EcoStruxure IT Expert, IT Advisor, Data Center Expert, and NetBotz
Link copied. Please paste this link to share this article on your social media post.
Posted: 2020-07-05 10:09 PM . Last Modified: 2024-04-03 12:34 AM
I'm trying to access the value of a device via SOAP, using the generated java classes from WSDL.
I can get a list of the devices (ISXCDevice) using the GetAllDevicesRequest. I do see the device I'm looking for. So far so good.
But I know this device has a value (for example something like 40mA), but I can't get it using any of the ISXCDevice properties.
I though maybe I should use GetDeviceControlsForDeviceRequest, but I don't even know how to get the isxcElementIDForDevice (the closest thing to an ID I could find is the getParentID() method from ISXCDevice).
Do you have some sample code on how to access properties from a device?
Thanks
(CID:148769889)
Link copied. Please paste this link to share this article on your social media post.
Link copied. Please paste this link to share this article on your social media post.
Posted: 2020-07-05 10:09 PM . Last Modified: 2024-04-03 12:34 AM
Hello Xavier.
There is a separate wsdl for sensor retrieval which exposes the following get sensor calls.
ISXCentralDeviceService_v2_0
More info can be found here:
(CID:148770067)
Link copied. Please paste this link to share this article on your social media post.
Link copied. Please paste this link to share this article on your social media post.
Posted: 2020-07-05 10:09 PM . Last Modified: 2024-04-03 12:34 AM
Hello Greg,
Thanks for the reply. As I was able to get the sensor through the "Device" list, I though I could access a detailed object. Anyway, I added the SensorService, but there is no GetAllSensorsRequest, everything that is there requires a parameter like an ISXCElementID, but I have no idea where/how to get it.
How should I proceed?
Thanks
(CID:148770128)
Link copied. Please paste this link to share this article on your social media post.
Link copied. Please paste this link to share this article on your social media post.
Posted: 2020-07-05 10:09 PM . Last Modified: 2024-04-03 12:34 AM
Did you try the getSensorsForDevice request?
Regards
Greg Sterling
(CID:148770161)
Link copied. Please paste this link to share this article on your social media post.
Link copied. Please paste this link to share this article on your social media post.
Posted: 2020-07-05 10:10 PM . Last Modified: 2024-04-03 12:34 AM
Ouch, didn't see the "s" at the end of sensor(s) in this one:)
Ok I still get a com.apc.stdws.wsdl.isxcentralsensors_v2.SensorServiceFault: Invalid ID though...
Here's what I'm doing so far, nothing fancy, just trying to get to the sensors:
ISXCentralSensorServiceV20_Service sensorService = new ISXCentralSensorServiceV20_Service();
ISXCentralSensorServiceV20 sensorServiceProxy = sensorService.getISXCentralSensorServiceV20HttpPort();
GetSensorsForDeviceRequest getSensorsForDeviceRequest= new GetSensorsForDeviceRequest();
GetSensorsForDeviceResponse response;
try {
response = sensorServiceProxy.getSensorsForDevice(getSensorsForDeviceRequest);
// => the Invalid ID fault is coming from the line above
List
...
}
(CID:148770164)
Link copied. Please paste this link to share this article on your social media post.
Link copied. Please paste this link to share this article on your social media post.
Posted: 2020-07-05 10:10 PM . Last Modified: 2024-04-03 12:34 AM
When you make the call to the getsensorsfordevice your request packet should look something like this where you substitute the element id from your previous get devices call. So an example might be B981f08_nbSNMPEnc94632825
Is this the format you are using?
So, using my above sample element id, the content of your request packet would look like this if you're querying my above device.
Regards
Greg Sterling
(CID:148770549)
Link copied. Please paste this link to share this article on your social media post.
Link copied. Please paste this link to share this article on your social media post.
Posted: 2020-07-05 10:10 PM . Last Modified: 2024-04-03 12:34 AM
Hello Greg,
I didn't have any Id, but digging a little more into the device tree, I was able to found it, but that is way too deep for my taste:)
ISXCDevice > ISXCNamedElement > ISXCElement > getId(), I would have expected a getId() right at the ISXCDevice object.
Anyway, I passed the ID and now I get to the sensor, but there is not much here, I can't seem to access its value. If I try to access the sensorData, I get com.apc.varlib.model.devices.impl.CustomSensorPodImpl cannot be cast to com.apc.varlib.model.sensors.Sensor
Could it be because it is a virtual sensor? (based on the package name, it seems like I should access it like a Device and not a Sensor anyway)
(CID:148770605)
Link copied. Please paste this link to share this article on your social media post.
Link copied. Please paste this link to share this article on your social media post.
Posted: 2020-07-05 10:10 PM . Last Modified: 2023-10-22 02:13 AM
This question is closed for comments. You're welcome to start a new topic if you have further comments on this issue.
Link copied. Please paste this link to share this article on your social media post.
Create your free account or log in to subscribe to the board - and gain access to more than 10,000+ support articles along with insights from experts and peers.