Skip to content

Support for multiple API commands in one MQTT request #642

@xZetsubou

Description

@xZetsubou

Bug report, debug log and your config file (FULL LOGS ARE MANDATORY)

Context:
I'm was making HA integration that can communicate with HyperHDR through MQTT but I bumped into some critical bugs.

  1. I can't control other instances LED Device components, I tested with MQTT Clients to confirm the issue source.
  2. MQTT doesn't reconnect when host shutdown. I need to uncheck and check the MQTT Enable to reconnect.

Steps to reproduce

  1. Switch to instance 1 using mqtt, json command
  2. the hyperhdr logs report the the selected instance has been changed to 1
  3. Turn off the LED using HyperHDR's components command with MQTT.

What is expected?

The selected index LED Turn off

What is actually happening?

-- The instance 0 what turned off.
-- In the logs before it reports the led turned off, It switch back to instance 0 all the time.

More-info

So it seems that sending MQTT command always switch back to instance 0 and reports in the logs before each command:

2023-09-21T10:46:11.278Z [HTTPJSONRPC] (JsonAPI.cpp:97) Client '::1' switch to HyperHDR instance 0
2023-09-21T10:46:11.279Z [HTTPJSONRPC] (JsonAPI.cpp:97) Client '::1' switch to HyperHDR instance 1

2023-09-21T10:46:14.918Z [HTTPJSONRPC] (JsonAPI.cpp:97) Client '::1' switch to HyperHDR instance 0
2023-09-21T10:46:14.919Z [SMOOTHING0] Clearing queued colors before: enabling
2023-09-21T10:46:14.919Z [SMOOTHING0] Smoothing queue is cleared
2023-09-21T10:46:14.919Z [LEDDEVICE_WS281X] (LedDevice.cpp:103) Enable device
2023-09-21T10:46:14.920Z [LEDDEVICE_WS281X] (LedDevice.cpp:333) Switch on
2023-09-21T10:46:14.920Z [LEDDEVICE_WS281X] (LedDevice.cpp:409) Power On

Another issue don't know if I should say bug or feature but when the MQTT Server drops HyperHDR Doesn't reconnect to MQTT.

System

I also tested this in the the last build https://github.com/awawa-dev/HyperHDR/actions/runs/6091102810
HyperHDR Server:

  • Build: (HEAD detached at b8c7f04) (Awawa-3141e80/b8c7f04-1676222403)
  • Build time: Feb 12 2023 17:40:25
  • Git Remote: https://github.com/awawa-dev/HyperHDR
  • Version: 19.0.0.0
  • UI Lang: auto (BrowserLang: ar)
  • UI Access: default
  • Avail Capt: Linux (V4L2)
  • Database: read/write

HyperHDR Server OS:

  • Distribution: Ubuntu 20.04.4 LTS
  • Architecture: arm64
  • CPU Type: Raspberry Pi 4 Model B Rev 1.5
  • CPU Revision: d03115
  • CPU Hardware: BCM2835
  • Kernel: linux (6.1.21-v8+ (WS: 64))
  • Qt Version: 5.15.2
  • Browser: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/116.0.0.0 Safari/537.36

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions