API Type: shutterBox (20190911)

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 in response from a real device then hardware version do not support this feature.

General

Information about device

Returns general information about device

Responses

200

OK

get/api/device/state

Controller's web server - connecting via device's WiFi AP

http://192.168.4.1/api/device/state

Controller's web server - connecting via local network - please change IP

http://IP_in_local_network/api/device/state

Controller's web server - connecting via local network - for own DNS resolving

http://device.blebox/api/device/state

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "device":
    {
    }
}

Device upTime

Returns information about number of seconds from boot

Responses

200

OK

get/api/device/uptime

Controller's web server - connecting via device's WiFi AP

http://192.168.4.1/api/device/uptime

Controller's web server - connecting via local network - please change IP

http://IP_in_local_network/api/device/uptime

Controller's web server - connecting via local network - for own DNS resolving

http://device.blebox/api/device/uptime

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "upTimeS": 243269
}

Perform firmware update

Perform firmware update. Return conflict if update is in progress

Responses

200

OK

409

Conflict

post/api/ota/update

Controller's web server - connecting via device's WiFi AP

http://192.168.4.1/api/ota/update

Controller's web server - connecting via local network - please change IP

http://IP_in_local_network/api/ota/update

Controller's web server - connecting via local network - for own DNS resolving

http://device.blebox/api/ota/update

Network

Network information

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

Responses

200

OK

get/api/device/network

Controller's web server - connecting via device's WiFi AP

http://192.168.4.1/api/device/network

Controller's web server - connecting via local network - please change IP

http://IP_in_local_network/api/device/network

Controller's web server - connecting via local network - for own DNS resolving

http://device.blebox/api/device/network

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "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

200

OK

get/api/wifi/status

Controller's web server - connecting via device's WiFi AP

http://192.168.4.1/api/wifi/status

Controller's web server - connecting via local network - please change IP

http://IP_in_local_network/api/wifi/status

Controller's web server - connecting via local network - for own DNS resolving

http://device.blebox/api/wifi/status

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "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
network
required
object

Internal access Point's settings

Responses

200

OK

400

Bad request

post/api/device/set

Controller's web server - connecting via device's WiFi AP

http://192.168.4.1/api/device/set

Controller's web server - connecting via local network - please change IP

http://IP_in_local_network/api/device/set

Controller's web server - connecting via local network - for own DNS resolving

http://device.blebox/api/device/set

Request samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "network":
    {
    }
}

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "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

200

OK

409

Conflict

get/api/wifi/scan

Controller's web server - connecting via device's WiFi AP

http://192.168.4.1/api/wifi/scan

Controller's web server - connecting via local network - please change IP

http://IP_in_local_network/api/wifi/scan

Controller's web server - connecting via local network - for own DNS resolving

http://device.blebox/api/wifi/scan

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "ap":
    [
    ]
}

Perform WiFi connect

Perform connect to local WiFi network

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

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

pwd
string [ 0 .. 64 ] characters Nullable

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

Responses

200

OK

400

Bad request

post/api/wifi/connect

Controller's web server - connecting via device's WiFi AP

http://192.168.4.1/api/wifi/connect

Controller's web server - connecting via local network - please change IP

http://IP_in_local_network/api/wifi/connect

Controller's web server - connecting via local network - for own DNS resolving

http://device.blebox/api/wifi/connect

Request samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "ssid": "WiFi_Name",
  • "pwd": "my_secret_password"
}

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "ssid": "WiFi_Name",
  • "station_status": 5
}

Perform WiFi disconnect

Perform disconnect from current local WiFi network

Responses

200

OK

post/api/wifi/disconnect

Controller's web server - connecting via device's WiFi AP

http://192.168.4.1/api/wifi/disconnect

Controller's web server - connecting via local network - please change IP

http://IP_in_local_network/api/wifi/disconnect

Controller's web server - connecting via local network - for own DNS resolving

http://device.blebox/api/wifi/disconnect

Control & State

Shutter state

Returns information about shutter state
(state, current/desired position and tilt)

Responses

200

OK

get/api/shutter/state

Controller's web server - connecting via device's WiFi AP

http://192.168.4.1/api/shutter/state

Controller's web server - connecting via local network - please change IP

http://IP_in_local_network/api/shutter/state

Controller's web server - connecting via local network - for own DNS resolving

http://device.blebox/api/shutter/state

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "shutter":
    {
    }
}

Extended shutter state

Returns extended information about shutter state
(all parameters needed to display user interface)

Responses

200

OK

get/api/shutter/extended/state

Controller's web server - connecting via device's WiFi AP

http://192.168.4.1/api/shutter/extended/state

Controller's web server - connecting via local network - please change IP

http://IP_in_local_network/api/shutter/extended/state

Controller's web server - connecting via local network - for own DNS resolving

http://device.blebox/api/shutter/extended/state

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "shutter":
    {
    }
}

Control with GET

Control shutter

Allows to control shutter using GET request

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


Command to execute, where:

Enum: Description:
u Up - open(lift shutter/blinds)
d Down - close (lower shutter/blinds)
s Stop
n Next step (in sequence open-stop-close-stop)
f Set favorite position

Responses

200

OK

400

Bad request

get/s/{command}

Controller's web server - connecting via device's WiFi AP

http://192.168.4.1/s/{command}

Controller's web server - connecting via local network - please change IP

http://IP_in_local_network/s/{command}

Controller's web server - connecting via local network - for own DNS resolving

http://device.blebox/s/{command}

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "shutter":
    {
    }
}

Set position

Allows to set position of shutter using GET request
(requires calibration - can be used only when shutter is calibrated)

path Parameters
percentage
required
integer [ 0 .. 100 ]

Position in percentage

Responses

200

OK

400

Bad request

get/s/p/{percentage}

Controller's web server - connecting via device's WiFi AP

http://192.168.4.1/s/p/{percentage}

Controller's web server - connecting via local network - please change IP

http://IP_in_local_network/s/p/{percentage}

Controller's web server - connecting via local network - for own DNS resolving

http://device.blebox/s/p/{percentage}

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "shutter":
    {
    }
}

Set tilt

Allows to set tilt using GET request

path Parameters
percentage
required
integer [ 0 .. 100 ]

Position in percentage

Responses

200

OK

400

Bad request

get/s/t/{percentage}

Controller's web server - connecting via device's WiFi AP

http://192.168.4.1/s/t/{percentage}

Controller's web server - connecting via local network - please change IP

http://IP_in_local_network/s/t/{percentage}

Controller's web server - connecting via local network - for own DNS resolving

http://device.blebox/s/t/{percentage}

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "shutter":
    {
    }
}

Settings

Settings state

Returns device's specific settings

Responses

200

OK