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

mqtt should be implemented as an API, not hardcoded into vzlogger core #550

Open
r00t- opened this issue Nov 24, 2022 · 1 comment
Open

Comments

@r00t-
Copy link
Contributor

r00t- commented Nov 24, 2022

i had not paid much attention to the mqtt implementation before,
but in #538 it came up that aggregation does not work for mqtt.

this is because mqtt (in #357) was not implemented as an api,
but hardcoded directly into the vzlogger core, bypassing aggregation and possibly other logic: https://github.com/mbehr1/vzlogger/blob/4ddc311c19ee7558c54049b2097ef5316783864a/src/threads.cpp#L143

mqtt should be an api so it can be configured like others, and make use of other features of vzlogger.
it should should look like this (at vzlogger.conf level):

    "meters": [{
        "channels": [{
            "api": "mqtt",
@r00t-
Copy link
Contributor Author

r00t- commented Nov 24, 2022

i might make a draft of how to change this,
but i'm not a user of or experienced in mqtt, so i won't be able to complete this by myself.

r00t- referenced this issue in mbehr1/vzlogger Nov 24, 2022
Adds
- ENABLE_MQTT cmake option. Defaults to On but turns off automatically
  if libmosquitto not found.
- basic mqtt client support using libmosquitto
  - topics generated are:
    vzlogger/<channel-id>/uuid
    vzlogger/<channel-id>/raw
    vzlogger/<channel-id>/agg
- added config options for
  - host
  - port (currently no tls/sll support!)
  - user
  - password
  - topic (prefix used instead of vzlogger in above example)
  - (some more, see etc/vzlogger.conf)
- agg values get's preferred instead of raw. Using config option
  rawAndAgg this can be changed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant