Using the Technische Alternative CMI with Telegraf

My heating system is controlled by an UVR1611 from Technische Alternative as i have to control a wood pellets heater and solar thermal collectors on the roof in a rather unusual configuration and the UVR is a quite universal controller (hence the U in the name ;) ). The system is CANbus based and you can extend really nicely. One of the extensions i’m using is the Computer Management Interface(CMI) which allows me to access the heating control from my network.

For a long time i’ve used a python script to to import the data directly into InfluxDB. I knew when i wrote the script that i could do this with Telegraf, however i did some preprocessing in the script and some additional distribution of the data i couln’t to with Telegraf. However the addtional processing fall out of use and thus i could simplify stuff a little bit. So i migrated the mechanism to pure Telegraf.

  urls = [
  username = "admin"
  password = "<password>"
  data_format = "json"
  interval = "60s"
  fieldpass = [
      "Data_Network Analog_1_Value_Value",
      "Data_Network Analog_2_Value_Value",
   sourcedevice = "cmi"
   cminode = "node 31"

    sourcedevice = ["cmi"]
    field = "Data_Network Analog_1_Value_Value"
    dest = "pufferspeicheroben"
    field = "Data_Network Analog_2_Value_Value"
    dest = "pufferspeicherunten"
    field = "Data_Inputs_4_Value_Value"
    dest = "Warmwasserspeicher"
    field = "Data_Inputs_9_Value_Value"
    dest = "Vorlauftemperatur"
    field = "Data_Inputs_10_Value_Value"
    dest = "Heizungsaussentemperatur"
    field = "Data_Outputs_2_Value_Value"
    dest = "Warmwasserladepumpe"
    field = "Data_Outputs_3_Value_Value"
    dest = "Heizkreispumpe"
    field = "Data_Outputs_4_Value_Value"
    dest = "Kesselanforderung"

When using this configuration, the data from the CMI will appear with fields like this.

Data_Network Analog_1_Value_Value

The number (for example the 4 in Data_Outputs_4_Value_Value) is always one less the number of the real port … so 4 is the Data Output Port 5).

If you run the configuration in test mode with --test it will translate the input into the following measurement:

http,cminode=node\ 31,host=server,sourcedevice=cmi,url=http://<ip>/INCLUDE/api.cgi?jsonnode\=31&jsonparam\=I\,O\,Na Heizkreispumpe=1,Heizungsaussentemperatur=17.5,Kesselanforderung=1,Vorlauftemperatur=51.3,Warmwasserladepumpe=0,Warmwasserspeicher=52.6,pufferspeicheroben=74.4,pufferspeicherunten=74.8 1613717063000000000

To make this a little bit more readable most of my Telegraf configuration is about renameing stuff. As Telegraf can diretly read JSON data and the CMI can deliver data in JSON getting and processing the data is really easy. I won’t explain what’s the exact meaning of the names. For owners of the UVR1611 it’s quite obvious. Otherwise you could look in the API documentation i will link below.

A number of additional remarks

One of my future projects is integrating the lambda sensor of the heating system into my monitoring but this is something for my next vacation.