Spain · household energy data
Using smart-meter and inverter data without double counting.
The distributor, supplier, inverter and battery app measure different points in the system. A reliable tariff model aligns the same dates and understands each meter boundary.
“My solar produced 20 kWh” does not mean the house exported 20 kWh or avoided buying 20 kWh. The same energy can move through the home, battery and grid in ways that different apps summarise differently.
1. Name the five flows
- Solar generation: AC energy reported by the inverter or generation meter.
- Direct self-consumption: solar used by household loads at the same time.
- Battery charge and discharge: energy moved into and out of storage.
- Grid import: electricity measured entering the property from the network.
- Grid export: electricity measured leaving the property for the network.
Household load is another calculated or measured quantity. Depending on system design, the inverter app may estimate it using current transformers rather than a revenue-grade meter.
2. Start with the distributor for grid flows
The distributor operates the network meter and normally provides interval import data through its consumer portal. For an export-enabled supply, obtain export data where available. These values are the closest reference for supplier billing because the supplier receives metering information through the market process.
Download a full period rather than reading dashboard totals. Record time zone, interval length and whether data is provisional or final.
3. Use the inverter for production and operating detail
Inverter data helps explain generation, direct use, export and battery behaviour. Check whether the app’s “consumption” includes battery charging, whether “self-consumption” includes stored solar later discharged, and whether readings are measured or calculated.
Firmware, communication outages and replacement hardware can create gaps. Export raw interval data where possible and keep a note of missing periods.
Simplified daily energy balance
Use one interval boundary
- Solar generation
- 24 kWh
- Grid export
- 8 kWh
- Solar retained on site
- About 16 kWh
- Grid import
- 6 kWh
“Retained on site” can include direct use, battery charging and losses. It is not automatically the final useful self-consumption figure.
4. Account for battery losses
Energy entering a battery is greater than useful energy later delivered because the battery and power electronics have losses. Do not add battery discharge to solar generation as if it were new energy. It is a later delivery of energy charged earlier, possibly from solar and possibly from the grid.
Record battery state of charge at the start and end of the comparison period. A day that ends with a fuller battery has stored some energy for the next day; a day that starts full and ends low has used energy generated or imported earlier.
5. Align dates with the bill
Use the exact billing start and end timestamps. A calendar-month inverter report will not match a bill running from the 17th to the 16th. Daylight-saving changes can alter interval counts. Check whether a bill date is inclusive and how the portals label midnight.
Compare the import and export values billed by the supplier with distributor data first. Then use inverter data to explain what happened behind the meter.
6. Build a tariff-ready dataset
| Field | Preferred source |
|---|---|
| Timestamp and duration | Distributor export file |
| Grid import kWh | Distributor |
| Grid export kWh | Distributor |
| Solar production kWh | Inverter |
| Battery charge/discharge | Battery or inverter |
| Tariff period or price | Contract and official source |
Apply each candidate import price to grid-import intervals and the export formula to eligible grid-export intervals. Add annual power and service costs separately. This avoids subtracting generation from consumption at the wrong price.
7. Investigate differences systematically
- Confirm the same dates, time zone and interval length.
- Check whether one source is provisional or estimated.
- Identify whether battery charging is counted as household consumption.
- Check sensor direction and configuration after installation work.
- Look for communications gaps or duplicate intervals.
- Escalate persistent billing differences with downloaded evidence.
8. Protect the raw evidence
Keep original CSV files, bills and screenshots in dated folders. Do calculations on copies. Note changes to inverter settings, battery reserve, tariff or household equipment so a later year-on-year comparison does not confuse a configuration change with performance.
Official sources
- CNMC — distributor responsibilities, meter data and bill information
- IDAE — self-consumption flows and practical guidance
- BOE — Spanish self-consumption framework
Reviewed 28 August 2026. Portal availability and file formats vary by distributor and equipment manufacturer.