ccutrer / waterfurnace_aurora

Library for communication with WaterFurnace Aurora control systems
30 stars 7 forks source link

Telegraf interface? #25

Closed BKFCAW closed 1 year ago

BKFCAW commented 1 year ago

I'm not sure where to ask about this...

I have several devices to which I have interface via Telegraf using JSON, which in turn connects to InfluxDB and then visualized in Grafana. I have tried various combinations of syntax, many of which generate errors, but when the Telegraf config file is error-free, there's no output, possibly signifying a mismatch of keywords.

I can see that the USB-ethernet connection is collecting data, both by issuing a mosquitto_sub command on the host Raspberry Pi, and by running MQTT Explorer on a nearby Linux box.

Most of my interfaces use JSON input to Telegraf, and it looks like there's a JSON output option in MQTT Explorer, and I can specify JSON in my Telegraf config file, but perhaps there is a better option.

Any suggestions on a Telegraf config file that works with Aurora MQTT data? Here is my Telegraf config file:

[agent]
  interval = "20s"
[[outputs.file]]
  files = ["stdout"]
[[inputs.mqtt_consumer]]
  servers = ["tcp://192.168.10.193:1883"]
  topics = [
  "/homie/aurora-180803112/abc/leaving-water-temperature"
  ]
  data_format json_v2 # or json (doesn't matter)

and here some debug output:

2022-11-24T21:33:17Z D! [agent] Initializing plugins
2022-11-24T21:33:17Z D! [agent] Connecting outputs
2022-11-24T21:33:17Z D! [agent] Attempting connection to [outputs.file]
2022-11-24T21:33:17Z D! [agent] Successfully connected to outputs.file
2022-11-24T21:33:17Z D! [agent] Starting service inputs
2022-11-24T21:33:17Z I! [inputs.mqtt_consumer] Connected [tcp://192.168.10.193:1883]
2022-11-24T21:33:27Z D! [outputs.file] Buffer fullness: 0 / 10000 metrics
2022-11-24T21:33:37Z D! [outputs.file] Buffer fullness: 0 / 10000 metrics
2022-11-24T21:33:47Z D! [outputs.file] Buffer fullness: 0 / 10000 metrics
2022-11-24T21:33:57Z D! [outputs.file] Buffer fullness: 0 / 10000 metrics
2022-11-24T21:34:07Z D! [outputs.file] Buffer fullness: 0 / 10000 metrics
...
BKFCAW commented 1 year ago

I'm not sure what did it, but I stumbled upon a confguration that works:

[[inputs.mqtt_consumer]]
  interval = "303s"
  servers = ["tcp://192.168.10.193:1883"]
  persistent_session = false
  qos = 0
  topics = [
  "homie/aurora-180803112/abc/entering-water-temperature",
  "homie/aurora-180803112/abc/leaving-water-temperature",
  "homie/aurora-180803112/pump/waterflow",
  "homie/aurora-180803112/compressor/speed"
  ]
  data_format = "value"
  data_type = "float"