We Value Your Privacy
By clicking "Accept", you agree to our use of cookies to improve your experience, analyze site usage, and deliver personalized contents.
The BLUE indicator is a normal network connection.The RED indicator is an abnormal network connection.
Step 2. Make sure the gateway and the PC are connected to the same LAN. Then enter the URL http://ihost.local on your browser.
Notice:
// Request curl --location --request GET 'http://<ip address>/open-api/v1/rest/bridge/access_token' --header 'Content-Type: application/json'
// Response { "error": 401, "data": {}, "message": "link button not pressed" }
// Request curl --location --request GET 'http://<ip address>/open-api/v1/rest/bridge/access_token' --header 'Content-Type: application/json' // Response { "error": 0, "data": { "token": "376310da-7adf-4521-b18c-5e0752cfff8d" }, "message": "success" }
// Request curl --location --request GET 'http://<ip address>/open-api/v1/rest/devices' \ --header 'Content-Type: application/json' \ --header 'Authorization: Bearer 376310da-7adf-4521-b18c-5e0752cfff8d' // Response { "error": 0, "data": { "device_list": [ { "serial_number": "ABCDEFGHIJK", "name": "device name", "manufacturer": "manufacturer name", "model": "model name", "firmware_version": "1.1.0", "display_category": "switch", "capabilities": [ { "capability": "power", "permission": "readWrite" } ], "protocol": "zigbee", "state": { "power": { "powerState": "on" } }, "tags": { "key": "value" }, "online": true } ] } "message": "success" }
Allow authorized user to restart the gateway through this interface
/open-api/v1/rest/hardware/reboot
POST
Request Parameters: none
Successful data response: empty Object {}
Conditions: The request parameters are legal, and the user identity verification is passed.
Status Code: 200 OK
{
"error": 0,
"data": {},
"message": "success"
}
Allow authorized users to control the speaker through this interface
/open-api/v1/rest/hardware/speaker
POST
Attribute | Type | Optional | Description |
type | string | N | Optional parameters: 1.play_sound (play the sound) 2.play_beep (play the beep) |
sound | SoundObject | Y (N if type is play_sound.) | The sound. |
beep | BeepObject | Y (N if type is play_beep.) | The beep |
SoundObject Object
Attribute | Type | Optional | Description |
name | string | N | The sound name. The supported values can be checked in [Resource List – Supported sound] |
volume | int | N | The sound volume. [0-100] |
countdown | int | N | The duration for the speaker to play the sound, and it will stop playing automatically after the time is up. Unit: second. [0,1799] |
200 OK
Attribute | Type | Optional | Description |
name | string | N | The deep name. The supported values can be checked in [Resource List – Supported deep] |
volume | int | N | The deep volume. [0-100] |
200 OK
Response Example:
{
"error": 0,
"data": {},
"message": "success"
}