blumeops/docs/teslamate.md
Erich Blume c89e69e25f Add docs/ with blumeops zk cards (#82)
## Summary
- Move 21 blumeops-tagged zettelkasten cards from ~/code/personal/zk/ to docs/
- Create symlink ~/code/personal/zk/blumeops -> blumeops/docs for obsidian integration
- Update zk-docs mise task to read from local docs/ directory
- Add blumeops workspace to obsidian.nvim config (strict=true)

## Benefits
- Docs are now git-managed in the blumeops repo (visible on GitHub)
- Wiki links between blumeops docs continue to work via symlink
- obsidian-sync isolation: docs don't sync to work laptop
- Direct editing via obsidian.nvim with dedicated workspace

## Testing
- [x] Files moved to docs/ (21 files)
- [x] Symlink created: ~/code/personal/zk/blumeops -> blumeops/docs
- [x] zk-docs mise task updated and working
- [ ] Verify obsidian.nvim link resolution (after merge)
- [ ] Verify obsidian backlinks work

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Reviewed-on: https://forge.ops.eblu.me/eblume/blumeops/pulls/82
2026-02-02 21:40:53 -08:00

3.3 KiB

id aliases tags
teslamate
teslamate
tesla
blumeops

TeslaMate

TeslaMate is a self-hosted Tesla data logger running in Kubernetes (minikube on indri), collecting and visualizing vehicle data from the Tesla Owner API.

Service Details

What TeslaMate Collects

  • Battery level, state of charge, range estimates
  • Charging sessions (location, energy, cost, duration)
  • Drives (distance, efficiency, routes)
  • Climate/HVAC usage
  • Software update history
  • Vampire drain analysis
  • Vehicle states (asleep, driving, charging, online)

Grafana Dashboards

18 dashboards available in Grafana under the "TeslaMate" folder at https://grafana.tail8d86e.ts.net:

  • Overview, Charges, Drives, Efficiency, States
  • Battery Health, Vampire Drain, Statistics
  • Charge Level, Locations, Trip, Mileage
  • Drive Stats, Charging Stats, Projected Range
  • Timeline, Updates, Visited

Dashboards use the TeslaMate PostgreSQL datasource (not Prometheus).

Useful Commands

# View logs
kubectl --context=minikube-indri -n teslamate logs -f deployment/teslamate

# Check pod status
kubectl --context=minikube-indri -n teslamate get pods

# Restart deployment
kubectl --context=minikube-indri -n teslamate rollout restart deployment/teslamate

# Sync from ArgoCD
argocd app sync teslamate

Credentials

1Password items (blumeops vault):

  • TeslaMate - contains db_password and api_enc_key fields

Kubernetes secrets:

  • teslamate-db (teslamate ns) - DATABASE_PASS for PostgreSQL connection
  • teslamate-encryption (teslamate ns) - ENCRYPTION_KEY for token encryption
  • blumeops-pg-teslamate (databases ns) - CloudNativePG managed role password
  • grafana-teslamate-datasource (monitoring ns) - Grafana datasource password

Backup

TeslaMate data is backed up via borgmatic:

  • PostgreSQL database teslamate included in borgmatic_postgresql_databases
  • Backed up alongside miniflux to sifaka NAS

Tesla API Authentication

TeslaMate uses Tesla's Owner API (not Fleet API) via OAuth:

  1. Access https://tesla.tail8d86e.ts.net
  2. Click "Sign in with Tesla"
  3. Complete OAuth flow in browser
  4. Tokens are encrypted with ENCRYPTION_KEY and stored in database
  5. TeslaMate automatically refreshes tokens as needed

Standalone OAuth tool: If you need to manually obtain tokens, there's a Rust-based helper:

Database Notes

  • TeslaMate requires PostgreSQL 17.3+ or 18.x
  • The teslamate user has superuser privileges (required for extension management during migrations)
  • Extensions used: cube, earthdistance (for geospatial calculations)

Log

Thu Jan 23 2026

  • Initial deployment to Kubernetes
  • 18 Grafana dashboards imported from TeslaMate project
  • Upgraded CloudNativePG 1.25 -> 1.28 for major version upgrade support
  • Upgraded PostgreSQL 17.2 -> 18.1 (required for TeslaMate 2.2.0)
  • Tailscale Ingress at tesla.tail8d86e.ts.net
  • Backup configuration added to borgmatic