From 484de3210ad2fde1785f1956c7dfe26368cbbd9e Mon Sep 17 00:00:00 2001 From: Julius Dill Date: Fri, 29 Aug 2025 14:27:45 +0200 Subject: [PATCH 1/2] fix EEBUS Data with spaces not being sent to the frontend --- app/hems.go | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/app/hems.go b/app/hems.go index 2e197a8..fb505a9 100644 --- a/app/hems.go +++ b/app/hems.go @@ -371,11 +371,8 @@ func (c *Cem) printFormat(msgType, format string, args ...interface{}) { // filter out UseCase and DetailedDiscovery func (c *Cem) filterSpineLogs(msg string) { parts := strings.Split(msg, " ") - if len(parts) != 3 { - return - } - if parts[0] != "Recv:" { + if parts[0] != "Recv:" && len(parts) < 3 { return } @@ -394,11 +391,11 @@ func (c *Cem) filterSpineLogs(msg string) { if len(msgService.Ski) == 0 { return } - + payload := strings.Join(parts[2:], " ") // discovery data if strings.Contains(msg, "{\"payload\":[{\"cmd\":[[{\"nodeManagementDetailedDiscoveryData\":") && !strings.Contains(msg, "{\"nodeManagementDetailedDiscoveryData\":[]") { - c.discoveryData[ski] = parts[2] + c.discoveryData[ski] = payload c.broadcastServicesList() return } @@ -406,7 +403,7 @@ func (c *Cem) filterSpineLogs(msg string) { // usecase data if strings.Contains(msg, "{\"payload\":[{\"cmd\":[[{\"nodeManagementUseCaseData\":") && !strings.Contains(msg, "{\"nodeManagementUseCaseData\":[]") { - c.usecaseData[ski] = parts[2] + c.usecaseData[ski] = payload c.broadcastServicesList() return } From 1a1476f32af5097b9de4493c9e02bd1de340f00b Mon Sep 17 00:00:00 2001 From: Julius Dill Date: Fri, 29 Aug 2025 14:32:19 +0200 Subject: [PATCH 2/2] Fix unclear if-statement --- app/hems.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/app/hems.go b/app/hems.go index fb505a9..7728af5 100644 --- a/app/hems.go +++ b/app/hems.go @@ -371,8 +371,11 @@ func (c *Cem) printFormat(msgType, format string, args ...interface{}) { // filter out UseCase and DetailedDiscovery func (c *Cem) filterSpineLogs(msg string) { parts := strings.Split(msg, " ") + if len(parts) < 3 { + return + } - if parts[0] != "Recv:" && len(parts) < 3 { + if parts[0] != "Recv:" { return }