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.
When using this configuration, the data from the CMI will appear with fields like this.
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:
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
- You have to use the admin user on the cmi and itss password for this to work. This is one of the things i don’t like about the CMI.
- An interval shorter than 1 minute is not useful. The CMI allows you not more than one access to the data per minute. I think that is more than sufficient. Heating systems are rather slow creatures.
- Of course you have to adapt the script to your own configuration. You have to change the more speaking names in the rename part of the configuration but more important you have to change the
fieldpasssection as this configuration just allows to pass the data into further processing that is of interest to me … otherwise you InfluxDB will look quite messy as all datapoints are processed.
- The documentation for the JSON interface is available here.
- For a short time my password was in the configuration in this blog entry. I have changed it. ;)
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.