-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
feat(outputs.mqtt): Add option to specify topic layouts #12697
Conversation
Based on #12683 and thus marked as draft for now. |
@srebhan I probably won't have time to setup a test for this the coming week. From the documentation it looks like this will solve my problem in my specific case (single task creating multiple fields that can be translated to separate mqtt topics). |
Ok. Let me know if you were able to really test this. |
7f43bfe
to
ba9a801
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
couple inline questions, otherwise this looks good to go! Thanks!
Co-authored-by: Joshua Powers <powersj@fastmail.com>
8268bca
to
ccbcc7c
Compare
Download PR build artifacts for linux_amd64.tar.gz, darwin_amd64.tar.gz, and windows_amd64.zip. 📦 Click here to get additional PR build artifactsArtifact URLs |
resolves #12589
resolves #10732
This PR adds a new
layout
option to specify how topics are generated from metrics. While preserving the original batch and non-batch options (renderingbatch
deprecated), the PR adds two new options,field
andhomie-v4
. Thefield
layout will generate one topic per metric field only containing the field value in string format (solving #10732). Thehomie-v4
layout allows to output metrics in topics adhering to the Homie v4.0 specification, a standard used for M2M and home-automation purposes.