Extract attributes from a MQTT topic in ThingsBoard #1756
Unanswered
ziotibia81
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I have an electrical measuring device that exports a list of measurements via MQTT. The topic is formatted as follows:
measuring/[site]/[param]
, and the data is published in plain text.For example:
I'm using ThingsBoard IoT Gateway (version 3.7.0) with ThingsBoard version 3.9.1. I've configured an MQTT connector that connects to the broker of the measuring device.
In the "Data Mapping" section, I used a topic filter like
measuring/site1/+
to subscribe to all parameters forsite1
. I set the Payload type toBytes
and the value expression to[:]
. However, I can't figure out how to extract thekey
(e.g., L1-Voltage, Freq) from the MQTT topic using a regular expression or placeholder. If I enter a regular expression into thekey
field, the telemetry data arrives in ThingsBoard with the literal regex string as the key name, not the extracted parameter name.Beta Was this translation helpful? Give feedback.
All reactions