Landis Gyr ULTRAHEAT with volkszahler
I use a Landis Gyr ULTRAHEAT®T550 (UH50) meter to measure my district heating consumption. As I have used “smart” technology throughout my home, I also wanted to integrate this meter, enabling me to collect and later display its measurements.
During my research on how to get values from the meter, I came across the Volkszähler project. Conveniently, there was an existing wiki entry specifically for the UH50 meter. After ordering all the necessary parts, I found some free time between Christmas and New Year’s to put everything together.
- Hichi IR Reader Head
- Raspberry Pi 4B
- 32 GB SD Card
- 4 Jumper wires
- 5 V USB Charger + USB-C Cable
- Soldering iron and solder
Raspberry Pi and hardware preparation
I installed the Volkszähler Pi image, which needs to be unzipping and flashed it using the Raspberry Pi Imager. I utilized the first serial port on the Pi, but to enable its use, it was necessary to disable the serial console. This was done by executing sudo raspi-config
, then navigating to 3 Interface Options -> I6 Serial Ports
and selecting ‘No’ for the login shell to be accessible over serial, followed by ‘Yes’ to enable the serial port hardware (see also screenshots at the end).
To confirm the changes, execute cat /boot/cmdline.txt
. The output should resemble the following for a successful configuration:
|
|
For connecting the IR Reader Head, I used the Raspberry Pi’s pins 4 (5 V), 6 (Ground), 8 (GPIO 14 TXD), and 10 (GPIO 15 RXD).
Because I often forget whether the RX and TX wires should be crossed, I conducted a test. By executing yes > /dev/serial0
, data is continuously written to serial0
. To verify if the data was being transmitted through the infrared LED, I used my phone camera. While infrared light is not visible to the naked eye, it can be detected by a camera. This method allowed me to confirm the data transmission without directly seeing the IR light.
Having confirmed the functionality of the hardware, I am now ready to proceed with the software setup.
Volkszaehler configuration
I accessed the Volkszaehler web interface and added two new channels corresponding to the identifiers 6.8 and 6.26, as specified in the configuration example. I then replaced the sample UUIDs in the configuration json with the ones generated for the channels I newly created.
I modified the api
to volkszaehler
and added the middleware
attribute in the channels
configuration.
|
|
Starting with the default configuration, I only modified the device setting to /dev/serial0
. After applying this change, I restarted the service using the command sudo service vzlogger restart
. The log files, located at /var/log/vzlogger/vzlogger.log
, showed entries that appeared promising, indicating that the changes were successful.
|
|
Despite the setup, no values were displayed in the web interface. I encountered a recurring error message: Failed to parse obis code
, which was unclear to me. Seeking a solution, I turned to Google and discovered discussions where others faced similar issues with the UH50 meter (discussion one, discussion two). Through this research, I learned about the dump_file
parameter, which logs raw serial data. This data provided a deeper insight into the issue I was facing.
|
|
It appeared that part of the initial data was being truncated. To address this, I experimented with various parameters and ultimately set the baudrate_change_delay
to 400. Following this adjustment, I restarted the vzlogger service. This time, the readings began correctly, starting with the identifier 6.8 and then 6.26, exactly as specified in the vzlogger.conf
configuration. These identifiers are likely OBIS codes, a standard for energy metering. (For more detailed information on these identifiers, you can refer to this documentation.)
|
|
At last, the web UI began displaying values, indicating that the setup was functioning correctly and the adjustments made were effective.
While the values displayed in the web UI were not correctly configured and didn’t make much sense, I wasn’t too concerned about it at the moment. My ultimate goal is to have these values feed into an InfluxDB, which I haven’t set up yet. For now, I verified that the meter readings are being stored in the MySQL database on the Raspberry Pi, which is a great start. I will migrate the data to InfluxDB later.
Below is my entire configuration file for reference.
|
|
Outlook
I have future plans to enhance the system. My objective is to transition from the Raspberry Pi setup to directly integrating the meter readings into my KNX home automation bus. To facilitate this, I intend to use the MiniBCU from the OpenKNX project. This will allow a direct connection of the IR Head to the KNX bus, streamlining the data integration into my home automation system.
Note: While I documented everything it was a little late already. I may missed some details. If so let me know :)