bemasher / rtlamr-collect

Data aggregation for rtlamr.
GNU Affero General Public License v3.0
171 stars 29 forks source link

Add support for publishing messages to MQTT #38

Open toxuin opened 2 years ago

toxuin commented 2 years ago

This adds ability to publish raw message to MQTT server in JSON format under EndpointId-specific topics.

toxuin commented 2 years ago

Since this current implementation does not much more but puts the raw JSON data to an endpoint-scoped topic, I think having a topic-prefix should be an ok compromise to converting everything in the project to an interface.

MQTT part would not even do anything if the MQTT server address is not set - that is obviously to not interfere with existing configs where MQTT is not required.

In my mind, InfluxDB data should always flow (it's kind of the whole point of this project) and then MQTT would provide an extra data access when necessary - therefore such non-sophisticated implementation.

Thanks for quick review!