MQTT-Explorer
MQTT-Explorer copied to clipboard
feat: add sparkplug b encoder for publishing
Continuing off the work of https://github.com/thomasnordquist/MQTT-Explorer/pull/629 and https://github.com/thomasnordquist/MQTT-Explorer/pull/582, this PR adds the ability to publish sparkplug B payloads.
I'm looking for input on the method used for determining when to encode (checking if the topic is sparkplug like via regex) and how error handling should be done when the format is incorrect (currently a no-op)
Also I should mention that I fixed the linting step in CI. I hope that was ok. Doing so exposed a warning in an unrelated file, that I'm not sure how to address.
@ferm10n Can you rebase this, and hopefully we can get it merged?
@bj00rn ready for review.
I did have a question about https://github.com/thomasnordquist/MQTT-Explorer/pull/655/files#diff-5255694efe3f339a40eef198ab371f5c050b53e65146bb32aa2dbb2427646beaR39, did you have a preference on how to handle an error when trying to encode a sparkplug payload (for example when the user provides a payload that cannot be sparkplug encoded)