API Call Sequence
This guide describes how to use the BECON Connect API through the call sequence.
Authentication Token Issuance
This section describes how to get an authentication token.
The authentication token is a value required when calling the BECON Connect API from the service. You must enter the issued authentication token in the request header to call and use the BECON Connect API.
The issued authentication toke is valid for one day (24 hours). Therefore, you must be reissued before the validity period of the authentication token expires.
For more information on API related to the authentication token, refer to API Reference > Auth page.
APIs to be used
-
GET /tms/v1.0/connect/auth/servertime
-
POST /tms/v1.0/connect/auth/token
Sequence
To receive an authentication token, you must first create a simple signature value. This value is created by encrypting the symmetric key and server time value promised between BECON Connect and the service through a specific algorithm.
-
Calls the server time inquiry API (
GET /tms/v1.0/connect/auth/servertime
) to get the server time value required to create a signature value. -
Creates a signature value using the symmetric key and server time value.
-
Calls the authentication token creation API (
POST /tms/v1.0/connect/auth/token
) using the created signature value. - If a valid signature value is sent through the API, you will receive an authentication token in response.
Getting HVAC Facility Status
This section describes how to get the status of an LG HVAC facility registered on the LG BECON Cloud platform.
For more information on API related to status inquiry, refer to API Reference > Facility page.
APIs to be used
-
GET /tms/v1.0/connect/site
-
GET /tms/v1.0/connect/site/{site-code}/gw
-
GET /tms/v1.0/connect/site/{site-code}/gw/{gw-id}/facilities
-
GET /tms/v1.0/connect/site/{site-code}/gw/{gw-id}/facility/{facility_type}/{facility-id}/state
Sequence
-
Before getting the status of an HVAC facility, call the Get Site List API (
GET /tms/v1.0/connect/site
) to view the site list if necessary. -
If necessary, call the Get GW List API (
GET /tms/v1.0/connect/site/{site-code}/gw
) to view the list of gateways installed at a specific site. -
If necessary, call the Get Facility List API (
GET /tms/v1.0/connect/site/{site-code}/gw/{gw-id}/facilities
) to view the list of HVAC facilities installed through a specific gateway. -
Once you have decided on an HVAC facility to get the status, call the Get specified Facility Status API (
GET /tms/v1.0/connect/site/{site-code}/gw/{gw-id}/facility/{facility_type}/{facility-id}/state
). In response, you will receive the status value of that HVAC facility.
Facility types that can get the status
- IDU (Indoor Unit)
- ODU (Outdoor Unit)
- VENT (Ventilation device)
- AWHP (Air to Water Heat Pump)
- AHU (Air Handling Unit)
- CHILLER
- AIRCARE (Commercial air purifier)
Controlling HVAC Facility
This section describes how to control LG HVAC facilities registered on the LG BECON Cloud platform.
For more information on API related to control, refer to API Reference > Control page.
APIs to be used
-
PUT /tms/v1.0/connect/site/{site-code}/gw/{gw-id}/facility/{facility_type}
Sequence
-
Call the General Control API (
PUT /tms/v1.0/connect/site/{site-code}/gw/{gw-id}/facility/{facility_type}
) to send a control command to the HVAC facility. -
In response, you will be informed whether the control command was successful.
Facility types that can be controlled
- IDU (Indoor Unit)
- ODU (Outdoor Unit)
- VENT (Ventilation device)
- AWHP (Air to Water Heat Pump)
- AHU (Air Handling Unit)
- CHILLER
- AIRCARE (Commercial air purifier)