Reading Tasmota Mqtt Content

Paddy65305
Sat, 22 Jun 2024 10:05:48 +0000
Telegraf

I have a ESP32 with Tasmota how is put to the digital electricity meter to get the information.
this send to Topics:
one on Tasmota/STATUS10 every 15min:
{“StatusSNS”:{“Time”:“2024-06-22T10:00:01”,“MT175”:{“E_in”:12642.6,“P”:2256.00,“L1”:263.00,“L2”:6.00,“L3”:1988.00,“Server_ID”:“0649534b010e1f5f9b3b”}}}

and one on Tasmota/SENSOR with the current change Values. This seams to be the content of StatusSNS
{“Time”:“2024-06-22T10:00:01”,“MT175”:{“E_in”:12642.6,“P”:2256.00,“L1”:263.00,“L2”:6.00,“L3”:1988.00,“Server_ID”:“0649534b010e1f5f9b3b”}}
But then only one of the Fields in MT175.* is sendet.
I try to get a messerument with all of this five Fields put all version I try didn
t work.

I have try a data_format=“xpath_json” version but there I get no values, and with to lines above I get the Error: configuration specified the fields [“timestamp_path”], but they were not used. This is either a typo…

data_format = “json_v2”
[[inputs.mqtt_consumer.json_v2]]
[[inputs.mqtt_consumer.json_v2.object]]
path = “StatusSNS”
timestamp_path = “Time”
timestamp_format = “2006-01-02T15:04:05”
[[inputs.mqtt_consumer.json_v2.object.field]] # fields by key and type
P = “number(MT175.P)”
L1 = “number(MT175.L1)”
L2 = “number(MT175.L2)”
L3 = “number(MT175.L3)”
E_in = “number(MT175.E_in)”

14 posts - 2 participants