Conntecting a Technische Alternative UVR1611 to InfluxDB and MQTT

My home has a heating control with an Ethernet port. Or to be exact: It has an heating control with a bus where it’s possible to connect a gateway with a Ethernet Port. It’s the UVR1611 from Technische Alternative. It’s quite a capable controller, especially if you use solarthermal heating as well. You can connect multiple of them and put them to work together.

For some time I used the vendor tools to get a visualization of the parameters of my heating system. However after putting data of a particulate matter sensor into an InfluxDB it was quite obvious to me to do the same for the heating. Especially as I have already a Raspberry Pi running that is doing nothing else than just collecting data from various log sources. Recently Technische Alternative documented an JSON interface for the data, so getting to the data is easy than in the past where you hat do trick around with a visualization schema running on the CMI and web page grabbing. The documentation is available at Technische Alternative

At start: I could have done it with Telegraf as well. You can take JSON and directly pipe it into InfluxDB with it. However my script has a second task: It publishes all values of my UVR via MQTT. That’s where this script initially started. And as I’m already processing the data, it was easy to add the data into InfluxDB. And the identifying strings are a little bit more speaking than the ones Telegraf would use. When I have some time I will add authentication to the script, but my visualization MQTT is currently running without authentication. The MQTT doing real stuff is of course password protected.

I just put my script and the config file I’m using into github. Its started like cmi2influx.cnf. It’s called every minute by cron. You can’t run this script more often than once per minute. The CMI interface just allows you to gather the data once per minute.

When you use the script, you have to install some libraries that are probably not in your default python installation:
pip3 install influxdb
pip3 install ConfigParser
pip3 install paho-mqtt

Perhaps this is useful for some or the other having a UVR1611 in the basement.

Usual disclaimer applies: It’s really quick and dirty bad python code. May have gapping security holes, may break things. The script doesn’t catch errors because all that happens when something doesn’t work are some missing minutes in the recording. Works in my environment. Do whatever you want with it. Check it and adapt it for your own needs. Don’t ask me ;-)