InfluxDB / Telegraf / MQTT - Can't read data

Hi @Tom999 -
Detailed mqtt_consumer documentation can be found here.

There are some problems with this code.

  1. Do not mix [[inputs.mqtt_consumer]] and [[inputs.file]]. All lower-level plug-in statements must also start with [[inputs.mqtt . . .]].
  2. Lower-level statements must use proper indentation (see this recent post.)
  3. Need to specify data_format = "json_v2" at the beginning.
  4. First parse the topic to unwrap the payload, then parse the JSON. It is reversed in your code which probably caused the error message.