IEC 62056-21 is an international standard for a protocol to exchange data with utility meters. Mostly for electricity but also water, thermal and other meters. It was previously known as IEC 61107
The iec62056
component allows you to read data from any compatible meter. It requires a serial port and an external optical interface.
Documentation: https://aquaticus.info/iec62056.html
Build you own meter interface: https://aquaticus.info/meter.html