Refine blink feature

This commit is contained in:
2026-03-24 23:35:05 +01:00
parent 1096bf5ce3
commit ecd8eb0778
2 changed files with 78 additions and 37 deletions
+43 -29
View File
@@ -53,25 +53,35 @@ Or directly from [here](streamdeck-plugin/README.md).
## End points
| Path | Method | Parameter | Description |
| --- | --- | --- | --- |
| /api/color | POST | `color` JSON object | Set the BusyLight color according to the `color` object passed in the request body. Return a `status` object. |
| /api/color | GET | n/a | Retreive the color currently displayed by the BusyLight. Return a `color` object. |
| /api/brightness | POST | `brightness` JSON object | Set the BusyLight brightness according to the `brightness` object passed in the request body. Return a `status` object. |
| /api/brightness | GET | n/a | Retreive the BusyLight brightness. Return a `brightness` object. |
| /api/status/on | POST / GET | n/a | Light up the BusyLight. White color. Return a `status` object. |
| /api/status/available | POST / GET | n/a | Set the BusyLight in `available` mode. Green color. Return a `status` object. |
| /api/status/away | POST / GET | n/a | Set the BusyLight in `away` mode. Yellow color. Return a `status` object. |
| /api/status/busy | POST / GET | n/a | Set the BusyLight in `busy` mode. Red color. Return a `status` object. |
| /api/status/off | POST / GET | n/a | Shutdown the BusyLight. Return a `status` object. |
| /api/status | GET | n/a | Retreive the current BusyLight status. Return a `status` object. |
| /api/blink | POST | `blink` JSON object | Make the BusyLight blink. Preserves current color, status and brightness. Return a `status` object. |
| /api/blink | GET | n/a | Retrieve the current BusyLight blink status. Return a `blink` object. |
| /api/blink/stop | POST | n/a | Stop the BusyLight blinking and restore previous state. Return a `status` object. |
| /api/debug | GET | n/a | Retreive the full BusyLight status. |
| Path | Method | Parameter | Description |
| --------------------- | ----------- | ------------------------- | ----------------------------------------------------------------------------------------------------------------------- |
| /api/color | POST | `color` JSON object | Set the BusyLight color according to the `color` object passed in the request body. Return a `status` object. |
| /api/color | GET | n/a | Retreive the color currently displayed by the BusyLight. Return a `color` object. |
| /api/brightness | POST | `brightness` JSON object | Set the BusyLight brightness according to the `brightness` object passed in the request body. Return a `status` object. |
| /api/brightness | GET | n/a | Retreive the BusyLight brightness. Return a `brightness` object. |
| /api/status/on | POST / GET | n/a | Light up the BusyLight. White color. Return a `status` object. |
| /api/status/available | POST / GET | n/a | Set the BusyLight in `available` mode. Green color. Return a `status` object. |
| /api/status/away | POST / GET | n/a | Set the BusyLight in `away` mode. Yellow color. Return a `status` object. |
| /api/status/busy | POST / GET | n/a | Set the BusyLight in `busy` mode. Red color. Return a `status` object. |
| /api/status | GET | n/a | Retreive the current BusyLight status. Return a `status` object. |
| /api/status/off | POST / GET | n/a | Shutdown the BusyLight. Return a `status` object. |
| /api/blink | POST | `setBlink` JSON object | Make the BusyLight blink. Preserves current color, status and brightness. Return a `status` object. |
| /api/blink | GET | n/a | Retrieve the current BusyLight blink status. Return a `blink` object. |
| /api/blink/stop | POST | n/a | Stop the BusyLight blinking and restore previous state. Return a `status` object. |
| /api/debug | GET | n/a | Retreive the full BusyLight status. |
## JSON objects
### `brightness` object
```json
{
"brightness": 0.5
}
```
`brightness`: LED brightness | float | [0.0 .. 1.0]
### `color` object
```json
@@ -88,16 +98,6 @@ Or directly from [here](streamdeck-plugin/README.md).
`b`: BLUE color | integer | [0 .. 255]
`brightness`: LED brightness (optional) | float | [0.0 .. 1.0]
### `brightness` object
```json
{
"brightness": 0.5
}
```
`brightness`: LED brightness | float | [0.0 .. 1.0]
### `blink` object
```json
@@ -112,17 +112,31 @@ Or directly from [here](streamdeck-plugin/README.md).
`isblinking`: whether the BusyLight is currently blinking | boolean
`frequency`: blink frequency | integer | Hz
`duration`: total blink duration | float | seconds | 0 = endless
`remains`: remaining blink time | float | seconds | 0 if endless
`remains`: remaining blink time | float | seconds | 0 if endless
### `setBlink` object
```json
{
"frequency": 2,
"duration": 5.0,
}
```
`frequency`: blink frequency | integer | Hz
`duration`: total blink duration | float | seconds | 0 = endless
### `status` object
```json
{
"status": "<STATUS>"
"status": "<STATUS>",
"blinking": true
}
```
`<STATUS>` : `on` | `off` | `available` | `away` | `busy` | `colored` | `blinking`
`<STATUS>` : `on` | `off` | `available` | `away` | `busy` | `colored`
`isblinking`: whether the BusyLight is currently blinking | boolean
# MuteDeck integration