Importing CSV Data from digital electricity meter using Netze BW API

Hey,

im completely new to this forum so please be understanding for any mistakes i may make.

I have a problem or rather a task i want to accomplish using home assistant. Basicly im trying to get my digital electricity meter readings into home assistants power section. Here in my part of Germany the digital electricity meter ist the model “itron OpenWay® 3.HZ” and is fully operated by the grids suplier (it sends its data via LTE). So there is no direct interaction that would be possible (for example plugin in a reader or something like that).

As the electricity meter has a set of IR LEDs these could be used to read the power data using the SML protocoll, for example with an ESP8266 (described here). But unfortunately im living in an apartment house where i could place the ESP, but i would need to run it using a power bank as ironicaly there is no power outlet at the meters location.

The grids supplier is Netze BW and in their customer portal its possible to get a .csv File including the power numbers each hour of the previous day (Date;Time;consumption(kWh);meter reading(kWh) where the time is 15 minute intervals). I would like to import this data for usage in home assistant as a diagramm.

My problem is how to get the csv data into home assistant using the Netze BW API. The link for downloading is structured like this:

https://api.netze-bw.de/imsservice/v1/meter/summary/file?enddate=2%2F11%2F2022%2011%3A00%3A00%20PM&meterid=XXXXXXXXXXXXXXXXXXXXXXXXX&startdate=2%2F10%2F2022%2011%3A00%3A00%20PM&userid=XXXXXXXXXXXXXXXXXXXXXXXX&valuetype=kWh&st=2022-02-12T17%3A32%3A32.5392635Z&et=2022-02-13T17%3A32%3A32.5392651Z&sig=XXXXXXXXXXXXXXXXXXXX&subscription-key=XXXXXXXXXXXXXXXXX

The above link generates the csv file for 11.02.2021 from 0:00 AM to 12.02.2021 0:00 AM. But i can not figure out how exactly the link is build to automaticly get the last days readings. Also im not sure how to pragramm something like this. But i could imagine that it would be possible to get a integration using the above mentioned API.

My idea would be to donwload the prevois days data at for example 1 AM the next day and use something like CSV to MQTT to get the data it into Home Assistant.

Would this be possible? Has someone got a similiar problem with a good solution? Or is there maybe a better way of doing this? The easiest way would probably be the ESP method, but im not sure how much power the ESP at the meters location would need so a power bank could be sized accordingly (so it only would need to be charged aprox. every 6 months or so).

Can you make use of the scrape automation.

If you have installed a PPC smart meter gateway, you may also be able to retrieve the data via its HAN interface. Theoretically, the HAN port should even provide enough power that the reader can be operated autonomously. I am currently facing the same problem and am in exchange with a Norwegian store, whether their HAN reader is also suitable for German electricity meters with HAN port:

I also have a meter from Netze BW. If the thing with the HAN port does not work, I would try to write a custom integration for Netze BW and Home Assistant.
Even if the current aggregate levels of the measurement data on Netze BW are not so well suited for this in my opinion. :-/

The same with me. I received my pin today and can use it to display the current consumption at the electricity meter itself.
But when trying to enter the pin in the customer portal appears a 'pin invalid ".

If you have a PPC Smart Metering Gateway it might be interesting to have a look at GitHub - duswie/node-red-contrib-smgw: A Node-RED node to read data from Smart Meter Gateways (SMGWs) via the HAN interface . But it seems a long way to integrate the extracted data into Home Assistant.

The HAN interface is currently simply too poorly documented. Even my network operator could not provide me with any further helpful information.
For the time being, I am therefore simply reading the electricity meter via SML. This is at least once widely used and well documented.

You need the 14 digits alphanumeric PIN.

What alfanumeric pin and from whom do I get it? I was only sent a relatively short, purely numeric pin from Netzte-BW.

Ask [email protected] for the Messsystem-PIN

You can download the csv file and read it with a file sensor.

Hi Guys,
Are there ‘any’ updates?

I just received a letter from ‘NetzeBW’ that my current meter will be ‘soon’ replaced with a new Smartmeter…

Currently, I am using a Homematic IR interface to get the data from my meter - and I have some doupts, that this will still work with the Smart-Meter…
So I would need another way of getting the Meter-Information…

I now use this reading head and have even flashed ESPHome onto it afterwards:
Tasmota Wifi ESP01S Lesekopf für Stromzähler / Smart Meter | eBay
Everything works wonderfully

thanks.
If the IR Reader is still working, I hope that my current Homematic Device could also work with the new Meter… Maybe, I need to change some settings, but then, I have some hope :slight_smile:

Hi, magicdom98, are you still around here?

I wonder how you got an API-Access to netze.bw.de? Is there an offical way? Something on there customer portal?

And - do you have an csv importer that’s working as expected?

Greetings,
Jesko

I had contact with NetzeBW via the email addresses from the PDF.

Apparently the API doesn’t exist - the only option would be to send a CSV via email.

I think an API like this would be sooooo great - how did you get the access data?