Metermon is a dockerized rtlamr wrapper that connects to an existing rtl_tcp instance and outputs formatted messages over MQTT for consumption by other software (e.g. telegraf for storage in influxdb and display in grafana, or import into Home Assistant).
The script can be run using docker (takes care of all dependencies) or standalone. It is designed to run on Raspberry Pi or similar.
By pulling apart this container it should be possible to figure out how to do this.
This project is a software defined radio receiver for these messages. We make use of an inexpensive rtl-sdr dongle to allow users to non-invasively record and analyze the commodity consumption of their household. Designed with ERT-compatible smart meters i mind.