Skip to content

dominant color processing on a full image + Fixes #1856

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 27 commits into from
Apr 27, 2025
Merged
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
3dd5ee4
Fix - Retries are not done when connection is destructed
Lord-Grey Apr 8, 2025
617e123
Remove costly unpack and streamline code
Lord-Grey Apr 8, 2025
5086c11
Update Flatbuffer client code
Lord-Grey Apr 10, 2025
70fe77c
Support for dominant color processing on a full image which is applie…
Lord-Grey Apr 18, 2025
de551bb
Allow uni dominant enums for API
Lord-Grey Apr 21, 2025
550d7a2
Fix C&P issue
Lord-Grey Apr 21, 2025
fa6fa14
Missing remote buttons' text
Lord-Grey Apr 21, 2025
c7fbbc7
Allow to provide additional details in error dialogue
Lord-Grey Apr 21, 2025
662c3b4
Ensure UI getConfig always get instances
Lord-Grey Apr 21, 2025
ad81c00
Stop API service when Hyperion is quitting
Lord-Grey Apr 21, 2025
b371d01
Update UI that Single and Multiple instance commands are correctly su…
Lord-Grey Apr 21, 2025
926e0ff
Fix that effects are not created/deleted per instance
Lord-Grey Apr 21, 2025
507f552
Fix dangling reference
Lord-Grey Apr 21, 2025
f90aa86
Correct instance dependencies on API commaands
Lord-Grey Apr 22, 2025
359add2
Add failing command to Error dialog
Lord-Grey Apr 22, 2025
6fd4182
Fix - Return correct mapping type for a running instance
Lord-Grey Apr 22, 2025
b09754c
Update changelog
Lord-Grey Apr 22, 2025
caa8234
Merge branch 'flatbuffer' into dominant
Lord-Grey Apr 22, 2025
7b4051c
Cleanup Flatbuffer processing
Lord-Grey Apr 22, 2025
94a8209
Use switched instance for API calls without instance provided
Lord-Grey Apr 24, 2025
de28333
Treat an empty instance array as "all instances" for multi-instance c…
Lord-Grey Apr 24, 2025
0be52eb
Fixed - Last update of an effect event is not removed in sources over…
Lord-Grey Apr 24, 2025
df61844
Translate no sources text element
Lord-Grey Apr 25, 2025
7ddc117
Fix CodeQL finding
Lord-Grey Apr 26, 2025
266537b
JSON API clean-up
Lord-Grey Apr 26, 2025
7a0ddcd
Http-Server: Support Cross-Origin Resource Sharing (CORS) (#1496)
Lord-Grey Apr 26, 2025
6b40df5
Dress CodeQL Findings (2)
Lord-Grey Apr 27, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -18,13 +18,16 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Support for Skydimo devices
- Support gaps on Matrix Layout (#1696)
- Support a configurable grabber inactive detection time interval (#1740)
- Support for dominant color processing on a full image which is applied to all LEDs (#1853)
- Windows: Added a new grabber that uses the DXGI DDA (Desktop Duplication API). This has much better performance than the DX grabber as it does more of its work on the GPU.
- Support to freely select source and target instances to be used by forwarder
- Support to import, export and backup Hyperion's full configuration via the UI, JSON-API and commandline (`--importConfig, --exportConfig`) (#804)
- Allow to force starting Hyperion in read-only mode (`--readonlyMode`)
- Effects: Limit the maximum update rate to 200Hz
- Systray: Support multiple instances
- UI: Validate that key ports do not overlap across editors and pages
- UI: Provide additional details in error dialogue
- Http-Server: Support Cross-Origin Resource Sharing (CORS) (#1496)

**JSON-API**
- New subscription support for event updates, i.e. `Suspend, Resume, Idle, idleResume, Restart, Quit`.
@@ -64,15 +67,18 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Fixed that LED Buffer and Layout might get out of sync.
- Fixed Screen capture error (#1824)
- Fixed Provide custom forwarding targets is not possible (#1713)
- Fixed Last update of an effect event is not removed in sources overview

**JSON-API**
- Refactored JSON-API to ensure consistent authorization behaviour across sessions and single requests with token authorization.
- Provide additional error details with API responses, esp. on JSON parsing, validation or token errors.
- Generate random TANs for every API request from the Hyperion UI
- Configuration requests do not any longer require a running instance
- Ensure that API service does not process commands when Hyperion is quitting
- Fixed: Handling of IP4 addresses wrapped in IPv6 for external network connections
- Fixed: Local Admin API Authentication rejects valid tokens (#1251)
- Fixed: Create a proper API response, when Effects are not part of a build
- Fixed: Return correct mapping type for a running instance

### Removed

24 changes: 16 additions & 8 deletions assets/webconfig/i18n/en.json
Original file line number Diff line number Diff line change
@@ -407,7 +407,7 @@
"edt_conf_enum_dl_verbose2": "Verbosity level 2",
"edt_conf_enum_dl_verbose3": "Verbosity level 3",
"edt_conf_enum_dominant_color": "Dominant Color - per LED",
"edt_conf_enum_dominant_color_advanced": "Dominant Color Advanced - per LED",
"edt_conf_enum_dominant_color_advanced": "Dominant Color (advanced) - per LED",
"edt_conf_enum_effect": "Effect",
"edt_conf_enum_gbr": "GBR",
"edt_conf_enum_grb": "GRB",
@@ -432,7 +432,9 @@
"edt_conf_enum_transeffect_sudden": "Sudden",
"edt_conf_enum_udp_ddp": "DDP",
"edt_conf_enum_udp_raw": "RAW",
"edt_conf_enum_unicolor_mean": "Mean Color Image - applied to all LEDs",
"edt_conf_enum_unicolor_mean": "Image's mean color - applied to all LEDs",
"edt_conf_enum_unicolor_dominant": "Image's dominant color - applied to all LEDs",
"edt_conf_enum_unicolor_dominant_advanced": "Image's dominant color (advanced) - applied to all LEDs",
"edt_conf_flatbufServer_heading_title": "Flatbuffer Server",
"edt_conf_flatbufServer_timeout_expl": "If no data is received for the given period, the component will be (soft) disabled.",
"edt_conf_flatbufServer_timeout_title": "Timeout",
@@ -1090,6 +1092,7 @@
"remote_input_ip": "IP:",
"remote_input_label": "Source Selection",
"remote_input_label_autoselect": "Auto Selection",
"remote_input_no_sources": "No sources available",
"remote_input_origin": "Origin",
"remote_input_owner": "Type",
"remote_input_priority": "Priority",
@@ -1099,11 +1102,13 @@
"remote_losthint": "Note: All changes will be lost after a restart.",
"remote_maptype_intro": "Usually the LED layout defines which LED covers a specific picture area. You can change it here: $1.",
"remote_maptype_label": "Mapping type",
"remote_maptype_label_dominant_color": "Dominant Color",
"remote_maptype_label_dominant_color_advanced": "Dominant Color Advanced",
"remote_maptype_label_multicolor_mean": "Mean Color Simple",
"remote_maptype_label_multicolor_mean_squared": "Mean Color Squared",
"remote_maptype_label_unicolor_mean": "Mean Color Image",
"remote_maptype_label_dominant_color": "Dominant Color - simple",
"remote_maptype_label_dominant_color_advanced": "Dominant Color - advanced",
"remote_maptype_label_multicolor_mean": "Mean Color - simple",
"remote_maptype_label_multicolor_mean_squared": "Mean Color - squared",
"remote_maptype_label_unicolor_dominant": "Dominant Color whole image - simple",
"remote_maptype_label_unicolor_dominant_advanced": "Dominant Color whole image - advanced",
"remote_maptype_label_unicolor_mean": "Mean Color whole image",
"remote_optgroup_syseffets": "System Effects",
"remote_optgroup_templates_custom": "User Templates",
"remote_optgroup_templates_system": "System Templates",
@@ -1228,6 +1233,9 @@
"wiz_yeelight_desc2": "Now choose which lamps should be added. The position assigns the lamp to a specific position on your \"picture\". Disabled lamps won't be added. To identify single lamps press the button on the right.",
"wiz_yeelight_intro1": "This wizard configures Hyperion for the Yeelight system. Features are the Yeelights' auto detection, setting each light to a specific position on your picture or disable it and tune the Hyperion settings automatically! So in short: All you need are some clicks and you are done!",
"wiz_yeelight_title": "Yeelight Wizard",
"wiz_yeelight_unsupported": "Unsupported"
"wiz_yeelight_unsupported": "Unsupported",
"ws_error_occured": "WebSocket error occured",
"ws_not_supported": "Websocket is not supported by your browser",
"ws_processing_exception": "Exception during Websocket message processing"
}

21 changes: 16 additions & 5 deletions assets/webconfig/js/content_index.js
Original file line number Diff line number Diff line change
@@ -158,9 +158,10 @@ $(document).ready(function () {
let instanceId = window.currentHyperionInstance;
const config = event.response.info;
const { instanceIds } = config;
if (instanceIds.length !== 0) {

if (Array.isArray(instanceIds) && instanceIds.length !== 0) {
if (!instanceIds.includes(window.currentHyperionInstance)) {
// If instanceID is not valid try to switch to the first enabled or or fall back to the first instance configured
// If instanceID is not valid try to switch to the first enabled or fall back to the first instance configured
const { instances } = config;

const firstEnabledInstanceId = instances.find((instance) => instance.enabled)?.id;
@@ -170,7 +171,6 @@ $(document).ready(function () {
} else {
instanceId = window.currentHyperionInstance = instanceIds[0];
}

}
}

@@ -242,11 +242,22 @@ $(document).ready(function () {
$(window.hyperion).on("error", function (event) {
//If we are getting an error "No Authorization" back with a set loginToken we will forward to new Login (Token is expired.
//e.g.: hyperiond was started new in the meantime)
if (event.reason == "No Authorization" && getStorage("loginToken")) {

const error = event.reason;

if (error?.message === "No Authorization" && getStorage("loginToken")) {
removeStorage("loginToken");
requestRequiresDefaultPasswortChange();
} else {
showInfoDialog("error", "Error", event.reason);
const errorDetails = [];

if (error?.cmd) {
errorDetails.push(`Command: "${error.cmd}"`);
}

errorDetails.push(error?.details || "No additional details.");

showInfoDialog("error", "", error?.message || "Unknown error", errorDetails);
}
});

8 changes: 7 additions & 1 deletion assets/webconfig/js/content_remote.js
Original file line number Diff line number Diff line change
@@ -124,11 +124,17 @@ $(document).ready(function () {
// Update input select options based on priorities
function updateInputSelect() {
// Clear existing elements
$('.sstbody').empty();
$('.sstbody').empty().html('');

const prios = window.serverInfo.priorities;
let clearAll = false;

if (prios.length === 0) {
$('.sstbody').append(`<tr><td colspan="4" class="text-center text-muted">${$.i18n('remote_input_no_sources')}</td></tr>`);
$('#auto_btn').empty();
return;
}

// Iterate over priorities
for (let i = 0; i < prios.length; i++) {
let origin = prios[i].origin ? prios[i].origin : "System";
Loading