u/Stumptown_Mike

Using the Shelly Plug US Gen4 API to automatically calculate real EV charging costs with TOU rates

Using the Shelly Plug US Gen4 API to automatically calculate real EV charging costs with TOU rates

I've been using a Shelly Plug US Gen4 on my Level 1 EV charger at home and wanted to share how I'm pulling the session data via the Shelly Cloud API to calculate actual cost per mile.

The basic flow: the Shelly captures kWh delivered and timestamps for each charging session. My app pulls that data, applies my utility's time-of-use rate schedule, and calculates exact cost per session — not an estimate based on national averages, but what I actually paid my utility for that specific session at that specific time of day.

The screenshot shows my recent sessions from the dashboard. You can see the per-session cost and kWh varying based on when I charged and which TOU tier applied (sometimes it's in-between because it blends sessions crossing TOU).

A few things I found interesting building this:

  • The Shelly data is clean and consistent — session start/end times and energy readings come through reliably
  • TOU calculations make a meaningful difference. The same kWh costs noticeably more if you charge during peak vs overnight
  • Level 1 on a standard 120V outlet works well for this — well within the Shelly's rated capacity charging overnight at 12A (my vehicle is limited to 8A due to being on a shared circuit)

Curious if anyone else is doing something similar with the Shelly API for energy cost tracking on their EV.

EV Charging Sessions Across TOU

reddit.com
u/Stumptown_Mike — 9 days ago

Is the Shelly Plug US Gen4 suitable for Level 1 EV charging?

I charge my Bolt EV overnight on a standard 120V outlet and I'm wondering if the Shelly Plug US Gen4 can handle the load. Level 1 EV charging draws around 12A continuously for several hours — well within the rated capacity on paper, but curious if anyone has real-world experience with this specific use case.

The reason I'm asking: I built a small web app that pulls session data from the Shelly API to calculate my actual cost per mile using my utility's TOU rate schedule. Before I recommend it to other EV owners I want to make sure the hardware holds up long-term.

Anyone running a Shelly Plug on an EV charger?

reddit.com
u/Stumptown_Mike — 1 month ago
▲ 0 r/BoltEV

Anyone else frustrated that the Bolt app doesn't show cost per mile?

My father-in-law is paying California gas prices and asked what my Bolt costs per mile. I had no good answer — not for him, not even for myself. The data is somewhere across my utility account and odometer readings but there's no easy way to pull it together.

I ended up plugging a Shelly smart plug (~$25) into my 120V outlet to measure exactly what goes into the car each Level 1 session, then built a little web app to calculate cost per session and cost per mile using my actual TOU rate. My number came out to $0.056/mile, which is the answer I should have had ready months ago.

Curious if others have solved this differently. The Shelly only works on 120V outlets so Level 2 folks would have to log sessions manually, but the math works either way.

reddit.com
u/Stumptown_Mike — 1 month ago