Skip to content

Customizable MQTT Topics for Multiple Device SupportΒ #45

@Love4yzp

Description

@Love4yzp

Description

When integrating multiple SenseCAP Indicator devices with systems like Home Assistant, each device publishes data to the same MQTT topic ("indicator/sensor"), leading to conflicts and data management issues. This feature request aims to introduce the ability to customize the MQTT topic per device through terminal commands, allowing users to assign unique topics to each device for easier identification and management.

Feature Proposal

Custom MQTT Topic Configuration

  • Introduce a new terminal command, such as setmqtt -t <custom_topic>, to allow users to specify a custom MQTT topic for each SenseCAP Indicator device.
  • This command would modify the MQTT topic that the device uses to publish its data, making it possible to have multiple devices in the same network without topic collision.

Use Case Scenario

  • In a setup with multiple SenseCAP Indicator devices, a user wishes to distinguish between devices located in different offices, e.g., "sensecapoffice1", "sensecapoffice2".
  • By executing a command like setmqtt -t sensecapoffice1 on one device and setmqtt -t sensecapoffice2 on another, each device would publish to its unique MQTT topic, simplifying data management and integration with Home Assistant.

Expected Benefits

  • Enhanced Scalability: Makes it easier to scale up the number of SenseCAP Indicator devices in a network without worrying about MQTT topic collisions.
  • Improved Data Management: Facilitates the organization and monitoring of data from multiple devices, especially in complex setups.
  • Increased Flexibility: Allows users to tailor the MQTT topics to their specific naming conventions and requirements, improving integration with various IoT platforms and services.

Potential Challenges & Considerations

  • Ensuring backward compatibility with existing setups where a specific MQTT topic is expected.
  • Providing clear documentation and user guidance on how to use this new feature effectively.

Originally posted by @MarcLuethi8356 in #29 (comment)

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions