Examples

Last updated: March 31st, 2021

Requesting the System Access Token

This assumes you have created your Daikin One Home account and registered your Daikin One+ Thermostat.

You will need your API Key, email account used for the Daikin One Home App, and the Integrator Token Requested through the app for your account.



curl --location --request POST "https://integrator-api.daikinskyport.com/v1/token" \
--header "x-api-key: ${apiKey}" \
--header "Content-Type: application/json" \
--data-raw "{
    "email": "${daikinOneHomeEmail}", 
    "integratorToken": "${integratorToken}"
}"




Successful Response Example:



{
    "accessToken": "accessToken",
    "accessTokenExpiresIn": 900,
    "tokenType": "Bearer"
}




*The accessToken needs to be requested every time it expires and does not expire if other Access Tokens are requested. The accessToken must be in the authorization header for all of the remaining GET and PUT requests.

Requesting the list of Thermostats

Example curl command:



curl --location --request GET "https://integrator-api.daikinskyport.com/v1/devices/" \
--header "Authorization: Bearer ${accessToken}" \
--header "x-api-key: ${apiKey}"



Example Response:



[
    {
        "locationName": "Country House",
        "devices": [
            {
    "id": "1abcdef2-345g-67hi-8jk91-123456ab7c89",
                "name": "Main Room",
                "model": "ONEPLUS",
                "firmwareVersion": "2.3.5"
            },
{
    "id": "1abcdef2-345g-67hi-8jk91-123456ab7c90",
                "name": "Upstairs",
                "model": "ONEPLUS",
                "firmwareVersion": "2.3.5"
            }
        ]
    },
    {
        "locationName": "Summer House",
        "devices": [
	{
                "id": "1abcdef2-345g-67hi-8jk91-123456ab7c91",  
                "name": "Main Room",
                "model": "ONEPLUS",
                "firmwareVersion": "2.3.5"
            }

       ]
    }
]




Requesting Thermostat Information

Example curl command:



curl --location --request GET "https://integrator-api.daikinskyport.com/v1/devices/${thermostatId}" \
--header "Authorization: Bearer ${accessToken}" \
--header "x-api-key: ${apiKey}"




Successful Response Example:



{
    "fanCirculate": 1,
    "tempIndoor": 23.1,
    "mode": 0,
    "humIndoor": 42,
    "setpointMinimum": 10,
    "fan": 0,
    "tempOutdoor": 14,
    "equipmentStatus": 4,
    "setpointDelta": 2,
    "modeEmHeatAvailable": false,
    "coolSetpoint": 20,
    "setpointMaximum": 32,
    "humOutdoor": 44,
    "geofencingEnabled": false,
    "heatSetpoint": 17.1,
    "scheduleEnabled": false,
    "modeLimit": 1,
    "fanCirculateSpeed": 2
}




Update Thermostat Mode – Setpoint Settings

Example on how to set the thermostat to HEAT mode along with the cool and heat setpoints.

*Please wait a minimum of 15 seconds before polling to determine if the changes were successfully made.

Example curl command:



curl --location --request PUT "https://integrator-api.daikinskyport.com/v1/devices/${thermostatId}/msp" \
--header "Authorization: Bearer ${accessToken}" \
--header "x-api-key: ${apiKey}" \
--header "Content-Type: application/json" \
--data-raw "{
    "mode": 1,
    "heatSetpoint": 20.5,
    "coolSetpoint": 23.5
}"




Successful Response Example:



{
    "message": "Write sent"
}




Update Thermostat Schedule Configuration

Example curl command:



curl --location --request PUT "https://integrator-api.daikinskyport.com/v1/devices/${thermostatId}/schedule" \
--header "Authorization: Bearer ${accessToken}" \
--header "x-api-key: ${apiKey}" \
--header "Content-Type: application/json" \
--data-raw "{
    "scheduleEnabled": false
}"




Successful Response Example:



{
    "message": "Write sent"
}




Update Thermostat Fan Settings - Unitary Systems Only

Updating the thermostat fanCirculate and fanCirculateSpeed settings.

Example curl command:



curl -location -request PUT "https://integrator-api.daikinskyport.com/v1/devices/${thermostatId}/fan" \
-header "Authorization: Bearer ${accessToken}"" \
-header "x-api-key: ${apiKey}" \
-header "Content-Type: application/json" \
-data-raw "{
    "fanCirculate": 2,
    "fanCirculateSpeed": 0
}"




Successful Response Example:



{
    "message": "Write sent"
}