REST API (BLink)
BLink is a hardware abstraction tool that can be used to simplify the development of applications on the BrioSens. This tool offers a REST API that is only accessible (by default) either via the Wi-Fi access point or locally from the device itself on the port 16601
You may use the programming language of your choice to interact with the REST API.
/all
GET
Summary:
Get all of the sensor values
Responses
Code | Description | Schema |
---|---|---|
200 | A successful response | blinkGet_All_Reply |
/analog?name=
GET
Summary:
Get the analog input, the value is given in mV
Parameters
Name | Located in | Description | Required | Schema |
---|---|---|---|---|
name | query | Maximum analog input is 24VDC AIO1 : Analog input #1 AIO2 : Analog input #2 AIO3 : Analog input #3 AIO4 : Analog input #4 |
Yes | string |
Responses
Code | Description | Schema |
---|---|---|
200 | A successful response. | blinkAnalog_Get_Reply |
/analog/currentloop
POST
Summary:
Enable the 4-20mA current loop
Parameters
Name | Located in | Description | Required | Schema |
---|---|---|---|---|
body | body | Yes | blinkAnalog_Enable_CurrentLoop_Request |
Responses
Code | Description | Schema |
---|---|---|
200 | A successful response. | blinkAnalog_Enable_CurrentLoop_Reply |
/analog/maxvoltage
POST
Summary:
Set the analog input's maximum voltage
Parameters
Name | Located in | Description | Required | Schema |
---|---|---|---|---|
body | body | Yes | blinkSet_MaxVoltage_Request |
Responses
Code | Description | Schema |
---|---|---|
200 | A successful response. | blinkSet_MaxVoltage_Reply |
/gpio?name=
GET
Summary:
Get a GPIO
GPIO Names
1 2 3 4 |
|
Parameters
Name | Located in | Description | Required | Schema |
---|---|---|---|---|
name | query | The GPIO name | Yes | string |
Responses
Code | Description | Schema |
---|---|---|
200 | A successful response. | blinkGpio_Get_Reply |
/gpio
POST
Summary:
Set a GPIO
GPIO Names
1 2 3 4 5 6 |
|
Warning
The digital outputs (DIO1-4) are only available on hardware revisions greater or equal to 130
Info
The DOUT GPIOs output logic is reversed, meaning that a value of 1
is written, the logical output
value will be 0
.
Parameters
Name | Located in | Description | Required | Schema |
---|---|---|---|---|
body | body | The GPIO name | Yes | blinkGpio_Set_Request |
Responses
Code | Description | Schema |
---|---|---|
200 | A successful response. | blinkGpio_Set_Reply |
/humidity
GET
Summary:
Get the relative humidity
Responses
Code | Description | Schema |
---|---|---|
200 | A successful response. | blinkSensor_GetHumidity_Reply |
/info
GET
Summary:
Get BrioSens version info
Responses
Code | Description | Schema |
---|---|---|
200 | A successful response. | blinkGet_Info_Reply |
/temperature
GET
Summary:
Get the current temperature
Responses
Code | Description | Schema |
---|---|---|
200 | A successful response. | blinkSensor_GetTemperature_Reply |
Models
blinkAnalog_Enable_CurrentLoop_Reply
Name | Type | Description |
---|---|---|
blinkAnalog_Enable_CurrentLoop_Reply | object | Empty reply when successful |
blinkAnalog_Enable_CurrentLoop_Request
Name | Type | Description | Required |
---|---|---|---|
name | string | AIO1 : Analog input #1 AIO2 : Analog input #2 AIO3 : Analog input #3 AIO4 : Analog input #4 |
Yes |
blinkAnalog_Get_Reply
Name | Type | Description |
---|---|---|
value | integer | If the current loop is enabled, value being read is in uA. If not, the value is in mV |
blinkAnalog_Set_MaxVoltage_Reply
Name | Type | Description |
---|---|---|
blinkAnalog_Set_MaxVoltage_Reply | object | Empty reply when successful |
blinkAnalog_Set_MaxVoltage_Request
Name | Type | Description | Required |
---|---|---|---|
name | string | The name of the analog input to configure | Yes |
value | integer | The maximum voltage for the measurements in mV. (Absolute maximum voltage is 24000 mV) | Yes |
blinkGet_All_Reply
Name | Type | Description |
---|---|---|
value | string | 'value': { 'aio1':2, (in mV or uA) 'aio2':0, (in mV or uA) 'aio3':0, (in mV or uA) 'aio4':0, (in mV or uA) 'io1':true,(boolean) 'io2':true,(boolean) 'io3':true,(boolean) 'io4':true,(boolean) 'temp':31, (temperature in Celcius) 'rh':9 (relative humidity in %) } |
blinkGet_Info_Reply
Name | Type | Description |
---|---|---|
info | string | info':{'blink':<BLinkVersion>,'os': <BsnsVersion>, 'hw': <HardwareVersion>, 'serial':<SerialNumber>} |
blinkGpio_Get_Reply
Name | Type | Description |
---|---|---|
value | boolean (boolean) | true : Current GPIO value is a logical 1false : Current GPIO value is a logical 0 |
blinkGpio_Set_Reply
Name | Type | Description |
---|---|---|
blinkGpio_Set_Reply | object | Empty reply when successful |
blinkGpio_Set_Request
Name | Type | Description | Required |
---|---|---|---|
name | string | LED_GREEN : The onboard green LED LED_RED : The onboard red LED DOUT1: The digital output #1 DOUT2: The digital output #2 DOUT3: The digital output #3 DOUT4: The digital output #4 |
Yes |
state | boolean (boolean) | true : Set the GPIO to a logical 1 valuefalse : Set the GPIO to a logical 0 value |
Yes |
Warning
The digital outputs (DIO1-4) are only available on hardware revisions greater or equal to 130
blinkSensor_GetHumidity_Reply
Name | Type | Description |
---|---|---|
value | integer | Relative humidity in % |
blinkSensor_GetTemperature_Reply
Name | Type | Description |
---|---|---|
value | integer | Temperature in Celcius |
blinkSet_MaxVoltage_Reply
Name | Type | Description |
---|---|---|
blinkSet_MaxVoltage_Reply | object | Empty reply when successful |
blinkSet_MaxVoltage_Request
Name | Type | Description | Required |
---|---|---|---|
name | string | AIO1 : Analog input #1 AIO2 : Analog input #2 AIO3 : Analog input #3 AIO4 : Analog input #4 |
Yes |
value | integer | Yes |