API Type: shutterBox (20210413)

Download OpenAPI specification:Download

Introduction

It is specific API of BleBox devices with API type: shutterBox

Please check API type and API level (version) before use,
if you don't see the expected field or object in response from a real device then hardware version do not support this feature.

General

Information about device

Returns general information about device

Responses

Response samples

Content type
application/json
{
  • "device": {
    }
}

Information about device Deprecated

Returns general information about device

It is deprecated -> look at:

Responses

Response samples

Content type
application/json
{
  • "device": {
    }
}

Device upTime

Returns information about number of seconds from boot

Responses

Response samples

Content type
application/json
{
  • "uptimeS": 243269
}

Perform firmware update

Perform firmware update. Return conflict if update is in progress

Responses

Network

Network information

Returns information about internal WiFi AP or about connected local WiFi network

Responses

Response samples

Content type
application/json
{
  • "ssid": "WiFi_Name",
  • "bssid": "70:4f:25:24:11:ae",
  • "ip": "192.168.1.11",
  • "mac": "bb:50:ec:2d:22:17",
  • "station_status": 5,
  • "tunnel_status": 5,
  • "apEnable": true,
  • "apSSID": "shutterBox-g650e32d2217",
  • "apPasswd": "my_secret_password",
  • "channel": 7
}

Local WiFi Status Deprecated

Returns information about connected local WiFi network and if scanning is in progress

It is deprecated -> look at:

Responses

Response samples

Content type
application/json
{
  • "scanning": false,
  • "ssid": "WiFi_Name",
  • "ip": "192.168.1.11",
  • "station_status": 5
}

Set internal access Point's settings

Allows to set interal access Point's ssid and password. Allows also to turn off internal AP.

Request Body schema: application/json
required
object

Internal access Point's settings

Responses

Request samples

Content type
application/json
{
  • "network": {
    }
}

Response samples

Content type
application/json
{
  • "device": {
    },
  • "network": {
    }
}

Perform WiFi scan and get results

Perform WiFi scan and return list of found WiFi networks. Return conflict if scanning is in progress

Responses

Response samples

Content type
application/json
{
  • "ap": [
    ]
}

Perform WiFi connect

Perform connect to local WiFi network

Request Body schema: application/json
ssid
required
string (ssid_connect) [ 0 .. 32 ] characters

SSID of WiFi network.
Empty string will disconnect from WiFi network

pwd
string or null (pwd) [ 0 .. 64 ] characters

Password to WiFi network. Empty string or 'null' indicates open mode (without password).

Responses

Request samples

Content type
application/json
{
  • "ssid": "WiFi_Name",
  • "pwd": "my_secret_password"
}

Response samples

Content type
application/json
{
  • "ssid": "WiFi_Name",
  • "station_status": 5
}

Perform WiFi disconnect

Perform disconnect from current local WiFi network

Responses

Response samples

Content type
application/json
{
  • "ssid": "WiFi_Name",
  • "station_status": 5
}

Control & State

State

Returns information about the device state
(Includes e.g. state, current position, desired position, favorite position, and tilt)

Responses

Response samples

Content type
application/json
{
  • "shutter": {
    }
}

Set state

Allows setting the desired state of the device and configuring a favorite position

Request Body schema: application/json
object

Object that allows setting the device state or configuring favorite position

Responses

Request samples

Content type
application/json
{
  • "shutter": {
    }
}

Response samples

Content type
application/json
{
  • "shutter": {
    }
}

Extended state

Returns extended information about the device state
(Includes all parameters required to display the user interface)

Responses

Response samples

Content type
application/json
{
  • "shutter": {
    }
}

Shutter state Deprecated

Returns information about the device state
(Includes e.g. state, current position, desired position, favorite position, and tilt)

Responses

Response samples

Content type
application/json
{
  • "shutter": {
    }
}

Set state of shutter Deprecated

Allows setting the desired state of the device and configuring a favorite position

Request Body schema: application/json
object

Object that allows setting the device state or configuring favorite position

Responses

Request samples

Content type
application/json
{
  • "shutter": {
    }
}

Response samples

Content type
application/json
{
  • "shutter": {
    }
}

Extended shutter state Deprecated

Returns extended information about the device state
(Includes all parameters required to display the user interface)

Responses

Response samples

Content type
application/json
{
  • "shutter": {
    }
}

Control with GET

Control device

Allows controlling the device using GET request

path Parameters
command
required
string
Enum: "u" "d" "s" "n" "f" "us" "ds"
Example: u


Command to execute, where:

Enum: Description:
u Open (move up)
d Close (move down)
s Stop
n Next step (in sequence open-stop-close-stop)
f Set favorite position
us If the motor is running, the controller stops the motor. If the motor is stopped, the controller performs a command to open (move up) the controlled device
ds If the motor is running, the controller stops the motor. If the motor is stopped, the controller performs a command to close (move down) the controlled device

Responses

Response samples

Content type
application/json
{
  • "shutter": {
    }
}

Set position

Allows setting the position using a GET request
(Requires calibration - can only be used when the device is calibrated)

path Parameters
positionPercentage
required
integer <int8_t> (position_set) [ 0 .. 100 ]
Example: 42


Position of the device, where:

Value: Description:
0 Open
1-99 Percentage value of closure (only if calibrated)
100 Close

Responses

Response samples

Content type
application/json
{
  • "shutter": {
    }
}

Adjust position

Allows adjusting (incrementing or decrementing) the position using a GET request
(Requires calibration - can only be used when the device is calibrated)

path Parameters
adjustmentType
required
string (adjustmentType)
Enum: "inc" "dec"
Example: inc


Type of adjustment.

inc or dec to increase or decrease by given value

positionDiffPP
required
integer <int8_t> (value_diff_pp_set) [ 0 .. 100 ]
Example: 33


Value of adjustement to apply in percentage points, where:

Value: Description:
0 No changes
1-100 Adjust by given percentage points in the given direction (type of adjustment). Desired value will be crop to range [0 - 100]

Responses

Response samples

Content type
application/json
{
  • "shutter": {
    }
}

Set position and tilt

Allows setting the position and tilt using a GET request
(Requires calibration - can only be used when the device is calibrated)
(only tilt-supported controlType)

path Parameters
positionPercentage
required
integer <int8_t> (position_set) [ 0 .. 100 ]
Example: 42


Position of the device, where:

Value: Description:
0 Open
1-99 Percentage value of closure (only if calibrated)
100 Close

tiltPercentage
required
integer <int8_t> (tilt_set) [ 0 .. 100 ]
Example: 50


Tilt (only for tilt-supported controlTypes), where:

Value: Description:
0 Minimum tilt
1-99 Percentage value of tilt move
100 Maximum tilt

Responses

Response samples

Content type
application/json
{
  • "shutter": {
    }
}

Set tilt

Allows setting the tilt / rotation using a GET request
(only for tilt-supported controlTypes)

path Parameters
tiltPercentage
required
integer <int8_t> (tilt_set) [ 0 .. 100 ]
Example: 50


Tilt (only for tilt-supported controlTypes), where:

Value: Description:
0 Minimum tilt
1-99 Percentage value of tilt move
100 Maximum tilt

Responses

Response samples

Content type
application/json
{
  • "shutter": {
    }
}

Adjust tilt

Allows adjusting (incrementing or decrementing) the tilt / rotation using a GET request
(only for tilt-supported controlTypes)

path Parameters
adjustmentType
required
string (adjustmentType)
Enum: "inc" "dec"
Example: inc


Type of adjustment.

inc or dec to increase or decrease by given value

tiltDiffPP
required
integer <int8_t> (value_diff_pp_set) [ 0 .. 100 ]
Example: 33


Value of adjustement to apply in percentage points, where:

Value: Description:
0 No changes
1-100 Adjust by given percentage points in the given direction (type of adjustment). Desired value will be crop to range [0 - 100]

Responses

Response samples

Content type
application/json
{
  • "shutter": {
    }
}

Settings

Settings state

Returns device's specific settings

Responses

Response samples

Content type
application/json
{
  • "settings": {
    }
}

Settings set

Allows setting the device's specific settings

Request Body schema: application/json
object

Object which contains specific settings

Responses

Request samples

Content type
application/json
{
  • "settings": {
    }
}

Response samples

Content type
application/json
{
  • "settings": {
    }
}