Communicating with NetEco via an openAPI user
This section describes the procedure on how to test the communication with NetEco through an openAPI user.
Prerequisites
- You have logged in to the NetEco 1000S as the installer or if you already have an account for openAPI user.
- You have the plant connected to the NetEco platform.
- You have downloaded, installed and logged in to the Postman API Platform.
Procedure
-
- Go to System > User Management > Create User
NOTE:
If you already have an open API user account, skip steps 1 and 2. - Enter all data and choose User Type as OpenAPI User > select the plant > OK
NOTE:
If you don't have an Open API User in the list, please contact the Photomate support team to create an OpenAPI account for you. - Dashboard Web Server query data from NetEco through HTTPS protocol,
Dashboard Web Server is the Client,
NetEco is the Server.
Source Device Source IP Address Source Port Destination Device Destination IP Adress Destination Port Protocol Port Description Authentification Mode Encryption Mode Client IP adress of the client Random port NetEco server IP address of the NetEco server 27200 HTTPS Port for logging in to the NetEco server open interface in TLS encryption mode Username/password TLS1.1&1.2 - Press Win+R to bring up Run dialog > type inetcpl.cpl > hit Enter key > go to Advanced tab > check if you have active on your computer the TLS1.1&1.2 and SSL.
- Go to Turn Windows features on or off > check if the Telnet client is enable.
- Press Win+R to bring up Run dialog > type cmd > Enter > type command "telnet + IP address or hostname + port number" (e.g., telnet www.example.com 1723 or telnet 10.17.xxx.xxx 27200) > Enter to check if the port 27200 is open on the according Server's side.
You can find the IP address for some EU NetEco servers below:URL IP address Command http://monitoring.photomate.eu 167.86.111.126 telnet 167.86.111.126 27200 http://neteco.photomate.eu 167.86.111.125 telnet 167.86.111.125 27200 http://neteco2.photomate.eu 95.111.236.245 telnet 95.111.236.245 27200
If the port is open, the blank window will appear:
If the port is closed, the Connect failed message will appear. Please, contact the Photomate support team to solve the issue. - Open the Postman program > go to Home > Settings > turn OFF the SSL certificate verification:
- Select the "+" button (near the top of Postman) to open a new tab > select POST method > type your server IP > add keys to interrogate Neteco with your openAPI user > click Send
Below you can find several possible requests to the server with response examples. - Log in to the NetEco
URL: https://ip:port/openApi/login
Request:
Method: POST
Parameter: userName, password
Response example: {"errorMsg":0,"openApiroarand":"IKIxSW2Sc6F1H0Do6mKWL12DQ5peZqSl"}
NOTE:
If the Neteco IP is 95.111.236.245 use the next link to login: https://95.111.236.245:27200/openApi/login
The key note in red will help you interrogate the other parameters. - Query the Plant list
URL: https://ip:port/openApi/queryPlantList
Request:
Method: POST
Parameter: openApiroarand
Response example: - Query Device List
URL: https://ip:port/openApi/queryDeviceList
Request:
Method: POST
Parameter: plantid, openApiroarand
Response example: - Query Plant Real Time Data
URL: https://ip:port/openApi/queryDeviceList
Request:
Method: POST
Parameter: plantid, openApiroarand
Response example: - Query Device Real Time Data
URL: https://ip:port/openApi/queryDeviceDetail
Request:
Method: POST
Parameter: plantid, openApiroarand
Response example: - Query Plant Day History Data
URL: https://ip:port/openApi/queryPlantDayData
Request:
Method: POST
Parameter: plantid, openApiroarand, date(YYYY-MM-DD)
Response example: - Query Plant Month History Data
URL: https://ip:port/openApi/queryPlantMonthData
Request:
Method: POST
Parameter: plantid, openApiroarand, month(YYYY-MM)
Response example: - Query Plant Year History Data
URL: https://ip:port/openApi/queryPlantYearData
Request:
Method: POST
Parameter: plantid, openApiroarand, year(YYYY)
Response example: - Query Plant Total History Data
URL: https://ip:port/openApi/queryPlantTotalData
Request:
Method: POST
Parameter: plantid, openApiroarand
Response example: - Log Out
URL: https://ip:port/openApi/logout
Request:
Method: POST
Parameter: openApiroarand
Response example:
- Go to System > User Management > Create User