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.