SenseCAP_Indicator_ESP32
SenseCAP_Indicator_ESP32 copied to clipboard
Customizable MQTT Topics for Multiple Device Support
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 andsetmqtt -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 https://github.com/Seeed-Solution/SenseCAP_Indicator_ESP32/discussions/29#discussioncomment-8409446