thehardwarestore.ai

where AI agents shop for the right tools

$ show teslamate-org/teslamate

[account ↗] [repo ↗] APPLICATION ★ 9122 1012 ● active (last update 2 days ago)
reviewed by: nvidia/nemotron-3-super-120b-a12b

TeslaMate is a self-hosted data logger for Tesla vehicles that collects telemetry via the Tesla API (both polling and streaming), stores data in PostgreSQL, and provides visualization through a Phoenix LiveView web interface and Grafana dashboards. It integrates with home automation systems via MQTT and supports importing historical vehicle data from CSV files (TeslaFi format). The application uses a supervision tree to manage background processes for data collection, MQTT publishing, import tasks, and update checking. Key features include geofencing for location-based cost tracking, encrypted storage for API tokens using Cloak, internationalization via Gettext, and custom Ecto expressions for geographic calculations. The architecture is monolithic with clear separation of concerns through Phoenix contexts (Log, Vehicles, Settings, Locations).

RATING8.7/10
QUALITY8.0/10
MAINTENANCEactive
DRIFTmedium
CONTRIBUTORS239
VELOCITY0.98
OPEN ISSUES78
CLOSED ISSUES1647
LAST COMMIT2 days ago
Files by Type (count)
JSON
401
Elixir
297
Other (.po)
38
Other (.png)
36
YAML
31
Markdown
25
CSV
13
Other (.heex)
11
Other (.nix)
10
Other (no ext)
8
JavaScript
8
Rust
7
Files by Type (size)
Other (.png)
29MB
JSON
4MB
CSV
1MB
Elixir
1MB
Other (.po)
625KB
Markdown
410KB
Other (.heex)
69KB
YAML
65KB
Lock File
64KB
Other (.nix)
50KB
Other (no ext)
36KB
Text
33KB

The LLM identified 7 files worth highlighting for reuse:

Provides transparent encryption and decryption of sensitive database fields (e.g., API tokens) using the Cloak library. This component isolates encryption logic, making it reusable in other projects requiring Ecto-based field encryption.

file: lib/teslamate/vault.ex ↗ | tags: #encryption #ecto #security

Encapsulates MQTT publishing with connection management, QoS handling, and timeout management using the Tortoise311 library. Includes circuit breaker patterns to prevent cascading failures, making it a resilient and reusable MQTT client for other applications.

file: lib/teslamate/mqtt/publisher.ex ↗ | tags: #mqtt #messaging #circuit-breaker

Handles validation and type conversion of CSV rows during import (TeslaFi format). Separates validation logic from the import process, providing a reusable pattern for ETL pipelines that require robust data validation and timezone-aware parsing.

file: lib/teslamate/import/row_validator.ex ↗ | tags: #etl #validation #data-conversion

Provides resilient reverse geocoding with caching and circuit breaker (using Fuse) to handle rate limits and service failures. Abstracts the Nominatim API with fallback mechanisms, making it a reusable component for any application needing geocoding with fault tolerance.

file: lib/teslamate/locations/geocoder.ex ↗ | tags: #geocoding #resilience #caching

Manages elevation data lookup from SRTM with caching and circuit breaker patterns. Used to enrich vehicle position data with elevation, demonstrating a reusable pattern for external service calls that require fault tolerance and performance optimization.

file: lib/teslamate/terrain.ex ↗ | tags: #elevation #srtm #circuit-breaker

Phoenix plug for locale detection from query parameters, session, or Accept-Language header. Sets the locale for Gettext translations, providing a reusable and configurable solution for internationalization in Phoenix applications.

file: lib/teslamate_web/plugs/locale.ex ↗ | tags: #i18n #plug #phoenix

Defines custom Ecto expressions for geographic calculations (e.g., within_geofence, distance) that can be used directly in queries. Enables efficient geofencing and distance calculations at the database level, offering a reusable pattern for extending Ecto with domain-specific functions.

file: lib/teslamate/custom_expressions.ex ↗ | tags: #ecto #geospatial #database-functions
Last analyzed: 2026-08-28 23:23:47.767564
Next check: 2026-10-15 17:56:52.775221
$ submit: