nachdem ich langsam in HAOS einsteige möchte ich die Daten die ich länger benötige in Influx speichern.
Die ersten Daten funktionieren schon (HAOS-> Influx) bzw MQTT->Influx (wenn die Daten als int oder float vorhanden sind).
Wo ich seit Tagen herumwurschtel: die Daten sind als String vorhanden und ich kann sie nicht importieren
MQTT: Topic: SHRDZM/807D3A37863A/807D3A37863A/sensor
Output auf der Konsole:
Daten sind aber keine im Bucket....
wo mache ich den Fehler?
Ich habe alle möglichen Versionen (json_2) usw probiert, aber überall das gleiche Dilemma....
Die ersten Daten funktionieren schon (HAOS-> Influx) bzw MQTT->Influx (wenn die Daten als int oder float vorhanden sind).
Wo ich seit Tagen herumwurschtel: die Daten sind als String vorhanden und ich kann sie nicht importieren
MQTT: Topic: SHRDZM/807D3A37863A/807D3A37863A/sensor
{
"timestamp":"2025-10-31T10:39:50",
"32.7.0":"236.10",
"52.7.0":"234.70",
"72.7.0":"235.30",
"31.7.0":"2.50",
"51.7.0":"2.00",
"71.7.0":"1.12",
"1.7.0":"0",
"2.7.0":"17",
"1.8.0":"9929432",
"2.8.0":"19417831",
"3.8.0":"692170",
"4.8.0":"7045923",
"16.7.0":"-17",
"uptime":"0003:09:38:02",
"UTC":"2025-10-31T09:39:53"
}
"timestamp":"2025-10-31T10:39:50",
"32.7.0":"236.10",
"52.7.0":"234.70",
"72.7.0":"235.30",
"31.7.0":"2.50",
"51.7.0":"2.00",
"71.7.0":"1.12",
"1.7.0":"0",
"2.7.0":"17",
"1.8.0":"9929432",
"2.8.0":"19417831",
"3.8.0":"692170",
"4.8.0":"7045923",
"16.7.0":"-17",
"uptime":"0003:09:38:02",
"UTC":"2025-10-31T09:39:53"
}
# Configuration for telegraf agent
[agent]
interval = "10s"
round_interval = true
metric_batch_size = 1000
metric_buffer_limit = 10000
collection_jitter = "0s"
flush_interval = "10s"
flush_jitter = "0s"
precision = ""
hostname = ""
omit_hostname = false
debug = true
[[outputs.influxdb_v2]]
urls = ["http://localhost:8086"]
token = "xxxxxxxxxxxxxxxxxxxxxxxxx"
organization = "Hoe"
bucket = "Smartmeter"
# Read metrics from MQTT topic(s)
[[inputs.mqtt_consumer]]
servers = ["tcp://192.168.10.214:1883"]
topics = [
"SHRDZM/807D3A37863A/807D3A37863A/sensor",
]
## Username and password to connect MQTT server.
#username = "KNX"
password = "KNX"
## Data format to consume.
#data_format = "json"# Read metrics from MQTT topic(s)
## The message topic will be stored in a tag specified by this value. If set
## to the empty string no topic tag will be created.
# topic_tag = "topic"
# qos = 0
# client_trace = true
# data_format = "xpath_json"
username = "KNX"
password = "KNX"
## Data format to use for messages
#name_override = "Smartmeter"
data_format = "json"
data_type = "int"
[[processors.converter]]
[processors.converter.tags]
measurement = []
string = []
integer = []
unsigned = []
boolean = []
float = []
[processors.converter.fields]
measurement = []
tag = []
string = []
integer = ["1,7,0","2.7.0"]
float = ["31.7.0","51.7.0"]
unsigned = []
boolean = []
timestamp = ["timestamp"]
timestamp_format = "2006-01-02T15:04:05"
[agent]
interval = "10s"
round_interval = true
metric_batch_size = 1000
metric_buffer_limit = 10000
collection_jitter = "0s"
flush_interval = "10s"
flush_jitter = "0s"
precision = ""
hostname = ""
omit_hostname = false
debug = true
[[outputs.influxdb_v2]]
urls = ["http://localhost:8086"]
token = "xxxxxxxxxxxxxxxxxxxxxxxxx"
organization = "Hoe"
bucket = "Smartmeter"
# Read metrics from MQTT topic(s)
[[inputs.mqtt_consumer]]
servers = ["tcp://192.168.10.214:1883"]
topics = [
"SHRDZM/807D3A37863A/807D3A37863A/sensor",
]
## Username and password to connect MQTT server.
#username = "KNX"
password = "KNX"
## Data format to consume.
#data_format = "json"# Read metrics from MQTT topic(s)
## The message topic will be stored in a tag specified by this value. If set
## to the empty string no topic tag will be created.
# topic_tag = "topic"
# qos = 0
# client_trace = true
# data_format = "xpath_json"
username = "KNX"
password = "KNX"
## Data format to use for messages
#name_override = "Smartmeter"
data_format = "json"
data_type = "int"
[[processors.converter]]
[processors.converter.tags]
measurement = []
string = []
integer = []
unsigned = []
boolean = []
float = []
[processors.converter.fields]
measurement = []
tag = []
string = []
integer = ["1,7,0","2.7.0"]
float = ["31.7.0","51.7.0"]
unsigned = []
boolean = []
timestamp = ["timestamp"]
timestamp_format = "2006-01-02T15:04:05"
Code:
telegraf --config http://192.168.50.133:8086/api/v2/telegrafs/0fb9500b80a11000 2025-10-31T09:41:52Z I! Loading config: http://192.168.50.133:8086/api/v2/telegrafs/0fb9500b80a11000 2025-10-31T09:41:52Z I! Starting Telegraf 1.36.3 brought to you by InfluxData the makers of InfluxDB 2025-10-31T09:41:52Z I! Available plugins: 239 inputs, 9 aggregators, 35 processors, 26 parsers, 65 outputs, 6 secret-stores 2025-10-31T09:41:52Z I! Loaded inputs: mqtt_consumer 2025-10-31T09:41:52Z I! Loaded aggregators: 2025-10-31T09:41:52Z I! Loaded processors: converter 2025-10-31T09:41:52Z I! Loaded secretstores: 2025-10-31T09:41:52Z I! Loaded outputs: influxdb_v2 2025-10-31T09:41:52Z I! Tags enabled: host=influxdb 2025-10-31T09:41:52Z I! [agent] Config: Interval:10s, Quiet:false, Hostname:"influxdb", Flush Interval:10s 2025-10-31T09:41:52Z W! [agent] The default value of 'skip_processors_after_aggregators' will change to 'true' with Telegraf v1.40.0! If you need the current default behavior, please explicitly set the option to 'false'! 2025-10-31T09:41:52Z D! [agent] Initializing plugins 2025-10-31T09:41:52Z D! [agent] Connecting outputs 2025-10-31T09:41:52Z D! [agent] Attempting connection to [outputs.influxdb_v2] 2025-10-31T09:41:52Z D! [agent] Successfully connected to outputs.influxdb_v2 2025-10-31T09:41:52Z D! [agent] Starting service inputs 2025-10-31T09:41:52Z I! [inputs.mqtt_consumer] Connected [tcp://192.168.10.214:1883] 2025-10-31T09:42:02Z D! [outputs.influxdb_v2] Buffer fullness: 0 / 10000 metrics
wo mache ich den Fehler?
Ich habe alle möglichen Versionen (json_2) usw probiert, aber überall das gleiche Dilemma....



Kommentar