Telegraf "MQTT Consumer" Plug in ... Input / Output Configuration question

Hello all
I have a working “Sonoff/Tasmota Pow R2” connected with MQTT protocol to influxdb via telegraf.
The logging works perfect.

Nevertheless i would like to block some fields/value in a mesurements called “mqtt_consumer” coming via MQTT …
Is that basically possible with the Input/Output Configuration possibilities in the telegraf-config-file “telegraf.conf” ??

Many thanks


                                                        "never ever give up"

Hello to all

In the meantime i solved my problem as follows :slight_smile:

In the " [[inputs.mqtt_consumer]] " part of the telegraf.conf file i added the following …
==> fielddrop = [“ENERGY_ApparentPower”,"_Factor","_Period","*_ReactivePower"]

… and now only the relevant/desired data are stored in the influxdb database.

Best regards

1 Like

Hi Toni,

I’m newbie on influx, mqtt and telegraf and I’m having problemas with the sonoff pow R2, and i don’t have idea why, my `[[inputs.mqtt_consumer]]
servers = [“tcp://localhost:1883”]
topics = [
persistent_session = true
client_id = “telegraf”
username = “admin”
password = “pass”

data_format = “json”
json_time_key = “Time”
json_time_format= “2022-02-03T00:42:51”
json_timezone= “Europe/Madrid”`

but influxdb doesn’t receive any data.

The JSON generated by Pow R2:
{ "Time": "2022-02-04T01:43:41", "ENERGY": { "TotalStartTime": "2020-08-26T12:32:26", "Total": 61.01, "Yesterday": 0, "Today": 0, "Period": 0, "Power": 0, "ApparentPower": 0, "ReactivePower": 0, "Factor": 0, "Voltage": 0, "Current": 0 } }
Thank you!