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.
Hi All,
I have started looking into the SmartConnector application as one of our major clients would like to pull Values and Trends from their Automation servers and Enterprise servers onto their own Webpage using the EWS RESTful Gateway.
I have setup everything according to the documents however I am getting stuck when trying to use Swagger to do some testing.
When I click on the Swagger link http://127.0.0.1:8083/swagger/docs/v1 as an example on my Endpoint it takes me to the page where I supposedly can do some test queries. However, It asks for a username and password which for the life of me I can't figure out. According to the EWS RESTfull gateway document I am supposed to, using a soapewsrestprovider, use the EWS user on the referenced server.
Now, since there is no specific user for EWS on the automation server/Enterprise server, I would assume using the admin account should grant me access. Unfortunately it keeps saying incorrect username or password.
Which username /password should I be using to authenticate swagger so I can test my SmartConnector Endpoint?
Link copied. Please paste this link to share this article on your social media post.
Petri,
I had another thought as well. I noticed that you configured the REST endpoint using the default port of 8083. Did you happen to delete the other REST endpoint that is added as sample data? That happens to also use port 8083. If you didn't delete it, you might be seeing a weird issue where Swagger thinks it's connecting to your REST endpoint for SBO but it's actually not. You would see that on the endpoint configurations page where only one of the endpoints would be actually running.
Link copied. Please paste this link to share this article on your social media post.
What you stated is correct; to connect to SBO, you need to use the SoapEwsRestProvider and valid credentials from the ES or AS you stated.
What value did you enter into the Endpoint Configuration's Http Configuration Server Address field? It needs to be the address for the EWS endpoint and should look like this:http://localhost:8081/EcoStruxure/DataExchange (change localhost and the port as needed).
Link copied. Please paste this link to share this article on your social media post.
Hi Mark,
Thanks for the response.
If I understand correctly, the server address should be the Automation Server or Enterprise Server you are using's IP.
For instance, if I want to pull trend logs or alarm events into a client's webpage , using smartconnect, I would enter the server I am connecting to, or consuming from,'s address in the Server Address field.
So for the 2 examples I tried (first AS, then ES) I had http://>exampleASIP</EcoStruxure/DataExchange and http://>exampleESIP</EcoStruxure/DataExchange as the server addresses. I tried http and https in both cases after I changed the "Enforce Secure Communication" setting to enable as well.
I used the AS, and ES passwords in swagger but it kept returning "The Username or Password were incorrect."
I am sure I'm missing something and would appreciate it if you could tell me what
Link copied. Please paste this link to share this article on your social media post.
Hi Petri,
Is your admin user on the default SBO domain? EWS users must be on the default domain of SBO.
You don't need to enforce secure communications for this to work (but of course the added security is nice ).
In any case, if you could provide us with the following information, we could more easily help you debug this issue:
- What version of SBO and SmartConnector are you using?
- In the SmartConnector Logging filters page, could you turn on Ews Consume, and Rest Serve and in the Settings page set the logging level to Debug. Run your test again, and send us the SmartConnector log (c:\ProgramData\SmartConnector\Logs) after you try and authenticate.
- If you could get some Fiddler and/or Wireshark captures of the handshake that could help as well.
Regards,
-Jeff
Link copied. Please paste this link to share this article on your social media post.
Petri,
I had another thought as well. I noticed that you configured the REST endpoint using the default port of 8083. Did you happen to delete the other REST endpoint that is added as sample data? That happens to also use port 8083. If you didn't delete it, you might be seeing a weird issue where Swagger thinks it's connecting to your REST endpoint for SBO but it's actually not. You would see that on the endpoint configurations page where only one of the endpoints would be actually running.
Link copied. Please paste this link to share this article on your social media post.
Hi Mark,
Thank you, that did the trick. I deleted the original endpoint and it took the password first time.
Now... to resume testing
Link copied. Please paste this link to share this article on your social media post.
Petri,
Glad it's working for you now. If you have any other questions, don't hesitate to ask.
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.