Closed michanismus closed 1 year ago
Hey,
has anybody be able to publish the data from Mosquitto via Telegraf into an Influx database?
I am able to receive data and to put it into Mosquitto which publish.
deye | 2023-03-24 13:10:13,564 - paho.mqtt.client - DEBUG - Received PUBACK (Mid: 860) deye | 2023-03-24 13:10:13,564 - DeyeMqttClient - DEBUG - Publishing message. topic: 'deye/dc/pv4/day_energy', value: '0.0' deye | 2023-03-24 13:10:13,564 - paho.mqtt.client - DEBUG - Sending PUBLISH (d0, q1, r0, m861), 'b'deye/dc/pv4/day_energy'', ... (3 bytes) deye | 2023-03-24 13:10:13,565 - paho.mqtt.client - DEBUG - Received PUBACK (Mid: 861) deye | 2023-03-24 13:10:13,565 - DeyeMqttClient - DEBUG - Publishing message. topic: 'deye/dc/pv4/total_energy', value: '0.0' deye | 2023-03-24 13:10:13,565 - paho.mqtt.client - DEBUG - Sending PUBLISH (d0, q1, r0, m862), 'b'deye/dc/pv4/total_energy'', ... (3 bytes) telegraf | 2023-03-24T12:10:13Z E! [inputs.mqtt_consumer] Error in plugin: collectd parser error: invalid data deye | 2023-03-24 13:10:13,565 - paho.mqtt.client - DEBUG - Received PUBACK (Mid: 862) telegraf | 2023-03-24T12:10:13Z E! [inputs.mqtt_consumer] Error in plugin: collectd parser error: invalid data deye | 2023-03-24 13:10:13,565 - DeyeMqttClient - DEBUG - Publishing message. topic: 'deye/dc/total_power', value: '157.7' deye | 2023-03-24 13:10:13,565 - paho.mqtt.client - DEBUG - Sending PUBLISH (d0, q1, r0, m863), 'b'deye/dc/total_power'', ... (5 bytes) telegraf | 2023-03-24T12:10:13Z E! [inputs.mqtt_consumer] Error in plugin: collectd parser error: invalid length 14126 mosquitto | 2023-03-24T12:10:13: Sending PUBACK to deye-inverter-4185850188 (m859, rc0) mosquitto | 2023-03-24T12:10:13: Received PUBLISH from deye-inverter-4185850188 (d0, q1, r0, m860, 'deye/dc/pv4/power', ... (3 bytes)) mosquitto | 2023-03-24T12:10:13: Sending PUBLISH to Telegraf-Consumer-KCzvL (d0, q0, r0, m0, 'deye/dc/pv4/power', ... (3 bytes)) mosquitto | 2023-03-24T12:10:13: Sending PUBACK to deye-inverter-4185850188 (m860, rc0) mosquitto | 2023-03-24T12:10:13: Received PUBLISH from deye-inverter-4185850188 (d0, q1, r0, m861, 'deye/dc/pv4/day_energy', ... (3 bytes)) mosquitto | 2023-03-24T12:10:13: Sending PUBLISH to Telegraf-Consumer-KCzvL (d0, q0, r0, m0, 'deye/dc/pv4/day_energy', ... (3 bytes)) mosquitto | 2023-03-24T12:10:13: Sending PUBACK to deye-inverter-4185850188 (m861, rc0) mosquitto | 2023-03-24T12:10:13: Received PUBLISH from deye-inverter-4185850188 (d0, q1, r0, m862, 'deye/dc/pv4/total_energy', ... (3 bytes)) mosquitto | 2023-03-24T12:10:13: Sending PUBLISH to Telegraf-Consumer-KCzvL (d0, q0, r0, m0, 'deye/dc/pv4/total_energy', ... (3 bytes)) mosquitto | 2023-03-24T12:10:13: Sending PUBACK to deye-inverter-4185850188 (m862, rc0) deye | 2023-03-24 13:10:13,565 - paho.mqtt.client - DEBUG - Received PUBACK (Mid: 863) deye | 2023-03-24 13:10:13,565 - DeyeMqttClient - DEBUG - Publishing message. topic: 'deye/operating_power', value: '0.0' deye | 2023-03-24 13:10:13,565 - paho.mqtt.client - DEBUG - Sending PUBLISH (d0, q1, r0, m864), 'b'deye/operating_power'', ... (3 bytes) telegraf | 2023-03-24T12:10:13Z E! [inputs.mqtt_consumer] Error in plugin: collectd parser error: invalid data deye | 2023-03-24 13:10:13,566 - paho.mqtt.client - DEBUG - Received PUBACK (Mid: 864) deye | 2023-03-24 13:10:13,566 - DeyeMqttClient - DEBUG - Publishing message. topic: 'deye/ac/active_power', value: '160.0' deye | 2023-03-24 13:10:13,566 - paho.mqtt.client - DEBUG - Sending PUBLISH (d0, q1, r0, m865), 'b'deye/ac/active_power'', ... (5 bytes) telegraf | 2023-03-24T12:10:13Z E! [inputs.mqtt_consumer] Error in plugin: collectd parser error: invalid length 12334 deye | 2023-03-24 13:10:13,566 - paho.mqtt.client - DEBUG - Received PUBACK (Mid: 865) deye | 2023-03-24 13:10:13,566 - DeyeMqttClient - DEBUG - Publishing message. topic: 'deye/radiator_temp', value: '21.7' deye | 2023-03-24 13:10:13,566 - paho.mqtt.client - DEBUG - Sending PUBLISH (d0, q1, r0, m866), 'b'deye/radiator_temp'', ... (4 bytes) telegraf | 2023-03-24T12:10:13Z E! [inputs.mqtt_consumer] Error in plugin: collectd parser error: invalid length 11831 mosquitto | 2023-03-24T12:10:13: Received PUBLISH from deye-inverter-4185850188 (d0, q1, r0, m863, 'deye/dc/total_power', ... (5 bytes)) mosquitto | 2023-03-24T12:10:13: Sending PUBLISH to Telegraf-Consumer-KCzvL (d0, q0, r0, m0, 'deye/dc/total_power', ... (5 bytes)) mosquitto | 2023-03-24T12:10:13: Sending PUBACK to deye-inverter-4185850188 (m863, rc0) mosquitto | 2023-03-24T12:10:13: Received PUBLISH from deye-inverter-4185850188 (d0, q1, r0, m864, 'deye/operating_power', ... (3 bytes)) mosquitto | 2023-03-24T12:10:13: Sending PUBLISH to Telegraf-Consumer-KCzvL (d0, q0, r0, m0, 'deye/operating_power', ... (3 bytes)) mosquitto | 2023-03-24T12:10:13: Sending PUBACK to deye-inverter-4185850188 (m864, rc0) mosquitto | 2023-03-24T12:10:13: Received PUBLISH from deye-inverter-4185850188 (d0, q1, r0, m865, 'deye/ac/active_power', ... (5 bytes)) mosquitto | 2023-03-24T12:10:13: Sending PUBLISH to Telegraf-Consumer-KCzvL (d0, q0, r0, m0, 'deye/ac/active_power', ... (5 bytes)) mosquitto | 2023-03-24T12:10:13: Sending PUBACK to deye-inverter-4185850188 (m865, rc0) deye | 2023-03-24 13:10:13,567 - paho.mqtt.client - DEBUG - Received PUBACK (Mid: 866) mosquitto | 2023-03-24T12:10:13: Received PUBLISH from deye-inverter-4185850188 (d0, q1, r0, m866, 'deye/radiator_temp', ... (4 bytes)) deye | 2023-03-24 13:10:13,567 - DeyeDaemon - INFO - Reading completed
I dont know how to configure a Telegraf input which can handle/process the data for storage into Influxdb... Is there a possibility to set the output format, for example JSON?
Okay, seems to work with input set to data_format = "value" and data_type = "string".
data_format = "value"
data_type = "string"
Hey,
has anybody be able to publish the data from Mosquitto via Telegraf into an Influx database?
I am able to receive data and to put it into Mosquitto which publish.
I dont know how to configure a Telegraf input which can handle/process the data for storage into Influxdb... Is there a possibility to set the output format, for example JSON?