SmartConnector Forum
Schneider Electric support forum about SmartConnector applications for integration of other building management systems (BMS) into EcoStruxure Building Operation.
Link copied. Please paste this link to share this article on your social media post.
I have a site with both the SBO REST Provider and the SOAP REST Provider configured. With the SBO REST Provider, I cannot read IO bus points or field controller points. Even when a Get/Containers/{id}/Children, the IO bus and BACnet interfaces do not show up. However, this works fine with the SOAP REST Provider.
Has anyone else had this issue?
Link copied. Please paste this link to share this article on your social media post.
Hi Steven,
The SboEwsRestProvider is based partially based on the CSP protocol that EBO uses natively to communicate between servers, while the SoapEwsRestProvider is wholey based on EWS. Because of this, while the SboEwsRestProvider has access to some additional features of the EWS Rest Provider (such as bulk get requests, and create requests), it also lacks in certain areas due to CSP being a bit non-intuitive and convoluted (for example, exactly what you are running into right now!)
Here's where this answer becomes super convoluted, and might make you wanna go back to using the SOAP Provider unless you have a very good reason to be on the SBO one .
Because of the many unknowns with regards to objects relation to EWS types, and types in CSP, a new table was added to the Smart Connector database in 2.3. It is called ComlEwsMappings. This table maps CSP COML Types to EWS Object types. This table is used, to help some requests (for example the /Containers/{id}/Children) determine which objects that it receives from SBO should actually be returned in the response. There are some default types added to this table when the Smart Connector database is installed, but it is in no way complete. I just ran some tests, and to even find a BACnet analog value object, in a IP BACnet device in my ES, I needed to add the below 4 records to this table.
23 | bacnet.IPDataLink | 0 | Structure |
24 | bacnet.BACnetApplicationProxy | 0 | Structure |
25 | bacnet.Application | 0 | Folder |
27 | bacnet.pointproxy.analog.Value | 1 | Double |
From my perspective, this isn't ideal, and while this is the initial implementation of the SboEwsRestProvider, there has been talk about re-doing this to be more generic in the future (e.g. without the table if we can figure it out). When the SboEwsRestProvider was written, this was the best way that could be determined due to a lack of certain documentation on 'certain' protocols.
So, to determine what types you need to add to this table, I would use the following process.
For each object that is in the path of the object (for example, BACnet interface>BACnet Network>BACnet device>Application folder>Object)
Note: Once you have completed this step for everything, restart the Smart Connector service as these mappings are only added to Memory the first time they are required, the service needs to be restarted in order for the new ones to be added to memory.
The EwsTypes and SubType options are detailed below.
0 = Container Item
EwsSubType options for for Container Items are:
1 = Value Item
EwsSubType options for Value Items are:
2 = History Item
3 = Alarm Item
Let me know of any questions you may have!
Regards,
-Jeff
Link copied. Please paste this link to share this article on your social media post.
Hi Steven,
The SboEwsRestProvider is based partially based on the CSP protocol that EBO uses natively to communicate between servers, while the SoapEwsRestProvider is wholey based on EWS. Because of this, while the SboEwsRestProvider has access to some additional features of the EWS Rest Provider (such as bulk get requests, and create requests), it also lacks in certain areas due to CSP being a bit non-intuitive and convoluted (for example, exactly what you are running into right now!)
Here's where this answer becomes super convoluted, and might make you wanna go back to using the SOAP Provider unless you have a very good reason to be on the SBO one .
Because of the many unknowns with regards to objects relation to EWS types, and types in CSP, a new table was added to the Smart Connector database in 2.3. It is called ComlEwsMappings. This table maps CSP COML Types to EWS Object types. This table is used, to help some requests (for example the /Containers/{id}/Children) determine which objects that it receives from SBO should actually be returned in the response. There are some default types added to this table when the Smart Connector database is installed, but it is in no way complete. I just ran some tests, and to even find a BACnet analog value object, in a IP BACnet device in my ES, I needed to add the below 4 records to this table.
23 | bacnet.IPDataLink | 0 | Structure |
24 | bacnet.BACnetApplicationProxy | 0 | Structure |
25 | bacnet.Application | 0 | Folder |
27 | bacnet.pointproxy.analog.Value | 1 | Double |
From my perspective, this isn't ideal, and while this is the initial implementation of the SboEwsRestProvider, there has been talk about re-doing this to be more generic in the future (e.g. without the table if we can figure it out). When the SboEwsRestProvider was written, this was the best way that could be determined due to a lack of certain documentation on 'certain' protocols.
So, to determine what types you need to add to this table, I would use the following process.
For each object that is in the path of the object (for example, BACnet interface>BACnet Network>BACnet device>Application folder>Object)
Note: Once you have completed this step for everything, restart the Smart Connector service as these mappings are only added to Memory the first time they are required, the service needs to be restarted in order for the new ones to be added to memory.
The EwsTypes and SubType options are detailed below.
0 = Container Item
EwsSubType options for for Container Items are:
1 = Value Item
EwsSubType options for Value Items are:
2 = History Item
3 = Alarm Item
Let me know of any questions you may have!
Regards,
-Jeff
Link copied. Please paste this link to share this article on your social media post.
I think I understand....So does this apply to IO points also? I would have thought that the table entries for the IO bus would already exisit??
Link copied. Please paste this link to share this article on your social media post.
So I have created the following entries:
23 bacnet.IPDataLink 0 Structure
24 bacnet.BACnetApplicationProxy 0 Structure
25 bacnet.Application 0 Folder
26 bacnet.pointproxy.analog.Value 1 Double
27 bacnet.MSTPDataLink 0 Structure
28 bacnet.pointproxy.analog.Input 1 Double
29 bacnet.pointproxy.digital.Input 1 Boolean
30 io.IOBus 0 Folder
31 io.UI16 0 Device
32 io.DI16 0 Device
33 io.AOV8 0 Device
34 io.DOFA12 0 Device
35 io.point.VoltageInput 1 Double
36 io.point.DigitalInput 1 Boolean
37 io.point.TemperatureInput 1 Double
38 io.point.CurrentInput 1 Double
39 io.point.CounterInput 1 Double
40 io.point.VoltageOutput 1 Double
41 io.point.CurrentOutput 1 Double
42 io.point.DigitalOutput 1 Boolean
...and points on the BACnet interface seem to work fine, but I am getting an error when I try to read the IO bus. I can now discover the IO Bus as a Child of the Server, but when I try to get Containers of the IO Bus, i get a 'not found error', and it seems to create a 'contract violation' in the log. I have tried changing the EwsSubtype for the IO bus and IO modules but still the same result. See log below.
2018-07-04 19:42:33.1616,Error,CspClient,StevenGr,Code=NoUserSession, DisplayInfo='The user session is lost, no specific reason has been set.', TechnicalInfo='[error created at 'SE.WorkStation.Communication.SP1WP3.CspProxy+CreateWebExceptionResult']', Module=Workstation, ModuleCode=0
at Mongoose.Csp.CspClient.ExecuteAndLogCall[TRequest,TResponse,TRecordType](String methodName, TRequest request, Func`2 methodToLog)
at Mongoose.Csp.CspClient.<>c__DisplayClass25_0.<RetrieveObject>b__0(Object <p0>)
at Mongoose.Csp.CspClient.ExecuteAndLogCall[TRequest,TResponse](String methodName, TRequest request, Func`2 methodToLog)
,["54D761B736D04236B00AF72E4F90D8B9"],
2018-07-04 19:42:33.1616,Error,RestServe,StevenGr,{"Message":"Value Id /20 MartinPlace/Servers/AS-21-1/"},IO Bus not found
2018-07-04 19:42:34.1908,Error,CspClient,imcd,Code=CommunicationContractViolation, DisplayInfo='ASN.1 Decode error @ offset 0:
Unexpected end-of-buffer encountered.', TechnicalInfo='[error created at 'SE.WorkStation.Communication.SP1WP3.Commands.CommunicationCommand`1+SendCspCommandRequestAndDecodeAsn1']', Module=Workstation, ModuleCode=0
at Mongoose.Csp.CspClient.ExecuteAndLogCall[TRequest,TResponse,TRecordType](String methodName, TRequest request, Func`2 methodToLog)
,["50ABD369EDC843EE8F89F8C1CC136486"],
2018-07-04 19:42:34.1908,Error,CspClient,imcd,Code=CommunicationContractViolation, DisplayInfo='ASN.1 Decode error @ offset 0:
Unexpected end-of-buffer encountered.', TechnicalInfo='[error created at 'SE.WorkStation.Communication.SP1WP3.Commands.CommunicationCommand`1+SendCspCommandRequestAndDecodeAsn1']', Module=Workstation, ModuleCode=0
at Mongoose.Csp.CspClient.ExecuteAndLogCall[TRequest,TResponse,TRecordType](String methodName, TRequest request, Func`2 methodToLog)
at Mongoose.Csp.CspClient.<>c__DisplayClass25_0.<RetrieveObject>b__0(Object <p0>)
at Mongoose.Csp.CspClient.ExecuteAndLogCall[TRequest,TResponse](String methodName, TRequest request, Func`2 methodToLog)
,["3B617EEC85694267BF537F3ED5660615"],
Link copied. Please paste this link to share this article on your social media post.
Hi Steven,
I have tried this out myself, and I was able to discover an IO Bus with no problems using the mappings you posted above. If you haven't I would try to restart your Smart Connector service. The mappings are lazily loaded into memory the first time they are required, so if you added them to the DB table after they have already been accessed, they will not be updated again until the Smart Connector service is restarted (as that clears the in-memory cache.)
In case this was your issues, I have added this step to my initial post above.
If this doesn't fix your issue, let me know, and I will dig deeper.
Regards,
-Jeff
Link copied. Please paste this link to share this article on your social media post.
I tried restarting several times with no luck. I can discover the io bus but not the modules or points under it. If I get values of a point, it causes an error and I have to get another token before anything will work. Will give it another go.
Link copied. Please paste this link to share this article on your social media post.
Hi Steven,
What version of SBO is installed on the AS? I am wondering if there is some version mismatch somewhere.
Regards,
-Jeff
Link copied. Please paste this link to share this article on your social media post.
We are using SBO 1.9.3. IO modules are returning values now, it looks like the additional entries in the SQL table did fix the problem. Will continue with the integration testing and let you know if we have any further issues. Thanks Jeff Bowman
Link copied. Please paste this link to share this article on your social media post.
Thanks Jeff. Note Get/Trends function seems to have the same issue and only searches the ES, not the Automation servers.
Link copied. Please paste this link to share this article on your social media post.
Thanks Steven,
The fix that I will be putting in will result in this being fixed for all cases. The fix included adding a new property to the SboEwsRestProvider called "SearchInSubservers'. Because I added a new property, this will result in your needing to recreate your SboEwsRestProvider so that you can get access to this property. In any case though, the reason for adding a property instead of making it always search in sub servers, is performance. Searching in an ES and ASes can be quite a long process, and it may not be necessary.
I plan on releasing Smart Connector with this change today. It will be announced on this exchange forum when it has been released.
As far as whether or not the SBO Rest Provider can read properties, it cannot today, as it only reads objects, not properties.
Regards,
-Jeff
Link copied. Please paste this link to share this article on your social media post.
Thanks Jeff.
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.