Introduction

The Mill Open API lets you control Mill WiFi products through an API.

You will be able to control:

1) Independent devices

2) Individually controlled devices inside a room

Note!

You will not be able to set Comfort, Sleep or Away temperature on room level. For devices inside a room the Open API lets you activate the “control device individually” so that they can be controlled.

You will get access to the following:

1) Temperature readings

2) Ability to change set temperature

3) Turn the device on/off

4) Device ID, room ID, user ID


Usage steps

step 1:

All Smart Home Partners must be pre-authorized by Mill to get access to “access_key” and “secret_token”

How to get access_key and secret_token?

Please go to https://api.millheat.com and apply. We will send your credentials on e-mail if your application is successful

step 2:

The developer logs in in their own system

step 3, step 4:

Send a HTTPS request to openAPI, and get a return response to exchange an 'authorization_code' for an access token.

step 5, step 6:

The application will use the authorization_code, username and password of millapp, to request an access token,refresh_token, and their expireTime.

Access_token is always valid during the start of the release to the expires_in valid period, and if it expires, you can get a new access_token based on refresh_token

step 7:

During the entire access, the access_token as the security credentials for openAPI access, and send some action for owned device

step 8:

openAPI will return to the successful failure of each instruction for the openapi's request.


Mill Open API documentation

Please click this link for access to the Mill Open API documentation: Mill Open API documentation


The errorCode of Mill Open API

error code interface message
101 all system error
102 all uds error
201 share/applyAuthCode access_key is wrong
221 share/applyAccessToken user is not exist
222 authorization_code is invalid
223 application account has lapsed
241 share/refreshtoken refresh_token is wrong, or expired
242 refresh_token is wrong
243 application account has lapsed
303 uds/deviceControlForOpenApi the device is not yours
304 cannot find device info