Hattapüh! Alles nach MQTT werfen zu können ist ja schon cool — aber dennoch muß ich offensichtlich Parser schreiben, damit die Daten via Telegraf in InfluxDB landen?
Aktuell schieben OpenDTU, Tasmota und ZigBee2MQTT Ihre Daten in meinen MQTT-Broker:
2024-10-09T03:56:21+0200 solar/123456789012/name 5 'HMS01' 2024-10-09T03:56:21+0200 solar/123456789012/status/reachable 1 '0' 2024-10-09T03:56:21+0200 solar/123456789012/status/producing 1 '0' 2024-10-09T03:56:21+0200 solar/123456789012/status/last_update 1 '0' 2024-10-09T03:56:21+0200 solar/ac/power 3 '0.0' 2024-10-09T03:56:21+0200 solar/ac/yieldtotal 5 '0.000' 2024-10-09T03:56:21+0200 solar/ac/yieldday 1 '0' 2024-10-09T03:56:21+0200 solar/ac/is_valid 1 '0' 2024-10-09T03:56:21+0200 solar/dc/power 3 '0.0' 2024-10-09T03:56:21+0200 solar/dc/irradiation 5 '0.000' 2024-10-09T03:56:21+0200 solar/dc/is_valid 1 '0' 2024-10-09T03:56:21+0200 tele/tasmota_15812D/MARGINS 28 '{"MARGINS":{"PowerDelta":1}}' 2024-10-09T03:56:21+0200 tele/tasmota_156AB7/MARGINS 29 '{"MARGINS":{"PowerDelta":-9}}' 2024-10-09T03:56:21+0200 tele/tasmota_156AB7/SENSOR 223 '{"Time":"2024-10-09T02:56:21","ENERGY":{"TotalStartTime":"2021-02-09T12:28:55","Total":63.890,"Yesterday":7.397,"Today":0.907,"Power":290,"ApparentPower":313,"ReactivePower":118,"Factor":0.93,"Voltage":232,"Current":1.348}}' 2024-10-09T03:56:21+0200 tele/tasmota_F0B4C6/MARGINS 28 '{"MARGINS":{"PowerDelta":1}}' 2024-10-09T03:56:21+0200 tele/tasmota_F0B4C6/SENSOR 221 '{"Time":"2024-10-09T02:56:21","ENERGY":{"TotalStartTime":"2024-01-03T12:54:30","Total":115.839,"Yesterday":0.425,"Today":0.052,"Power":18,"ApparentPower":34,"ReactivePower":29,"Factor":0.53,"Voltage":237,"Current":0.143}}' 2024-10-09T03:56:21+0200 esphome/azenvy-1/debug 98 '[D][sensor:124]: 'WiFi Signal': Sending state -46.00000 dBm with 0 decimals of accuracy' 2024-10-09T03:56:21+0200 tele/tasmota_156D3F/MARGINS 29 '{"MARGINS":{"PowerDelta":-3}}' 2024-10-09T03:56:21+0200 tele/tasmota_156D3F/SENSOR 222 '{"Time":"2024-10-09T02:56:21","ENERGY":{"TotalStartTime":"2021-02-09T10:39:11","Total":30.280,"Yesterday":3.526,"Today":0.433,"Power":141,"ApparentPower":147,"ReactivePower":43,"Factor":0.96,"Voltage":232,"Current":0.634}}' 2024-10-09T03:56:21+0200 esphome/azenvy-1/sensor/wifi_signal/state 3 '-46' 2024-10-09T03:56:22+0200 tele/tasmota_F0AFC0/MARGINS 30 '{"MARGINS":{"PowerDelta":-13}}' 2024-10-09T03:56:22+0200 tele/tasmota_F0AFC0/SENSOR 227 '{"Time":"2024-10-09T02:56:21","ENERGY":{"TotalStartTime":"2024-01-03T18:39:52","Total":2743.395,"Yesterday":9.477,"Today":1.167,"Power":371,"ApparentPower":406,"ReactivePower":164,"Factor":0.91,"Voltage":235.4,"Current":1.725}}' 2024-10-09T03:56:22+0200 tele/tasmota_15812D/MARGINS 29 '{"MARGINS":{"PowerDelta":-1}}' 2024-10-09T03:56:22+0200 tele/tasmota_156AB7/MARGINS 29 '{"MARGINS":{"PowerDelta":-7}}' 2024-10-09T03:56:22+0200 tele/tasmota_156AB7/SENSOR 222 '{"Time":"2024-10-09T02:56:22","ENERGY":{"TotalStartTime":"2021-02-09T12:28:55","Total":63.890,"Yesterday":7.397,"Today":0.907,"Power":283,"ApparentPower":294,"ReactivePower":82,"Factor":0.96,"Voltage":232,"Current":1.267}}' 2024-10-09T03:56:22+0200 tele/tasmota_F0B4C6/MARGINS 29 '{"MARGINS":{"PowerDelta":-1}}' 2024-10-09T03:56:22+0200 tele/tasmota_F0B4C6/SENSOR 221 '{"Time":"2024-10-09T02:56:22","ENERGY":{"TotalStartTime":"2024-01-03T12:54:30","Total":115.839,"Yesterday":0.425,"Today":0.052,"Power":18,"ApparentPower":34,"ReactivePower":29,"Factor":0.52,"Voltage":237,"Current":0.144}}' 2024-10-09T03:56:22+0200 tele/tasmota_156D3F/MARGINS 29 '{"MARGINS":{"PowerDelta":-5}}' 2024-10-09T03:56:22+0200 tele/tasmota_156D3F/SENSOR 222 '{"Time":"2024-10-09T02:56:22","ENERGY":{"TotalStartTime":"2021-02-09T10:39:11","Total":30.280,"Yesterday":3.526,"Today":0.433,"Power":136,"ApparentPower":140,"ReactivePower":33,"Factor":0.97,"Voltage":232,"Current":0.601}}' 2024-10-09T03:56:23+0200 tele/tasmota_156D3F/MARGINS 28 '{"MARGINS":{"PowerDelta":4}}' 2024-10-09T03:56:23+0200 tele/tasmota_156D3F/SENSOR 221 '{"Time":"2024-10-09T02:56:23","ENERGY":{"TotalStartTime":"2021-02-09T10:39:11","Total":30.280,"Yesterday":3.526,"Today":0.433,"Power":140,"ApparentPower":140,"ReactivePower":0,"Factor":1.00,"Voltage":233,"Current":0.601}}' 2024-10-09T03:56:23+0200 zigbee2mqtt/bridge/logging 812 '{"level":"info","message":"z2m:mqtt: MQTT publish: topic 'zigbee2mqtt/0xa4c138f836aa56fd ', payload '{\"child_lock\":\"UNLOCK\",\"countdown\":0,\"current\":0,\"device\":{\"applicationVersion\":80,\"dateCode\":\"\",\"friendlyName\":\"0xa4c138f836aa56fd \",\"hardwareVersion\":1,\"ieeeAddr\":\"0xa4c138f836aa56fd\",\"manufacturerID\":4417,\"manufacturerName\":\"_TZ3000_w0qqde0g\",\"model\":\"TS011F_plug_1\",\"networkAddress\":7929,\"powerSource\":\"Mains (single phase)\",\"stackVersion\":0,\"type\":\"Router\",\"zclVersion\":3},\"energy\":3.54,\"indicator_mode\":\"off/on\",\"last_seen\":1728438983947,\"linkquality\":116,\"power\":0,\"power_outage_memory\":\"restore\",\"state\":\"ON\",\"update\":{\"installed_version\":80,\"latest_version\":80,\"state\":\"idle\"},\"update_available\":null,\"voltage\":235}'"}' 2024-10-09T03:56:23+0200 zigbee2mqtt/0xa4c138f836aa56fd 624 '{"child_lock":"UNLOCK","countdown":0,"current":0,"device":{"applicationVersion":80,"dateCode":"","friendlyName":"0xa4c138f836aa56fd ","hardwareVersion":1,"ieeeAddr":"0xa4c138f836aa56fd","manufacturerID":4417,"manufacturerName":"_TZ3000_w0qqde0g","model":"TS011F_plug_1","networkAddress":7929,"powerSource":"Mains (single phase)","stackVersion":0,"type":"Router","zclVersion":3},"energy":3.54,"indicator_mode":"off/on","last_seen":1728438983947,"linkquality":116,"power":0,"power_outage_memory":"restore","state":"ON","update":{"installed_version":80,"latest_version":80,"state":"idle"},"update_available":null,"voltage":235}' 2024-10-09T03:56:24+0200 zigbee2mqtt/bridge/logging 812 '{"level":"info","message":"z2m:mqtt: MQTT publish: topic 'zigbee2mqtt/0xa4c138f836aa56fd ', payload '{\"child_lock\":\"UNLOCK\",\"countdown\":0,\"current\":0,\"device\":{\"applicationVersion\":80,\"dateCode\":\"\",\"friendlyName\":\"0xa4c138f836aa56fd \",\"hardwareVersion\":1,\"ieeeAddr\":\"0xa4c138f836aa56fd\",\"manufacturerID\":4417,\"manufacturerName\":\"_TZ3000_w0qqde0g\",\"model\":\"TS011F_plug_1\",\"networkAddress\":7929,\"powerSource\":\"Mains (single phase)\",\"stackVersion\":0,\"type\":\"Router\",\"zclVersion\":3},\"energy\":3.54,\"indicator_mode\":\"off/on\",\"last_seen\":1728438984154,\"linkquality\":108,\"power\":0,\"power_outage_memory\":\"restore\",\"state\":\"ON\",\"update\":{\"installed_version\":80,\"latest_version\":80,\"state\":\"idle\"},\"update_available\":null,\"voltage\":235}'"}' 2024-10-09T03:56:24+0200 zigbee2mqtt/0xa4c138f836aa56fd 624 '{"child_lock":"UNLOCK","countdown":0,"current":0,"device":{"applicationVersion":80,"dateCode":"","friendlyName":"0xa4c138f836aa56fd ","hardwareVersion":1,"ieeeAddr":"0xa4c138f836aa56fd","manufacturerID":4417,"manufacturerName":"_TZ3000_w0qqde0g","model":"TS011F_plug_1","networkAddress":7929,"powerSource":"Mains (single phase)","stackVersion":0,"type":"Router","zclVersion":3},"energy":3.54,"indicator_mode":"off/on","last_seen":1728438984154,"linkquality":108,"power":0,"power_outage_memory":"restore","state":"ON","update":{"installed_version":80,"latest_version":80,"state":"idle"},"update_available":null,"voltage":235}' 2024-10-09T03:56:24+0200 tele/tasmota_15812D/SENSOR 230 '{"Time":"2024-10-09T02:56:23","ENERGY":{"TotalStartTime":"2024-01-08T11:34:12","Total":260.764,"Yesterday":1.524,"Today":0.187,"Power":64.0,"ApparentPower":117.5,"ReactivePower":98.5,"Factor":0.54,"Voltage":235.0,"Current":0.500}}'
Aber jeder macht sein eigenes Ding — und in seinem eigenen Datenformat.
Ich habe eine TIG-Instanz am Start (Telegraf, InfluxDB, Grafana), und im Grunde kann Telegraf wohl MQTT empfangen, parsen und in der InfluxDB versenken: allein, wie man dies mit multiplen Formaten löst, steht wieder nirgends und so manches YT-Video setzt auf Node-RED für die Umwandlung 🙁 Aber wieso Node-RED, wenn Telegraf das angeblich auch beherrscht?
Könnt‘ Ihr nicht oder wollt Ihr nicht? Mein vorheriges Setup … hat die Yucun-SSD gefressen: ConBee-II-ZigBee plus rtl433-2-MQTT in die lokale InfluxDB hat jene SSD leider kein Jahr überlebt — mit ein Grund, warum ich nun auf zigbee2mqtt setze. Aber wie parst man in Telegraf unterschiedliche Formate aus einer Datenquelle?
1 thought on “MQTT, oder: neuzeitliches Babel”
Kommentare sind geschlossen.