To transfer the information from my smart meter from Domoticz to Home Assistant I use an extra application dsmr-reader, which reads the smart meter, stores the data in a local PostgreSQL database and shares it with Home Assistant, MQTT and InfluxDB, among others.
Every night dsmr-reader uploads the information about the gas consumption to Mindergas.nl.
For this installation I installed dsmr-reader on a Raspbery Pi and then connected the USB cable. In Domoticz I disabled the P1 Smart Meter USB. Now receive is energy consumption every 10 seconds and gas consumption in dsmr reader every hour. It then appears in the other systems as well.
To also provide insight into historical data I used a PowerShell script which imports the export of the Domoticz database into the PostgreSQL database from dsmr reader.
In time, I may want to transfer the database to my Synology NAS, so that that information is kept extra safe.