Skip to content
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

Ability to change MQTT Topic. #619

Closed
xZetsubou opened this issue Aug 9, 2023 · 2 comments · Fixed by #691
Closed

Ability to change MQTT Topic. #619

xZetsubou opened this issue Aug 9, 2023 · 2 comments · Fixed by #691

Comments

@xZetsubou
Copy link

xZetsubou commented Aug 9, 2023

Feature request

What problem does this feature solve?

The issue is that if I have multi HyperHDR server in my network connected to the same MQTT Server they will all share the same topic HyperHDR/JsonAPI, trigger an action will trigger all HyperHDR servers

More FR tho it's not so important, It will be even more useful I can specify the instance index through the topic,
HyperHDR/0/JsonAPI # Instance 0
HyperHDR/1/JsonAPI # Instance 1

What does the proposed API look like?

How should this be implemented in your opinion?

Add a textbox in MQTT Config tab to modify main topic

{var_mqtt_topic}/JsonAPI 
{var_mqtt_topic}/JsonAPI/response

Are you willing to work on this yourself?

Haven't code c++ before but I can help if needed

@awawa-dev
Copy link
Owner

PR implementing custom MQTT topic: #620
Temporarily installers are available here for a while:: https://github.com/awawa-dev/HyperHDR/actions/runs/5813337111
Please test it and let me know if it works OK. I think we leave the direct instance channel for HyperHDR v21 as there is an option to switch instances using JsonAPI.

@xZetsubou
Copy link
Author

xZetsubou commented Aug 9, 2023

I just tested it and it works perfectly good .

2023-08-10T01:56:26.737Z [MQTT] (mqtt.cpp:37) Starting the MQTT connection. Address: synology:1883. Protocol: NO SSL. Authentication: YES, Ignore errors: NO, MQTT topic: HyperHDR/Bedroom/JsonAPI, MQTT response: HyperHDR/Bedroom/JsonAPI/response
2023-08-10T01:56:26.742Z [MQTT] (mqtt.cpp:90) Connected
2023-08-10T01:56:34.053Z [HTTPJSONRPC] (JsonAPI.cpp:98) Previous line repeats 45 times
2023-08-10T01:56:34.053Z [WEBSOCKET] (JsonAPI.cpp:1379) log streaming activated for client ::ffff:192.168.1.18
2023-08-10T02:01:56.660Z [SMOOTHING0] Clearing queued colors before: disabling
2023-08-10T02:01:56.660Z [SMOOTHING0] Smoothing queue is cleared
2023-08-10T02:01:56.661Z [LEDDEVICE_WS281X] (LedDevice.cpp:140) Disable device

Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants