Skip to content

appspace/kwwhat

Repository files navigation

⚡ kwwhat: open-source dbt models for EV charger analytics

dbt models for OCPP logs here


kwwhat is an open-source dbt project that models reliability and utilization metrics from EV charger logs based on the OCPP 1.6 and 2.0.1 protocols. Starting from raw OCPP logs, the project builds a transparent path toward meaningful metrics like uptime, session success, and visit-level outcomes.

This project is powered by public OCPP log data and is designed for CSMS providers, utilities, researchers, and data practitioners aiming to build their own charger analytics stack.


What’s included

kwwhat includes:

  • Source modeling for raw OCPP logs (StatusNotification, Heartbeat, Start/StopTransaction)
  • Session and visit grouping logic
  • Core metrics like:
    • Outages: from, to, type
    • Port _uptime (% time chargers heartbeating and ports not faulted - a solid base for calculating uptime by adding maintenance and exclusion rules)
    • Attempt success
    • Visit success
    • First attempt success rate
    • Troubled success rate
  • Public OCPP logs for realistic examples
  • Modular dbt structure to plug into your existing stack
  • Interval data for other reporting use cases that require energy delivery by 15-min time slices

Check Tableau dashboard here


Definitions

Charger definitions aligned with National Electric Vehicle Infrastructure (NEVI) standards

  • Charger means a device with one or more charging ports and connectors for charging EVs. Also referred to as Electric Vehicle Supply Equipment (EVSE).
  • Charging port means the system within a charger that charges one EV. A charging port may have multiple connectors, but it can provide power to charge only one EV through one connector at a time.
  • Connector means the device that attaches an EV to a charging port in order to transfer electricity.

Source: 23 CFR §680.104 — National Electric Vehicle Infrastructure Standards and Requirements

Success criteria

Charge attempt is successful when:

  • there is a transaction (energy transfer)
  • next connector status is not ‘Faulted'
  • transaction stop reason is 'Local’ or ‘Remote’ or ‘EVDisconnected'
  • energy transferred is above 0.1 kWh

partially borrowed from https://github.com/chargex-consortium/OCPP-2.0.1-Interim-KPI-Calculator

Visits is successful when the last attempt of the visit is successful.

a modification of visit success when at least one charge attempt is successful here Customer-Focused Key Performance Indicators (KPIs) for Electric Vehicle Charging


Installation

git clone https://github.com/YOUR_USERNAME/kwwhat.git
cd kwwhat

Then update your profiles.yml to point to your raw data location (e.g., DuckDB, BigQuery, Snowflake, Redshift, etc.).


Example metrics

Metric Description
_uptime_pct % of time a charger had a regular heartbeat and port was not in a Faulted state
visit_success_rate % of visits that result in meaningful energy transfer. Visit is a rollup of sessions generated by the same driver on the co-located chargers close in time
first_attempt_success_rate Visits where the first charging attempt succeeded
troubled_success_rate Visits that initially failed but succeeded sfter some troubleshooting

Data sources & attribution

Seed data was generated with OCPP synthetic log generator

Use dbt seed command to add seed data to your warehouse.


Insights & References

Designed based on industry frameworks and academic research to align metrics with real-world expectations:


Disclaimer

This project was created independently and outside of any prior employment. It does not include any proprietary information, logic, or data.


License

The kwwhat project is licensed under the MIT License. External datasets and tools used in this repo follow their respective licenses as noted above.


Contributing

Open to contributions from the EV data community. If you’re building in this space and want to improve reliability tracking, user experience analytics, or charger diagnostics — join in!


Contact

Questions? Ideas? Drop an issue or find us on LinkedIn kwwhat

About

dbt models for OCPP logs

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •