API Type: wLightBox (20190808)

Download OpenAPI specification:Download

Introduction

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

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

State of lighting

Returns information about mode, selected effect, color and transition times

Responses

200

OK

get/api/rgbw/state

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

http://192.168.4.1/api/rgbw/state

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

http://IP_in_local_network/api/rgbw/state

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

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

Response samples

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

Set state of lighting

Allows to set desired color, effect and transition times

Request Body schema: application/json
rgbw
object

An object which contain parameters related with LED lighting

Responses

200

OK

400

Bad request

post/api/rgbw/set

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

http://192.168.4.1/api/rgbw/set

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

http://IP_in_local_network/api/rgbw/set

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

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

Request samples

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

Response samples

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

Extended parameters of lighting

Returns information about mode, selected effect, color, transition times.
Additionaly returns favorite colors and effects names
(All parameters needed to display user interface)

Responses

200

OK

get/api/rgbw/extended/state

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

http://192.168.4.1/api/rgbw/extended/state

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

http://IP_in_local_network/api/rgbw/extended/state

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

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

Response samples

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

Set extended parameters of lighting

Allows to set state of lighting - effect, color, transition times
Additionaly allows to set extended parameters - favorite colors

Request Body schema: application/json
rgbw
object

An object which contain extended parameters related with LED lighting

Responses

200

OK

400

Bad request

post/api/rgbw/extended/set

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

http://192.168.4.1/api/rgbw/extended/set

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

http://IP_in_local_network/api/rgbw/extended/set

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

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

Request samples

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

Response samples

Content type
application/json