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

Add option for target name to be used as the MQTT topic #157

Open
wants to merge 15 commits into
base: main
Choose a base branch
from

Conversation

arychj
Copy link

@arychj arychj commented Nov 24, 2022

Intent

Adds an optional parameter to the MQTT configuration to use the target's name as the second topic level rather than the hostname.

Example

# config.yml

mqtt:
  # < snip >
  target_name_as_topic: true

targets:
  - host: 192.168.8.81
    name: UPS 3301
    version: 1
    sensors:
      - oid: 1.3.6.1.4.1.3808.1.1.1.1.1.1.0
        name: Model Number

Effect

  • before setting target_name_as_topic: messages are published to .../192.168.8.81/...
  • after setting target_name_as_topic: messages are published to .../ups_3301/...

image

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

Successfully merging this pull request may close these issues.

1 participant