Publish ANT+ data to MQTT server #123
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Allows sending received ANT+ packets to an MQTT server, in a similar way to how the InfluxDB subparser works. This adds an optional dependency on paho-mqtt with the selector "mqtt".
By default, data will be posted to the topic
openant/<DeviceType>/<DeviceId>. This can be overridden with the option--device-topic, which lets the user directly control which topic is used for a given device. This might be needed for easier integration with external systems.By default, data will be posted as a single JSON data string to the topic (e.g.
openant/HeartRate/54368), since this appears to be most common method in use. Alternatively, by enabling the--topic-per-fieldoption, data will be posted as individual topic below the device. E.g.:openant/HeartRate/54368/heart_ratewill contain a single integer.