Hello I am already reading data from ems-esp (heating system) to homeassistant via moqitto.
Now I would like to transfer data from mosqitto to influxdb2 via Telegraf.
Basically Telegraf is working already but only once. The service runs on influxdb but only transfers data on the first start.
Feb 07 11:02:04 influxdb telegraf[775]: 2025-02-07T10:02:04Z I! Loading config: /etc/telegraf/telegraf.conf
Feb 07 11:02:04 influxdb telegraf[775]: 2025-02-07T10:02:04Z I! Starting Telegraf 1.33.1 brought to you by InfluxData the makers of InfluxDB
Feb 07 11:02:04 influxdb telegraf[775]: 2025-02-07T10:02:04Z I! Available plugins: 236 inputs, 9 aggregators, 33 processors, 26 parsers, 63 outputs, 6 secret-stores
Feb 07 11:02:04 influxdb telegraf[775]: 2025-02-07T10:02:04Z I! Loaded inputs: mqtt_consumer
Feb 07 11:02:04 influxdb telegraf[775]: 2025-02-07T10:02:04Z I! Loaded aggregators:
Feb 07 11:02:04 influxdb telegraf[775]: 2025-02-07T10:02:04Z I! Loaded processors:
Feb 07 11:02:04 influxdb telegraf[775]: 2025-02-07T10:02:04Z I! Loaded secretstores:
Feb 07 11:02:04 influxdb telegraf[775]: 2025-02-07T10:02:04Z I! Loaded outputs: file influxdb_v2
Feb 07 11:02:04 influxdb telegraf[775]: 2025-02-07T10:02:04Z I! Tags enabled: host=influxdb
Feb 07 11:02:04 influxdb telegraf[775]: 2025-02-07T10:02:04Z I! [agent] Config: Interval:10s, Quiet:false, Hostname:"influxdb", Flush Interval:10s
Feb 07 11:02:04 influxdb telegraf[775]: 2025-02-07T10:02:04Z D! [agent] Initializing plugins
Feb 07 11:02:04 influxdb telegraf[775]: 2025-02-07T10:02:04Z D! [agent] Connecting outputs
Feb 07 11:02:04 influxdb telegraf[775]: 2025-02-07T10:02:04Z D! [agent] Attempting connection to [outputs.file]
Feb 07 11:02:04 influxdb telegraf[775]: 2025-02-07T10:02:04Z D! [agent] Successfully connected to outputs.file
Feb 07 11:02:04 influxdb telegraf[775]: 2025-02-07T10:02:04Z D! [agent] Attempting connection to [outputs.influxdb_v2]
Feb 07 11:02:04 influxdb telegraf[775]: 2025-02-07T10:02:04Z D! [agent] Successfully connected to outputs.influxdb_v2
Feb 07 11:02:04 influxdb telegraf[775]: 2025-02-07T10:02:04Z D! [agent] Starting service inputs
Feb 07 11:02:04 influxdb systemd[1]: Started telegraf.service - Telegraf.
░░ Subject: A start job for unit telegraf.service has finished successfully
░░ Defined-By: systemd
░░ Support: https://www.debian.org/support
░░
░░ A start job for unit telegraf.service has finished successfully.
░░
░░ The job identifier is 1401.
Feb 07 11:02:04 influxdb telegraf[775]: 2025-02-07T10:02:04Z I! [inputs.mqtt_consumer] Connected [tcp://192.168.10.146:1883]
Feb 07 11:02:14 influxdb telegraf[775]: mqtt_consumer,host=influxdb,topic=ems-esp/solar_data turnondiff=10,cylpumpmod=0,solarpumpmod=0,collectortemp=31.3,energytoday=15459,pumpminmod=5,heatcnt=0,climatezone=90,pumpworktime=83801,cylmaxtemp=60,m1worktime=0,collectormintemp=20,turnoffdiff=5,pump2worktime=0,energytotal=3312.1,collector1area=7,collectormaxtemp=120,energylasthour=0,solarpump2mod=0,cylbottomtemp=52.8 1738922524200126227
Feb 07 11:02:14 influxdb telegraf[775]: mqtt_consumer,host=influxdb,topic=ems-esp/boiler_data pumpmodmax=100,boil2hyston=0,pumpdelay=10,burnminperiod=10,burnmaxpower=100,burn2workmin=0,heatingpumpmod=0,boil2hystoff=0,selflowtemp=5,burnminpower=0,boilhyston=-6,maintenancetime=6000,heatingtemp=82,burnworkmin=194452,outdoortemp=19.8,curburnpow=0,curflowtemp=26.5,heatworkmin=168918,servicecodenumber=203,boilhystoff=6,selburnpow=0,heatstarts=9535,ubauptime=896104,burnstarts=12008,flamecurr=0,pumpmodmin=10 1738922524200210183
Feb 07 11:02:14 influxdb telegraf[775]: mqtt_consumer,host=influxdb,topic=ems-esp/boiler_data_ww wwcurtemp2=54,wwstarts=2473,wwsettemp=50,wwseltemp=50,wwmaxpower=100,wwstoragetemp2=54,wwhystoff=0,wwdisinfectiontemp=70,wwworkm=25534,wwcurtemp=54,wwflowtempoffset=40,wwcurflow=0,wwhyston=-5 1738922524200281498
Feb 07 11:02:14 influxdb telegraf[775]: mqtt_consumer,host=influxdb,topic=ems-esp/thermostat_data_hc1 maxflowtemp=48,comforttemp=22,remoteseltemp=0,tempautotemp=-1,targetflowtemp=0,manualtemp=30,reducetemp=0,minflowtemp=25,offsettemp=0,roominflfactor=4,fastheatup=0,noreducetemp=-31,nofrosttemp=5,summertemp=15,curroominfl=0,seltemp=22,designtemp=45,roominfluence=0,ecotemp=21 1738922524200336601
Feb 07 11:02:14 influxdb telegraf[775]: mqtt_consumer,host=influxdb,topic=ems-esp/thermostat_data intoffset=0,wwsettemplow=45,wwextra1=0,wwsettemp=60,dampedoutdoortemp=19.9,wwdisinfecttime=120,floordrytemp=0,wwchargeduration=60,minexttemp=-10 1738922524200386862
Feb 07 11:02:14 influxdb telegraf[775]: 2025-02-07T10:02:14Z D! [outputs.file] Wrote batch of 5 metrics in 194.489µs
Feb 07 11:02:14 influxdb telegraf[775]: 2025-02-07T10:02:14Z D! [outputs.file] Buffer fullness: 0 / 10000 metrics
Feb 07 11:02:14 influxdb telegraf[775]: 2025-02-07T10:02:14Z D! [outputs.influxdb_v2] Wrote batch of 5 metrics in 12.645894ms
Feb 07 11:02:14 influxdb telegraf[775]: 2025-02-07T10:02:14Z D! [outputs.influxdb_v2] Buffer fullness: 0 / 10000 metrics
Feb 07 11:02:24 influxdb telegraf[775]: 2025-02-07T10:02:24Z D! [outputs.influxdb_v2] Buffer fullness: 0 / 10000 metrics
Feb 07 11:02:24 influxdb telegraf[775]: 2025-02-07T10:02:24Z D! [outputs.file] Buffer fullness: 0 / 10000 metrics
Feb 07 11:02:04 influxdb telegraf[775]: 2025-02-07T10:02:04Z I! Loading config: /etc/telegraf/telegraf.conf
Feb 07 11:02:04 influxdb telegraf[775]: 2025-02-07T10:02:04Z I! Starting Telegraf 1.33.1 brought to you by InfluxData the makers of InfluxDB
Feb 07 11:02:04 influxdb telegraf[775]: 2025-02-07T10:02:04Z I! Available plugins: 236 inputs, 9 aggregators, 33 processors, 26 parsers, 63 outputs, 6 secret-stores
Feb 07 11:02:04 influxdb telegraf[775]: 2025-02-07T10:02:04Z I! Loaded inputs: mqtt_consumer
Feb 07 11:02:04 influxdb telegraf[775]: 2025-02-07T10:02:04Z I! Loaded aggregators:
Feb 07 11:02:04 influxdb telegraf[775]: 2025-02-07T10:02:04Z I! Loaded processors:
Feb 07 11:02:04 influxdb telegraf[775]: 2025-02-07T10:02:04Z I! Loaded secretstores:
Feb 07 11:02:04 influxdb telegraf[775]: 2025-02-07T10:02:04Z I! Loaded outputs: file influxdb_v2
Feb 07 11:02:04 influxdb telegraf[775]: 2025-02-07T10:02:04Z I! Tags enabled: host=influxdb
Feb 07 11:02:04 influxdb telegraf[775]: 2025-02-07T10:02:04Z I! [agent] Config: Interval:10s, Quiet:false, Hostname:"influxdb", Flush Interval:10s
Feb 07 11:02:04 influxdb telegraf[775]: 2025-02-07T10:02:04Z D! [agent] Initializing plugins
Feb 07 11:02:04 influxdb telegraf[775]: 2025-02-07T10:02:04Z D! [agent] Connecting outputs
Feb 07 11:02:04 influxdb telegraf[775]: 2025-02-07T10:02:04Z D! [agent] Attempting connection to [outputs.file]
Feb 07 11:02:04 influxdb telegraf[775]: 2025-02-07T10:02:04Z D! [agent] Successfully connected to outputs.file
Feb 07 11:02:04 influxdb telegraf[775]: 2025-02-07T10:02:04Z D! [agent] Attempting connection to [outputs.influxdb_v2]
Feb 07 11:02:04 influxdb telegraf[775]: 2025-02-07T10:02:04Z D! [agent] Successfully connected to outputs.influxdb_v2
Feb 07 11:02:04 influxdb telegraf[775]: 2025-02-07T10:02:04Z D! [agent] Starting service inputs
Feb 07 11:02:04 influxdb systemd[1]: Started telegraf.service - Telegraf.
░░ Subject: A start job for unit telegraf.service has finished successfully
░░ Defined-By: systemd
░░ Support: https://www.debian.org/support
░░
░░ A start job for unit telegraf.service has finished successfully.
░░
░░ The job identifier is 1401.
Feb 07 11:02:04 influxdb telegraf[775]: 2025-02-07T10:02:04Z I! [inputs.mqtt_consumer] Connected [tcp://192.168.10.146:1883]
Feb 07 11:02:14 influxdb telegraf[775]: mqtt_consumer,host=influxdb,topic=ems-esp/solar_data turnondiff=10,cylpumpmod=0,solarpumpmod=0,collectortemp=31.3,energytoday=15459,pumpminmod=5,heatcnt=0,climatezone=90,pumpworktime=83801,cylmaxtemp=60,m1worktime=0,collectormintemp=20,turnoffdiff=5,pump2worktime=0,energytotal=3312.1,collector1area=7,collectormaxtemp=120,energylasthour=0,solarpump2mod=0,cylbottomtemp=52.8 1738922524200126227
Feb 07 11:02:14 influxdb telegraf[775]: mqtt_consumer,host=influxdb,topic=ems-esp/boiler_data pumpmodmax=100,boil2hyston=0,pumpdelay=10,burnminperiod=10,burnmaxpower=100,burn2workmin=0,heatingpumpmod=0,boil2hystoff=0,selflowtemp=5,burnminpower=0,boilhyston=-6,maintenancetime=6000,heatingtemp=82,burnworkmin=194452,outdoortemp=19.8,curburnpow=0,curflowtemp=26.5,heatworkmin=168918,servicecodenumber=203,boilhystoff=6,selburnpow=0,heatstarts=9535,ubauptime=896104,burnstarts=12008,flamecurr=0,pumpmodmin=10 1738922524200210183
Feb 07 11:02:14 influxdb telegraf[775]: mqtt_consumer,host=influxdb,topic=ems-esp/boiler_data_ww wwcurtemp2=54,wwstarts=2473,wwsettemp=50,wwseltemp=50,wwmaxpower=100,wwstoragetemp2=54,wwhystoff=0,wwdisinfectiontemp=70,wwworkm=25534,wwcurtemp=54,wwflowtempoffset=40,wwcurflow=0,wwhyston=-5 1738922524200281498
Feb 07 11:02:14 influxdb telegraf[775]: mqtt_consumer,host=influxdb,topic=ems-esp/thermostat_data_hc1 maxflowtemp=48,comforttemp=22,remoteseltemp=0,tempautotemp=-1,targetflowtemp=0,manualtemp=30,reducetemp=0,minflowtemp=25,offsettemp=0,roominflfactor=4,fastheatup=0,noreducetemp=-31,nofrosttemp=5,summertemp=15,curroominfl=0,seltemp=22,designtemp=45,roominfluence=0,ecotemp=21 1738922524200336601
Feb 07 11:02:14 influxdb telegraf[775]: mqtt_consumer,host=influxdb,topic=ems-esp/thermostat_data intoffset=0,wwsettemplow=45,wwextra1=0,wwsettemp=60,dampedoutdoortemp=19.9,wwdisinfecttime=120,floordrytemp=0,wwchargeduration=60,minexttemp=-10 1738922524200386862
Feb 07 11:02:14 influxdb telegraf[775]: 2025-02-07T10:02:14Z D! [outputs.file] Wrote batch of 5 metrics in 194.489µs
Feb 07 11:02:14 influxdb telegraf[775]: 2025-02-07T10:02:14Z D! [outputs.file] Buffer fullness: 0 / 10000 metrics
Feb 07 11:02:14 influxdb telegraf[775]: 2025-02-07T10:02:14Z D! [outputs.influxdb_v2] Wrote batch of 5 metrics in 12.645894ms
Feb 07 11:02:14 influxdb telegraf[775]: 2025-02-07T10:02:14Z D! [outputs.influxdb_v2] Buffer fullness: 0 / 10000 metrics
Feb 07 11:02:24 influxdb telegraf[775]: 2025-02-07T10:02:24Z D! [outputs.influxdb_v2] Buffer fullness: 0 / 10000 metrics
Feb 07 11:02:24 influxdb telegraf[775]: 2025-02-07T10:02:24Z D! [outputs.file] Buffer fullness: 0 / 10000 metrics
Can somone help me to get the data into influxdb?
Do I have to adjust something in mosquitto to be able to read from homeassistant and from Telegraf?
This is the log on mosqitto on a new start of telegraf:
2025-02-07 11:39:40: Client Telegraf-Consumer-p0T9W disconnected.
2025-02-07 11:39:40: New connection from 192.168.10.101:35310 on port 1883.
2025-02-07 11:39:40: New client connected from 192.168.10.101:35310 as Telegraf-Consumer-fPBYe (p2, c1, k60, u'telegramm').
more debug information:
Feb 07 12:49:36 influxdb telegraf[877]: 2025-02-07T11:49:36Z D! [outputs.file] Buffer fullness: 0 / 10000 metrics
Feb 07 12:49:36 influxdb telegraf[877]: 2025-02-07T11:49:36Z D! [outputs.influxdb_v2] Buffer fullness: 0 / 10000 metrics
Feb 07 12:49:41 influxdb telegraf[877]: 2025-02-07T11:49:41Z D! [inputs.mqtt_consumer] [pinger] ping check59.999514447
Feb 07 12:49:46 influxdb telegraf[877]: 2025-02-07T11:49:46Z D! [inputs.mqtt_consumer] [pinger] ping check64.999583579
Feb 07 12:49:46 influxdb telegraf[877]: 2025-02-07T11:49:46Z D! [inputs.mqtt_consumer] [pinger] keepalive sending ping
Feb 07 12:49:46 influxdb telegraf[877]: 2025-02-07T11:49:46Z D! [inputs.mqtt_consumer] [net] startIncoming Received Message
Feb 07 12:49:46 influxdb telegraf[877]: 2025-02-07T11:49:46Z D! [inputs.mqtt_consumer] [net] startIncomingComms: got msg on ibound
Feb 07 12:49:46 influxdb telegraf[877]: 2025-02-07T11:49:46Z D! [inputs.mqtt_consumer] [net] startIncomingComms: received pingresp
Feb 07 12:49:46 influxdb telegraf[877]: 2025-02-07T11:49:46Z D! [inputs.mqtt_consumer] [net] logic waiting for msg on ibound
Feb 07 12:49:46 influxdb telegraf[877]: 2025-02-07T11:49:46Z D! [outputs.influxdb_v2] Buffer fullness: 0 / 10000 metrics
Feb 07 12:49:46 influxdb telegraf[877]: 2025-02-07T11:49:46Z D! [outputs.file] Buffer fullness: 0 / 10000 metrics