
Plan MAI----Own plan
To understand this blog post you need to read the post "Keeeping token cost down and evaluation test" and the other posts
MVP plan for Tesla charging scheduler
Problem
Build a lightweight local Docker app that charges a Tesla in the cheapest hours of the day while still reaching a user-defined target battery percentage by a chosen departure time.
Shared understanding
- Primary goal: reach target battery percentage by departure time.
- Cheapest-hours scheduling is the strategy used to achieve that goal.
- Tesla API usage should stay low and configurable, with reads only at defined times (for example 18:00 and 20:00) and commands used for charging control.
- Price data comes from a public Danish electricity price source only.
- The app runs locally in Docker and uses environment variables for secrets.
Proposed approach
- Create a small scheduler service that runs on a timer.
- Fetch Danish electricity prices from a public API.
- Compute the cheapest charging window(s) needed to reach the target battery percentage before departure.
- Use the Tesla API only for command execution (start/stop charging, set charge limit) and for a small number of read operations at configured times.
- Persist the last known state locally so the app can continue planning without requiring a full state refresh every run.
Key components
- Scheduler: decides when to evaluate prices and charging actions.
- Price provider: fetches and normalizes Danish hourly prices.
- Planner: calculates the cheapest charging plan for the target SoC and departure time.
- Tesla client: sends commands and performs limited state reads.
- Config layer: environment variables and optional local config file.
- Storage: local JSON/state file for last known status and plan history.
MVP scope
- One target battery percentage and one departure time per day.
- Configurable read times for Tesla state.
- Docker-based local deployment.
- Basic logging and health check endpoint.
Out of scope for MVP
- Multi-car support.
- Complex user accounts or cloud hosting.
- Price fallback to manual input.
- Advanced forecasting beyond the public price feed.
Implementation order
- Define configuration model and environment variables.
- Implement the price provider integration.
- Implement the charging planner.
- Implement the Tesla command layer and limited state reads.
- Add the scheduler loop and local state persistence.
- Package as Docker and validate the flow end-to-end.
Share this post
Related Posts

Plan Big Pickle----Own plan
To understand this blog post you need to read the post "Keeeping token cost down and evaluation test" and the other posts
July 4, 2026

Plan Kimi K2.7-coder----Own plan
To understand this blog post you need to read the post "Keeeping token cost down and evaluation test" and the other posts
July 4, 2026

Keeping token cost down and evaluation test
I asked tree different LLMs and AI "coder appa" to writhe a plan for a Tesla Charging app, with the goal of not using the token limit agains the Tesla APi (10$) free pr month. and to make the none High-end LLMs to make the plan. and i used /grill-me for all of them
July 4, 2026
Comments
Be the first to leave a comment.