API Type: wLightBox (20200229)

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

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 [ 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

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 of lighting

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

Responses

Response samples

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

Set state of lighting

Allows to set desired color, effect and transition times

Request Body schema: application/json
object

An object which contain parameters related with LED lighting

Responses

Request samples

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

Response samples

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

Response samples

Content type
application/json
{
  • "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
object

An object which contain extended parameters related with LED lighting

Responses

Request samples

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

Response samples

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

Control with GET

Toggle (ON/OFF last state)

Turning ON/OFF (toggle) last color or effect

Responses

Response samples

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

Set to last state

Setting last color or effect

Responses

Response samples

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

Set color

Set color using GET request

path Parameters
channels
required
string (colorSet) ^(?:[0-9a-fA-F]{2}|--){1}$|^(?:[0-9a-fA-F]{2}...
Example: ff003000

Color value in format: 4 channels (R)(G)(B)(W) or 1 channel (S), where
every channel can get value between: 00-FF (HEX) (DEC: 0-255)

Use "--" instead hex value to keep channel unchanged - e.g. ff00--12.

Responses

Response samples

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

Adjust brightness

Adjust brightness using GET request

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

As the name of field says

inc or dec to increase or decrease brightness

channelsDelta
required
string (colorValue) ^(?:[0-9a-fA-F]{2}){1}$|^(?:[0-9a-fA-F]{2}){4...
Example: ff003000

As the name of field says

Color value in format: 4 channels (R)(G)(B)(W) or 1 channel (S), where
every channel can get value between: 00-FF (HEX) (DEC: 0-255)

Responses

Response samples

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

Set effect

Turning ON effect with given ID using GET request

path Parameters
effectID
required
integer <uint8_t> (effectID) [ 0 .. 10 ]
Example: 2

No (ID) of Effect, where

Value: Decription:
0 None Effect - Disable current effect and restore previous state
>0 Effect - Turn on selected effect (if exist)

Responses

Response samples

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

Set color with fade time

Set color with color fade time in milliseconds using GET request

path Parameters
channels
required
string (colorSet) ^(?:[0-9a-fA-F]{2}|--){1}$|^(?:[0-9a-fA-F]{2}...
Example: ff003000

Color value in format: 4 channels (R)(G)(B)(W) or 1 channel (S), where
every channel can get value between: 00-FF (HEX) (DEC: 0-255)

Use "--" instead hex value to keep channel unchanged - e.g. ff00--12.

timeMs
required
integer <uint32_t> (colorFade) [ 25 .. 3600000 ]
Value: 0
Example: 1000

Time of transition from current color to desired color measured in milliseconds
(full scale: 0x00 -> 0xff)

Responses

Response samples

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

Set color for a given time

Set color for given time using GET request (after given time returns to previous state)

path Parameters
channels
required
string (colorSet) ^(?:[0-9a-fA-F]{2}|--){1}$|^(?:[0-9a-fA-F]{2}...
Example: ff003000

Color value in format: 4 channels (R)(G)(B)(W) or 1 channel (S), where
every channel can get value between: 00-FF (HEX) (DEC: 0-255)

Use "--" instead hex value to keep channel unchanged - e.g. ff00--12.

timeS
required
integer <uint16_t> [ 1 .. 65535 ]
Example: 30

Time in seconds for which the selected state will be set, after this time the last state will be restored.

Responses

Response samples

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

Set effect for a given time

Turning ON effect with given ID using GET request (after given time returns to previous state)

path Parameters
effectID
required
integer <uint8_t> (effectID) [ 0 .. 10 ]
Example: 2

No (ID) of Effect, where

Value: Decription:
0 None Effect - Disable current effect and restore previous state
>0 Effect - Turn on selected effect (if exist)

timeS
required
integer <uint16_t> [ 1 .. 65535 ]
Example: 30

Time in seconds for which the selected state will be set, after this time the last state will be restored.

Responses

Response samples

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

Set color with fade time for a given time

Set color with color fade time for given time using GET request (after given time returns to previous state)

path Parameters
channels
required
string (colorSet) ^(?:[0-9a-fA-F]{2}|--){1}$|^(?:[0-9a-fA-F]{2}...
Example: ff003000

Color value in format: 4 channels (R)(G)(B)(W) or 1 channel (S), where
every channel can get value between: 00-FF (HEX) (DEC: 0-255)

Use "--" instead hex value to keep channel unchanged - e.g. ff00--12.

timeMs
required
integer <uint32_t> (colorFade) [ 25 .. 3600000 ]
Value: 0
Example: 1000

Time of transition from current color to desired color measured in milliseconds
(full scale: 0x00 -> 0xff)

timeS
required
integer <uint16_t> [ 1 .. 65535 ]
Example: 30

Time in seconds for which the selected state will be set, after this time the last state will be restored.

Responses

Response samples

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

Settings

Settings state

Return device's specific settings

Responses

Response samples

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

Settings set

Allow to set device's specific settings

Request Body schema: application/json
object

An object which contain specific settings

Responses

Request samples

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

Response samples

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