Stream Deck plugin v0.3.0.0 (#23)

This commit is contained in:
iGoX 2025-01-06 20:26:19 +01:00
parent 3650a5213e
commit b1bbabe90e
39 changed files with 69 additions and 91 deletions

View file

@ -1,5 +1,32 @@
# Release notes # Release notes
## Version 0.3.0.0 (2024-01-06)
### Download
[org.igox.busylight.v0.3.0.0.streamDeckPlugin](download/org.igox.busylight.v0.3.0.0.streamDeckPlugin)
### Features
- None added
### Enhancements
- Rework icons to comply with plugin guidelines for Elgato Marketplace
- Combine the 3 "status" actions into a single action and having the status be selected with a dropdown
### Fixes
- None.
### Bugs & known limitations
- None known at publication time.
### Screenshot
![v0.3.0.0 screenshot](img/v0.3.0.0.png)
## Version 0.2.0.0 (2024-12-28) ## Version 0.2.0.0 (2024-12-28)
### Download ### Download

Binary file not shown.

Before

Width:  |  Height:  |  Size: 75 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 573 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 573 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 99 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 99 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 575 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 575 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 33 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 33 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 45 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 89 KiB

View file

@ -1,69 +1,21 @@
{ {
"Name": "iGoX BusyLight", "Name": "iGoX BusyLight",
"Version": "0.2.0.0", "Version": "0.3.0.0",
"Author": "iGoX", "Author": "iGoX",
"$schema": "https://schemas.elgato.com/streamdeck/plugins/manifest.json", "$schema": "https://schemas.elgato.com/streamdeck/plugins/manifest.json",
"Actions": [ "Actions": [
{ {
"Name": "Set status as 'Available'", "Name": "Set BusyLight status",
"UUID": "org.igox.busylight.status.available", "UUID": "org.igox.busylight.status.set",
"Icon": "imgs/actions/status/available/available", "Icon": "imgs/actions/icons/status/status",
"Tooltip": "Set status as 'Available'", "Tooltip": "Set BusyLight status",
"PropertyInspectorPath": "ui/status-config.html", "PropertyInspectorPath": "ui/status-config.html",
"Controllers": [ "Controllers": [
"Keypad" "Keypad"
], ],
"States": [ "States": [
{ {
"Image": "imgs/actions/status/available/available", "Image": "imgs/actions/icons/status/status",
"TitleAlignment": "bottom"
}
]
},
{
"Name": "Set status as 'Away'",
"UUID": "org.igox.busylight.status.away",
"Icon": "imgs/actions/status/away/away",
"Tooltip": "Set status as 'Away'",
"PropertyInspectorPath": "ui/status-config.html",
"Controllers": [
"Keypad"
],
"States": [
{
"Image": "imgs/actions/status/away/away",
"TitleAlignment": "bottom"
}
]
},
{
"Name": "Set status as 'Busy'",
"UUID": "org.igox.busylight.status.busy",
"Icon": "imgs/actions/status/busy/busy",
"Tooltip": "Set status as 'Busy'",
"PropertyInspectorPath": "ui/status-config.html",
"Controllers": [
"Keypad"
],
"States": [
{
"Image": "imgs/actions/status/busy/busy",
"TitleAlignment": "bottom"
}
]
},
{
"Name": "Turn off the BusyLight",
"UUID": "org.igox.busylight.status.off",
"Icon": "imgs/actions/status/off/off",
"Tooltip": "Turn off the BusyLight",
"PropertyInspectorPath": "ui/status-config.html",
"Controllers": [
"Keypad"
],
"States": [
{
"Image": "imgs/actions/status/off/off",
"TitleAlignment": "bottom" "TitleAlignment": "bottom"
} }
] ]
@ -71,7 +23,7 @@
{ {
"Name": "Set brightness", "Name": "Set brightness",
"UUID": "org.igox.busylight.brigthness.set", "UUID": "org.igox.busylight.brigthness.set",
"Icon": "imgs/actions/brightness/brightness", "Icon": "imgs/actions/icons/brightness/brightness",
"Tooltip": "Set LED brightness", "Tooltip": "Set LED brightness",
"PropertyInspectorPath": "ui/brightness-config.html", "PropertyInspectorPath": "ui/brightness-config.html",
"Controllers": [ "Controllers": [
@ -79,7 +31,7 @@
], ],
"States": [ "States": [
{ {
"Image": "imgs/actions/brightness/brightness", "Image": "imgs/actions/icons/brightness/brightness",
"TitleAlignment": "bottom" "TitleAlignment": "bottom"
} }
] ]
@ -87,7 +39,7 @@
{ {
"Name": "Set color", "Name": "Set color",
"UUID": "org.igox.busylight.color.set", "UUID": "org.igox.busylight.color.set",
"Icon": "imgs/actions/color/color", "Icon": "imgs/actions/icons/color/color",
"Tooltip": "Set BusyLight displayed color", "Tooltip": "Set BusyLight displayed color",
"PropertyInspectorPath": "ui/color-config.html", "PropertyInspectorPath": "ui/color-config.html",
"Controllers": [ "Controllers": [
@ -95,17 +47,17 @@
], ],
"States": [ "States": [
{ {
"Image": "imgs/actions/color/color", "Image": "imgs/actions/icons/color/color",
"TitleAlignment": "bottom" "TitleAlignment": "bottom"
} }
] ]
} }
], ],
"Category": "iGoX BusyLight", "Category": "iGoX BusyLight",
"CategoryIcon": "imgs/plugin/marketplace", "CategoryIcon": "imgs/plugin/category",
"CodePath": "bin/plugin.js", "CodePath": "bin/plugin.js",
"Description": "Control your DIY BusyLight (https://github.com/igox/busylight) from your Stream Deck", "Description": "Control your DIY BusyLight (https://github.com/igox/busylight) from your Stream Deck",
"Icon": "imgs/plugin/marketplace", "Icon": "imgs/plugin/category",
"SDKVersion": 2, "SDKVersion": 2,
"Software": { "Software": {
"MinimumVersion": "6.4" "MinimumVersion": "6.4"

View file

@ -25,5 +25,14 @@
value="getGlobalSettings()"> value="getGlobalSettings()">
</sdpi-textfield> </sdpi-textfield>
</sdpi-item> </sdpi-item>
<sdpi-item label="Status">
<sdpi-select setting="status" placeholder="Please choose a status">
<option value="available">Available</option>
<option value="away">Away</option>
<option value="busy">Busy</option>
<option value="on">On</option>
<option value="off">Off</option>
</sdpi-select>
</sdpi-item>
</body> </body>
</html> </html>

View file

@ -1,31 +1,21 @@
import streamDeck, { action, KeyDownEvent, SingletonAction } from "@elgato/streamdeck"; import streamDeck, { action, KeyDownEvent, SingletonAction, DidReceiveSettingsEvent } from "@elgato/streamdeck";
@action({ UUID: "org.igox.busylight.status.available" }) @action({ UUID: "org.igox.busylight.status.set" })
export class SetStatusAvailable extends SingletonAction { export class SetStatus extends SingletonAction {
override async onKeyDown(ev: KeyDownEvent): Promise<void> { override async onKeyDown(ev: KeyDownEvent<statusSettings>): Promise<void> {
setStatus('available'); const { settings } = ev.payload;
settings.status ??= 'available';
setStatus(settings.status);
} }
}
@action({ UUID: "org.igox.busylight.status.busy" }) override async onDidReceiveSettings(ev: DidReceiveSettingsEvent<statusSettings>): Promise<void> {
export class SetStatusBusy extends SingletonAction { const { settings } = ev.payload;
override async onKeyDown(ev: KeyDownEvent): Promise<void> { let status = settings.status;
setStatus('busy'); streamDeck.logger.debug(`>>> Config status changed to: ${status} <<<`);
}
} await ev.action.setImage(`imgs/actions/buttons/${status}/${status}.png`);
@action({ UUID: "org.igox.busylight.status.away" }) }
export class SetStatusAway extends SingletonAction {
override async onKeyDown(ev: KeyDownEvent): Promise<void> {
setStatus('away');
}
}
@action({ UUID: "org.igox.busylight.status.off" })
export class SetStatusOff extends SingletonAction {
override async onKeyDown(ev: KeyDownEvent): Promise<void> {
setStatus('off');
}
} }
async function setStatus(status: string) { async function setStatus(status: string) {
@ -43,4 +33,8 @@ async function setStatus(status: string) {
}) })
.then(response => response.json()) .then(response => response.json())
.then(data => streamDeck.logger.debug(data)); .then(data => streamDeck.logger.debug(data));
} }
type statusSettings = {
status?: string;
};

View file

@ -1,7 +1,6 @@
import streamDeck, { LogLevel, SingletonAction, action, type DidReceiveSettingsEvent } from "@elgato/streamdeck"; import streamDeck, { LogLevel, SingletonAction, action, type DidReceiveSettingsEvent } from "@elgato/streamdeck";
//import { IncrementCounter } from "./actions/increment-counter"; import { SetStatus} from "./actions/set-status";
import { SetStatusAvailable, SetStatusBusy, SetStatusAway, SetStatusOff } from "./actions/set-status";
import { SetBrightness } from "./actions/set-brightness"; import { SetBrightness } from "./actions/set-brightness";
import { SetColor } from "./actions/set-color"; import { SetColor } from "./actions/set-color";
@ -9,10 +8,7 @@ import { SetColor } from "./actions/set-color";
streamDeck.logger.setLevel(LogLevel.INFO); streamDeck.logger.setLevel(LogLevel.INFO);
// Register the actions. // Register the actions.
streamDeck.actions.registerAction(new SetStatusAvailable()); streamDeck.actions.registerAction(new SetStatus());
streamDeck.actions.registerAction(new SetStatusBusy());
streamDeck.actions.registerAction(new SetStatusAway());
streamDeck.actions.registerAction(new SetStatusOff());
streamDeck.actions.registerAction(new SetBrightness()); streamDeck.actions.registerAction(new SetBrightness());
streamDeck.actions.registerAction(new SetColor()); streamDeck.actions.registerAction(new SetColor());

Binary file not shown.

Before

Width:  |  Height:  |  Size: 112 KiB

After

Width:  |  Height:  |  Size: 134 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 125 KiB

After

Width:  |  Height:  |  Size: 152 KiB

Before After
Before After

Binary file not shown.

After

Width:  |  Height:  |  Size: 104 KiB