ESB Smart Meter Power Usage Integration

In Ireland, we have a ESB Smart Meter which returns the In and Out usage of power by a home every 30mins. There is an API which returns this csv format data.

I’d like to create a HA integration/add-on which gets the data and then records the values into a format which HA can leverage.

This is an existing repo which has the steps for the login and downloading of the csv data

and I’d hope to reuse/integrate this with the Restful API/Scraper functions from HA.

The format of the csv data is shown below

MPRN,Meter Serial Number,Read Value,Read Type,Read Date and End Time
100012XYZ,33831590,0.006000,Active Import Interval (kW),07-06-2024 01:00
100012XYZ,33831590,0.008000,Active Export Interval (kW),07-06-2024 01:00
100012XYZ,33831590,0.009000,Active Export Interval (kW),07-06-2024 00:30
100012XYZ,33831590,0.006000,Active Import Interval (kW),07-06-2024 00:30

My question is how should i transpose this data feed and what sdk/api from HA should i call so i can track the kW In and Out usage.

Any advise/pointers would be appreciated.
Thanks

References

Do you use MariaDB or InfluxDB with your HA instance? You could insert the data there

have a look at Reading multiple rows from csv - #12 by VDRainer and it might give you a pointer in terms of reading from the CSV you have…

beyond me before I say it…but ideally we’d get the original script you linked to working with pyscript (or similar) so we could call it as a service direct from HA and update sensor data from there. From a similar perspective there are some scripts floating around Boards that will pull the Met Eireann solar forecast into HA sensors so that’s kind of what I’m on about (Boards is an Irish multi-topic general forum for anyone not familiar with it boards.ie - Wikipedia)

I’ve found the ESBN HDF files to be poor in terms of data quality. Missing data for days on end (presumably some ETL process has fallen over) etc.

Perhaps our efforts would be better focused on getting ESBN to enable the P1 port on the smart meters. That would give realtime billing data.