Skip to content

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

Open
arychj wants to merge 15 commits into
dchesterton:mainfrom
ste-haus:eo/target-name-as-topic
Open

Add option for target name to be used as the MQTT topic#157
arychj wants to merge 15 commits into
dchesterton:mainfrom
ste-haus:eo/target-name-as-topic

Conversation

@arychj

@arychj arychj commented Nov 24, 2022

Copy link
Copy Markdown

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