Telegraf.conf file for shelly 1pm data

I would like to store all the data from a Shelly 1PM in a influx database.
So i have difficulties in configure my telegraf.conf file for that purpose.
The Shelly publishing MQTT messages like this …:
Client mosqsub|1204-raspberryp received PUBLISH (d0, q0, r0, m0, ‘shellies/sh1pm/temperature’, … (5 bytes))
… but unfortunately i do not find any data in my database “shellies” !
The telegraf.conf file looks like this …



  interval = "15s"
  round_interval = true

  metric_batch_size = 1000

  metric_buffer_limit = 10000

  collection_jitter = "0s"

  flush_interval = "10s"

  flush_jitter = "0s"

  precision = ""

 urls = ["http://raspberrypi:8086"]
 database = "shellies"

# ==============================================================================
# # Read metrics from MQTT topic(s)
#   ## MQTT broker URLs to be used. The format should be scheme://host:port,
#   ## schema can be tcp, ssl, or ws.
servers = ["tcp://raspberrypi:1883"]
#   ## Topics that will be subscribed to.

topics = ["+/+/+"]

data_format = "json"

Can anybody help me?

Hi @Toni-PV
To isolate the problem, I’d suggest setting [debug = true] in the [agent] section and sending your output to stdout. Then verify that the JSON coming into Telegraf looks good.

You’re using the 1.X output plugin for Influxdb which is fine if you have installed a 1.X version on the other side. You may need some additional authentication info in [[outputs.influxdb]].

JSON is coming into Telegraf but Influx typically expects Line Protocol.

Hello phill

Many thanks, i could solve the problem with your help.
Debugging showed me, that something is wrong about the output.
So i replaced

data_format = “json”


data_format = “value”
data_type = “float”

Now it is working fine

Best regards


@Toni-PV That’s fantastic. Good luck with your project!

@phill thank you for helping!