Welcome to the new Schneider Electric Community

It's your place to connect with experts and peers, get continuous support, and share knowledge.

Close
Important Announcement: WELCOME to the Schneider Electric Community! We have moved to a new address: community.se.com — bookmark it today and contact SchneiderCommunity.Support@se.com if you have any questions!
Invite a Co-worker
Send a co-worker an invite to the Exchange portal.Just enter their email address and we’ll connect them to register. After joining, they will belong to the same company.
Send Invite Cancel
82760members
350548posts

What is the correct way to call EwsClient.ExtractHistroyItemIds on an AS?

SmartConnector Forum

Discussion of SmartConnector applications for integration of various other building management systems (BMS) into EcoStruxure Building Operation

Solved
sesa180961_brid
Lieutenant Lieutenant
Lieutenant
0 Likes
2
135

What is the correct way to call EwsClient.ExtractHistroyItemIds on an AS?


I have a few Interval Trend Logs on an AS in a specific folder. This AS is attached to an ES.

"03/Server 1/Servers/DFW18_S220_DCIM04/TrendLogs"

In a SmartConnector, I would like to get Interval Trend Logs using EwsClient.ExtractHistoryItemIds or EwsClient.ExtractHistoryItems.

When I call using these parameters, it does not work.

itemIds = c.ExtractHistoryItemIds(false, new List<string> { "03/Server 1/Servers/DFW18_S220_DCIM04/TrendLogs" }, 5);  items = c.ExtractHistoryItems(false, new List<string> { "03/Server 1/Servers/DFW18_S220_DCIM04/TrendLogs" }, 5);

But when I call the same method using the true parameter, it returns but takes a while to return.

itemIds = c.ExtractHistoryItemIds(true, new List<string> { "03/Server 1/Servers/DFW18_S220_DCIM04/TrendLogs" }, 5);  items = c.ExtractHistoryItems(true, new List<string> { "03/Server 1/Servers/DFW18_S220_DCIM04/TrendLogs" }, 5);

The EwsClient version is 2.2.108.0

I assumed that if the path to the logs is known, passing false should work. Is there some setting on the AS that should be set or some other parameter I am missing?

Thanks in advance!!


Accepted Solutions
JeffBowman
Schneider Alumni (Retired)
Schneider Alumni (Retired)
0 Likes
1
99

Re: What is the correct way to call EwsClient.ExtractHistroyItemIds on an AS?

Hi Maneesh,

I think this isn't working because when it is set to False it is expecting a list of Container Items Ids, but from what I can see, you havent passed in any ContainerItem Ids, but actually HistoryItem Ids.

itemIds = c.ExtractHistoryItemIds(false, new List<string> { "03/Server 1/Servers/DFW18_S220_DCIM04/TrendLogs" }, 5); 

items = c.ExtractHistoryItems(false, new List<string> { "03/Server 1/Servers/DFW18_S220_DCIM04/TrendLogs" }, 5);

should probably be changed to:

itemIds = c.ExtractHistoryItemIds(false, new List<string> { "00/Server 1/Servers/DFW18_S220_DCIM04/TrendLogs" }, 5); 

items = c.ExtractHistoryItems(false, new List<string> { "00/Server 1/Servers/DFW18_S220_DCIM04/TrendLogs" }, 5);

Notice 03 has been changed to 00 in the prefix of your Container Item IDs.

Below are what the prefixes in the SBO EWS Ids mean:

00 - Container Item

01 - Value Item

11 - Value item, that is a property of another Value Item

02 - Alarm Item

03 - History Item

-Jeff

See Answer In Context

2 Replies 2
JeffBowman
Schneider Alumni (Retired)
Schneider Alumni (Retired)
0 Likes
1
100

Re: What is the correct way to call EwsClient.ExtractHistroyItemIds on an AS?

Hi Maneesh,

I think this isn't working because when it is set to False it is expecting a list of Container Items Ids, but from what I can see, you havent passed in any ContainerItem Ids, but actually HistoryItem Ids.

itemIds = c.ExtractHistoryItemIds(false, new List<string> { "03/Server 1/Servers/DFW18_S220_DCIM04/TrendLogs" }, 5); 

items = c.ExtractHistoryItems(false, new List<string> { "03/Server 1/Servers/DFW18_S220_DCIM04/TrendLogs" }, 5);

should probably be changed to:

itemIds = c.ExtractHistoryItemIds(false, new List<string> { "00/Server 1/Servers/DFW18_S220_DCIM04/TrendLogs" }, 5); 

items = c.ExtractHistoryItems(false, new List<string> { "00/Server 1/Servers/DFW18_S220_DCIM04/TrendLogs" }, 5);

Notice 03 has been changed to 00 in the prefix of your Container Item IDs.

Below are what the prefixes in the SBO EWS Ids mean:

00 - Container Item

01 - Value Item

11 - Value item, that is a property of another Value Item

02 - Alarm Item

03 - History Item

-Jeff

sesa180961_brid
Lieutenant Lieutenant
Lieutenant
0 Likes
0
99

Re: What is the correct way to call EwsClient.ExtractHistroyItemIds on an AS?

I see. That explains it. Thanks!