Showing preview only (4,482K chars total). Download the full file or copy to clipboard to get everything.
Repository: teslamate-org/teslamate
Branch: main
Commit: a6d541b51eee
Files: 427
Total size: 4.2 MB
Directory structure:
gitextract_eqx17o02/
├── .credo.exs
├── .dialyzer_ignore.exs
├── .dockerignore
├── .envrc
├── .formatter.exs
├── .github/
│ ├── ISSUE_TEMPLATE/
│ │ ├── bug_report.yml
│ │ └── config.yml
│ ├── actions/
│ │ ├── build/
│ │ │ └── action.yml
│ │ ├── grafana/
│ │ │ └── action.yml
│ │ ├── merge/
│ │ │ └── action.yml
│ │ └── setup-elixir-and-cache-deps/
│ │ └── action.yml
│ ├── dependabot.yml
│ └── workflows/
│ ├── buildx.yml
│ ├── check_if_pr_from_outside_repo.yml
│ ├── check_paths.yml
│ ├── cleanup_caches.yml
│ ├── cleanup_largest_caches.yml
│ ├── devops.yml
│ ├── elixir_dep_verification_and_static_analysis.yml
│ ├── elixir_test.yml
│ ├── ensure_linting.yml
│ ├── ghcr_build.yml
│ ├── ghcr_purge.yml
│ ├── spell_check.yml
│ ├── stale.yml
│ └── update-flake-lock.yml
├── .gitignore
├── .markdownlint.yaml
├── .node-version
├── .typos.toml
├── CHANGELOG.md
├── CONTRIBUTING
├── Dockerfile
├── LICENSE
├── Makefile
├── README.md
├── SECURITY.md
├── TRADEMARK.md
├── VERSION
├── assets/
│ ├── css/
│ │ ├── app.scss
│ │ ├── themes/
│ │ │ ├── dark.scss
│ │ │ └── light.scss
│ │ └── vendor/
│ │ └── modal-fx.scss
│ ├── js/
│ │ ├── app.js
│ │ ├── hooks.js
│ │ ├── main.js
│ │ └── socket.js
│ ├── package.json
│ └── scripts/
│ └── build.js
├── config/
│ ├── config.exs
│ ├── dev.exs
│ ├── prod.exs
│ ├── runtime.exs
│ └── test.exs
├── coveralls.json
├── entrypoint.sh
├── flake.nix
├── grafana/
│ ├── Dockerfile
│ ├── dashboards/
│ │ ├── battery-health.json
│ │ ├── charge-level.json
│ │ ├── charges.json
│ │ ├── charging-stats.json
│ │ ├── database-info.json
│ │ ├── drive-stats.json
│ │ ├── drives.json
│ │ ├── efficiency.json
│ │ ├── internal/
│ │ │ ├── charge-details.json
│ │ │ ├── drive-details.json
│ │ │ └── home.json
│ │ ├── locations.json
│ │ ├── mileage.json
│ │ ├── overview.json
│ │ ├── projected-range.json
│ │ ├── reports/
│ │ │ └── dutch-tax.json
│ │ ├── states.json
│ │ ├── statistics.json
│ │ ├── timeline.json
│ │ ├── trip.json
│ │ ├── updates.json
│ │ ├── vampire-drain.json
│ │ └── visited.json
│ ├── dashboards.sh
│ ├── dashboards.yml
│ └── datasource.yml
├── lib/
│ ├── tesla_api/
│ │ ├── auth/
│ │ │ └── refresh.ex
│ │ ├── auth.ex
│ │ ├── error.ex
│ │ ├── middleware/
│ │ │ ├── follow_redirects.ex
│ │ │ └── token_auth.ex
│ │ ├── stream/
│ │ │ └── data.ex
│ │ ├── stream.ex
│ │ ├── vehicle/
│ │ │ └── state.ex
│ │ └── vehicle.ex
│ ├── tesla_api.ex
│ ├── teslamate/
│ │ ├── api.ex
│ │ ├── application.ex
│ │ ├── auth/
│ │ │ └── tokens.ex
│ │ ├── auth.ex
│ │ ├── convert.ex
│ │ ├── custom_expressions.ex
│ │ ├── database_check.ex
│ │ ├── dependency.ex
│ │ ├── http.ex
│ │ ├── import/
│ │ │ ├── csv.ex
│ │ │ ├── fake_api.ex
│ │ │ └── line_parser.ex
│ │ ├── import.ex
│ │ ├── locations/
│ │ │ ├── address.ex
│ │ │ ├── geo_fence.ex
│ │ │ └── geocoder.ex
│ │ ├── locations.ex
│ │ ├── log/
│ │ │ ├── car.ex
│ │ │ ├── charge.ex
│ │ │ ├── charging_process.ex
│ │ │ ├── drive.ex
│ │ │ ├── position.ex
│ │ │ ├── state.ex
│ │ │ └── update.ex
│ │ ├── log.ex
│ │ ├── mqtt/
│ │ │ ├── handler.ex
│ │ │ ├── publisher.ex
│ │ │ ├── pubsub/
│ │ │ │ └── vehicle_subscriber.ex
│ │ │ └── pubsub.ex
│ │ ├── mqtt.ex
│ │ ├── release.ex
│ │ ├── repair.ex
│ │ ├── repo.ex
│ │ ├── settings/
│ │ │ ├── car_settings.ex
│ │ │ └── global_settings.ex
│ │ ├── settings.ex
│ │ ├── terrain.ex
│ │ ├── updater.ex
│ │ ├── vault.ex
│ │ ├── vehicles/
│ │ │ ├── vehicle/
│ │ │ │ └── summary.ex
│ │ │ └── vehicle.ex
│ │ └── vehicles.ex
│ ├── teslamate.ex
│ ├── teslamate_web/
│ │ ├── cldr.ex
│ │ ├── controllers/
│ │ │ ├── car_controller.ex
│ │ │ ├── drive_controller.ex
│ │ │ └── fallback_controller.ex
│ │ ├── endpoint.ex
│ │ ├── gettext.ex
│ │ ├── health_check.ex
│ │ ├── live/
│ │ │ ├── car_live/
│ │ │ │ ├── index.ex
│ │ │ │ ├── index.html.heex
│ │ │ │ ├── summary.ex
│ │ │ │ └── summary.html.heex
│ │ │ ├── charge_live/
│ │ │ │ ├── cost.ex
│ │ │ │ └── cost.html.heex
│ │ │ ├── geofence_live/
│ │ │ │ ├── form.ex
│ │ │ │ ├── form.html.heex
│ │ │ │ ├── index.ex
│ │ │ │ └── index.html.heex
│ │ │ ├── import_live/
│ │ │ │ ├── index.ex
│ │ │ │ └── index.html.heex
│ │ │ ├── init_assigns.ex
│ │ │ ├── settings_live/
│ │ │ │ ├── index.ex
│ │ │ │ └── index.html.heex
│ │ │ └── signin_live/
│ │ │ ├── index.ex
│ │ │ └── index.html.heex
│ │ ├── plugs/
│ │ │ └── put_session.ex
│ │ ├── router.ex
│ │ ├── templates/
│ │ │ ├── drive/
│ │ │ │ └── gpx.xml.eex
│ │ │ └── layout/
│ │ │ ├── app.html.heex
│ │ │ ├── live.html.heex
│ │ │ ├── root.html.heex
│ │ │ └── root.xml.eex
│ │ └── views/
│ │ ├── car_view.ex
│ │ ├── changeset_view.ex
│ │ ├── drive_view.ex
│ │ ├── error_helpers.ex
│ │ ├── error_view.ex
│ │ └── layout_view.ex
│ └── teslamate_web.ex
├── mix.exs
├── nix/
│ ├── backup_and_restore.nix
│ ├── flake-modules/
│ │ ├── checks.nix
│ │ ├── devenv.nix
│ │ ├── formatter.nix
│ │ └── package.nix
│ ├── maintenance.nix
│ └── module.nix
├── priv/
│ ├── gettext/
│ │ ├── ca/
│ │ │ └── LC_MESSAGES/
│ │ │ ├── default.po
│ │ │ └── errors.po
│ │ ├── da/
│ │ │ └── LC_MESSAGES/
│ │ │ ├── default.po
│ │ │ └── errors.po
│ │ ├── de/
│ │ │ └── LC_MESSAGES/
│ │ │ ├── default.po
│ │ │ └── errors.po
│ │ ├── default.pot
│ │ ├── en/
│ │ │ └── LC_MESSAGES/
│ │ │ ├── default.po
│ │ │ └── errors.po
│ │ ├── errors.pot
│ │ ├── es/
│ │ │ └── LC_MESSAGES/
│ │ │ ├── default.po
│ │ │ └── errors.po
│ │ ├── fi/
│ │ │ └── LC_MESSAGES/
│ │ │ ├── default.po
│ │ │ └── errors.po
│ │ ├── fr/
│ │ │ └── LC_MESSAGES/
│ │ │ ├── default.po
│ │ │ └── errors.po
│ │ ├── it/
│ │ │ └── LC_MESSAGES/
│ │ │ ├── default.po
│ │ │ └── errors.po
│ │ ├── ja/
│ │ │ └── LC_MESSAGES/
│ │ │ ├── default.po
│ │ │ └── errors.po
│ │ ├── ko/
│ │ │ └── LC_MESSAGES/
│ │ │ ├── default.po
│ │ │ └── errors.po
│ │ ├── nb/
│ │ │ └── LC_MESSAGES/
│ │ │ ├── default.po
│ │ │ └── errors.po
│ │ ├── nl/
│ │ │ └── LC_MESSAGES/
│ │ │ ├── default.po
│ │ │ └── errors.po
│ │ ├── sv/
│ │ │ └── LC_MESSAGES/
│ │ │ ├── default.po
│ │ │ └── errors.po
│ │ ├── th/
│ │ │ └── LC_MESSAGES/
│ │ │ ├── default.po
│ │ │ └── errors.po
│ │ ├── tr/
│ │ │ └── LC_MESSAGES/
│ │ │ ├── default.po
│ │ │ └── errors.po
│ │ ├── uk/
│ │ │ └── LC_MESSAGES/
│ │ │ ├── default.po
│ │ │ └── errors.po
│ │ ├── zh_Hans/
│ │ │ └── LC_MESSAGES/
│ │ │ ├── default.po
│ │ │ └── errors.po
│ │ └── zh_Hant/
│ │ └── LC_MESSAGES/
│ │ ├── default.po
│ │ └── errors.po
│ ├── repo/
│ │ ├── migrations/
│ │ │ ├── .formatter.exs
│ │ │ ├── 20190330150000_create_car.exs
│ │ │ ├── 20190330160000_create_trips.exs
│ │ │ ├── 20190330170000_create_positions.exs
│ │ │ ├── 20190330180000_create_states.exs
│ │ │ ├── 20190330190000_create_charging_processes.exs
│ │ │ ├── 20190330200000_create_charges.exs
│ │ │ ├── 20190408203117_create_updates.exs
│ │ │ ├── 20190415103933_add_inside_temp.exs
│ │ │ ├── 20190415115227_add_battery_heater_fields.exs
│ │ │ ├── 20190415130006_create_addresses.exs
│ │ │ ├── 20190415130705_add_addresses_to_trips.exs
│ │ │ ├── 20190415192200_add_address_to_charging_process.exs
│ │ │ ├── 20190416125429_add_indexes_on_dates.exs
│ │ │ ├── 20190525125700_rename_soc_fields.exs
│ │ │ ├── 20190717184003_add_fkey_indexes.exs
│ │ │ ├── 20190729142656_add_conversion_functions.exs
│ │ │ ├── 20190729181314_fix_trip_efficiency.exs
│ │ │ ├── 20190730101523_create_tokens.exs
│ │ │ ├── 20190731154452_create_settings.exs
│ │ │ ├── 20190805092941_fix_incomplete_charging_processes.exs
│ │ │ ├── 20190810105216_unit_of_length_and_temperature.exs
│ │ │ ├── 20190810131321_persist_suspend_settings.exs
│ │ │ ├── 20190810151901_create_geofences.exs
│ │ │ ├── 20190812191616_rename_trips_to_drives.exs
│ │ │ ├── 20190813184320_fix_incomplete_charging_processes_v2.exs
│ │ │ ├── 20190814152810_increase_suspend_min.exs
│ │ │ ├── 20190816165713_extend_car_table.exs
│ │ │ ├── 20190816200723_add_est_battery_range_km.exs
│ │ │ ├── 20190821143938_add_constraints.exs
│ │ │ ├── 20190821155748_drop_consumption_columns.exs
│ │ │ ├── 20190823173437_add_sleep_requirements.exs
│ │ │ ├── 20190826142828_fix_incomplete_charging_processes_v3.exs
│ │ │ ├── 20190828094708_add_battery_range.exs
│ │ │ ├── 20190828104902_add_elevation.exs
│ │ │ ├── 20190828122529_add_m_to_ft_conversion_helper.exs
│ │ │ ├── 20190828150058_do_not_require_efficiency.exs
│ │ │ ├── 20190903151524_add_unique_index_on_vins.exs
│ │ │ ├── 20190913165850_add_range_enum.exs
│ │ │ ├── 20190913175011_add_rated_range_to_drives.exs
│ │ │ ├── 20190913175543_set_start_and_end_rated_range_km.exs
│ │ │ ├── 20190925152807_create_geo_extensions.exs
│ │ │ ├── 20190925161034_create_index_on_address_positions.exs
│ │ │ ├── 20190925182253_add_geofence_id_to_addresses.exs
│ │ │ ├── 20190928155641_add_base_url_setting.exs
│ │ │ ├── 20191003130650_add_start_and_end_position_to_drives.exs
│ │ │ ├── 20191003132415_add_position_ids_and_apply_geofences.exs
│ │ │ ├── 20191007105010_add_new_fkey_indexes.exs
│ │ │ ├── 20191008191431_fix_ll_to_earth.exs
│ │ │ ├── 20191017003836_add_est_total_charge_energy.exs
│ │ │ ├── 20191020130234_increase_datetime_precision.exs
│ │ │ ├── 20191026144449_drop_cp_confidence_and_interval.exs
│ │ │ ├── 20191026145925_phase_correction.exs
│ │ │ ├── 20191026185642_calculate_charge_energy_used.exs
│ │ │ ├── 20191117042320_add_cost_field_to_charges.exs
│ │ │ ├── 20191117143038_add_grafana_url.exs
│ │ │ ├── 20191117171307_car_settings.exs
│ │ │ ├── 20191119162847_geofence_sleep.exs
│ │ │ ├── 20191212215130_remove_phase_correction.exs
│ │ │ ├── 20191212230527_recalc_energy_used.exs
│ │ │ ├── 20200103073606_add_usable_battery_level.exs
│ │ │ ├── 20200116190926_charges_add_usable_battery_level.exs
│ │ │ ├── 20200120130125_add_language.exs
│ │ │ ├── 20200120142602_replace_place_id_with_osmid.exs
│ │ │ ├── 20200203120311_cascade_delete.exs
│ │ │ ├── 20200203180529_location_based_charge_cost.exs
│ │ │ ├── 20200212001245_location_based_charge_cost_increase_scale.exs
│ │ │ ├── 20200216121330_use_rated_as_default_preferred_range.exs
│ │ │ ├── 20200302100654_add_vehicle_config_attrbitues.exs
│ │ │ ├── 20200306130218_update_cities.exs
│ │ │ ├── 20200306133847_add_flat_fee.exs
│ │ │ ├── 20200318164021_use_streaming_api.exs
│ │ │ ├── 20200320140020_drop_power_avg.exs
│ │ │ ├── 20200401170940_remove_sleep_mode_toggles.exs
│ │ │ ├── 20200401171402_remove_sleep_mode_requirements.exs
│ │ │ ├── 20200401171923_enable_streaming.exs
│ │ │ ├── 20200410112005_database_efficiency_improvements.exs
│ │ │ ├── 20200502140646_drop_unused_indexes.exs
│ │ │ ├── 20200528163852_cost_by_minute.exs
│ │ │ ├── 20200528173223_rename_unit_enums.exs
│ │ │ ├── 20200528175158_optimize_conversion_helpers.exs
│ │ │ ├── 20200709165119_change_sleep_requirements_default.exs
│ │ │ ├── 20210130174838_use_variable_length_type_for_tokens.exs
│ │ │ ├── 20210812173700_car_priorities.exs
│ │ │ ├── 20210831153305_add_not_null_constraint_to_display_priority.exs
│ │ │ ├── 20211022103654_add_not_null_constraint_to_start_date.exs
│ │ │ ├── 20220123131732_encrypt_api_tokens.exs
│ │ │ ├── 20220422132017_add_marketing_name_to_car.exs
│ │ │ ├── 20220617170400_add_tire_pressures.exs
│ │ │ ├── 20220718085412_add_unit_of_pressure_to_global_settings.exs
│ │ │ ├── 20230417225712_composite_index_to_position.exs
│ │ │ ├── 20240603152807_add_enabled_to_car_settings.exs
│ │ │ ├── 20240627021414_add_lfp_battery_car_setting.exs
│ │ │ ├── 20240915193446_composite_index_with_predicate_to_position.exs
│ │ │ ├── 20240929084639_recreate_geo_extensions.exs
│ │ │ ├── 20250407155134_upgrade_earthdistance.exs
│ │ │ ├── 20250613133700_add_and_calculate_elevation_changes.exs
│ │ │ ├── 20250924215353_create_private_schema.exs
│ │ │ ├── 20251207212310_add_theme_mode_to_settings.exs
│ │ │ └── 20251225150000_replace_positions_date_indexes.exs
│ │ └── seeds.exs
│ └── static/
│ ├── browserconfig.xml
│ ├── robots.txt
│ └── site.webmanifest
├── test/
│ ├── fixtures/
│ │ └── import/
│ │ ├── 01_complete/
│ │ │ ├── TeslaFi62016.csv
│ │ │ └── TeslaFi72016.csv
│ │ ├── 02_timezone/
│ │ │ └── TeslaFi92019.csv
│ │ ├── 03_empty/
│ │ │ ├── TeslaFi52018.csv
│ │ │ └── TeslaFi62018.csv
│ │ ├── 04_error/
│ │ │ ├── TeslaFi110017.csv
│ │ │ ├── TeslaFi112017.csv
│ │ │ └── TeslaFi122017.csv
│ │ ├── 05_dst/
│ │ │ └── TeslaFi102019.csv
│ │ ├── 06_two_cars/
│ │ │ └── TeslaFi62020.csv
│ │ └── 07_alternative_variant/
│ │ └── 112023.csv
│ ├── support/
│ │ ├── conn_case.ex
│ │ ├── data_case.ex
│ │ ├── mocks/
│ │ │ ├── api.ex
│ │ │ ├── auth.ex
│ │ │ ├── geocoder.ex
│ │ │ ├── locations.ex
│ │ │ ├── log.ex
│ │ │ ├── mqtt_publisher.ex
│ │ │ ├── pubsub.ex
│ │ │ ├── settings.ex
│ │ │ ├── srtm.ex
│ │ │ ├── terrain.ex
│ │ │ ├── vehicle.ex
│ │ │ └── vehicles.ex
│ │ ├── test_helper.ex
│ │ └── vehicle_case.ex
│ ├── teslamate/
│ │ ├── api_test.exs
│ │ ├── auth_test.exs
│ │ ├── http_test.exs
│ │ ├── import_test.exs
│ │ ├── locations/
│ │ │ ├── addresses_test.exs
│ │ │ ├── geocoder_test.exs
│ │ │ └── geofences_test.exs
│ │ ├── log/
│ │ │ ├── log_car_test.exs
│ │ │ ├── log_charging_test.exs
│ │ │ ├── log_drive_test.exs
│ │ │ ├── log_state_test.exs
│ │ │ └── log_update_test.exs
│ │ ├── mqtt/
│ │ │ └── pubsub/
│ │ │ └── vehicle_subscriber_test.exs
│ │ ├── settings_test.exs
│ │ ├── terrain/
│ │ │ └── update_positions_test.exs
│ │ ├── terrain_test.exs
│ │ ├── updater_test.exs
│ │ ├── vault_test.exs
│ │ ├── vehicles/
│ │ │ ├── identification_test.exs
│ │ │ ├── vehicle/
│ │ │ │ ├── charging_sync_test.exs
│ │ │ │ ├── charging_test.exs
│ │ │ │ ├── driving_test.exs
│ │ │ │ ├── streaming_test.exs
│ │ │ │ ├── suspend_logging_test.exs
│ │ │ │ ├── suspend_test.exs
│ │ │ │ └── updating_test.exs
│ │ │ ├── vehicle_sync_test.exs
│ │ │ └── vehicle_test.exs
│ │ └── vehicles_test.exs
│ ├── teslamate_web/
│ │ ├── controllers/
│ │ │ ├── car_controller_test.exs
│ │ │ └── drive_controller_test.exs
│ │ ├── live/
│ │ │ ├── car_index_live_test.exs
│ │ │ ├── car_summary_live_test.exs
│ │ │ ├── charge_cost_live_test.exs
│ │ │ ├── geofence_live_test.exs
│ │ │ ├── import_test.exs
│ │ │ ├── settings_test.exs
│ │ │ └── sign_in_test.exs
│ │ └── views/
│ │ ├── error_view_test.exs
│ │ ├── layout_view_test.exs
│ │ └── page_view_test.exs
│ └── test_helper.exs
├── treefmt.toml
└── website/
├── .gitignore
├── README.md
├── docs/
│ ├── advanced_guides/
│ │ ├── apache.md
│ │ ├── traefik.md
│ │ └── unix_domain_sockets.md
│ ├── configuration/
│ │ ├── api.md
│ │ └── environment_variables.md
│ ├── development.mdx
│ ├── faq.md
│ ├── import/
│ │ ├── tesla_apiscraper.md
│ │ └── teslafi.md
│ ├── installation/
│ │ ├── docker.md
│ │ ├── nixos.md
│ │ └── unsupported/
│ │ ├── debian.md
│ │ ├── freebsd.md
│ │ └── unraid.md
│ ├── integrations/
│ │ ├── Node-RED/
│ │ │ └── Teslamate-flows.json.example
│ │ ├── Node-RED.md
│ │ ├── home_assistant.md
│ │ └── mqtt.md
│ ├── maintenance/
│ │ ├── backup_restore.mdx
│ │ ├── manually_fixing_data.mdx
│ │ └── upgrading_postgres.md
│ ├── projects.md
│ ├── screenshots.mdx
│ └── upgrading.mdx
├── docusaurus.config.js
├── package.json
├── sidebars.js
└── src/
├── css/
│ └── custom.css
└── pages/
├── index.js
└── styles.module.css
================================================
FILE CONTENTS
================================================
================================================
FILE: .credo.exs
================================================
# This file contains the configuration for Credo and you are probably reading
# this after creating it with `mix credo.gen.config`.
#
# If you find anything wrong or unclear in this file, please report an
# issue on GitHub: https://github.com/rrrene/credo/issues
#
%{
#
# You can have as many configs as you like in the `configs:` field.
configs: [
%{
#
# Run any config using `mix credo -C <name>`. If no config name is given
# "default" is used.
#
name: "default",
#
# These are the files included in the analysis:
files: %{
#
# You can give explicit globs or simply directories.
# In the latter case `**/*.{ex,exs}` will be used.
#
included: [
"lib/",
"src/",
"test/",
"web/",
"apps/*/lib/",
"apps/*/src/",
"apps/*/test/",
"apps/*/web/"
],
excluded: [~r"/_build/", ~r"/deps/", ~r"/node_modules/"]
},
#
# Load and configure plugins here:
#
plugins: [],
#
# If you create your own checks, you must specify the source files for
# them here, so they can be loaded by Credo before running the analysis.
#
requires: [],
#
# If you want to enforce a style guide and need a more traditional linting
# experience, you can change `strict` to `true` below:
#
strict: false,
#
# To modify the timeout for parsing files, change this value:
#
parse_timeout: 5000,
#
# If you want to use uncolored output by default, you can change `color`
# to `false` below:
#
color: true,
#
# You can customize the parameters of any check by adding a second element
# to the tuple.
#
# To disable a check put `false` as second element:
#
# {Credo.Check.Design.DuplicatedCode, false}
#
checks: %{
enabled: [
#
## Consistency Checks
#
{Credo.Check.Consistency.ExceptionNames, []},
{Credo.Check.Consistency.LineEndings, []},
{Credo.Check.Consistency.ParameterPatternMatching, []},
{Credo.Check.Consistency.SpaceAroundOperators, []},
{Credo.Check.Consistency.SpaceInParentheses, []},
{Credo.Check.Consistency.TabsOrSpaces, []},
#
## Design Checks
#
# You can customize the priority of any check
# Priority values are: `low, normal, high, higher`
#
{Credo.Check.Design.AliasUsage,
[priority: :low, if_nested_deeper_than: 2, if_called_more_often_than: 0]},
{Credo.Check.Design.TagFIXME, []},
# You can also customize the exit_status of each check.
# If you don't want TODO comments to cause `mix credo` to fail, just
# set this value to 0 (zero).
#
{Credo.Check.Design.TagTODO, [exit_status: 2]},
#
## Readability Checks
#
{Credo.Check.Readability.AliasOrder, []},
{Credo.Check.Readability.FunctionNames, []},
{Credo.Check.Readability.LargeNumbers, []},
{Credo.Check.Readability.MaxLineLength, [priority: :low, max_length: 120]},
{Credo.Check.Readability.ModuleAttributeNames, []},
{Credo.Check.Readability.ModuleDoc, []},
{Credo.Check.Readability.ModuleNames, []},
{Credo.Check.Readability.ParenthesesInCondition, []},
{Credo.Check.Readability.ParenthesesOnZeroArityDefs, []},
{Credo.Check.Readability.PipeIntoAnonymousFunctions, []},
{Credo.Check.Readability.PredicateFunctionNames, []},
{Credo.Check.Readability.PreferImplicitTry, []},
{Credo.Check.Readability.RedundantBlankLines, []},
{Credo.Check.Readability.Semicolons, []},
{Credo.Check.Readability.SpaceAfterCommas, []},
{Credo.Check.Readability.StringSigils, []},
{Credo.Check.Readability.TrailingBlankLine, []},
{Credo.Check.Readability.TrailingWhiteSpace, []},
{Credo.Check.Readability.UnnecessaryAliasExpansion, []},
{Credo.Check.Readability.VariableNames, []},
{Credo.Check.Readability.WithSingleClause, []},
#
## Refactoring Opportunities
#
{Credo.Check.Refactor.Apply, []},
{Credo.Check.Refactor.CondStatements, []},
{Credo.Check.Refactor.CyclomaticComplexity, []},
{Credo.Check.Refactor.FilterCount, []},
{Credo.Check.Refactor.FilterFilter, []},
{Credo.Check.Refactor.FunctionArity, []},
{Credo.Check.Refactor.LongQuoteBlocks, []},
{Credo.Check.Refactor.MapJoin, []},
{Credo.Check.Refactor.MatchInCondition, []},
{Credo.Check.Refactor.NegatedConditionsInUnless, []},
{Credo.Check.Refactor.NegatedConditionsWithElse, []},
{Credo.Check.Refactor.Nesting, []},
{Credo.Check.Refactor.RedundantWithClauseResult, []},
{Credo.Check.Refactor.RejectReject, []},
{Credo.Check.Refactor.UnlessWithElse, []},
{Credo.Check.Refactor.WithClauses, []},
#
## Warnings
#
{Credo.Check.Warning.ApplicationConfigInModuleAttribute, []},
{Credo.Check.Warning.BoolOperationOnSameValues, []},
{Credo.Check.Warning.Dbg, []},
{Credo.Check.Warning.ExpensiveEmptyEnumCheck, []},
{Credo.Check.Warning.IExPry, []},
{Credo.Check.Warning.IoInspect, []},
{Credo.Check.Warning.MissedMetadataKeyInLoggerConfig, []},
{Credo.Check.Warning.OperationOnSameValues, []},
{Credo.Check.Warning.OperationWithConstantResult, []},
{Credo.Check.Warning.RaiseInsideRescue, []},
{Credo.Check.Warning.SpecWithStruct, []},
{Credo.Check.Warning.UnsafeExec, []},
{Credo.Check.Warning.UnusedEnumOperation, []},
{Credo.Check.Warning.UnusedFileOperation, []},
{Credo.Check.Warning.UnusedKeywordOperation, []},
{Credo.Check.Warning.UnusedListOperation, []},
{Credo.Check.Warning.UnusedPathOperation, []},
{Credo.Check.Warning.UnusedRegexOperation, []},
{Credo.Check.Warning.UnusedStringOperation, []},
{Credo.Check.Warning.UnusedTupleOperation, []},
{Credo.Check.Warning.WrongTestFileExtension, []}
],
disabled: [
#
# Checks scheduled for next check update (opt-in for now, just replace `false` with `[]`)
#
# Controversial and experimental checks (opt-in, just move the check to `:enabled`
# and be sure to use `mix credo --strict` to see low priority checks)
#
{Credo.Check.Consistency.MultiAliasImportRequireUse, []},
{Credo.Check.Consistency.UnusedVariableNames, []},
{Credo.Check.Design.DuplicatedCode, []},
{Credo.Check.Design.SkipTestWithoutComment, []},
{Credo.Check.Readability.AliasAs, []},
{Credo.Check.Readability.BlockPipe, []},
{Credo.Check.Readability.ImplTrue, []},
{Credo.Check.Readability.MultiAlias, []},
{Credo.Check.Readability.NestedFunctionCalls, []},
{Credo.Check.Readability.OneArityFunctionInPipe, []},
{Credo.Check.Readability.OnePipePerLine, []},
{Credo.Check.Readability.SeparateAliasRequire, []},
{Credo.Check.Readability.SingleFunctionToBlockPipe, []},
{Credo.Check.Readability.SinglePipe, []},
{Credo.Check.Readability.Specs, []},
{Credo.Check.Readability.StrictModuleLayout, []},
{Credo.Check.Readability.WithCustomTaggedTuple, []},
{Credo.Check.Refactor.ABCSize, []},
{Credo.Check.Refactor.AppendSingleItem, []},
{Credo.Check.Refactor.DoubleBooleanNegation, []},
{Credo.Check.Refactor.FilterReject, []},
{Credo.Check.Refactor.IoPuts, []},
{Credo.Check.Refactor.MapMap, []},
{Credo.Check.Refactor.ModuleDependencies, []},
{Credo.Check.Refactor.NegatedIsNil, []},
{Credo.Check.Refactor.PassAsyncInTestCases, []},
{Credo.Check.Refactor.PipeChainStart, []},
{Credo.Check.Refactor.RejectFilter, []},
{Credo.Check.Refactor.VariableRebinding, []},
{Credo.Check.Warning.LazyLogging, []},
{Credo.Check.Warning.LeakyEnvironment, []},
{Credo.Check.Warning.MapGetUnsafePass, []},
{Credo.Check.Warning.MixEnv, []},
{Credo.Check.Warning.UnsafeToAtom, []}
# {Credo.Check.Refactor.MapInto, []},
#
# Custom checks can be created using `mix credo.gen.check`.
#
]
}
}
]
}
================================================
FILE: .dialyzer_ignore.exs
================================================
[]
================================================
FILE: .dockerignore
================================================
_build/
deps/
.git/
.gitignore
Dockerfile
Makefile
README*
test/
priv/static/assets
**/node_modules
import/
teslamate.bck
================================================
FILE: .envrc
================================================
use flake . --override-input devenv-root "file+file://"<(printf %s "$PWD")
================================================
FILE: .formatter.exs
================================================
[
import_deps: [:ecto, :phoenix, :phoenix_live_view, :tesla],
inputs: ["*.{heex,ex,exs}", "priv/*/seeds.exs", "{config,lib,test}/**/*.{heex,ex,exs}"],
plugins: [Phoenix.LiveView.HTMLFormatter],
subdirectories: ["priv/*/migrations"]
]
================================================
FILE: .github/ISSUE_TEMPLATE/bug_report.yml
================================================
name: Bug Report
description: File a bug report
labels: []
assignees: []
body:
- type: checkboxes
attributes:
label: Is there an existing issue for this?
description: |
Thank you for helping us make TeslaMate better, by reporting a bug you have found. This issue may already be reported.
Please search to see if an issue already exists for the bug you encountered:
- [Issues](https://github.com/teslamate-org/teslamate/issues?q=)
- [Discussions](https://github.com/teslamate-org/teslamate/discussions)
options:
- label: I have checked the existing issues and discussions, and I can confirm that there are no duplicates.
required: true
- type: markdown
attributes:
value: |
Thanks for taking the time to fill out this bug report! Please provide as much info as possible.
- type: textarea
id: current-behavior
attributes:
label: What happened?
description: A concise description of what you're experiencing.
validations:
required: true
- type: textarea
id: expected-behavior
attributes:
label: Expected Behavior
description: A concise description of what you expected to happen.
validations:
required: false
- type: dropdown
id: can_repro
attributes:
label: Can the issue reliably be reproduced?
options:
- "Yes"
- "No"
validations:
required: true
- type: textarea
attributes:
label: Steps To Reproduce the issue
description: Explain how the maintainers can reproduce the issue.
placeholder: |
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error
validations:
required: false
- type: textarea
id: logs
attributes:
label: Relevant log output
description: |
Please copy and paste any relevant log output of the TeslaMate Docker container or application. This will be automatically formatted into code, so no need for backticks.
To retrieve the TeslaMate Docker container logs, run `docker compose logs teslamate`.
placeholder: |
2021-09-22 23:20:54.226 [info] Starting logger for 'Tesla'
2021-09-22 23:20:54.251 [info] MQTT connection has been established
2021-09-22 23:20:54.334 car_id=1 [info] Start / :asleep
2021-09-22 23:20:56.721 [info] GET /
render: shell
validations:
required: true
- type: textarea
attributes:
label: Screenshots
description: If applicable, add screenshots to help explain the problem.
placeholder: Upload screenshot files here by dragging & dropping
validations:
required: false
- type: textarea
attributes:
label: Additional data
description: |
If applicable, add an export of the data for the given period.
For example, to export charge data after January 1, 2020:
```bash
$ docker compose exec database psql teslamate teslamate -c \
"COPY (select * from charges where date > '2020-01-01') TO STDOUT WITH CSV HEADER" > charges.csv
$ docker compose exec database psql teslamate teslamate -c \
"COPY (select * from charging_processes where start_date > '2020-01-01') TO STDOUT WITH CSV HEADER" > charging_processes.csv
```
To export drive data after January 1, 2020:
```bash
$ docker compose exec database psql teslamate teslamate -c \
"COPY (select id, car_id, drive_id, date, elevation, speed, power, odometer, ideal_battery_range_km, est_battery_range_km, rated_battery_range_km, battery_level, usable_battery_level, battery_heater_no_power, battery_heater_on, battery_heater, inside_temp, outside_temp, fan_status, driver_temp_setting, passenger_temp_setting, is_climate_on, is_rear_defroster_on, is_front_defroster_on from positions where date > '2020-01-20') TO STDOUT WITH CSV HEADER" > positions.csv
$ docker compose exec database psql teslamate teslamate -c \
"COPY (select * from drives where start_date > '2020-01-01') TO STDOUT WITH CSV HEADER" > drives.csv
```
placeholder: Upload exported data here by dragging & dropping
validations:
required: false
- type: dropdown
id: installation
attributes:
label: Type of installation
options:
- Docker (https://docs.teslamate.org/docs/installation/docker/)
- NixOS (https://docs.teslamate.org/docs/installation/nixos)
- Manual (no support)
- Unraid (no support, if not using docker compose)
- Other (no support)
validations:
required: true
- type: input
id: version
attributes:
label: Version
description: What version of TeslaMate are you running?
placeholder: v1.33.0
validations:
required: true
- type: input
id: postgresql_version
attributes:
label: PostgreSQL version
description: What version of PostgreSQL are you running? (see Database information dashboard -> PostgreSQL Version (upper right on desktop) or database -> image section in your `docker-compose.yml`)
placeholder: v17.3
- type: checkboxes
attributes:
label: Are you running latest major supported PostgreSQL version?
description: |
Please ensure you are running the latest major supported PostgreSQL version by comparing your installation with the [installation docs](https://docs.teslamate.org/docs/installation/docker/).
If not, please first do a backup and follow [Upgrading PostgreSQL to a new major version](https://docs.teslamate.org/docs/maintenance/upgrading_postgres)
options:
- label: I run the latest major supported PostgreSQL version
validations:
required: true
- type: dropdown
id: reverse_proxy
attributes:
label: Are you using a reverse Proxy for TeslaMate?
options:
- "No"
- "Yes (specify in next field)"
validations:
required: true
- type: textarea
id: reverse_proxy_details
attributes:
label: Details about your reverse Proxy if applicable
description: If you use a reverse Proxy, please provide details about your setup
validations:
required: false
================================================
FILE: .github/ISSUE_TEMPLATE/config.yml
================================================
blank_issues_enabled: false
contact_links:
- name: Community Support
url: https://github.com/teslamate-org/teslamate/discussions
about: Please ask and answer questions here.
================================================
FILE: .github/actions/build/action.yml
================================================
name: "Build"
description: "Build images"
inputs:
is_dockerhub_pushed:
description: "Need docker hub login?"
required: true
default: ""
docker_password:
description: "Docker password"
required: true
repository_owner:
description: "Repository owner"
required: true
default: "teslamate-org"
repository:
description: "Repo owner and name (repo_owner/repo_name)"
required: true
default: "teslamate"
github_token:
description: "GitHub Token"
required: true
labels:
description: "Labels added on metadata"
required: false
default: ""
version:
description: "Branch deployed"
required: false
default: ""
runs:
using: "composite"
steps:
- name: normalize version name to a valid string
# convert backslashes to dashes, so for example dependabot/x/y/z-1.2.3 works
id: normalize_version
shell: bash
run: |
VERSION="${{ inputs.version }}"
NORMALIZED_VERSION="${VERSION//\//-}"
echo "normalized_version=${NORMALIZED_VERSION}" >> $GITHUB_OUTPUT
- name: Docker meta
id: meta
uses: docker/metadata-action@030e881283bb7a6894de51c315a6bfe6a94e05cf # v6.0.0
with:
images: ${{ env.REGISTRY_IMAGE }}
labels: |
{{ inputs.labels }}
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@4d04d5d9486b7bd6fa91e7baf45bbb4f8b9deedd # v4.0.0
- name: Login to Docker Hub
if: inputs.is_dockerhub_pushed != ''
uses: docker/login-action@b45d80f862d83dbcd57f89517bcf500b2ab88fb2 # v4.0.0
with:
username: teslamate
password: ${{ inputs.docker_password }}
- name: Login to GitHub Container Registry
uses: docker/login-action@b45d80f862d83dbcd57f89517bcf500b2ab88fb2 # v4.0.0
with:
registry: ghcr.io
username: ${{ inputs.repository_owner }}
password: ${{ inputs.github_token }}
- name: Build and push by digest
id: build
uses: docker/build-push-action@d08e5c354a6adb9ed34480a06d141179aa583294 # v7.0.0
with:
context: .
platforms: ${{ matrix.platform }}
labels: ${{ steps.meta.outputs.labels }}
tags: ${{ steps.docker_meta.outputs.tags }}
cache-from: |
type=registry,ref=ghcr.io/${{ inputs.repository }}:buildcache-${{ matrix.cache_id }}-${{ steps.normalize_version.outputs.normalized_version }}
type=registry,ref=ghcr.io/${{ inputs.repository }}:buildcache-${{ matrix.cache_id }}-main
cache-to: type=registry,ref=ghcr.io/${{ inputs.repository }}:buildcache-${{ matrix.cache_id }}-${{ steps.normalize_version.outputs.normalized_version }},mode=max
outputs: type=image,name=${{ env.REGISTRY_IMAGE }},push-by-digest=true,name-canonical=true,push=true
- name: Export digest
shell: bash
run: |
mkdir -p /tmp/digests
digest="${{ steps.build.outputs.digest }}"
touch "/tmp/digests/${digest#sha256:}"
ls -l /tmp/digests/
- name: Upload digest
uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
with:
name: single-digest-${{ matrix.cache_id }}
path: /tmp/digests/*
if-no-files-found: error
retention-days: 1
================================================
FILE: .github/actions/grafana/action.yml
================================================
name: "Grafana"
description: "Grafana images"
inputs:
tags:
description: "Tags"
required: false
default: ""
labels:
description: "Labels"
required: true
image:
description: "Image target"
required: true
default: "teslamate/grafana"
runs:
using: "composite"
steps:
- name: Docker meta
id: docker_meta
uses: docker/metadata-action@030e881283bb7a6894de51c315a6bfe6a94e05cf # v6.0.0
with:
images: ${{ inputs.image }}
tags: ${{ inputs.tags }}
labels: ${{ inputs.labels }}
- name: Set up QEMU
uses: docker/setup-qemu-action@ce360397dd3f832beb865e1373c09c0e9f86d70a # v4.0.0
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@4d04d5d9486b7bd6fa91e7baf45bbb4f8b9deedd # v4.0.0
- name: Build and push
uses: docker/build-push-action@d08e5c354a6adb9ed34480a06d141179aa583294 # v7.0.0
with:
context: grafana
push: true
platforms: linux/amd64,linux/arm/v7,linux/arm64
tags: ${{ steps.docker_meta.outputs.tags }}
cache-from: type=gha
cache-to: type=gha,mode=max
================================================
FILE: .github/actions/merge/action.yml
================================================
name: "Merge"
description: "Merge images"
inputs:
tags:
description: "Tags"
required: false
default: ""
image:
description: "Image target"
required: true
runs:
using: "composite"
steps:
- name: Merge digests and reupload
uses: actions/upload-artifact/merge@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
with:
name: digests
pattern: single-digest-*
- name: Download merged digests
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
with:
name: digests
path: /tmp/digests
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@4d04d5d9486b7bd6fa91e7baf45bbb4f8b9deedd # v4.0.0
- name: Docker meta
id: meta
uses: docker/metadata-action@030e881283bb7a6894de51c315a6bfe6a94e05cf # v6.0.0
with:
images: ${{ inputs.image }}
tags: ${{ inputs.tags }}
- name: Create manifest list and push
working-directory: /tmp/digests
shell: bash
run: |
docker buildx imagetools create $(jq -cr '.tags | map("-t " + .) | join(" ")' <<< "$DOCKER_METADATA_OUTPUT_JSON") \
$(printf '${{ env.REGISTRY_IMAGE }}@sha256:%s ' *)
- name: Inspect image
shell: bash
run: |
docker buildx imagetools inspect ${{ env.REGISTRY_IMAGE }}:${{ steps.meta.outputs.version }}
================================================
FILE: .github/actions/setup-elixir-and-cache-deps/action.yml
================================================
name: "Setup Elixir and Cache Dependencies"
description: "Setup Elixir, OTP and cache dependencies"
inputs:
elixir-version:
description: "Elixir version"
required: false
default: "1.19.5"
otp-version:
description: "OTP version"
required: false
default: "26"
cache-name-deps:
description: "Cache name for dependencies"
required: true
cache-name-compiled:
description: "Cache name for compiled build"
required: true
mix-env:
description: "Mix environment"
required: false
default: "dev"
ELIXIR_ASSERT_TIMEOUT:
description: "Elixir assert timeout"
required: false
default: "1000"
outputs:
elixir-version:
description: "The Elixir version used in the setup"
value: ${{ steps.beam.outputs.elixir-version }}
otp-version:
description: "The OTP version used in the setup"
value: ${{ steps.beam.outputs.otp-version }}
runs:
using: "composite"
steps:
- name: Setup Elixir and OTP
id: beam
uses: erlef/setup-beam@b9c58b0450cd832ccdb3c17cc156a47065d2114f # v1.18.1
with:
elixir-version: ${{ inputs.elixir-version }}
otp-version: ${{ inputs.otp-version }}
- name: Cache deps
id: cache-deps
uses: actions/cache@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 # v5.0.3
with:
path: deps
key: ${{ runner.os }}-mix-${{ inputs.cache-name-deps }}-${{ hashFiles('**/mix.lock') }}
restore-keys: |
${{ runner.os }}-mix-${{ inputs.cache-name-deps }}-
- name: Cache compiled build
id: cache-build
uses: actions/cache@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 # v5.0.3
with:
path: |
_build
priv/cldr/locales
key: ${{ runner.os }}-mix-${{ inputs.cache-name-compiled }}-${{ hashFiles('**/mix.lock') }}
restore-keys: |
${{ runner.os }}-mix-${{ inputs.cache-name-compiled }}-
${{ runner.os }}-mix-
- name: Clean to rule out incremental build as a source of flakiness
if: github.run_attempt > 3
run: |
mix deps.clean --all
mix clean
shell: sh
- name: Install dependencies
run: mix deps.get
shell: sh
================================================
FILE: .github/dependabot.yml
================================================
version: 2
updates:
- package-ecosystem: "mix"
directory: "/"
schedule:
interval: "monthly"
- package-ecosystem: "npm"
directory: "/assets"
schedule:
interval: "monthly"
ignore:
# ignore the path based dependencies to prevent "Dependabot couldn't fetch all your path-based dependencies"
- dependency-name: phoenix
- dependency-name: phoenix_html
- dependency-name: phoenix_live_view
- package-ecosystem: "npm"
directory: "/website"
schedule:
interval: "monthly"
- package-ecosystem: "docker"
directory: "/"
schedule:
interval: "monthly"
- package-ecosystem: "docker"
directory: "/grafana"
schedule:
interval: "monthly"
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "monthly"
================================================
FILE: .github/workflows/buildx.yml
================================================
name: Publish Docker images
on:
workflow_dispatch:
workflow_call:
schedule:
- cron: "0 3 * * *"
push:
tags:
- "v*"
paths:
- "**/*"
- "!.github/**" # Important: Exclude PRs related to .github from auto-run
- "!.github/workflows/**" # Important: Exclude PRs related to .github/workflows from auto-run
- "!.github/actions/**" # Important: Exclude PRs related to .github/actions from auto-run
env:
REGISTRY_IMAGE: teslamate/teslamate
permissions:
contents: read
packages: write
jobs:
check_paths:
uses: ./.github/workflows/check_paths.yml
teslamate_build:
needs: check_paths
if: needs.check_paths.outputs.githubfolder == 'false' || github.event_name == 'schedule'
strategy:
fail-fast: false
matrix:
include:
- platform: "linux/amd64"
runs_on: "ubuntu-24.04"
cache_id: amd64
- platform: "linux/arm/v7"
runs_on: "ubuntu-24.04-arm"
cache_id: arm
- platform: "linux/arm64"
runs_on: "ubuntu-24.04-arm"
cache_id: arm64
runs-on: ${{ matrix.runs_on }}
timeout-minutes: 10
steps:
- name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Buildx
uses: ./.github/actions/build
with:
is_dockerhub_pushed: "1"
docker_password: ${{ secrets.DOCKER_PASSWORD }}
repository_owner: ${{ github.repository_owner }}
repository: ${{ github.repository }}
github_token: ${{ secrets.GITHUB_TOKEN }}
version: ${{ github.head_ref || github.ref_name }}
teslamate_merge:
runs-on: ubuntu-24.04
needs:
- check_paths
- teslamate_build
if: needs.check_paths.outputs.githubfolder == 'false' || github.event_name == 'schedule'
steps:
- name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Login to Docker Hub
uses: docker/login-action@b45d80f862d83dbcd57f89517bcf500b2ab88fb2 # v4.0.0
with:
username: teslamate
password: ${{ secrets.DOCKER_PASSWORD }}
- uses: ./.github/actions/merge
with:
image: ${{ env.REGISTRY_IMAGE }}
tags: |
type=schedule,pattern=edge
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=edge
grafana:
needs: check_paths
if: needs.check_paths.outputs.githubfolder == 'false' || github.event_name == 'schedule'
runs-on: ubuntu-24.04
timeout-minutes: 10
steps:
- name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Login to Docker Hub
uses: docker/login-action@b45d80f862d83dbcd57f89517bcf500b2ab88fb2 # v4.0.0
with:
username: teslamate
password: ${{ secrets.DOCKER_PASSWORD }}
- uses: ./.github/actions/grafana
with:
tags: |
type=edge
type=schedule,pattern=edge
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
================================================
FILE: .github/workflows/check_if_pr_from_outside_repo.yml
================================================
name: Check if PR from outside repo
on:
workflow_call:
# Map the workflow outputs to job outputs
outputs:
is_pr_from_outside_repo:
description: "Indicates if the PR is from an outside repository"
value: ${{ jobs.check_if_pr_from_outside_repo.outputs.is_pr_from_outside_repo }}
permissions:
contents: read
jobs:
check_if_pr_from_outside_repo:
name: Check if PR from outside repo
# as we currently only push ghcr images for PRs from our own repo
outputs:
is_pr_from_outside_repo: ${{ steps.check_if_pr_from_outside_repo.outputs.is_pr_from_outside_repo }}
runs-on: ubuntu-24.04
steps:
- name: check if PR from outside repo
id: check_if_pr_from_outside_repo
shell: bash
run: |
echo "::group::Check if PR from outside repo"
if [[ "${{ github.event_name }}" == "pull_request" && "${{ github.event.pull_request.head.repo.full_name }}" != "${{ github.repository }}" ]]; then
echo "This PR is from outside the repo"
echo "is_pr_from_outside_repo=true" >> $GITHUB_OUTPUT
else
echo "This PR is from our own repo"
echo "is_pr_from_outside_repo=false" >> $GITHUB_OUTPUT
fi
echo "::endgroup::"
================================================
FILE: .github/workflows/check_paths.yml
================================================
name: Check paths
on:
workflow_call:
# Map the workflow outputs to job outputs
outputs:
githubfolder:
description: "changes to .github folder"
value: ${{ jobs.check_paths.outputs.githubfolder }}
permissions:
contents: read
jobs:
check_paths:
runs-on: ubuntu-24.04
outputs:
githubfolder: ${{ steps.filter.outputs.githubfolder }}
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- uses: dorny/paths-filter@9d7afb8d214ad99e78fbd4247752c4caed2b6e4c # v4.0.0
id: filter
with:
base: "main" # needed to set as a called workflow does not have direct access to repository.default_branch
filters: |
githubfolder:
- '.github/**'
================================================
FILE: .github/workflows/cleanup_caches.yml
================================================
name: Cleanup caches by a branch
on:
pull_request:
types:
- closed
paths:
- "**/*"
- "!.github/**" # Important: Exclude PRs related to .github from auto-run
- "!.github/workflows/**" # Important: Exclude PRs related to .github/workflows from auto-run
- "!.github/actions/**" # Important: Exclude PRs related to .github/actions from auto-run
permissions:
contents: read
packages: read
actions: write
jobs:
check_paths:
uses: ./.github/workflows/check_paths.yml
cleanup:
name: Delete caches when PR is closed
needs: check_paths
if: needs.check_paths.outputs.githubfolder == 'false'
runs-on: ubuntu-24.04
steps:
- name: Cleanup
run: |
echo "Fetching list of cache key"
cacheKeysForPR=$(gh cache list --repo $REPO --ref $BRANCH --limit 100 | cut -f 1 )
## Setting this to not fail the workflow while deleting cache keys.
set +e
echo "Deleting caches..."
for cacheKey in $cacheKeysForPR
do
gh cache delete $cacheKey --repo $REPO
done
echo "Done"
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
REPO: ${{ github.repository }}
BRANCH: refs/pull/${{ github.event.pull_request.number }}/merge
================================================
FILE: .github/workflows/cleanup_largest_caches.yml
================================================
name: Cleanup largest 100 caches
on:
workflow_dispatch:
permissions:
contents: read
packages: read
actions: write
jobs:
cleanup:
name: Delete largest 100 caches
runs-on: ubuntu-24.04
steps:
- name: Cleanup largest 100 caches
run: |
echo "Fetching list of cache key"
cacheKeysLargest=$(gh cache list --repo $REPO --limit 100 --sort size_in_bytes --order desc | cut -f 1 )
## Setting this to not fail the workflow while deleting cache keys.
set +e
echo "Deleting caches..."
for cacheKey in $cacheKeysLargest
do
gh cache delete $cacheKey --repo $REPO
done
echo "Done"
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
REPO: ${{ github.repository }}
================================================
FILE: .github/workflows/devops.yml
================================================
name: DevOps
on:
workflow_dispatch:
push:
branches: ["main"]
paths:
- "**/*"
- "!.github/**" # Important: Exclude PRs related to .github from auto-run
- "!.github/workflows/**" # Important: Exclude PRs related to .github/workflows from auto-run
- "!.github/actions/**" # Important: Exclude PRs related to .github/actions from auto-run
pull_request:
branches: ["main"]
paths:
- "**/*"
- "!.github/**" # Important: Exclude PRs related to .github from auto-run
- "!.github/workflows/**" # Important: Exclude PRs related to .github/workflows from auto-run
- "!.github/actions/**" # Important: Exclude PRs related to .github/actions from auto-run
# Cancel any in-progress runs when a new commit is pushed
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
permissions:
contents: read
packages: write
jobs:
check_paths:
uses: ./.github/workflows/check_paths.yml
spell_check:
needs: check_paths
if: needs.check_paths.outputs.githubfolder == 'false' || github.event_name == 'schedule'
uses: ./.github/workflows/spell_check.yml
ensure_linting:
needs:
- check_paths
- spell_check
if: needs.check_paths.outputs.githubfolder == 'false' || github.event_name == 'schedule'
uses: ./.github/workflows/ensure_linting.yml
elixir_dep_verification_and_static_analysis:
needs:
- check_paths
- ensure_linting
if: needs.check_paths.outputs.githubfolder == 'false' || github.event_name == 'schedule'
uses: ./.github/workflows/elixir_dep_verification_and_static_analysis.yml
elixir_test:
needs:
- check_paths
- ensure_linting
if: needs.check_paths.outputs.githubfolder == 'false' || github.event_name == 'schedule'
uses: ./.github/workflows/elixir_test.yml
================================================
FILE: .github/workflows/elixir_dep_verification_and_static_analysis.yml
================================================
name: Elixir Dependency Verification and Static Analysis
on:
workflow_call:
env:
CACHE_NAME_DEPS: cache-elixir-deps
CACHE_NAME_COMPILED_DEV: cache-compiled-dev-build
CACHE_NAME_COMPILED_TEST: cache-compiled-test-build
ELIXIR_ASSERT_TIMEOUT: 1000
permissions:
contents: read
jobs:
verify_dependencies_and_static_analysis:
name: Verify dependencies, POT files, unused dependencies, static analysis
runs-on: ubuntu-24.04
permissions:
contents: read
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Setup Elixir and Cache Dependencies
id: setup-elixir-and-cache-deps
uses: ./.github/actions/setup-elixir-and-cache-deps
with:
cache-name-deps: ${{ env.CACHE_NAME_DEPS }}
cache-name-compiled: ${{ env.CACHE_NAME_COMPILED_DEV }}
mix-env: dev
- name: Compile without warnings
run: mix compile --warnings-as-errors
shell: sh
- name: Verify that POT files are up to date
run: mix gettext.extract --check-up-to-date
- name: Check unused dependencies
run: mix deps.unlock --check-unused
- name: Restore PLT cache
id: plt_cache
uses: actions/cache/restore@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 # v5.0.3
with:
key: |
${{ runner.os }}-${{ steps.setup-elixir-and-cache-deps.outputs.elixir-version }}-${{ steps.setup-elixir-and-cache-deps.outputs.otp-version }}-plt
restore-keys: |
${{ runner.os }}-${{ steps.setup-elixir-and-cache-deps.outputs.elixir-version }}-${{ steps.setup-elixir-and-cache-deps.outputs.otp-version }}-plt
path: |
priv/plts
- name: Create Persistent Lookup Tables (PLTs) for Dialyzer
if: steps.plt_cache.outputs.cache-hit != 'true'
run: mix dialyzer --plt
- name: Save PLT cache
id: plt_cache_save
uses: actions/cache/save@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 # v5.0.3
if: steps.plt_cache.outputs.cache-hit != 'true'
with:
key: |
${{ runner.os }}-${{ steps.setup-elixir-and-cache-deps.outputs.elixir-version }}-${{ steps.setup-elixir-and-cache-deps.outputs.otp-version }}-plt
path: |
priv/plts
- name: Run dialyzer for static analysis
run: mix dialyzer --format github
================================================
FILE: .github/workflows/elixir_test.yml
================================================
name: Elixir Test and report coverage
on:
workflow_call:
env:
CACHE_NAME_DEPS: cache-elixir-deps
CACHE_NAME_COMPILED_TEST: cache-compiled-test-build
ELIXIR_ASSERT_TIMEOUT: 1000
permissions:
contents: read
jobs:
test:
name: Test
runs-on: ubuntu-24.04
permissions:
contents: read
services:
db:
image: postgres:18-trixie
ports: ["5432:5432"]
env:
POSTGRES_PASSWORD: postgres
options: >-
--health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Setup Elixir and Cache Dependencies
id: setup-elixir-and-cache-deps
uses: ./.github/actions/setup-elixir-and-cache-deps
with:
cache-name-deps: ${{ env.CACHE_NAME_DEPS }}
cache-name-compiled: ${{ env.CACHE_NAME_COMPILED_TEST }}
mix-env: test
ELIXIR_ASSERT_TIMEOUT: ${{ env.ELIXIR_ASSERT_TIMEOUT }}
- name: Compile without warnings
run: mix compile --warnings-as-errors
shell: sh
- name: Run tests
run: mix test --warnings-as-errors
- name: Check Coverage
if: github.ref == 'refs/heads/main'
run: mix coveralls.github
continue-on-error: true
env:
MIX_ENV: test
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
================================================
FILE: .github/workflows/ensure_linting.yml
================================================
name: Ensure Linting
on:
workflow_call:
permissions:
contents: read
jobs:
check_linting:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Install Nix
uses: nixbuild/nix-quick-install-action@2c9db80fb984ceb1bcaa77cdda3fdf8cfba92035 # v34
- name: Nix binary cache
uses: nix-community/cache-nix-action@7df957e333c1e5da7721f60227dbba6d06080569 # v7.0.2
with:
# restore and save a cache using this key
primary-key: nix-${{ runner.os }}-${{ hashFiles('**/*.nix', '**/flake.lock') }}
# if there's no cache hit, restore a cache by this prefix
restore-prefixes-first-match: nix-${{ runner.os }}-
# collect garbage until Nix store size (in bytes) is at most this number
# before trying to save a new cache
# 1G = 1073741824
gc-max-store-size-linux: 1073741824
# do purge caches
purge: true
# purge all versions of the cache
purge-prefixes: nix-${{ runner.os }}-
# created more than this number of seconds ago
# relative to the start of the `Post Restore and save Nix store` phase
purge-created: 0
# except any version with the key that is the same as the `primary-key`
purge-primary-key: never
- name: Run treefmt in CI mode
run: nix develop --override-input devenv-root "file+file://"<(printf %s "$PWD") . --command treefmt --ci
# or use: https://github.com/cachix/git-hooks.nix?tab=readme-ov-file
================================================
FILE: .github/workflows/ghcr_build.yml
================================================
name: Build GHCR images
on:
push:
branches: ["main"]
paths:
- "**/*"
- "!.github/**" # Important: Exclude pushes related to .github from auto-run
- "!.github/workflows/**" # Important: Exclude pushes related to .github/workflows from auto-run
- "!.github/actions/**" # Important: Exclude pushes related to .github/actions from auto-run
pull_request:
branches: ["main"]
paths:
- "**/*"
- "!.github/**" # Important: Exclude PRs related to .github from auto-run
- "!.github/workflows/**" # Important: Exclude PRs related to .github/workflows from auto-run
- "!.github/actions/**" # Important: Exclude PRs related to .github/actions from auto-run
env:
REGISTRY_IMAGE: ghcr.io/${{ github.repository }}
permissions:
contents: read
packages: write
jobs:
check_paths:
uses: ./.github/workflows/check_paths.yml
check_if_pr_from_outside_repo:
needs: check_paths
if: needs.check_paths.outputs.githubfolder == 'false'
uses: ./.github/workflows/check_if_pr_from_outside_repo.yml
teslamate_build:
name: Build images
needs:
- check_paths
- check_if_pr_from_outside_repo
if: needs.check_paths.outputs.githubfolder == 'false' && needs.check_if_pr_from_outside_repo.outputs.is_pr_from_outside_repo == 'false'
strategy:
fail-fast: false
matrix:
include:
- platform: "linux/amd64"
runs_on: "ubuntu-24.04"
cache_id: amd64
- platform: "linux/arm/v7"
runs_on: "ubuntu-24.04-arm"
cache_id: arm
- platform: "linux/arm64"
runs_on: "ubuntu-24.04-arm"
cache_id: arm64
runs-on: ${{ matrix.runs_on }}
timeout-minutes: 10
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Buildx
uses: ./.github/actions/build
with:
docker_password: ${{ secrets.DOCKER_PASSWORD }}
repository_owner: ${{ github.repository_owner }}
repository: ${{ github.repository }}
github_token: ${{ secrets.GITHUB_TOKEN }}
version: ${{ github.head_ref || github.ref_name }}
labels: |
org.opencontainers.image.version=${{ github.ref || github.ref_name }}
teslamate_merge:
name: Merge GHCR images
needs:
- check_paths
- teslamate_build
if: needs.check_paths.outputs.githubfolder == 'false'
runs-on: ubuntu-24.04
timeout-minutes: 10
steps:
- name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Login to GitHub Container Registry
uses: docker/login-action@b45d80f862d83dbcd57f89517bcf500b2ab88fb2 # v4.0.0
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Merge
id: merge
uses: ./.github/actions/merge
with:
image: ${{ env.REGISTRY_IMAGE }}
grafana:
needs:
- check_paths
- check_if_pr_from_outside_repo
if: needs.check_paths.outputs.githubfolder == 'false' && needs.check_if_pr_from_outside_repo.outputs.is_pr_from_outside_repo == 'false'
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Login to GitHub Container Registry
uses: docker/login-action@b45d80f862d83dbcd57f89517bcf500b2ab88fb2 # v4.0.0
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- uses: ./.github/actions/grafana
with:
image: ${{ env.REGISTRY_IMAGE }}/grafana
labels: |
org.opencontainers.image.version=${{ github.ref || github.ref_name }}
================================================
FILE: .github/workflows/ghcr_purge.yml
================================================
name: Purge PR images
on:
workflow_call:
pull_request:
types:
- closed
paths:
- "**/*"
- "!.github/**" # Important: Exclude PRs related to .github from auto-run
- "!.github/workflows/**" # Important: Exclude PRs related to .github/workflows from auto-run
- "!.github/actions/**" # Important: Exclude PRs related to .github/actions from auto-run
permissions:
contents: read
packages: write
jobs:
check_paths:
uses: ./.github/workflows/check_paths.yml
check_if_pr_from_outside_repo:
needs: check_paths
if: needs.check_paths.outputs.githubfolder == 'false'
uses: ./.github/workflows/check_if_pr_from_outside_repo.yml
purge-pr-package:
name: Delete images from ghcr.io when PR is closed
needs:
- check_paths
- check_if_pr_from_outside_repo
if: needs.check_paths.outputs.githubfolder == 'false' && needs.check_if_pr_from_outside_repo.outputs.is_pr_from_outside_repo == 'false'
runs-on: ubuntu-24.04
concurrency:
group: "purge-pr-images"
steps:
- name: normalize version name to a valid string
# convert backslashes to dashes, so for example dependabot/x/y/z-1.2.3 works
id: normalize_version
shell: bash
run: |
VERSION="${{ github.head_ref }}"
NORMALIZED_VERSION="${VERSION//\//-}"
echo "normalized_version=${NORMALIZED_VERSION}" >> $GITHUB_OUTPUT
- uses: dataaxiom/ghcr-cleanup-action@cd0cdb900b5dbf3a6f2cc869f0dbb0b8211f50c4 # v1.0.16
name: Delete images for teslamate and teslamate/grafana from ghcr.io
with:
packages: "teslamate,teslamate/grafana"
token: ${{ secrets.GITHUB_TOKEN }}
delete-tags: "pr-${{ github.event.pull_request.number }}"
- uses: dataaxiom/ghcr-cleanup-action@cd0cdb900b5dbf3a6f2cc869f0dbb0b8211f50c4 # v1.0.16
name: Delete build cache images for teslamate from ghcr.io
with:
packages: "teslamate"
token: ${{ secrets.GITHUB_TOKEN }}
delete-tags: "buildcache-arm-${{ steps.normalize_version.outputs.normalized_version }},buildcache-arm64-${{ steps.normalize_version.outputs.normalized_version }},buildcache-amd64-${{ steps.normalize_version.outputs.normalized_version }}"
- uses: dataaxiom/ghcr-cleanup-action@cd0cdb900b5dbf3a6f2cc869f0dbb0b8211f50c4 # v1.0.16
name: Delete untagged images from ghcr.io
with:
packages: "teslamate,teslamate/grafana"
token: ${{ secrets.GITHUB_TOKEN }}
delete-untagged: "true"
delete-ghost-images: "true"
older-than: "1 day"
================================================
FILE: .github/workflows/spell_check.yml
================================================
name: Spell check
on:
workflow_call:
permissions:
contents: read
jobs:
spell_check:
name: Spell check
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Spell check
uses: crate-ci/typos@631208b7aac2daa8b707f55e7331f9112b0e062d # v1.44.0
================================================
FILE: .github/workflows/stale.yml
================================================
name: "Close Stale Issues and Pull Requests"
on:
schedule:
- cron: "45 0 * * *" # every day at 00:45 UTC
permissions:
issues: write
pull-requests: write
jobs:
stale:
runs-on: ubuntu-24.04
steps:
- uses: actions/stale@b5d41d4e1d5dceea10e7104786b73624c18a190f # v10.2.0
with:
stale-issue-message: >
This issue has been automatically marked as stale because
it has not had recent activity. It will be closed in 7 days if
no further activity occurs. Thank you for your contributions.
stale-pr-message: >
This pull request has been automatically marked as stale because
it has not had recent activity. It could be closed if no further
activity occurs. Thank you for your contributions.
days-before-stale: 30
days-before-close: 7
days-before-pr-close: -1
exempt-all-pr-milestones: true
exempt-issue-labels: "area:grafana, area:tesla api, enhancement, kind:bug, kind:documentation, kind:idea, note:needs investigation, security, pinned"
exempt-pr-labels: "awaiting-approval, area:grafana, area:tesla api, enhancement, kind:bug, kind:documentation, kind:idea, note:needs investigation, security, pinned"
================================================
FILE: .github/workflows/update-flake-lock.yml
================================================
---
name: Update flake.lock
on:
workflow_dispatch:
schedule:
# runs weekly on Saturday at 00:00 UTC time
- cron: "0 0 * * 6"
permissions:
contents: write
pull-requests: write
jobs:
lockfile:
runs-on: ubuntu-24.04
steps:
- name: Checkout repository
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Install Nix
uses: nixbuild/nix-quick-install-action@2c9db80fb984ceb1bcaa77cdda3fdf8cfba92035 # v34
- name: Nix binary cache
uses: nix-community/cache-nix-action@7df957e333c1e5da7721f60227dbba6d06080569 # v7.0.2
with:
# restore and save a cache using this key
primary-key: nix-${{ runner.os }}-${{ hashFiles('**/*.nix', '**/flake.lock') }}
# if there's no cache hit, restore a cache by this prefix
restore-prefixes-first-match: nix-${{ runner.os }}-
# collect garbage until Nix store size (in bytes) is at most this number
# before trying to save a new cache
# 1G = 1073741824
gc-max-store-size-linux: 1073741824
# do purge caches
purge: true
# purge all versions of the cache
purge-prefixes: nix-${{ runner.os }}-
# created more than this number of seconds ago
# relative to the start of the `Post Restore and save Nix store` phase
purge-created: 0
# except any version with the key that is the same as the `primary-key`
purge-primary-key: never
- name: Update flake.lock
id: update
uses: DeterminateSystems/update-flake-lock@834c491b2ece4de0bbd00d85214bb5e83b4da5c6 #v28
with:
pr-title: "build(deps): update flake.lock"
pr-labels: |
dependencies
automated
- name: Print PR number
run: echo Pull request number is ${{ steps.update.outputs.pull-request-number }}.
================================================
FILE: .gitignore
================================================
# The directory Mix will write compiled artifacts to.
/_build/
# If you run "mix test --cover", coverage assets end up here.
/cover/
# The directory Mix downloads your dependencies sources to.
/deps/
# Where 3rd-party dependencies like ExDoc output generated docs.
/doc/
# Ignore .fetch files in case you like to edit your project deps locally.
/.fetch
# If the VM crashes, it generates a dump, let's ignore it too.
erl_crash.dump
# Also ignore archive artifacts (built via "mix archive.build").
*.ez
# Ignore package tarball (built via "mix hex.build").
tesla_mate-*.tar
# If NPM crashes, it generates a log, let's ignore it too.
npm-debug.log
# The directory NPM downloads your dependencies sources to.
/assets/node_modules/
# Ignore assets that are produced by build tools.
/priv/static/assets/
# Ignore digested assets cache.
/priv/static/cache_manifest.json
# CDLR data repository
/priv/cldr/
# Files matching config/*.secret.exs pattern contain sensitive
# data and you should not commit them into version control.
#
# Alternatively, you may comment the line below and commit the
# secrets files as long as you replace their contents by environment
# variables.
/config/*.secret.exs
config/*.env
.env
/import/
.srtm_cache/
# Make sure IDE files don't get committed to the repo
.idea/
.eclipse/
.elixir_ls/
/.project
.vscode/
# Mac files
.DS_Store
/priv/plts/*.plt
/priv/plts/*.plt.hash
# Nix files
/.direnv
/.devenv
/tzdata/
/result
# Used during tests
/tmp/
================================================
FILE: .markdownlint.yaml
================================================
---
default: true
MD013:
line_length: 500
MD024:
siblings_only: true # heading duplication is allowed for non-sibling headings (common in changelogs)
MD033:
allowed_elements: ["details", "summary", "TabItem", "pre"]
================================================
FILE: .node-version
================================================
20
================================================
FILE: .typos.toml
================================================
[default.extend-words]
mosquitto = "mosquitto"
HASS = "HASS"
Juni = "Juni"
bck = "bck"
Automations = "Automations"
automations = "automations"
ws = "ws"
WS = "WS"
ro = "ro"
hd = "hd"
dur = "dur"
pn = "pn"
Derivated = "Derivated"
Bre = "Bre"
BRIN = "BRIN"
[type.po]
extend-glob = ["*.po"]
check-file = false
[files]
extend-exclude = ["*.json.example"]
================================================
FILE: CHANGELOG.md
================================================
# Changelog
## [unreleased]
### New features
### Improvements and bug fixes
- feat(webview): Sort vehicles by display_priority (#5188 - @olsoybakk and @swiffer)
- feat(webview): Make icons inherit text color for better contrast in dark mode (#5193 - @olsoybakk)
#### Build, CI, internal
- build(deps): bump ex_cldr from 2.46.0 to 2.47.1 to fix 100% CPU lock when accessing TeslaMate web (#5166)
- ci: migrate runners for arm from buildjet to gha native (#5206 - @adriankumpf)
- ci: limit DevOps workflow runs of type push to branch main to prevent duplicate runs on PR (#5211 - @swiffer)
- build(deps): update flake.lock (#5186)
- fix(nix): update mix dependency hash in nix builds (#5186 - @JakobLichterfeld)
- build(deps): bump actions/stale from 10.1.1 to 10.2.0 (#5162)
- build(deps): bump crate-ci/typos from 1.42.3 to 1.44.0 (#5163)
- build(deps): bump finch from 0.20.0 to 0.21.0 (#5165)
- build(deps): bump immutable from 5.1.4 to 5.1.5 in /assets (#5176)
- build(deps): bump svgo from 3.3.2 to 3.3.3 in /website (#5177)
- ci: bump actions to avoid warnings for node 20 (#5213 - @swiffer)
- ci: ensure fully purging PR related tags for images hosted on GHCR on PR close (#5212 - @swiffer)
- ci: build images for main branch and use buildcache of main as fallback for PR builds (#5212 - @swiffer)
- ci: run Purge PR images workflow only if PR is from our own repo (#5217 - @swiffer)
- ci: for check_paths ensure the job value is retrieved and set as workflow output correctly (#5219 - @swiffer)
#### Dashboards
- fix: use FLOOR/CEIL over ROUND for timestamps used in dashboard links to avoid timeranges becoming to narrow (#5187 - @swiffer)
- fix: ensure Charges / Drives dashboards load correctly if no Geofence exists (#5199 - @swiffer)
- fix: division by zero in SQL query for cost_mileage in Trips dashboard (#5198 - @DrMichael)
#### Translations
- i18n: updated Catalan default.po (#5180 - @pellix)
#### Documentation
- docs: drop private schema before restore (#5190 - @brianmay)
## [3.0.0] - 2026-02-28
Let's start with a quote: "Why do programmers like dark mode? Because light attracts bugs.". Yes, you read that right. TeslaMate Webview now has a dark mode.
As always, lots of improvements have been made. Memory usage has been reduced, while performance has been increased — it sounds too good to be true, but it's the reality.
Battery heating is now also shown on the overview dashboard, and the drives dashboard now always shows the consumption.
To make your TeslaMate experience even better, we have also made more than 52 other improvements.
Enjoy!
### 📄 License Change Notice
As of PR #5131, TeslaMate has transitioned from the MIT License to the GNU Affero General Public License v3.0 (AGPLv3).
What does this mean for you?
- For Private Users: Nothing changes. You can continue to use, host, and modify TeslaMate for your personal use for free, just as before.
- For the Community: This change ensures that TeslaMate remains open and free. It prevents companies from taking the community's hard work and turning it into a closed-source commercial service without giving back.
- For Developers: If you modify or use TeslaMate, you must now share your source code modifications under the same license.
We believe this step is necessary to protect the project from exploitation and to ensure its long-term sustainability.
### Known issues
- We have received reports from users suffering with "No Data" errors when viewing dashboards in Grafana (#5157).
This issue is currently assumed to be instance specific and caused by changes in Grafana (v12.1.1 -> v12.4.0). If you are affected please try saving the TeslaMate datasource by clicking on "Save & test" in Grafana -> Connections -> Data sources -> TeslaMate.
- Dashboards containing a Geofence filter fail to load if no Geofence is defined (#5191). While being a regression in Grafana v12.4.0 most likely it can be fixed by defining at least one Geofence. We will provide a workaround in TeslaMate v3.0.1 until it's fixed upstream.
### New features
- feat: add optional dark mode feature (#5065 - @wooter)
- legal: relicense under AGPLv3 (#5131 - @JakobLichterfeld)
- legal: add Trademark notice (#5131 - @JakobLichterfeld)
- feat: use Bulma 1 for dark theme and revised it (#5112 - @swiffer)
### Improvements and bug fixes
- feat: use Logger instead of IO.puts in DB check (#5050 - @swiffer)
- feat: Increase max_header_value_length to support oauth2-proxy (#5031 - @ultravail)
- perf: Replace positions indexes from BTREE to BRIN to reduce memory usage (#5075 - @ilya-y-synth)
- feat(grafana): disable update checks as version is handled via docker image (#5115 - @fatbasstard)
- perf: use static asset compression via brotli and zstandard to enhance HTTP Compression (#5113 - @swiffer)
- feat: use Grafana 12.4.0 (#4965 - @swiffer)
- fix(vehicle): update state transition to handle offline scenario after a drive end with no network (#5152 - @jlestel)
#### Build, CI, internal
- build(deps): bump mdast-util-to-hast from 13.2.0 to 13.2.1 in /website (#5059)
- build(deps): bump js-yaml from 3.14.1 to 3.14.2 in /website (#5043)
- build(deps): bump crate-ci/typos from 1.39.0 to 1.40.0 (#5055)
- build(deps): bump DeterminateSystems/update-flake-lock from 27 to 28 (#5056)
- build(deps): bump express from 4.21.2 to 4.22.1 in /website (#5060)
- build(deps): update flake.lock (#5027)
- fix(website): Bump node-forge to 1.3.3 to resolve CVE-2025-12816, CVE-2025-66030 and CVE-2025-66031 (#5071 - @JakobLichterfeld)
- chore(website): bump qs to fix CVE-2025-15284 (#5091 - @JakobLichterfeld)
- build(deps): bump react and react-dom from 19.2.0 to 19.2.3 in /website (#5084)
- build(deps): bump nix-community/cache-nix-action from 6.1.3 to 7.0.0 (#5082)
- build(deps): bump actions/cache from 4.3.0 to 5.0.1 (#5077)
- build(deps): bump crate-ci/typos from 1.40.0 to 1.41.0 (#5079)
- build(deps): bump actions/stale from 10.1.0 to 10.1.1 (#5080)
- build(deps): bump lodash from 4.17.21 to 4.17.23 in /website (#5109)
- build(deps): bump lodash and @geoman-io/leaflet-geoman-free in /assets (#5126)
- build(deps): bump react and react-dom from 19.2.3 to 19.2.4 in /website (#5124)
- build(deps): bump crate-ci/typos from 1.41.0 to 1.42.3 (#5123)
- build(deps): bump docker/login-action from 3.6.0 to 3.7.0 (#5119)
- build(deps): bump nix-community/cache-nix-action from 7.0.0 to 7.0.2 (#5122)
- build(deps): bump actions/cache from 5.0.1 to 5.0.3 (#5120)
- build(deps): bump webpack from 5.102.0 to 5.105.0 in /website (#5135)
- feat(nix): use nixos-25.11 (#5062 - @JakobLichterfeld)
- chore(nix): update flake.lock with new dependency revisions (#5062 - @JakobLichterfeld)
- build(nix): use elixir 1.19 to align with dockerfile (#5062 - @JakobLichterfeld)
- chore: reorganize CLI definition to avoid elixir 1.19 warning (#5062 - @JakobLichterfeld)
- build: update db_connection to version 2.9.0 (#5062 - @JakobLichterfeld)
- build: use Elixir 1.19.5 OTP 26 (#5130 - @swiffer, @brianmay and @JakobLichterfeld)
- build(deps): bump qs from 6.14.1 to 6.14.2 in /website (#5140)
- build(deps): update & bump mix deps (#5139 - @swiffer)
- build(deps): bump ex_cldr from 2.42.0 to 2.46.0 (#5053 - @JakobLichterfeld)
- build(deps): bump floki & gettext, remove override on ranch, require elixir 1.19 (#5142 - @swiffer)
- feat(grafana-home-dashboard): change cors proxy (#5143 - @swiffer)
- build(deps): update flake.lock (#5141)
- build(deps): relax requirement for elixir to allow 1.17+ and clarify what is supported (#5145 - @swiffer)
- build(deps): update flake.lock (#5148)
- build(deps): update flake.lock (#5154)
- build(deps): bump ajv in /website (#5149)
- chore(website): bump mimimatch to version 3.1.5 to solve CVE-2026-26996, CVE-2026-27903 and CVE-2026-27904 (#5155 - @JakobLichterfeld)
- chore(website): bump serialize-javascript to version 7.0.3 to solve CWE-96 (#5156 - @JakobLichterfeld)
#### Dashboards
- feat(overview): show battery heating on overview dashboard as well (#5090 - @kaistian)
- feat: optimize reduced_range query and always show consumption kwh in drives dashboard (#5089 - @swiffer)
#### Translations
#### Documentation
- docs(traefik): update to v3.6 as 3.6.1 solves issues with docker 29.0 (#5034 - @JakobLichterfeld)
- docs: fix the formatting of the `DATABASE_SOCKET_DIR` description (#5026 - @IngmarStein)
- docs: fix external image rendering with Traefik SSL (#5074 - @swiffer)
- docs(home_assistant): default tesla_active_route_distance_to_arrival sensor to kilometers (#5086 - @kenni)
- docs: Remove hints to now deprecated Grafana VS Code Extension in contribution guide (#5110 - @swiffer)
- docs: Add reference to TeslaMate Achievements (#5134 - @crstian19)
## [2.2.0] - 2025-11-06
As always, there have been many improvements. We now support a proxy for the OpenStreetMap API. If you live in a geo-blocked location, this could simplify your setup. Your tokens are now more secure.
We use the latest dependencies and support PostgreSQL 18 (To update, back up your data and follow [the guide](https://docs.teslamate.org/docs/maintenance/upgrading_postgres) **Please note: Volume mounts have changed in PostgreSQL18, see point 4 of the guide.**).
We also avoid memory bloat on misconfigured Docker hosts. If your host has limited hardware, this will greatly improve your experience.
The dashboards have been improved in terms of performance, and all dashboards now function as expected when set to miles.
Enjoy it.
### New features
- feat: support proxy for openstreet API (#4970 - @jaypark0006)
### Improvements and bug fixes
- sec: set tokens to private schema (#4968 -@brianmay)
- build(deps): use elixir 1.18.4, node 22 & debian trixie (#4889 - @swiffer)
- fix: allow using different PostgreSQL port than default when using socket_dir connection (#4979 - @jaypark0006)
- perf: use anti join for short-circuit evaluation when getting non streamed drives (#4990 - @swiffer)
- feat: Add ulimit cap to prevent memory bloat in some misconfigured versions of Docker/containerd Hosts (e.g. on Debian 13) (#5025 - @JakobLichterfeld)
- feat: officially support PostgreSQL 18 (#4890 - @swiffer)
#### Build, CI, internal
- build(deps): update flake.lock (#4911)
- build(deps): bump @docusaurus/core from 3.8.1 to 3.9.1, @docusaurus/preset-classic from 3.8.1 to 3.9.1, bump dependencies in /website (#4977 - @JakobLichterfeld)
- build(deps): bump actions/checkout from 4.2.2 to 5.0.0 (#4933)
- build(deps): bump actions/cache from 4.2.3 to 4.3.0 (#4972)
- build(deps): bump nixbuild/nix-quick-install-action from 32 to 34 (#4974)
- build(deps): bump docker/login-action from 3.4.0 to 3.6.0 (#4975)
- build(deps): bump crate-ci/typos from 1.34.0 to 1.37.0 (#4976)
- build(deps): bump finch from 0.19.0 to 0.20.0 (#4929)
- build(deps): update flake.lock (#4991)
- build(deps): update flake.lock (#4997)
- build(deps): bump actions/stale from 9.1.0 to 10.1.0 (#5019)
- build(deps): bump @docusaurus/core from 3.9.1 to 3.9.2, @docusaurus/preset-classic from 3.9.1 to 3.9.2 and dependencies in /website (#5020)
#### Dashboards
- fix: charging stats now correctly calculate cost when set to miles (#4983 - @DrMichael)
- perf: Optimize Grafana query for trip view to leverage indexes more effectively (#4964 - @jaypark0006)
- feat: add shared buffers size to db info dashboard (#4989 - @swiffer)
- fix: cast to numeric instead of integer when converting from km to miles to avoid rounding issues in all dashboards (#4986 - @swiffer)
- fix: correctly determine charging phases in charge detail dashboard (#4988 - @swiffer)
#### Translations
- i18n: add spanish car location translation (#4892 - @jpizquierdo)
- i18n: add missing italian translations, correct the gender of some words and use more uniform translations (#4920 - @giovaorama)
- i18n: add thai car location translation (#4956 - @tomzt)
- i18n: update Traditional Chinese translations with missing translations and to avoid PRC terms and ensure consistency across UI strings (#4995 - @occultsound)
#### Documentation
- docs: for new installs, pin postgres container to debian trixie to avoid collation version mismatch (#4901 - @swiffer)
- docs: Update FreeBSD and Debian instructions to use GRAFANA_API_TOKEN for the dashboard writes (#4942 - @uqs)
- docs: rename Home Assistant object_id to default_entity_id to be compliant with latest HA (#4980 - @MrPaulAR)
- docs: explain MQTT in Readme via link to Wikipedia (#4985 - @DanCard)
- docs(dev): provide guidelines for checking dependency updates before merging (#4969 - @JakobLichterfeld)
- docs: add domain prefix to Home Assistant default_entity_id (#5014 - @gym22)
- docs: add star history (#5024 - @JakobLichterfeld)
- docs: bump Traefik to v3.5 and enable http3 in advanced guide (#5023 - @swiffer)
- docs: add docs for volume mount change with PostgreSQL 18 (#4890 - @swiffer)
## [2.1.1] - 2025-08-16
As always, there have been many improvements. We now use the latest version of Grafana (12.1.1) and have enhanced the database migration process to include the new ascent and descent values, allowing successful migration even when entries are faulty. Previously, this prevented the migration from succeeding for some users. This highlights the importance of user feedback. Such cases never occurred in our testing.
Enjoy it.
### New features
- feat(nix): add idiomatic maintenance scripts (#4849 - @JakobLichterfeld)
### Improvements and bug fixes
- feat(webview): show offline duration in extended view on mobile as well to improve UX (#4848 - @JakobLichterfeld)
- feat: use Grafana 12.1.0 (#4855 - @swiffer)
- feat(nix): use datasources.settings.datasources to allow merging Grafana sources from multiple modules (#4870 - @JakobLichterfeld)
- fix(nix): correctly set default Grafana dashboard path (#4870 - @JakobLichterfeld)
- feat(nix): allow disabling default Grafana dashboard with setDefaultDashboard option (#4870 - @JakobLichterfeld)
- fix: set descent and ascent to 0 when out of bounds (> 32767 meters) to ensure migration succeeds (#4882 - @swiffer)
- feat: use Grafana 12.1.1 (#4886 - @swiffer)
- feat(webview): update wording to View car location on Google Maps for clarity (#4875 - @JakobLichterfeld)
#### Build, CI, internal
- style(issue-template): typo fix in Unraid (#4842 - @JakobLichterfeld)
- build(deps): update flake.lock (#4858)
- build(deps): bump DeterminateSystems/update-flake-lock from 25 to 27 (#4864)
- build(deps): bump react and react-dom from 19.1.0 to 19.1.1 in /website (#4865 - @JakobLichterfeld)
- build(deps): bump ecto_sql from 3.12.1 to 3.13.2 (#4863)
- build(deps): update flake.lock (#4867)
- build(deps): bump phoenix_ecto from 4.6.4 to 4.6.5 (#4862)
- build(deps): update flake.lock (#4881)
- build(deps): update flake.lock (#4888)
#### Dashboards
#### Translations
- i18n: fix de translation for car location link (#4844 - @JakobLichterfeld)
#### Documentation
- docs: add reference to idiomatic nix backup and restore scripts (#4849 - @JakobLichterfeld)
- docs: add reference to idiomatic nix maintenance scripts (#4849 - @JakobLichterfeld)
## [2.1.0] - 2025-07-21
As always, there are many improvements. We have introduced new database fields to store the total ascent and descent of a drive, which can be used in the drives and efficiency dashboards. This is a valuable addition for users who wish to analyze their driving patterns and performance in hilly areas, and it enhances the efficiency metrics.
The database will be migrated automatically to include these new fields. Depending on your host and the size of your database, this process may take some time. Please be patient and wait for the process to finish (depending on your host, it takes a few seconds to about a minute on a Raspberry Pi 3B+ with a 1 GB database).
We now use the latest Grafana 12.0.1, and you can now open a Google Maps link for the car's current location by clicking on the location marker icon in the webview to quickly navigate to your car's location, without having to open the Tesla app.
Additionally, we have fixed some issues with the consumption for drives with a positive SOC difference, and we have aligned the usage of time-range filters to resolve consumption gross issues in some edge cases.
The charging stats are now even more consistent. We now detect consecutive charges and exclude them from the charge / discharge stats (PV surplus charging: we've got you covered).
Enjoy it.
### New features
- feat(webview): add map marker icon to open Google Maps link with car's current location (#4838 - @JakobLichterfeld)
- feat: add total ascent & descent to the drive table to use in the drives dashboards (#4798 - @swiffer)
- feat(nix): add idiomatic backup and restore scripts (#4835 - @JakobLichterfeld)
### Improvements and bug fixes
- fix(nix): update cldr hash (#4723 - @brianmay)
- feat: use Grafana 12.0.0 (#4721 - @swiffer)
- feat: use Grafana 12.0.1 (#4756 - @swiffer)
- feat: preserve the folders when restoring dashboards (#4715 - @IngmarStein)
- feat: use Grafana 12.0.1+security-01 (#4799 - @swiffer)
- feat: use Grafana 12.0.2 (#4805 - @swiffer)
- feat(mqtt): always publish healthy status and disable retain to prevent stale healthy status via mqtt (#4817 - @allivshits)
- feat: use the k8s-style API introduced in Grafana v12 if using manual dashboard setup (#4764- @IngmarStein)
- feat(db-check): allow beta / rc PostgreSQL versions for testing (#4795 - @swiffer)
- feat: enhance HTTP limits for managing fleets with over 10 vehicles (#4607 - @jlestel)
#### Build, CI, internal
- build(deps): bump tzdata from 1.1.2 to 1.1.3 (#4713)
- build(deps-dev): bump mock from 0.3.8 to 0.3.9 (#4712)
- build(deps-dev): bump credo from 1.7.11 to 1.7.12 (#4711)
- build(deps): bump crate-ci/typos from 1.31.1 to 1.31.2 (#4710)
- fix(nix): update mix dependency hash in nix builds ([08fe0ac](https://github.com/teslamate-org/teslamate/commit/08fe0ac934176484c84fd4329c8d64925b6b0b97) - @JakobLichterfeld)
- feat(nix): use nixos-25.05 (#4716 - @JakobLichterfeld)
- build(deps): update flake.lock (#4716)
- fix(nix): skip duplicate cldr download to fix build on darwin and improve reproducibility (#4763 - @JakobLichterfeld)
- build(deps): bump DeterminateSystems/update-flake-lock from 24 to 25 (#4774)
- build(deps): bump crate-ci/typos from 1.31.2 to 1.32.0 (#4775)
- build(deps): bump castore from 1.0.12 to 1.0.14 (#4778)
- build(deps): update flake.lock (#4772)
- build(deps): bump phoenix_ecto from 4.6.3 to 4.6.4 (#4779)
- build(deps): bump @docusaurus/preset-classic from 3.7.0 to 3.8.0 in /website (#4776)
- build(deps): bump @docusaurus/core from 3.7.0 to 3.8.0, @docusaurus/preset-classic from 3.8.0 to 3.8.1, bump dependencies in /website (#4777 - @JakobLichterfeld)
- build(deps): bump nixbuild/nix-quick-install-action from 30 to 32 (#4813)
- build(deps): bump brace-expansion from 1.1.11 to 1.1.12 in /website (#4821)
- build(deps): bump plug_cowboy from 2.7.3 to 2.7.4 (#4816)
- build(deps): bump crate-ci/typos from 1.33.1 to 1.34.0 (#4814)
- build(deps): bump timex from 3.7.11 to 3.7.13 (#4815)
- build(deps): update flake.lock (#4828 - @JakobLichterfeld)
- build(nix): update mix dependency hash in nix builds (#4828 - @JakobLichterfeld)
- chore(issue-template): enhance bug report template with additional fields and guidance (#4827 - @JakobLichterfeld)
- build(deps): bump on-headers from 1.0.2 to 1.1.0 and compression from 1.0.2 to 1.1.0 in /website (#4831)
- sec(deps): override webpack-dev-server to version 5.2.1 to fix CVE-2025-30360 (#4833 - @JakobLichterfeld)
- ci(coverage): explicitly set mix-env to test ([322c2a2](https://github.com/teslamate-org/teslamate/commit/322c2a26e61ce68d5b44cb7f0f1a7c1820e0164d) and [e6931ab](https://github.com/teslamate-org/teslamate/commit/e6931aba6809c457cc7224aec934b8e419d2c116) - @JakobLichterfeld)
- fix(mix): add "coveralls.github" to preferred_cli_env to avoid missing task error in CI runs ([1c76994](https://github.com/teslamate-org/teslamate/commit/1c76994b563a4e61514a1cf62c310532775add46) - @JakobLichterfeld)
- build(deps): update flake.lock (#4834)
- chore(issue-template): update bug report template to include Unraid as unsupported installation method (#4829 - @JakobLichterfeld)
#### Dashboards
- fix: new image on home dashboard as old got removed from Tesla mediaserver (#4702 - @JakobLichterfeld, @swiffer)
- feat: update image on home dashboard to juniper and back to dark (#4742 - @swiffer)
- fix: consumption for drives with positive soc diff (#4746 - @swiffer)
- fix: align usage of time-range filters to fix consumption gross issues in some edge cases (#4787 - @swiffer)
- feat(dashboards-Charging-Stats): align query conditions and introduce a min duration filter applied to all panels to ensure consistent charging stats (#4791 - @swiffer)
- feat(dashboards): reliably calculate charging costs per 100 km for shorter periods and align across trip, statistics and charging stats dashboards (#4791 - @swiffer)
- feat(dashboards): detect consecutive charges and exclude from Charge / Discharge Stats (#4791 - @swiffer)
- feat(dashboards): introduce slope-adjusted efficiency metric in drives dashboard (#4798 - @swiffer)
#### Translations
- i18n: create Catalan default.po (#4727 and #4728 - @pellix)
- i18n: more descriptive italian localization (#4748 -@StarkITA)
#### Documentation
- docs: improvement to the Debian installation instructions (#4734 - @iustin)
- docs: add note on accessory power functionality can prevent car sleep (#4737 - @darox)
- docs: clarify pricing for Teslemetry (#4705 - @Bre77)
- docs: add NixOS installation guide (#4768 - @JakobLichterfeld)
- doc: add OpenSSF scorecard (#4819 - @JakobLichterfeld)
- docs: streamline installation guides (#4829 - @JakobLichterfeld)
- docs: add nix develop to run treefmt to support non nix direnv users (#4829 - @JakobLichterfeld)
- docs: add Unraid installation and maintenance instructions (no support) (#4758, #4829 - @vypergts and @JakobLichterfeld)
- docs: clarify the use of secure connection to access TeslaMate (#4829 - @JakobLichterfeld)
- docs: reorder guides into advanced guides, categories FleetAPI documentation as config (#4829 - @JakobLichterfeld)
- docs: clarify which installation methods are supported and which are not (#4829 - @JakobLichterfeld)
- docs: mention dedicated version for MCU2 upgraded cars (#4829 - @JakobLichterfeld)
## [2.0.0] - 2025-04-26
**This is a breaking change release:** TeslaMate uses PostgreSQL as database, this is an external dependency and needs to be updated by yourself. We now require PostgreSQL 16.7 or 17.3 or higher as we are upgrading the bundled earthdistance extension to v1.2. TeslaMate will now fail to start if you are using an older version. Ensure to upgrade your database before upgrading TeslaMate. To upgrade PostgreSQL, you need to follow these instructions:
- [Backup your data](https://docs.teslamate.org/docs/maintenance/backup_restore#backup)
- [Upgrade PostgreSQL to postgres:17](https://docs.teslamate.org/docs/maintenance/upgrading_postgres) (Yes, you will have to erase your data, which is why you need your backup in the first place.)
- [Upgrade TeslaMate to this version](https://docs.teslamate.org/docs/upgrading)
- [Backup your data after the upgrade](https://docs.teslamate.org/docs/maintenance/backup_restore#backup)
**Note for user which revoked permissions:** If the SUPERUSER privilege has been revoked after the initial (manual) installation, it must be temporarily granted for pending earthdistance migrations to succeed. The privilege can then be safely revoked.
As always, there are also many improvements. The webview now shows the TPMS values in the low pressure tooltip. We use the latest Grafana 11.6.1 and have improved the battery health dashboard and aligned the range calculation through the dashboards. Additionally time zone handling has been improved and the date formats are now based on the browser locale.
Enjoy it.
**Note for contributors:** The default branch was renamed to `main`. Please update your local repository accordingly (see GitHub hint when visiting [teslamate-org/teslamate](https://github.com/teslamate-org/teslamate) or [GitHub documentation](https://docs.github.com/en/repositories/configuring-branches-and-merges-in-your-repository/managing-branches-in-your-repository/renaming-a-branch#updating-a-local-clone-after-a-branch-name-changes) for more information).
### Breaking Changes
- feat: check Postgres version on startup, require 16.7 / 17.3, update earthdistance extension (#4648 - @swiffer)
### New features
- feat: show tpms value to the low pressure tooltip in webview (#4654 - @NirKli)
### Improvements and bug fixes
- fix(nix): non-recursive provider for ../grafana/dashboards (#4680 - @swiffer)
- feat: use Grafana 11.6.1 (#4662 - @swiffer)
#### Build, CI, internal
- build(deps): bump image-size from 1.2.0 to 1.2.1 in /website (#4622)
- ci: switch to cache-nix-action as Magic Nix Cache is deprecated (#4626 - @JakobLichterfeld)
- build(deps): update flake.lock (#4603)
- build(deps): bump crate-ci/typos from 1.30.0 to 1.31.1 (#4611)
- build(deps): bump docker/login-action from 3.3.0 to 3.4.0 (#4612)
- build(deps): bump actions/cache from 4.2.2 to 4.2.3 (#4613)
- build(deps): bump tesla from 1.13.2 to 1.14.1 (#4616)
- ci(sec): remove pull_request_target workflow triggers to improve sec even further, the downside is that test images are now only created for repo's own PRs (#4637 - @JakobLichterfeld / Thanks to @Firebasky for responsibly disclosing the vulnerability)
- ci: fix ghcr build ([..ddf85e6](https://github.com/teslamate-org/teslamate/commit/ba35f417014e6be742ee2b0713cfa7876ddf85e6) - @JakobLichterfeld)
- ci: ensure ghcr images build correctly even if branch contains backslash (#4655 - @JakobLichterfeld)
- ci: skip ghcr build for PRs from outside repo (#4660 and [462b568](https://github.com/teslamate-org/teslamate/commit/462b5680abbfbdfd26f028d88f7a62f4ae4183cd) - @JakobLichterfeld)
- build(deps): bump estree-util-value-to-estree in /website (#4641)
- build(deps): update flake.lock (#4653)
- fix(nix): update mix dependency hash in nix builds ([3d08431](https://github.com/teslamate-org/teslamate/commit/3d08431ee3de0eaf3d3045aa0018c687627c4dac) - @JakobLichterfeld)
- ci(dependabot): add ignore rules for path-based dependencies (#4666 - @JakobLichterfeld)
- sec: upgrade esbuild to 0.25.2 and esbuild-sass-plugin to 3.3.1 to avoid GHSA-67mh-4wv8-2f99 (#4669 - @JakobLichterfeld)
- build(deps): bump http-proxy-middleware from 2.0.7 to 2.0.9 in /website (#4670)
- build(deps): bump phoenix_html from 4.2.0 to 4.2.1 (#4667)
- build(deps): bump ex_cldr from 2.40.2 to 2.42.0 (#4615)
- build(deps): bump react from 18.3.1 to 19.1.0 and docusaurus/core from 3.4.0 to 3.7.0 in /website (#4618 - @JakobLichterfeld)
- build(deps): bump phoenix_ecto from 4.6.2 to 4.6.3 (#4333)
- build(deps): update flake.lock (#4674)
- fix(nix): update mix dependency hash in nix builds (#4695 - @JakobLichterfeld)
- chore: rename branch to main (#4700 - @JakobLichterfeld and @adriankumpf)
- build(deps-dev): bump phoenix_live_reload from 1.5.3 to 1.6.0 (#4699)
- build(deps): bump tortoise311 from 0.12.0 to 0.12.1 (#4698)
- build(deps): bump nix-community/cache-nix-action from 6.1.2 to 6.1.3 (#4696)
- build(deps): bump floki from 0.36.3 to 0.37.1 (#4697)
#### Dashboards
- fix: improve calc for usable (now) in battery health dashboard (#4644 - @swiffer)
- feat: make use of car filter, add timefilter in locations dashboard (#4647 - @swiffer)
- fix: use same rated range calculation in updates dashboard as in battery health dashboard (#4682 - @swiffer)
- fix: explicitly set height of home dashboard background image based on current layout & grafana css (#4681 -@swiffer)
- fix: set $\_\_timezone explicitly in dashboards to ensure truncation is done with respect to the Grafana timezone (#4684 - @swiffer)
- fix: issues when using browser locale for date formats (#4662 - @swiffer)
- fix: widens Date Columns to fully show date strings formatted in US locale (#4662 - @swiffer)
- feat: add duration time to charges details dashboard (#4677 - @jheredianet)
#### Translations
#### Documentation
- chore(issue-template): add PostgreSQL version input and checkbox for latest version check in bug report template (#4643 - @JakobLichterfeld)
- docs: allow to add energy added to the Home Assistant's Energy tab to measure how much energy each session uses (#4659 - @alexsapran)
- docs: update changelog with breaking changes description (#4691 - @JakobLichterfeld)
## [1.33.0] - 2025-03-28
As always, there are many improvements.
We now use Grafana 11.6.0 which was release the last days, improved the logging and state transitions, added a new dashboard for database information and improved other dashboards. We also added a new section to the documentation about the Entity Relationship Model (ERM) of TeslaMate. This is a great help for developers who want to understand the data model of TeslaMate and how to extend it.
Enjoy it.
### New features
### Improvements and bug fixes
- fix(nix): wait for mosquitto to start before starting teslamate (#4419 - @brianmay)
- feat: use Grafana 11.4.0 (#4299 - @swiffer)
- feat: improve logging messages (#4467 - @micves and @brianmay)
- feat: optimize state transitions (#4473 - @micves and @brianmay)
- don't try to sleep if power > 0
- cancel an ongoing suspended state/trying to sleep and go back to online
- add conditions to enter charging
- feat: support accessing PostgreSQL on unix domain sockets (#4456 - @j-baker)
- fix(nix): temporarily disable browser locale in date formats for nix deployment as well (#4480 - @swiffer)
- feat: Grafana 11.5.0 (#4509 - @swiffer)
- feat: Grafana 11.5.2 (#4551 - @swiffer)
- fix(nix): update mix dependency hash in nix builds. (#4577 - @weiren2)
- feat: Grafana 11.6.0 (#4570 - @swiffer)
#### Build, CI, internal
- build(deps): bump castore from 1.0.9 to 1.0.10 (#4414)
- build(deps): bump @docusaurus/preset-classic from 3.5.2 to 3.6.3 in /website (#4412)
- build(deps): bump path-to-regexp from 1.8.0 to 1.9.0 in /website (#4424)
- build(deps): bump crate-ci/typos from 1.27.0 to 1.28.1 (#4411)
- build(deps): bump tesla from 1.13.0 to 1.13.2 (#4416)
- build(deps): bump postgrex from 0.19.1 to 0.19.3 (#4415)
- build(nix): switch to nixos-24.11 (#4420 - @brianmay)
- build(deps): update flake.lock (#4427)
- fix: update mix deps hash to fix build error on recent NixOS 24.11 update (#4428)
- build(deps): bump path-to-regexp and express in /website (#4433)
- build(deps): update flake.lock (#4440)
- build(deps): bump actions/cache from 4.1.2 to 4.2.0 (#4465)
- build(deps): bump phoenix from 1.7.14 to 1.7.18 (#4462)
- build(deps-dev): bump dialyxir from 1.4.4 to 1.4.5 (#4460)
- build(deps): bump ex_cldr from 2.40.1 to 2.40.2 (#4461)
- build(deps): bump crate-ci/typos from 1.28.1 to 1.29.0 (#4464)
- ci: update actions/cache to v4.2.0 ([79107d5](https://github.com/teslamate-org/teslamate/commit/79107d53b7712934587bbe40c503e63d5dd9f122) - @JakobLichterfeld)
- build(deps): bump DeterminateSystems/magic-nix-cache-action from 8 to 9 (#4515)
- build(deps): bump actions/stale from 9.0.0 to 9.1.0 (#4516)
- build(deps): bump crate-ci/typos from 1.29.0 to 1.29.5 (#4514)
- build(deps-dev): bump excoveralls from 0.18.3 to 0.18.5 (#4524)
- build(deps-dev): bump credo from 1.7.8 to 1.7.11 (#4523)
- build(deps): bump @docusaurus/preset-classic from 3.6.3 to 3.7.0 in /website (#4518)
- build(deps): bump serialize-javascript from 6.0.1 to 6.0.2 in /website (#4548)
- build(deps): update flake.lock (#4455)
- style(markdownlint): allow 'details', 'summary', and 'TabItem' elements ([d5b1a55](https://github.com/teslamate-org/teslamate/commit/d5b1a55007eefedd5d852ecd50d67b8c4d36faa5) - @JakobLichterfeld)
- style(environment_variables): remove multiple whitespaces ([603ff82](https://github.com/teslamate-org/teslamate/commit/603ff824b052b4465fcce9fe77e5e40ad586c07a) - @JakobLichterfeld)
- style(docs): fix line length fenced-code-style, no bare url links, multiple whitespaces, alt text, header style ([1972584](https://github.com/teslamate-org/teslamate/commit/1972584d8f9d11c2f640de046a8e9fd47b43c4fb) - @JakobLichterfeld)
- build(deps): bump actions/cache from 4.2.0 to 4.2.2 (#4564)
- build(deps): bump crate-ci/typos from 1.29.5 to 1.30.0 (#4563)
- build(deps): bump castore from 1.0.11 to 1.0.12 (#4565)
- build(deps): bump plug_cowboy from 2.7.2 to 2.7.3 (#4566)
- build(deps): bump prismjs from 1.29.0 to 1.30.0 in /website (#4582)
- build(deps): bump @babel/runtime from 7.26.0 to 7.26.10 in /website (#4589)
- build(deps): bump @babel/helpers from 7.26.7 to 7.26.10 in /website (#4588)
- build(deps): bump @babel/runtime-corejs3 in /website (#4587)
- build(deps): update flake.lock (#4562)
#### Dashboards
- fix: for battery health dashboard erroring out if no charge data has been collected so far (#4448 - @swiffer)
- fix: url for releases in home dashboard (#4452 -@FLX3009)
- feat: add 0 as lower bound for gauge to ensure proper scaling (#4498 - @swiffer)
- feat(dashboards): improve elevation scale in drive stats (#4546 - @swiffer)
- feat: add Database Information Dashboard (#4578 - @jheredianet)
#### Translations
- feat: Translate remaining Spanish sentences (#4529 - @jheredianet)
#### Documentation
- doc: bump elixir based on availability (#4431 - @swiffer)
- doc: align node req with what is used in CI (#4430 - @swiffer)
- doc: added missing topic "charging_state" in mqtt doc (#4466 - @Beme99)
- docs: Grafana 11.4 for manual install on FreeBSD (#4474 - @swiffer)
- doc: Fixing typo for sensor psi calculation (#4470 - @Phazz)
- doc: Simplify Home Assistant sensors, add device_class to allow changing measurement units (#4472 - @longzheng)
- docs: add reindexing instructions for database maintenance to improve performance in case of index bloat due to frequent updates or deletions (#4558 and #4574 - @jheredianet)
- docs: Update projects using TeslaMate (#4573 - @jheredianet)
- docs: fix and rearrange screenshot links (alphabetical) (#4580 - @swiffer)
- docs: enhance TeslaFi import documentation with updated Python script for bulk data export (#4575 - @TheLinuxGuy and @JakobLichterfeld)
- docs: add Entity Relationship Model section to development documentation (#4586 - @DrMichael and @JakobLichterfeld)
## [1.32.0] - 2024-11-23
As always, there are many improvements. The focus has been on quality of life improvements and standardization across all dashboards. Enjoy it.
### New features
### Improvements and bug fixes
- feat: use Grafana 11.2.3 (#4338 - @swiffer)
- feat: Update marketing name to recognize Model S LR+ (#4370 - @cwanja)
- fix(nix): bump hash for dependencies (#4371 - @brianmay)
#### Build, CI, internal
- ci: remove unknown flag --ref for gh cache delete in cleanup_caches workflow ([3a515df](https://github.com/teslamate-org/teslamate/commit/3a515df5aa400139acf8ef638e5ae37339c553cf) - @JakobLichterfeld)
- build(deps): bump actions/checkout from 4.2.1 to 4.2.2 (#4340)
- build(deps): bump actions/cache from 4.0.2 to 4.1.2 (#4341)
- build(deps): bump cachix/install-nix-action from 27 to 30 (#4342)
- build(deps): bump tesla from 1.12.1 to 1.13.0 (#4335)
- build(deps): bump floki from 0.36.2 to 0.36.3 (#4336)
- feat: add CONTRIBUTING file to exclusion lists for treefmt (#4359 - @JakobLichterfeld)
- ci: create PR to update flake.lock every saturday (#4372 - @brianmay)
- ci(fix): correct permissions for flake.lock updates ([c673ef3](https://github.com/teslamate-org/teslamate/commit/c673ef363ba73ad076680d71ef54bd549582d41f)- @JakobLichterfeld)
- ci: update flake.lock workflow with appropriate labels for created pr's ([54c41c1](https://github.com/teslamate-org/teslamate/commit/54c41c1fe66664b62d817502d1b2bdb244b70dc2) - @JakobLichterfeld)
- build(deps): bump cross-spawn from 7.0.3 to 7.0.6 in /website (#4391)
- build(deps): bump crate-ci/typos from 1.26.0 to 1.27.0 (#4344)
- build(deps): update flake.lock (#4381)
#### Dashboards
- fix: allow editing of dashboards - [changes will be overwritten on update](https://grafana.com/docs/grafana/latest/administration/provisioning/#making-changes-to-a-provisioned-dashboard) (#4338 - @swiffer)
- fix: ensure max speed panels are converted according to length unit setting in drive stats dashboard (#4338 - @swiffer)
- perf: speed up queries used to calculate max speed in drive stats dashboard (#4338 - @swiffer)
- feat: add a welcome dashboard (#4338 - @swiffer)
- fix: Charges Dashboard -> Range added renamed to Ø Charge rate (#4349 - @swiffer)
- fix: Axis Labels for XY Chart in Battery Health and reduces Query count in Visited (#4364 - @swiffer)
- feat: Dashboard refinements and standardization (#4367 - @swiffer)
- feat: add Detailed Energy Use to drive-details (#4386 - @jameskitt616)
#### Translations
#### Documentation
docs: add contributing guidelines link for GitHub (#4345 - @JakobLichterfeld)
docs: update Home Assistant integration documentation with configuration URL and model name hints (#4359 - @JakobLichterfeld)
docs: Remove availability from Home Assistant MQTT sensors, as it can be misleading and prevent sensors from receiving updated values (#4362 - @longzheng)
docs: Introducing TeslaMate Guru on Gurubase.io (#4390 - @kursataktas)
## [1.31.1] - 2024-10-29
This release primarily prevents beam.smp from overloading the CPU on ARM hosts. It also includes a number of other bug fixes and performance improvements. Enjoy it.
Please also note: [v1.31.0 Release Notes](https://github.com/teslamate-org/teslamate/releases/tag/v1.31.0)
### New features
### Improvements and bug fixes
- fix: use elixir-1.17.3-otp-26 to avoid beam.smp chewing CPU on arm (#4319 - @brianmay, @swiffer and @JakobLichterfeld)
#### Build, CI, internal
- ci(fix): update cleanup_caches.yml to use new cache management commands and fix permissions ([d6793ce](https://github.com/teslamate-org/teslamate/commit/d6793ce5717687b9e984067bf4c208415e15fdac), [b0b694f](https://github.com/teslamate-org/teslamate/commit/b0b694fc8c3c45036aafda45200f3b0d068a2f50), [16bb503](https://github.com/teslamate-org/teslamate/commit/16bb5032c7d81cb86e76cc19662e3332456291a0) - @JakobLichterfeld)
- ci: Add workflow to manually cleanup largest 100 caches ([dad7e3d](https://github.com/teslamate-org/teslamate/commit/dad7e3dea0ae1d799398bf1b31a0d598eff784bf), [523419d](https://github.com/teslamate-org/teslamate/commit/523419d35a610c7b06bbf7e9c2edd105e7d089aa) - @JakobLichterfeld)
#### Dashboards
- perf: add ideal_battery_range_km as query condition (#4305 - @swiffer)
- fix: re-add missing changes from pr 4124 (#4310 - @swiffer)
- feat: add max speed & speed histogram to drive stats (#4253 - @js94x)
- fix: remove convert_km from kwh calculations in timeline dashboard (#4318 - @swiffer)
- fix: ensure dutch-tax dashboard is not repeating multiple times per car (row and table) (#4317 - @swiffer)
#### Translations
- Update default.po for thai (#4312 - @tomzt)
- Spanish translation of missing items (#4320 -@ferminmg)
#### Documentation
- docs: fix ghcr image path in contributing guide (#4309 - @swiffer)
## [1.31.0] - 2024-10-27
As always, lots of improvements. The focus has been on performance improvements, especially on slow HW like Raspberry Pi 3B+. We achieved 240x speed improvements in several dashboards :rocket: And we welcomed @swiffer to the TeslaMate-Org team :wave: And much, much more. Enjoy it.
**Regarding PostgreSQL 17:** TeslaMate uses PostgreSQL as database, this is an external dependency and needs to be updated by yourself. Although TeslaMate currently runs fine with PostgreSQL 14+ we strongly recommend upgrading to the latest supported version. We recommend that you do this as follows:
- [Backup your data](https://docs.teslamate.org/docs/maintenance/backup_restore#backup)
- [Upgrade TeslaMate to this version](https://docs.teslamate.org/docs/upgrading)
- [Backup your data after the upgrade](https://docs.teslamate.org/docs/maintenance/backup_restore#backup)
- [Upgrade PostgreSQL to postgres:17](https://docs.teslamate.org/docs/maintenance/upgrading_postgres) (Yes, you will have to erase your data, which is why you need your backup in the first place.)
**Additional info:** In some very rare cases with very old installations of TeslaMate (from 2019) we have observed performance issues due to missing indexes. These should normally be added with our automatic migrations. If you think your installation may be missing some indexes, see #4201 for the corrective SQL command.
### New features
### Improvements and bug fixes
- fix: 401 on direct Fleet API calls (#4095 - @jlestel)
- feat: add support for PostgreSQL 17 (#4231 - @swiffer)
- fix: add nix module option to specify postgres package (#4227 - @brianmay)
- perf: limit positions to set elevation for to last 10 days (#4228 - @swiffer)
- feat: add treefmt-nix to nix flake (#4219 - @JakobLichterfeld)
- feat: use Grafana 11.0.6-security-01 (#4279 - @swiffer)
#### Build, CI, internal
- ci: pin GitHub action dependencies to protect against supply chain attacks (#4076 - @JakobLichterfeld)
- chore: correct comment for pinned Docker login-action to version 3.2.0 (#4120 - @JakobLichterfeld)
- build(deps): bump erlef/setup-beam from 1.18.0 to 1.18.1 (#4116)
- build(deps): bump docker/login-action from 3.2.0 to 3.3.0 (#4115)
- chore: update PostgreSQL to version 16 in flake.nix (#4135- @JakobLichterfeld)
- build(deps): bump webpack from 5.92.1 to 5.94.0 in /website (#4171)
- build(deps): bump micromatch from 4.0.5 to 4.0.8 in /website (#4174)
- chore: Update tzdata to version 1.1.2 and mimerl to version 1.3.0 (#4205 - @JakobLichterfeld)
- build(deps): bump send and express in /website (#4203)
- ci: enable dependabot for mix and npm (#4207 - @JakobLichterfeld)
- build(deps): bump @docusaurus/preset-classic from 3.4.0 to 3.5.2 in /website (#4210)
- build(deps): bump phoenix_ecto from 4.4.3 to 4.6.2 (#4213)
- build(deps): bump jason from 1.4.1 to 1.4.4 (#4216)
- build(deps): bump classnames from 2.3.2 to 2.5.1 in /website (#4211)
- ci: add treefmt as code formatting multiplexer (#4219 - @JakobLichterfeld)
- ci(refactor): use composite action to avoid duplication in elixir workflow (#4219 - @JakobLichterfeld)
- ci: prevent workflow runs for certain conditions and allow scheduled runs (#4219 - @JakobLichterfeld)
- ci(refactor): use reusable workflow to check paths (#4219 - @JakobLichterfeld)
- ci(refactor): use reusable workflows for streamlined DevOps pipeline (#4219 - @JakobLichterfeld)
- ci(refactor): allow ghcr_build parallel to elixir test (#4219 - @JakobLichterfeld)
- ci: ensure proper linting via treefmt (#4219 - @JakobLichterfeld)
- doc: update CI badge URL for devops workflow (#4219 - @JakobLichterfeld)
- ci(fix): handle empty path filter output (#4219 - @JakobLichterfeld)
- fix: avoid the need for impure for devenv (#4245 - @brianmay)
- ci(fix): run ghcr build workflow only for specific conditions (#4219 - @JakobLichterfeld)
- ci: remove branch restriction for check_paths workflow to increase sec (#4219 - @JakobLichterfeld)
- build(deps): bump actions/checkout from 4.1.7 to 4.2.1 (#4262)
- ci(fix): only run ghcr build in DevOps workflow on own repo ([022b173](https://github.com/teslamate-org/teslamate/commit/022b173430221d385479f4ec9d91d8ccffbfe7b9) - @JakobLichterfeld)
- ci: pin ubuntu-24.04 as runner OS ([40dab3e](https://github.com/teslamate-org/teslamate/commit/40dab3e2a978b8a867f1159626d4c157ccab6c56) - @JakobLichterfeld)
- ci: cleanup caches when pr is closed ([75cfc7c](https://github.com/teslamate-org/teslamate/commit/75cfc7cdd4b8f83f247211dc7fc5c5cd433bf746) - @JakobLichterfeld)
- ci(fix): run ghcr build in DevOps workflow for forks ([688147e](https://github.com/teslamate-org/teslamate/commit/688147e2cf3fb5b55e702185a97a4a4ebb14d7ca) - @JakobLichterfeld)
- ci(fix): correct syntax in ghcr_build workflow for workflow_call ([9e6a275](https://github.com/teslamate-org/teslamate/commit/9e6a2758d5ff21604976184ad69befc1c546e600) - @JakobLichterfeld)
- ci(fix): run ghcr build as separate workflow to fix permission issues with forks ([0410593](https://github.com/teslamate-org/teslamate/commit/0410593850cde00e8f201a9b7d6009f0581ed43c) - @JakobLichterfeld)
- build(deps-dev): bump credo from 1.7.1 to 1.7.8 (#4238)
- build(deps): bump crate-ci/typos from 1.22.9 to 1.26.0 (#4261)
- refactor: Cleanup nix code (#4265 - @scottbot95)
- build(deps): bump elixir from 1.16.2-otp-26 to 1.17.2-otp-27 (#4296 - @JakobLichterfeld)
- build(deps): bump http-proxy-middleware from 2.0.6 to 2.0.7 in /website (#4303)
- feat: update to Phoenix HTML 4.1, bump dependencies (#4277 - sdwalker and @JakobLichterfeld)
#### Dashboards
- Improve Battery Health dashboard estimations on rated range (#4074 - @jheredianet)
- Update charges.json: range added per hour (#4089 - @DrMichael)
- small visual distinguish between AC & DC charging in charges dashboard and unification of the DC coloring in all dashboards (#4124 - @stauffenberg2020)
- Improve drive stats (#4148 - @jheredianet)
- Improve drives dashboard (#4146 - @jheredianet)
- Odometer in charges (#4144 - @jheredianet)
- Update charging-stats for handling suc cost mixed with AC charge on TWC (#4137 - @cyberden)
- Fix the issue of failing to restore efficiency dashboard (#4153 - @ghostiee)
- Improve rounding to month / weeks / days in Updates "Since Previous Update" column (#4164 - @swiffer)
- feat: Improve cost filter on Charges dashboard to show charges with negative cost as well (#4179 - @jheredianet)
- feat: display vehicle VIN as a fallback for vehicle name on grafana dashboards (#4198 - @arcastro)
- feat: Add Moving Average / Percentiles to Charge Level dashboard & bucket data to support longer periods (#4200 - @swiffer)
- increase max battery charge gauge threshold to 101 in case of LFP (#4191 - @neothematrix)
- multiple cars, same name, add VIN next to name (#4230 - @swiffer)
- json_build_object instead of concat in battery-health (#4229 - @swiffer)
- perf: fix skipping streaming data in charging stats (#4252 - @swiffer)
- perf: improvements drive stats (#4258 - @swiffer)
- fix: for drives not showing if duration < 1 minute (#4284 - @swiffer)
- feat: add max speed in drives dashboard (#4284 / #4267 - @js94x)
- perf: exclude streaming data when getting battery level (#4286 - @swiffer)
- perf: exclude streaming data in visited dashboard (#4287 - @swiffer)
- fix: weighted average calculation for consumption in drives dashboard (#4289 - @swiffer)
- perf: improvement in charge level (#4301 - @swiffer)
- perf: improvement and deprecated syntax removal (#4304 - @swiffer)
#### Translations
- Adding missing Swedish translation (#4097 - @tobiasehlert)
#### Documentation
- doc: Add initial author and list of contributors to README.md (#4084 - @JakobLichterfeld)
- doc: add steps to the guide regarding how to switch to Fleet API (#4103 - @yangiak)
- doc: align TPMS Pressure naming in sensor config to match UI config for home assistant (#4104 - @helmo)
- doc: Update screenshots and rearrange links (#4151 - @jheredianet)
- doc: fix markdownlint warnings in fleet API documentation (#4173 - @JakobLichterfeld)
- doc: clarify using fleet API has lots of drawbacks (#4173 - @JakobLichterfeld)
- docs: fix Home Assistant MQTT sensor JSON templates warnings (#4257 - @longzheng)
- docs: add recommended RAM size (#4278 - @JakobLichterfeld)
- docs: add best practice section to contribution guide (#4288 - @swiffer)
## [1.30.1] - 2024-07-10
This is a hotfix release to work around the map fit problem in the new Upstream Grafana. As soon as a new Grafana version is available, we will update again.
### Improvements and bug fixes
- downgrade grafana until maps issue in upstream grafana is resolved (#4071 - @swiffer)
#### Build, CI, internal
- ci: fix coverage report env variable (#4066 - @JakobLichterfeld)
#### Dashboards
- Configure Grafana to use browser language / date formats (#4064 - @swiffer)
- Fix hard coded information (timezone and orgId) (#4056 - @jlestel)
#### Translations
- update zh_hans localized string (#4073 - @mrgaolei)
- Update default.po for thai (#4072 - @tomzt)
## [1.30.0] - 2024-07-07
As always with many improvements. Cleaner LFP battery handling, 100x speed improvement in dashboards and much, much more. Enjoy it.
### New features
- Track open/close states for individual doors (#3962 - @SaswatPadhi), new MQTT values see [documentation](https://docs.teslamate.org/docs/integrations/mqtt)
- Allow Fleet API users to change client_id (#3984 - @jlestel)
- Customize intervals between vehicle_data calls (#3940 - @jlestel)
- feat: Create NixOS module (#3998 - @scottbot95)
- feat: Add ability to enable and disable data collection for cars (#3993 - @mark3-dev)
- publish center_display_state to mqtt (#3813 - @Atrox), new MQTT values see [documentation](https://docs.teslamate.org/docs/integrations/mqtt)
- feat: add LFP Battery setting for car settings (#4007 -@cwanja)
- Add icon to summary when Sentry Mode is triggered and recording (#4043 -@kolaCZek)
### Improvements and bug fixes
- Update vehicle.ex with marketing name for Model Y Long Range RWD (#3989 - @stefanlange)
- feat: use Grafana 11.1.0 (#4019 - @swiffer)
- Update vehicle.ex with marketing name for Model Y SR (#4042 - @kolaCZek)
- feat: update breadcrumb links to use Phoenix path helpers (#4052 - @JakobLichterfeld)
#### Build, CI, internal
- build(deps): bump crate-ci/typos from 1.21.0 to 1.22.9 (#4021)
- build(deps): bump express from 4.18.2 to 4.19.2 in /website (#3790)
- chore: update @docusaurus/core and @docusaurus/preset-classic dependencies to v3.4.0 and react and react-dom to 18.3.1 (#4046 - @JakobLichterfeld)
- build: specify node.js version for Netlify in base dir as latest lts major version (#4046 - @JakobLichterfeld)
- style: fix single quoted string in car_live (#4049 - @JakobLichterfeld)
#### Dashboards
- Improve drive details (#4004 - @jheredianet)
- Improve visualizations on Battery Health dashboard (#4005 - @jheredianet)
- Update drives.json: show drives with duration=0 but distance>0 (#3867 - @DrMichael)
- Improve performance of timeline dashboard (#4019 - @swiffer)
- Fix detection of missing data (geofence condition) in timeline dashboard (#4019 - @swiffer)
- Fix time filter for links to trip dashboard in timeline dashboard (#4019 - @swiffer)
- Reduce number of queries executed in overview dashboard to increase performance (#4019 - @swiffer)
- Ensure Index usage when getting temperatures in overview dashboard (#4019 - @swiffer)
- re-enable time picker by default in drive-details, charge-details dashboards (#3985)
- Improve "Charges" dashboard (#4031 - @jheredianet)
- Improve "Drives" dashboard (#4033 - @jheredianet)
- Update overview.json: Add Distance (#4034 - @DrMichael)
- Update overview.json: fix Net (#4045 - @DrMichael)
- update overview dashboard to fix units for energy consumption (#4048 - @JakobLichterfeld)
- use lfp_battery setting in dashboards & speed up updates dashboard (#4051 - @swiffer)
#### Translations
- feat: update German translations missing messages (#4054 - @JakobLichterfeld)
#### Documentation
- doc: remove outdated, unsupported, unmaintained portainer doc (#3972 - @JakobLichterfeld)
- doc: fix MMM-Teslamate and ha-addon-teslamate project links (#3973 - @olexs)
- doc: update the Contributor's Guide with the latest requirements (#4017 - @JakobLichterfeld)
- doc: Documentation for new endpoint changes (#3978 - @jlestel)
- doc: Add Grafana VS Code extension documentation (#4025 - @JakobLichterfeld)
- doc: fix markdown linter warnings in faq (#4046 - @JakobLichterfeld)
- doc: fix typo in MQTT location JSON format (#4047 - @JakobLichterfeld)
## [1.29.2] - 2024-06-18
This release improve TeslaMate behavior on Tesla API rate limits, which occur from time to time. We respect the retry-after header on 429 response code to not hammer the API unnecessarily in these cases.
### New features
- feat: Dynamic endpoints and token to use official Tesla API (self-hosted or from third party provider) (#3903 - @jlestel)
### Improvements and bug fixes
- fix: Update statistics.json: change back uid (#3907 -@DrMichael)
- feat: Update TeslaFi importer to accept newer export formats (#3431 - @ithinuel)
- feat: Upgrade PostgreSQL to v16 (#3884 -@enoch85)
- feat: Respect Retry-After header on 429 response code (#3943 - @jlestel)
- feat: use Grafana 11.0.0 (#3895 - @swiffer)
#### Build, CI, internal
- ci: Upgrade PostgreSQL to v16 in elixir workflow (#3916 - @JakobLichterfeld)
- build(deps): bump docker/login-action from 3.1.0 to 3.2.0 (#3933)
- build(deps): bump elixir from 1.16.1-otp-26 to 1.16.2-otp-26 (#3935 - @JakobLichterfeld)
- build(deps): bump braces from 3.0.2 to 3.0.3 in /website #3967
#### Dashboards
- Remove A lot of empty space on the drive graph (#3927 - @jheredianet)
- Add more ways to recognize Supercharger locations (#3863 -@woyteck1)
- Projected Range fix (using usable_battery_level) (#3859 -@woyteck1)
- Update and fix timeline dashboard (#3951 -@jheredianet)
- Remove A lot of empty space on the drive graph (#3950 -@jheredianet)
- Integrate LFP specific dashboards into regular dashboards (#3966 - @swiffer)
- Export all Dashboards via Grafana 11.0.0 (#3971 - @swiffer)
#### Translations
- feat: Update default.po for Thai translation (#3906, #3945 - @tomzt)
#### Documentation
- doc: update backup path location to current directory to work around no write access to placeholder directory issue (#3908 - @JakobLichterfeld)
- doc: Update MQTT examples of location/active_route (#3919 - @longzheng)
- doc: Update HomeAssistant docs to use new MQTT values (#3923 - @longzheng)
- doc: Add network flows that should be authorized (#3886 - @fl42)
- doc: Update projects.md with new MMM (#3953 - @top-gun)
## [1.29.1] - 2024-05-20
same as 1.29.0 but reverted: "Dynamic endpoints and token to use official Tesla API (self-hosted or from third party provider) (#3866 - @jlestel)" as it was breaking backwards compatibility
## [1.29.0] - 2024-05-20
### New features
- Publish extra active_route fields to mqtt output (#3789 - @brianmay)
- Dynamic endpoints and token to use official Tesla API (self-hosted or from third party provider) (#3866 - @jlestel)
### Improvements and bug fixes
- fix: errors from Timex.Timezone.local() during switchover to DST (#3848 - @dyxyl)
#### Build, CI, internal
- build(deps): bump dorny/paths-filter from 3.0.1 to 3.0.2 (#3799)
- build(deps): bump docker/login-action from 3.0.0 to 3.1.0 (#3798)
- build(deps): bump grafana/grafana from 10.4.0 to 10.4.1 in /grafana (#3800)
- build(deps): bump grafana/grafana from 10.4.1 to 10.4.2 in /grafana (#3876)
- ci: update typos false positive list (#3808 - @JakobLichterfeld)
- build(deps): bump docker/login-action from 3.0.0 to 3.1.0 in custom action ([b9f1f8b](https://github.com/teslamate-org/teslamate/commit/b9f1f8b956c7fb531321a2d3d875efffd4be6ead) - @JakobLichterfeld)
- ci: pin crate-ci/typos action to version v1.20.1 ([bd50177](https://github.com/teslamate-org/teslamate/commit/bd50177a454426501a9dd7fca000b44c62f10113) and [53d8e62](https://github.com/teslamate-org/teslamate/commit/53d8e625ae4483789b456458a8bb43af9f009361) - @JakobLichterfeld)
- build(deps): bump crate-ci/typos from 1.20.1 to 1.21.0 (#3875)
#### Dashboards
- Battery Health: Fix a bug on efficiency estimations (#3795 - @jheredianet)
- Add more info on charge details dashboard (#3821, #3827 -@jheredianet)
- Battery Health dashboard: new stats panel for efficiency and improve query performance (#3806 -@jheredianet)
- Add stats to Visited dashboard (#3824 - @jheredianet)
- Update Thresholds colors for ºF temperature in Charges dashboard (#3834 - @jheredianet)
- Velocity/Speed histogram in drive details dashboard (#3836 - @jheredianet)
- Change car id selector by row on Charge Details dashboard (#3844- @jheredianet)
- Fix missing units when miles is used (#3850 - @sdwalker)
- Statistics: Add max value for efficiency thresholds (#3852 - @sdwalker)
- Add average cost per kWh for AC and DC as separate values (#3841 -@woyteck1)
- Update statistics.json: timezone issues addressed (#3862 - @DrMichael)
- Statistics: fix temperature colors and column layout for Fahrenheit (#3854 - @sdwalker)
#### Translations
- Update zh_Hans default.po typo (#3804 - @liopoos)
#### Documentation
- doc: remove update steps in installation instructions and link to maintenance section ([dbf23fa](https://github.com/teslamate-org/teslamate/commit/dbf23faa31d84f222c99dba9f5de52c69dd43afb) and #3794 - @JakobLichterfeld and @brianmay)
- doc: add instructions how to update pot files to development guide ([3ab8ee8](https://github.com/teslamate-org/teslamate/commit/3ab8ee8535da32ba0c11307aaacc65379ddcc0b2) - @JakobLichterfeld)
- doc: update links to token apps in FAQ (#3833 - @JakobLichterfeld)
- doc: add testing with ci build docker images to contributing guide (#3856- @JakobLichterfeld)
- doc: adding filename specification for TeslaFi import file (#3872 - @spinecho31)
## [1.28.5] - 2024-03-25
### New features
- feat: Add URL_PATH environment variable for reverse proxy deployments (#3771 -@b1c1l1)
### Improvements and bug fixes
- fix: permissions denied error when specifying user (#3772 -@tobiasehlert)
#### Build, CI, internal
- Update to latest devenv in nix flake (#3760 - @brianmay)
- build(deps): bump webpack-dev-middleware from 5.3.3 to 5.3.4 in /website (#3766)
#### Dashboards
- Improve estimations on Battery Health dashboard (#3756 - @jheredianet)
- Update overview.json: add time range to states link (#3757 - @DrMichael)
- Update overview.json: add time range to charges links (#3758 - @DrMichael)
#### Translations
#### Documentation
- doc: version tag in docker-compose.yml is obsolete since docker 25.05 (#3761 - @JakobLichterfeld)
## [1.28.4] - 2024-03-19
### New features
- Add navigation active route drive state data (#3657 - @longzheng)
- Add location topic (lat and long in one json blob) (#3729 - @brianmay)
### Improvements and bug fixes
- Fix aggressive switch to offline when stream gets offline message (#3672 - @micves)
- feat: Grafana 10.4.0 & Angular Deprecation (#3726 - @swiffer and @JakobLichterfeld)
- test: Make tests non-async (#3738 - @brianmay)
#### Build, CI, internal
- ci: prevent workflow runs for certain conditions and allow scheduled runs ([f71cc51](https://github.com/teslamate-org/teslamate/commit/f71cc51271007da70e7dc57c00e292acdf20e8d6) and [596a10f](https://github.com/teslamate-org/teslamate/commit/596a10f1eeb5c81f1f79293684a06241cc68d465) - @JakobLichterfeld)
- feat: Upgrade web development framework to Phoenix 1.7 (#3615 - @marvelm and @JakobLichterfeld)
- ci: stale after 30 days ([07670fa](https://github.com/teslamate-org/teslamate/commit/07670fa014b4d79d6907e7198960ec13c5cdae71) -@JakobLichterfeld)
- ci: run edge build every night ([206d731](https://github.com/teslamate-org/teslamate/commit/206d731935a5e8ebc350a7981df8c6d92480b88b) - @JakobLichterfeld)
- ci: update upload-artifact action (#3689 - @JakobLichterfeld)
- fix: upload and merge artifact naming conflict since action version v4 (#3689 - @JakobLichterfeld)
- build: bump app base image to fix 'GLIBC_2.34' not found error (#3691- @JakobLichterfeld)
- build: bump app dependencies for libssl and netcat to packages available in debian bookworm (#3691- @JakobLichterfeld)
- build: use netcat-openbsd to support ipv6 again (#3732 - @JakobLichterfeld)
- build: reduce the size of the Docker image by cleaning the APT cache (#3692- @JakobLichterfeld)
- ci: bump dorny/paths-filter from 3.0.0 to 3.0.1 (#3712)
- build: pin elixir image full version to elixir:1.16.1-otp-26 (#3733 - @brianmay and @JakobLichterfeld)
- build: adding chmod to file copy in app stage (#3740 - @tobiasehlert)
- ci: bump actions/delete-package-versions from 4 to 5 (#3713)
- Replace tortoise library with tortoise311 (#3697 - @brianmay)
- build(deps): bump follow-redirects from 1.15.4 to 1.15.6 in /website (#3743)
- feat: experimental nix flake (#3485 - @brianmay)
#### Dashboards
- feat: Add stat panel for selected duration in drive details dashboard (#3667 - @oivindoh)
- Change tracking line color on Maps to blue (#3670 - @jheredianet)
- Select last three drives in trip dashboard now opens in new tab to work reliable ([ca9816b](https://github.com/teslamate-org/teslamate/commit/ca9816ba4905c653b5f4daad533bf2caf2fe1d9c) - @DrMichael)
- Battery health dashboard: Added Distance (Logged - Mileage) stats (#3741 - @jheredianet)
- Update timeline.json: column Action correct width with new grafana version (#3744 - @DrMichael)
#### Translations
- Add Thai Translation (#3566 - @tomzt)
- Update default.po missing french translations (#3662 - @pquattro)
- update zh_Hans text (#3664 - @mrgaolei)
- Add missing German translation for new messages, fix mistakes (#3694 - @accolon)
- feat: add missing translation for new messages for Korean (#3693 - @zipizigi)
- add Traditional Chinese translation for new messages (#3699 and #3709 - @occultsound)
- Adding missing Swedish translation for new messages (#3716 -@tobiasehlert)
#### Documentation
- Add details how to configuring the TZ environment variable (#3650 - @NirKli)
- doc: add instructions, how to connect to database before editing cars (#3656 - @JakobLichterfeld)
- Fix name in lovelace example to match sensor name (#3718 - @js94x)
- doc: Hint for null value in Grafana if car has not been renamed yet (#3720 -@js94x)
- doc: Updated links for TeslaMate projects ([bf50f79](https://github.com/teslamate-org/teslamate/commit/bf50f799941ade1810fadacc408392e274afa459) - @JakobLichterfeld)
## [1.28.3] - 2024-02-02
### New features
- Support listening on unix domain socket (#3328 - @PhracturedBlue)
- Added expected finish charging localtime to teslamate overview in web (#3646 - @NirKli)
### Improvements and bug fixes
- CI: Remove deprecated probot-no-response and update to stale workflow (#3525 - @JakobLichterfeld)
- Fix an issue when car is could enter sleep mode while dog mode is enabled (#3538 - @NirKli)
- Handle stream getting the message "Vehicle is offline" and change the state to offline in vehicle (#3508 - @micves)
- fix: use product api endpoint to fetch vehicles (#3630 - @brianmay and @JakobLichterfeld)
#### Dashboards
- Update locations.json with car selector (@DrMichael)
- Fix Odometer_mi charger dashboard (#3534 - @mechoriet)
- Update charges.json: reenable cost per kWh re added (#3544 - @DrMichael)
- Improve Battery health derived efficiency estimations and Fix error divided by zero (#3593 - @jheredianet)
- Battery Health - Improve performance & adjust queries to handle empty or null data (#3627 - @jheredianet)
- charging-stats: map - add charges count and move label (#3625 - @fmossott)
#### Translations
- fix: translation Update default.po for simplified Chinese (#3600 - @ycjcl868)
- Improvements for Spanish translations (#3610 - @jheredianet)
#### Documentation
- Node-RED required modules should be saved under /data (#3623 - @ToniA)
- Use recommended format for Home Assistant MQTT sensor configuration (#3344)
- Update projects.md with TeslaBox (#3542 - @mluggy)
- update tesla-youq project (#3547 - @brchri)
- doc: Fix TPMS sensor names to match binary_sensor.yaml (#3613 - @kenni)
- update docker-compose.yml for Docker Compose version v2.24.1 (#3626 - @realJustinLee)
### Configure Timezone Setting for Accurate Local Time Display
To ensure time-related features display accurately in your local timezone, configure the TZ environment variable.
Detailed instructions are available in our [configuration guide](https://docs.teslamate.org/docs/configuration/environment_variables/).
## [1.28.2] - 2023-11-27
### New features
### Improvements and bug fixes
- grafana: support DATABASE_SSL_MODE (#3498 - @simonsmh)
- Support server_name_indication for ssl (#3497 - @simonsmh)
- grafana: Fix Dashboard dropdown link display (#3501 - @oivindoh)
- Ci: GHCR Purge success even if package doesn't exist (#3480 - @jlestel and #3504 - @JakobLichterfeld)
#### Dashboards
#### Translations
#### Documentation
## [1.28.1] - 2023-11-26
### New features
### Improvements and bug fixes
- Fix display version in settings
#### Dashboards
#### Translations
#### Documentation
## [1.28.0] - 2023-11-26
Note: First release as @teslamate-org organization.
### New features
- Added tire low pressure icon to teslamate web (#3424 - @NirKli)
- Add charging_state to VehicleSummary (#3471 - @brianmay)
### Improvements and bug fixes
- UI: sync meta theme-color with header background color for iOS status bar (#2840 - @libotony)
- Linting in dashboard links (#3443 - @jlestel)
- Update Grafana to 10.1.2 (#3455 - @swiffer)
- CI: Build PR images on GHCR, so every PR will have a dedicated dockerfile for testing purpose (#3445, #3480, #3481, #3491 -@jlestel)
- Update to Node.js 20 (#3477 - @PhilThurston)
- Add credo lint support for static code analysis (#3452 - @brianmay)
#### Dashboards
- Fix link to Charge Level dashboard (#3263 - @Sjorsa)
- Add LFP variants of Grafana dashboards (#3311 - @eden881)
- Average cost stat in stats dashboard (#3030 - @fmossott)
- Odometer in Charges dashboard (#3463 - @DrMichael)
- Use built-in Grafana visuals instead of plugins (#3439 - @oivindoh and @swiffer)
- Ensure that dashboards can be modified after import (#3454 - @swiffer)
- Migrate projected range to TimeSeries (#3454 - @swiffer)
#### Translations
- There is nothing new here.
#### Documentation
- Gaussmeter units no longer for sale, #3419 - @LelandSindt
- Docker backup restore note about update command when using different TM_DB_USER (#3291 - @tsongalin)
- Update FreeBSD installation instructions (#3277 - @uqs)
- Updated Docker Compose instructions (#3320 - @Dulanic)
- Update HA integration docs with TPMS sensors and examples (#2845 - @marspath)
- Fix code style in FreeBSD section (#3461 and #3462 - @ivanovd)
- Advise that docker-compose v1 is EOL and to upgrade to v2 (#3472 - @cwanja)
- Fix tpms bar sensors name in template for psi (#3490 - @virtualm2000)
## [1.27.4] - 2023-11-12
Note: TeslaMate moved to the new @teslamate-org organization.
### Improvements and Bug Fixes
- Add endpoints query param to `vehicle_data` request to [reflect changes](https://developer.tesla.com/docs/fleet-api?shell#vehicle_data) to the API (#3398 - @swiffer)
- Remove donation links
- Fix warnings on Elixir 1.16
- Upgrade Grafana to 9.5
- Trim whitespace from geofence names
- Support self-signed certificates via (`DATABASE_SSL_CA_CERT_FILE`)
- Use preferred tile.openstreetmap.org URL (#3368)
- Update dependencies
#### Dashboards
- Charges: Mark `end_date` as `dateTimeAsLocal` (#3033 - @DrMichae)
- Add Battery Health dashboard (#3059 - @jheredianet)
- Show all vehicles on drive stats dashboard (#3342 - @yoyostile)
- Updates: Fix for div by zero error (#3289 - @Dulanic)
- Show location name in charge details (#3294 - @DrMichael)
- Fix broken links when orgId is not 1 (#3380 - @jlestel)
- Update query to get car efficiency on Battery Health dashboard (#3245 - @jheredianet)
#### Translations
- Updated Spanish translation (#3244 - @jheredianet)
#### Documentation
- Update docs to use Docker Compose V2 (#3025 - @eden881)
- Update FreeBSD instructions (#3394 - @ivanovd)
- Add Tesla-YouQ project (#3347 - @brchri)
## [1.27.3] - 2023-06-12
### Improvements and Bug Fixes
- Read the vehicle name from the `vehicle_data` response as Tesla has made [some changes](https://github.com/timdorr/tesla-api/issues/728) to the API
- Add composite index to position and drop drive_id index (#3186 - @IlyaDiallo)
- Bump Grafana to 8.5.26
- Ship Docker image with OTP 26 (this should improve performance on ARM devices)
- Optimize automatic Docker image builds
#### Dashboards
- Update drive-details.json missing dataSource for pressure units (#3225 - @OrangeBean)
- Bump pr0ps-trackmap-panel to 2.1.4 (#3076 - @Obihoernchen)
#### Translations
- Fix Korean translation (#3126 - @nanishin)
#### Documentation
- Update docs to manually remove vehicle (#3075 - @cwanja)
- Update Project: Tesla Home Assistant Integration (#3194 - @Megabytemb)
- Updated menu route to Download TeslaFi Data (#3218 - @helmo)
## [1.27.2] - 2023-01-13
### Improvements and Bug Fixes
- Bump pr0ps-trackmap-panel to 2.1.3 (fixes #2770)
- Bump grafana to 8.5.15
- Fix GPX format (#2925 - @martinh2011)
- Change esbuild target to es2017
- Update Elixir and frontend dependencies
- Update GH action workflows
#### Dashboards
- Charging Stats: Update the filter for superchargers (#2832 - @sultantariq)
#### Translations
- Add Ukrainian translations (#3039 - @ZeusF1)
- Update Korean translations (#2898 - @zipizigi)
- Update Chinese (traditional) translations (#2852 - @occultsound)
- Update Chinese translations (#2855 - @JhouXerox)
- Update French translations (#2844 - @CrowMash)
#### Documentation
- Fix typo (#2843 - @CrowMash)
- Improve FreeBSD installation documentation (#2885 - @victori)
- Fix tesla_power unit from W to kW (#3024 - @enzo2)
- Added "Custom Grafana Dashboards" to project list (#3056 - @CarlosCuezva)
## [1.27.1] - 2022-07-22
### Improvements and Bug Fixes
- Add setting to select tire pressure units
- Fix `Protocol 'inet_tcp': register/listen error: econnrefused` error (#2771 - @manuduarte)
- Bump minimum supported Elixir version to 1.12
- Improve handling of invalid API tokens
#### Dashboards
- Charging Stats: Include SuC geofences to calculate charging cost
## [1.27.0] - 2022-07-15
### 🔓 Encryption of API tokens
To ensure that the Tesla API tokens are stored securely, **an encryption key must be provided via the `ENCRYPTION_KEY` environment variable**.
If you use a `docker-compose.yml` file to run TeslaMate, add a line with the `ENCRYPTION_KEY` to the `environment` section or check out the updated installation guides on [docs.teslamate.org](https://docs.teslamate.org):
```yaml
services:
teslamate:
image: teslamate/teslamate:latest
environment:
- ENCRYPTION_KEY=your_secret_encryption_key
# ...
```
If no `ENCRYPTION_KEY` environment variable is provided when running the database migrations a **randomly generated key will be set for you** to encrypt the tokens. In that case, a warning with further instructions will be displayed.
### Improvements and Bug Fixes
- Add `charge_current_request` and `charge_current_request_max` MQTT topics
- Add detection of refresh Model X (2022) (#2455 - @cwanja)
- Restart streaming API process if token expired
- Do not start erlang's EPMD service
- Store vehicle marketing names in the database
- Allow customizing the default geofence via the `DEFAULT_GEOFENCE` environment variable (#2564)
- Bump Grafana to 8.5.6
#### Dashboards
- Add datasource to table and map panels (#2391- @andrewjw)
- Charge Details: Ensure that battery heater is shown when active during charging (#2527 - @woyteck1)
- Charging Stats, Charges: Add average cost per kWh to charging stats (#2693 - @yoyostile)
- Charging Stats, Charging Details: Add Charging curve (#2093 - @ToniA, #2152 - @fmossott)
- Charging Stats: Add panel with the cost of charges at SuC (#2448 - @carloscuezva)
- Charging Stats: Fix for better "Charge deltas" when the charging process is interrupted and re-started (#2566, #2656 - @nicoladefranceschi)
- Charging Stats: Set Y-Axis max of heatmap to 100 (#2461 - @DrMichael)
- Charging Stats: Update Charging Stats panel styling (#2481 - @cwanja)
- Drive Details: Add elevation summary (#2449 - @coreGreenberet)
- Drive Details: Record the tire pressure which was made available by Tesla in the 2022.4 SW release (#2706 - @NirKli)
- Drive Details: Set elevation units on axis
- Drive Stats: Optimize query to estimate mileage calculation (#2464 - @coreGreenberet)
- Locations: Let the gauge scale up to the maximum value (#2647 - @DrMichael)
- States: Update States top row panels height (#2487 - @cwanja)
- Timeline: Fix links (#2601 - @DrMichael)
- Trip: Render Trip piechart legend (#2473 - @cwanja)
- Migrate dashboards to the new timeseries panels
- Change unit of boolean fields
#### Translations
- Update Chinese translation (#2479 - @AemonCao)
- Add missing Swedish translation (#2731 - @tobiasehlert)
#### Documentation
- Add ProxyPreserveHost On to the Grafana entries in Apache2 config (#2471 - @DrMichael)
- Node-RED: Fix typo (#2410 - @baylanger)
- Update to projects page (TeslaMate-ABRP) (#2518 - @fetzu)
- Update HomeAssistant Integration examples for HA 2022.6 (#2704 - @star114)
- HomeAssistant Integration: enhance km to mi conversion / add timestamp class to charge time (#2735 - @dcod3d)
- Add FAQ around Docker timestamp logs (#2655 - @cwanja)
- Add HomeAssistant notification example (#2712 - @brombomb)
## [1.26.1] - 2022-01-28
### Improvements and Bug Fixes
- Add link on the TeslaMate overview page to the notateslaapp.com release notes ([#2390](https://github.com/adriankumpf/teslamate/pull/2390) by [cwanja](https://github.com/cwanja))
- Fix token refresh for Chinese accounts
#### Dashboards
- Charges: Show link if the charge cost is not set ([#2380](https://github.com/adriankumpf/teslamate/pull/2380) by [carloscuezva](https://github.com/carloscuezva))
- Efficiency: Add min & max values to the Temperature-Efficiency gauge ([#2395](https://github.com/adriankumpf/teslamate/pull/2395) by [DrMichael](https://github.com/DrMichael))
- Overview / Updates: Fix software version format
#### Translations
- Adding missing Swedish translation ([#2373](https://github.com/adriankumpf/teslamate/pull/2373) by [tobiasehlert](https://github.com/tobiasehlert))
- Small correction for Spanish translation ([#2379](https://github.com/adriankumpf/teslamate/pull/2379) by [carloscuezva](https://github.com/carloscuezva))
- Spanish translation refinements ([#2388](https://github.com/adriankumpf/teslamate/pull/2388) by [jmalcaide](https://github.com/jmalcaide))
## [1.26.0] - 2022-01-25
### Improvements and Bug Fixes
- Remove support for logins with username/password
- Show zoom controls when hovering over or tapping the map ([#2184](https://github.com/adriankumpf/teslamate/pull/2184) by [bogosj](https://github.com/bogosj))
- Use new Chinese Tesla API endpoints
- Fix MFA for Chinese accounts ([#2234](https://github.com/adriankumpf/teslamate/pull/2234) by [howard0su](https://github.com/howard0su))
- Fix detection of refreshed Model S
- Guard against duplicate vehicle API responses
- Don't suspend logging while a car software update is downloaded
- Don't warn if the update status completing the of a car software update is still reported as 'downloading'
- Bump Docker app base image to Debian 11
- Raspberry Pi users unfortunately have to upgrade to Raspbian Bullseye or install the backports version `libseccomp2` (see [#2302](https://github.com/adriankumpf/teslamate/issues/2302))
#### Dashboards
##### Upgrade Grafana to version 8
> ⚠️ Manually managed Grafana instances have to be upgraded to v8.3.4 or higher!
- All table panels have been migrated to the new table component
- This brings a bunch of improvements including an improved experience on small screen sizes
- The date columns now use a local format depending on your browser language setting
- The pie chart panels have been migrated to the new native pie charts component
- The discrete panels have been replaced by the native state timeline panel
##### Other
- Drive Details: Display if the car is preconditioning ([#2281](https://github.com/adriankumpf/teslamate/pull/2281) by [carloscuezva](https://github.com/carloscuezva))
- Timeline: Add filters for destination ([#2354](https://github.com/adriankumpf/teslamate/pull/2354) by [DrMichael](https://github.com/DrMichael))
#### Translations
- Update Chinese translation ([#2232](https://github.com/adriankumpf/teslamate/pull/2232) by [howard0su](https://github.com/howard0su))
- Update Chinese translation ([#2236](https://github.com/adriankumpf/teslamate/pull/2236) by [summergeorge](https://github.com/summergeorge))
- Update French translation ([#2216](https://github.com/adriankumpf/teslamate/pull/2216) by [tydoo](https://github.com/tydoo))
- Update Spanish translation ([#2148](https://github.com/adriankumpf/teslamate/pull/2148) by [jmalcaide](https://github.com/jmalcaide))
- Update Italian translation ([#2146](https://github.com/adriankumpf/teslamate/pull/2146) by [ludovi-com](https://github.com/ludovi-com))
#### Documentation
- Update FreeBSD docs ([#2226](https://github.com/adriankumpf/teslamate/pull/2226) by [rustikles](https://github.com/rustikles))
- Update FAQ: Clarified how the consumption values are calculated and what triggers the recalculations ([#2345](https://github.com/adriankumpf/teslamate/pull/2345)) by [cwanja](https://github.com/cwanja)
- Added [TeslaMate-ABRP](https://github.com/fetzu/teslamate-abrp) to list of projects ([#2314](https://github.com/adriankumpf/teslamate/pull/2314))
- Fix typo ([#2217](https://github.com/adriankumpf/teslamate/pull/2217) by [Oddadin](https://github.com/Oddadin))
- Clarify that the pull command needs to be ran from the directory where the docker YML file is located ([#2368](https://github.com/adriankumpf/teslamate/pull/2368) by [cwanja](https://github.com/cwanja))
## [1.25.2] - 2022-01-12
- Bump app base image to Debian 11 to fix `GLIBC_2.29' not found` error
- Bump Grafana to 7.5.12
## [1.25.1] - 2022-01-12
Disable anonymous logins to Grafana by default (when using the `teslamate/grafana` Docker image)
- The first time you visit Grafana, you will be asked to log in. Use the default user `admin` with the password `admin`. After successful login, you will be prompted to change the password.
- To allow anonymous logins set the environment variable of the Grafana image `GF_AUTH_ANONYMOUS_ENABLED` to `true` (use only if your Grafana instance is not exposed to the internet!)
> This change only affects users who followed the [basic Docker installation guide](https://docs.teslamate.org/docs/installation/docker) which, as mentioned in the guide, is intended for home network use only and not for exposure to the internet. Users who followed one of the [advanced installation guides](https://docs.teslamate.org/docs/guides/traefik) are not affected as their Grafana instances always had anonymous logins disabled.
## [1.25.0] - 2021-11-12
### Improvements and Bug Fixes
- Add Apple mobile web app capable meta tag ([#2128](https://github.com/adriankumpf/teslamate/pull/2128))
- Add NOT NULL constraint to the charging_processes.start_date column
- Add workaround for an error that occurred when the OS does not return the current date and time
- Display marketing names (again). This was necessary due to an API change.
- Add Mid-Range Model 3 ([#2057](https://github.com/adriankumpf/teslamate/pull/2057) by [RickyRomero](https://github.com/RickyRomero))
- Show the token sign-up form by default
- Sign out if the Tesla API repeatedly returns 401 responses
- Use SSO access tokens instead of Owner API tokens (except for Chinese accounts)
#### Dashboards
- Timeline: bugfixes and improvements ([#2125](https://github.com/adriankumpf/teslamate/pull/2125), [#2092](https://github.com/adriankumpf/teslamate/pull/2092), [#2061](https://github.com/adriankumpf/teslamate/pull/2061) by [DrMichael](https://github.com/DrMichael))
#### Translations
- Update French translation ([#2091](https://github.com/adriankumpf/teslamate/pull/2091) by [ranaud80](https://github.com/ranaud80))
#### Documentation
- Add integration Guide for Node-RED, with examples ([#2098](https://github.com/adriankumpf/teslamate/pull/2098) by [pmboothby](https://github.com/pmboothby))
- Update upgrade guide ([#2043](https://github.com/adriankumpf/teslamate/pull/2043) by [withanhdammit](https://github.com/withanhdammit))
## [1.24.2] - 2021-09-29
### Improvements and Bug Fixes
- Discard stale data originating from the Tesla Streaming API
- Broadcast offline state via MQTT when car goes offline while driving
#### Dashboards
- Updates and Timeline: Link to [notateslaapp.com](https://www.notateslaapp.com/software-updates/history/) for release notes
## [1.24.1] - 2021-09-29
- Update error message that is shown if reCAPTCHA is required
- Update Erlang/OTP version to [prevent possible outages due to DST Root CA expiry on Sep 30th](https://elixirforum.com/t/psa-preventing-outages-due-to-dst-root-ca-expiry-on-sep-30th/42247)
**⚠️ NOTE:** Tesla have tightened the captcha security once again and now require Google reCAPTCHA to generate API tokens. reCAPTCHA is implemented in a way that makes it impossible to bypass for applications like TeslaMate. There are third-party services that offer to fill these captchas (by having humans solve them manually), but they're slow and can be pricey if you're making a large a mount of requests.
So if you are having issues signing in to your Tesla account via TeslaMate, the only remaining **workaround** right now is to sign in using `existing API tokens` (there is a button on the TeslaMate sign-in form). There are multiple apps available to securely generate access tokens yourself, for example:
- [Auth app for Tesla (iOS)](https://apps.apple.com/us/app/auth-app-for-tesla/id1552058613#?platform=iphone)
- [Tesla Tokens (Android)](https://play.google.com/store/apps/details?id=net.leveugle.teslatokens)
- [Tesla Auth (macOS, Linux)](https://github.com/adriankumpf/tesla_auth)
Users who are already signed in in do not have to worry about it. TeslaMate will continue to be able to access the Tesla API.
## [1.24.0] - 2021-08-31
### Improvements and Bug Fixes
- Tesla have once again made changes to the login: TeslaMate can now handle a delayed captcha that first appears after submitting the login form …
- Handle Tesla OwnerAPI errors returned by streaming API
- Lay the groundwork for the ability to customize the displayed order of vehicles ([#1904](https://github.com/adriankumpf/teslamate/pull/1904) by [leewillis77](https://github.com/leewillis77))
- The order can currently be customized by manually updating the `display_priority` column in the `cars` database table
#### Dashboards
- Charging Stats: Use the full range of colors in the heatmap ([#1821](https://github.com/adriankumpf/teslamate/pull/1821) by [dyxyl](https://github.com/dyxyl))
- Projected Range: Change right y-axis battery level range max from 200% to 100% ([#1840](https://github.com/adriankumpf/teslamate/pull/1840) by [toneus](https://github.com/toneus))
- Timeline: Fix for missing drives and add links to the Action column ([1818](https://github.com/adriankumpf/teslamate/pull/1818) and [#1872](https://github.com/adriankumpf/teslamate/pull/1872) by [DrMichael](https://github.com/DrMichael))
- Charge Level: Fix diagram glitch ([#1936](https://github.com/adriankumpf/teslamate/pull/1936) by [DrMichael](https://github.com/DrMichael))
#### Translations
- Add Japanese translation ([#1909](https://github.com/adriankumpf/teslamate/pull/1909) by [kuma](https://github.com/kuma))
#### Documentation
- Add a note about RAM needed after having issues, also a small clarification on where to place the .env file in the advanced guide ([#1857](https://github.com/adriankumpf/teslamate/pull/1857) by [billerby](https://github.com/billerby))
- Add note with custom TM_DB_USER when backing up ([#1931](https://github.com/adriankumpf/teslamate/pull/1931) by [kyleawayan](https://github.com/kyleawayan))
- Advanced installation with Traefik: Update Grafana rule to limit to TeslaMate host ([#1937](https://github.com/adriankumpf/teslamate/pull/1937) by [benoitm974](https://github.com/benoitm974))
## [1.23.7] - 2021-07-16
### Improvements and Bug Fixes
- Since Tesla have once again made changes to the login with captcha, this version fixes the problems caused by it
- Update permissions to the Grafana plugin directory ([#1814](https://github.com/adriankumpf/teslamate/pull/1814) by [letienne](https://github.com/letienne))
#### Documentation
- Fix heading of the Home Assistant binary_sensor config ([#1756](https://github.com/adriankumpf/teslamate/pull/1756) by [mrzeldaguy](https://github.com/mrzeldaguy))
## [1.23.6] - 2021-07-08
### Improvements and Bug Fixes
- Disable sign-in button if captcha code is missing
- Fix login for Chinese accounts
## [1.23.5] - 2021-07-08
### Improvements and Bug Fixes
- Fix login with captcha
#### Dashboards
- Timeline: Make added kWh more accurate
## [1.23.4] - 2021-06-18
### Improvements and Bug Fixes
#### Dashboards
- Drive Details: Don't round down duration ([#1677](https://github.com/adriankumpf/teslamate/pull/1677) by [Dulanic](https://github.com/Dulanic))
- Projected Range: Prevent division by zero ([#1678](https://github.com/adriankumpf/teslamate/pull/1678) by [Dulanic](https://github.com/Dulanic))
- Updates / States / Stastistics: Use local browser time ([#1685](https://github.com/adriankumpf/teslamate/pull/1685) by [Ed-M72](https://github.com/Ed-M72))
- Charge Level: Simplify database query ([#1693](https://github.com/adriankumpf/teslamate/pull/1693) by [Dulanic](https://github.com/Dulanic))
- Timeline: Add new category `Missing` and some other adjustments ([#1708](https://github.com/adriankumpf/teslamate/pull/1708) by [DrMichael](https://github.com/DrMichael))
- Timeline: Fix missing datasources ([#1730](https://github.com/adriankumpf/teslamate/pull/1730) by [nickbock](https://github.com/nickbock))
- Bump Grafana to 7.5.8 (Docker image)
#### Documentation
- Fix Home Assistant Lovelace UI and sensors ([#1711](https://github.com/adriankumpf/teslamate/pull/1711) by [JakobLichterfeld](https://github.com/JakobLichterfeld))
- Add FreeBSD guide ([#1646](https://github.com/adriankumpf/teslamate/pull/1646) and [#1712](https://github.com/adriankumpf/teslamate/pull/1712) by [tuxbox](https://github.com/tuxbox))
## [1.23.3] - 2021-06-02
### Bug Fixes
- Fix API tokens form
## [1.23.2] - 2021-06-02
### Bug Fixes
- Fix sign-in for Chinese accounts
## [1.23.1] - 2021-06-02
### Improvements and Bug Fixes
- Tesla has removed the captcha again …
- Fix error when changing the language to Chinese
#### Translations
- Update Swedish translations ([#1655](https://github.com/adriankumpf/teslamate/pull/1655) by [tobiasehlert](https://github.com/tobiasehlert))
## [1.23.0] - 2021-06-01
### Improvements and Bug Fixes
- Support Tesla's new captcha verification
- Improve naming of addresses (city aliases)
- Add `power` to published MQTT topics ([#1504](https://github.com/adriankumpf/teslamate/pull/1504) by [mnadvornik](https://github.com/mnadvornik))
- The Docker image now ships with Erlang/OTP 24 which comes with a JIT-compiler (enabled on most x86 64-bit platforms)
- Only publish geofence via MQTT if it has changed
- Fix calculation of gross consumption while charging
- Fix service mode detection
- Fix typo in code_challenge_method ([#1571](https://github.com/adriankumpf/teslamate/pull/1571) by [tuxbox](https://github.com/tuxbox))
- Make `dashboards.sh` script portable e.g. to BSD ([#1645](https://github.com/adriankumpf/teslamate/pull/1645) by [tuxbox](https://github.com/tuxbox))
#### Dashboards
- Add a new Timeline dashboard ([#1621](https://github.com/adriankumpf/teslamate/pull/1621) by [DrMichael](https://github.com/DrMichael))
- Statistics: Fix `pq: time zone "" not recognized` error ([#1470](https://github.com/adriankumpf/teslamate/pull/1470) and [#1559](https://github.com/adriankumpf/teslamate/pull/1559) by [Dulanic](https://github.com/Dulanic))
#### Translations
- Update Swedish translations ([#1461](https://github.com/adriankumpf/teslamate/pull/1461) by [tobiasehlert](https://github.com/tobiasehlert))
- Update French translations ([#1473](https://github.com/adriankumpf/teslamate/pull/1473) by [ranaud80](https://github.com/ranaud80))
- Update German translations
#### Documentation
- Update Mosquitto version used in docker-compose examples
- Add device classes and binary sensors to documented Home Assistant config ([#1597](https://github.com/adriankumpf/teslamate/pull/1597) by [flacjacket](https://github.com/flacjacket) and [#1634](https://github.com/adriankumpf/teslamate/pull/1634) by [ffeingol](https://github.com/ffeingol))
## [1.22.0] - 2021-03-17
### Improvements and Bug Fixes
- Add option to sign in with existing API tokens
- Avoid false `plugged_in` events ([#1423](https://github.com/adriankumpf/teslamate/pull/1423) by [brianmay](https://github.com/brianmay))
- Handle distinct OSM IDs gracefully when changing the address language
- Set another user agent for auth requests.
- ⚠️ _This fixes timeouts when signing in for the time being. Most users who are affected reported using a cloud hosting service. Expect this to break anytime Tesla decides to block this type of traffic coming from these providers._
- Update user agent used for API requests to GitHub and OpenStreetMap
#### Dashboards
- Add battery heater info to Overview / Charging Details and Charge Details dashboards ([#1428](https://github.com/adriankumpf/teslamate/pull/1428) by [ToniA](https://github.com/ToniA))
- Statistics: Calculate efficiency from charged energy ([#1445](https://github.com/adriankumpf/teslamate/pull/1445) by [ToniA](https://github.com/ToniA))
- Make Statistics dashboard look the same on both kilometers and miles ([#1439](https://github.com/adriankumpf/teslamate/pull/1439) by [ToniA](https://github.com/ToniA))
- Updates: Rename column to "Since Previous Update"
#### Translations
- Update Spanish translation ([#1446](https://github.com/adriankumpf/teslamate/pull/1446) by [alceasan](https://github.com/alceasan))
#### Documentation
- Explaining the asleep mode with MCU1 and the non-streaming mode ([#1453](https://github.com/adriankumpf/teslamate/pull/1453) by [ToniA](https://github.com/ToniA))
## [1.21.6] - 2021-03-10
### Improvements and Bug Fixes
- Change HTTP headers again to avoid auth requests timing out
- Fix changing the address language
- Add health check route ([#1422](https://github.com/adriankumpf/teslamate/pull/1422) by [brianmay](https://github.com/brianmay))
#### Translations
- Update Korean translation ([#1381](https://github.com/adriankumpf/teslamate/pull/1381) by [dongbum](https://github.com/dongbum))
- Updated Danish translation ([#1404](https://github.com/adriankumpf/teslamate/pull/1404) by [larskochhansen](https://github.com/larskochhansen))
#### Documentation
- Add fixed pricing information to [TeslaMateApi](https://github.com/tobiasehlert/TeslaMateApi) project description ([#1399](https://github.com/adriankumpf/teslamate/pull/1399) by [tobiasehlert](https://github.com/tobiasehlert))
## [1.21.5] - 2021-02-21
### Improvements and Bug Fixes
- Implement a workaround for login requests timing out
- Handle failed token refresh requests gracefully
#### Dashboards
- Overview: Fix Gross Panel font size ([#1363](https://github.com/adriankumpf/teslamate/pull/1363) by [DrMichael](https://github.com/DrMichael))
- Charging Stats: Set bucket size on charging heatmap ([#1355](https://github.com/adriankumpf/teslamate/pull/1355) by [leewillis77](https://github.com/leewillis77))
- Downgrade Grafana to 7.3.7 because of an incompatibility with the Trackmap plugin
## [1.21.4] - 2021-02-16
### Enhancements and Bug Fixes
- Point out more clearly when starting into import mode
- Hide sign-out button in import mode
- Don't purge debug log statements from production release
- Handle non-existing range values after the car was offline
#### Dashboards
- Statistics: Show "Starting at" column and fix timezone issue ([#1254](https://github.com/adriankumpf/teslamate/pull/1254) by [DrMichael](https://github.com/DrMichael))
- Charge Level: Fix usable battery level alternating between usable battery level and regular battery level
- Bump Grafana to v7.4.1
#### Documentation
- Add [TeslaMateApi](https://github.com/tobiasehlert/TeslaMateApi) to the list of projects using TeslaMate ([#1350](https://github.com/adriankumpf/teslamate/pull/1350) by [tobiasehlert](https://github.com/tobiasehlert))
- Update installation docks ([#1287](https://github.com/adriankumpf/teslamate/pull/1287) by [tobiasehlert](https://github.com/tobiasehlert))
- Update HomeAssistant documentation ([#1321](https://github.com/adriankumpf/teslamate/pull/1321) by [jschollenberger](https://github.com/jschollenberger))
## [1.21.3] - 2021-02-06
- Add support for v3 API tokens in China
- Detect if TeslaFi CSV files contain data for more than one car
- Change log level for streaming timeouts to debug
## [1.21.2] - 2021-01-31
> **⚠️ NOTE**: Any previously stored API refresh tokens will no longer function, as Tesla has deprecated the existing authentication endpoint. Existing access tokens will continue to work **until they expire**. Eventually, a full login will be needed to obtain new refresh tokens.
>
> **To immediately obtain new tokens after upgrading**, go to the TeslaMate settings page, **sign out via the button** at the bottom of the page and then sign in again.
Additional:
> **⚠️ NOTE**: This release changes TeslaMate's base Docker image to Debian. If you have any customizations on top of TeslaMate (like healthchecks), they could need updates to work on top of this new image.
### Enhancements
- Use the new Tesla authentication endpoint for refreshing access tokens
- Drop support for the `/oauth/token` endpoint
- Add a sign-out button at the bottom of the settings page
#### Translations
- Add Turkish Language Support ([#1194](https://github.com/adriankumpf/teslamate/pull/1194) by [neocorp](https://github.com/neocorp))
#### Dashboards
- Display average outside temperature in charges dashboard ([#1213](https://github.com/adriankumpf/teslamate/pull/1213) by [DrMichael](https://github.com/DrMichael))
## [1.21.1] - 2021-01-10
### Enhancements
#### Translations
- Add Finnish translation ([#1190](https://github.com/adriankumpf/teslamate/pull/1190) by [puppee](https://github.com/puppee))
#### Documentation
- Add some documentation about updating TeslaMate when installed with Docker ([#1170](https://github.com/adriankumpf/teslamate/pull/1170) by [fatbasstard](https://github.com/fatbasstard))
- Update "Import from tesla-apiscraper" documentation: Give an example how to get the vehicle_id from TeslaMate ([#1174](https://github.com/adriankumpf/teslamate/pull/1174) by [Bdot42](https://github.com/Bdot42))
- Add link to unofficial Home Assistant addon ([#1188](https://github.com/adriankumpf/teslamate/pull/1188) by [matt-FFFFFF](https://github.com/matt-FFFFFF))
#### Other
- Allow to use non-standard MQTT ports (via [MQTT_PORT](https://docs.teslamate.org/docs/configuration/environment_variables))
- Refactoring: Use built-in Ecto enum type
- Guard against unexpected MFA errors
### Bug Fixes
- Update drive duration query to avoid displaying different times for drives (Details vs Overview) ([#1191](https://github.com/adriankumpf/teslamate/pull/1191) by [fatbasstard](https://github.com/fatbasstard))
- Fix font colors for light theme (Updates dashboard) ([#1169](https://github.com/adriankumpf/teslamate/pull/1169) by [fatbasstard](https://github.com/fatbasstard))
- Fix typo (Statistics dashboard) ([#1185](https://github.com/adriankumpf/teslamate/pull/1185) by [rogiervandergeer](https://github.com/rogiervandergeer))
## [1.21.0] - 2021-01-02
### Enhancements
#### Dashboards
- Drive Details: Add button to download a drive as GPX file ([#993](https://github.com/adriankumpf/teslamate/pull/993) by [ayonix](https://github.com/ayonix))
- New dashboard for reporting to Dutch tax ([#998](https://github.com/adriankumpf/teslamate/pull/998) and [#1051](https://github.com/adriankumpf/teslamate/pull/1051) by [roadrash2108](https://github.com/roadrash2108))
- Locations: Add panel to see when an address was last visited
- Charges/Drives: Add more filtering capabilities ([#1016](https://github.com/adriankumpf/teslamate/pull/1016) by [Kosta-Github](https://github.com/Kosta-Github))
- Overview: Fix unit of measurement for charge energy added ([#1061](https://github.com/adriankumpf/teslamate/pull/1061) by [landler](https://github.com/landler))
- Charge Level: Add green bars (20/80%) to match "Charge Delta" graph ([#1059](https://github.com/adriankumpf/teslamate/pull/1059) by [roadrash2108](https://github.com/roadrash2108))
- Charging-Stats/Trip: Change colors of AC/DC ([#1058](https://github.com/adriankumpf/teslamate/pull/1058) by [roadrash2108](https://github.com/roadrash2108))
- Statistics: Resolve issue with month groupings ([#1082](https://github.com/adriankumpf/teslamate/pull/1082) by [leewillis77](https://github.com/leewillis77))
- Updates: Apply number of charges and average rated range to the correct update ([#1147](https://github.com/adriankumpf/teslamate/pull/1147) by [tlj](https://github.com/tlj))
#### Other
- Add support for Tesla’s new authentication process (two-factor authentication)
- Optimize TeslaFi CSV file import: reduced memory usage and increased performance
- Require [Elixir v1.11](https://docs.teslamate.org/docs/installation/debian#requirements)
- Allow to connect to Postgres via IPv6 (via [DATABASE_IPV6](https://docs.teslamate.org/docs/configuration/environment_variables))
- Allow to connect to MQTT broker via IPv6 (via [MQTT_IPV6](https://docs.teslamate.org/docs/configuration/environment_variables))
- Improve detection of whether the vehicle is plugged in during cold weather (+ fix [#1154](https://github.com/adriankumpf/teslamate/pull/1154) by [virtualm2000](https://github.com/virtualm2000))
- Use connection pooling for SRTM downloads
- Optimize Docker layer caching to speed up image build times
- Battery level tooltip: Prevent division by zero error if car is totally down to 0%
- Display the actual error if the import directory is not accessible
#### Translations
- Add Italian translation ([#1095](https://github.com/adriankumpf/teslamate/pull/1095) and [#1096](https://github.com/adriankumpf/teslamate/pull/1096) by [HavanaMan](https://github.com/HavanaMan))
#### Documentation
- Fix version info on development guide & minor spelling fix ([#994](https://github.com/adriankumpf/teslamate/pull/994) by [techgaun](https://github.com/techgaun))
- Update backup_restore.md ([#1027](https://github.com/adriankumpf/teslamate/pull/1027) by [pihomeserver](https://github.com/pihomeserver))
- Improve garage door automation example ([#1039](https://github.com/adriankumpf/teslamate/pull/1039) by [andrewfoster](https://github.com/andrewfoster))
- Update traefik guide to use a single public hostname instead of two ([#1101](https://github.com/adriankumpf/teslamate/pull/1101) by [pmboothby](https://github.com/pmboothby))
- Projects using TeslaMate:
- [TeslaMateAgile](https://github.com/MattJeanes/TeslaMateAgile): mention Tibber support ([#1097](https://github.com/adriankumpf/teslamate/pull/1097) by [tobiasehlert](https://github.com/tobiasehlert))
- Add [TeslaMate_Telegram_Bot](https://github.com/JakobLichterfeld/TeslaMate_Telegram_Bot) ([#1122](https://github.com/adriankumpf/teslamate/pull/1122) by [JakobLichterfeld](https://github.com/JakobLichterfeld))
- Update installation instructions for Apache ([#1124](https://github.com/adriankumpf/teslamate/pull/1124) by [juankymoral](https://github.com/juankymoral))
## [1.20.1] - 2020-10-24
### Enhancements
#### Dashboards
- Charge Level: Always show 0% and 100% when state of charge is shown in a diagram ([#980](https://github.com/adriankumpf/teslamate/pull/980) by [mbertheau](https://github.com/mbertheau))
- Charging Stats: Titles/labels now match pie-charts ([#998](https://github.com/adriankumpf/teslamate/pull/998) by [roadrash2108](https://github.com/roadrash2108))
- Drive Details: Increase width of odometer panel
- Efficiency: Set a fixed max value and use LCD gauge
- Overview: Fix overlapping timestamps in discrete map ([#995](https://github.com/adriankumpf/teslamate/pull/995) by [pmboothby](https://github.com/pmboothby))
- Fix overlapping timestamps in trip and states dashboard
- Statistics: Add links to other dashboards ([#973](https://github.com/adriankumpf/teslamate/pull/973) by [DrMichael](https://github.com/DrMichael))
#### Translations
- Update Norwegian translation ([#996](https://github.com/adriankumpf/teslamate/pull/996) and [#1007](https://github.com/adriankumpf/teslamate/pull/1007) by [spacecosmos](https://github.com/spacecosmos))
- Update Swedish translation ([#1029](https://github.com/adriankumpf/teslamate/pull/1029) by [tobiasehlert](https://github.com/tobiasehlert))
#### Other
- Display update version in the homescreen update tooltip ([#976](https://github.com/adriankumpf/teslamate/pull/976) by [ayonix](https://github.com/ayonix))
- Customize Grafana home screen logo ([#1004](https://github.com/adriankumpf/teslamate/pull/1004) by [gimmespam](https://github.com/gimmespam))
- Bump Grafana to 7.2.1
### Bug Fixes
- Fix tooltips in car overview being hidden by .card ([#975](https://github.com/adriankumpf/teslamate/pull/975) by [ayonix](https://github.com/ayonix))
- Make Statistics dashboard compatible with older versions of Postgres
- Open Statistics dashboard with browser time zone when coming from the TeslaMate UI
## [1.20.0] - 2020-10-04
### Enhancements
#### Dashboards
- Update consumption unit to Watt-hour to match in-car unit ([#717](https://github.com/adriankumpf/teslamate/pull/717) by [mattw01](https://github.com/mattw01))
- Update dashboards to use the new components from Grafana 7
- Charges: Show very short charging sessions
- Charges: Add filter for voltage ([#857](https://github.com/adriankumpf/teslamate/pull/857) by [Dulanic](https://github.com/Dulanic))
- Charging Details: Show kWh even if still charging ([#744](https://github.com/adriankumpf/teslamate/pull/744) by [Dulanic](https://github.com/Dulanic))
- Charging Stats: Visualize % of sum instead of max kWh in charging heat map ([#680](https://github.com/adriankumpf/teslamate/pull/680) by [Dulanic](https://github.com/Dulanic))
- Charging Stats: Show cost per 100 km/mi (Charging Stats)
- Drives: Update possible values for the "cold" column to be consistent ([#702](https://github.com/adriankumpf/teslamate/pull/702) by [Dulanic](https://github.com/Dulanic))
- Drive Details: Show drive efficiency
- Mileage: Optimize query to get odometer ([#804](https://github.com/adriankumpf/teslamate/pull/804) by [Dulanic](https://github.com/Dulanic))
- Overview: Add 'total energy added' to chart ([#690](https://github.com/adriankumpf/teslamate/pull/690) by [Dulanic](https://github.com/Dulanic))
- Overview: Hide stale temperatures
- Overview: Show most recent driver temp setting while driving
- Overview: Add efficiency ([#970](https://github.com/adriankumpf/teslamate/pull/970) by [DrMichael](https://github.com/DrMichael))
- States: Display all states names ([#755](https://github.com/adriankumpf/teslamate/pull/755) by [DrMichael](https://github.com/DrMichael))
- Updates: Add links to release notes ([#797](https://github.com/adriankumpf/teslamate/pull/797) and [#823](https://github.com/adriankumpf/teslamate/pull/823) by [pmboothby](https://github.com/pmboothby))
- Updates: Show average range and number of chargers per software version to identify if an update had a bigger than expected impact on range ([#731](https://github.com/adriankumpf/teslamate/pull/731) and [#762](https://github.com/adriankumpf/teslamate/pull/762) by [Dulanic](https://github.com/Dulanic))
- Updates: Fix up the version display when it only has a week value and no point release ([#925](https://github.com/adriankumpf/teslamate/pull/925) by [pyjamasam](https://github.com/pyjamasam))
- Vampire Drain: Utilize charges as additional anchor points ([#769](https://github.com/adriankumpf/teslamate/pull/769) by [tacotran](https://github.com/tacotran))
- Add new Statistics dashboard ([#965](https://github.com/adriankumpf/teslamate/pull/965) by [DrMichael](https://github.com/DrMichael))
- Add the "shared crosshair" setting to some of the dashboards ([#932](https://github.com/adriankumpf/teslamate/pull/932) and [#962](https://github.com/adriankumpf/teslamate/pull/936) by [Kosta-Github](https://github.com/Kosta-Github))
- "Customize" Grafana logo ([#890](https://github.com/adriankumpf/teslamate/pull/890) by [https://github.com/fatbasstard](https://github.com/fatbasstard))
##### Note
- The dashboards require **Grafana 7**. Make sure you are running the latest version of Grafana if you are not using the Docker installation.
#### Translations
- Update Chinese (Simplified) translation ([#747](https://github.com/adriankumpf/teslamate/pull/747) by [edward4hgl](https://github.com/edward4hgl))
- Update French translation ([#693](https://github.com/adriankumpf/teslamate/pull/693) by [tomS3210](https://github.com/tomS3210))
- Tweak Dutch translation ([#880](https://github.com/adriankumpf/teslamate/pull/880) and[#881](https://github.com/adriankumpf/teslamate/pull/881) by [https://github.com/fatbasstard](https://github.com/fatbasstard))
#### Documentation
- Update HomeAssistant documentation ([#705](https://github.com/adriankumpf/teslamate/pull/705) by [ngardiner](https://github.com/ngardiner))
- TeslaFi Import: Clarify steps 3 and 4 about emptying the import folder ([#703](https://github.com/adriankumpf/teslamate/pull/703) by [ramonsmits](https://github.com/ramonsmits))
- Update Upgrade documentation ([#790](https://github.com/adriankumpf/teslamate/pull/790) by [roadrash2108](https://github.com/roadrash2108))
- Add a page that lists projects that use TeslaMate: [docs.teslamate.org/docs/projects](https://docs.teslamate.org/docs/projects)
- An note about moving the backup file ([#813](https://github.com/adriankumpf/teslamate/pull/813) by [traviscollins](https://github.com/traviscollins))
- Add `-T` flag to backup command ([#851](https://github.com/adriankumpf/teslamate/pull/851) by [acemtp](https://github.com/acemtp))
#### Other
- Optimize conversion helper functions
- Allow to set a cost by the minute per geo-fence
- Allow to set charge cost by minute
- Allow negative charge costs
- Periodically store vehicle data while charging
- Use a more performant HTTP client
- Try to keep using API tokens if initial refresh at startup fails
- Tweak streaming timeouts and create a new connection after too many disconnects
- Change default sleep requirements to not require the car to be locked
- Use GitHub Actions to build docker images and publish them to DockerHub
- For those who want to help **testing the latest development version**: the docker images with the `edge` tag (`teslamate/teslamate:edge` and `teslamate/grafana:edge`) are for you.
- Allow negative cost_per_unit for geofences ([#968](https://github.com/adriankumpf/teslamate/pull/968) by [ayonix](https://github.com/ayonix))
- Speed up parsing of CSV files (data import)
### Bug Fixes
- Vampire Drain: Fix duplicate values with multiple cars ([#726](https://github.com/adriankumpf/teslamate/pull/726) by [Dulanic](https://github.com/Dulanic))
- Tooling: Ensure dashboards are restored into the same folder as they currently belong to ([#712](https://github.com/adriankumpf/teslamate/pull/712) by [sumnerboy12](https://github.com/sumnerboy12))
- Battery Level & Range: fix wrongly displayed values for multiple cars ([#843](https://github.com/adriankumpf/teslamate/issues/843) by [lemmerk](https://github.com/lemmerk))
- Fix handling of locations that cannot be geocoded
- Show in progress charging sessions
- Handle API errors during initialization
## [1.19.4] - 2020-06-04
- Bump Grafana to 6.7.4 which includes an [important security patch](https://grafana.com/blog/2020/06/03/grafana-6.7.4-and-7.0.2-released-with-important-security-fix)
## [1.19.3] - 2020-05-03
### Enhancements
#### Translations
- Improve Chinese (Traditional) translation accuracy ([#650](https://github.com/adriankumpf/teslamate/pull/650) by [occultsound](https://github.com/occultsound))
- Improve Chinese (Simplified) translation accuracy ([#649](https://github.com/adriankumpf/teslamate/pull/649) by [edward4hgl](https://github.com/edward4hgl))
- Improve Korean translation ([#663](https://github.com/adriankumpf/teslamate/pull/663) by [dongbum](https://github.com/dongbum))
#### Dashboards
- Overview: Update battery gauge thresholds ([#651](https://github.com/adriankumpf/teslamate/pull/651) by [wooter](https://github.com/wooter))
- Drives: Add column header for reduced range ([#662](https://github.com/adriankumpf/teslamate/pull/662) by [Dulanic](https://github.com/Dulanic))
- Charging Stats: Show map with frequently used chargers ([#666](https://github.com/adriankumpf/teslamate/pull/666) by [Dulanic](https://github.com/Dulanic))
- _Manual install: requires Grafana plugin **grafana-map-panel**_
```bash
grafana-cli --pluginUrl https://github.com/panodata/grafana-map-panel/releases/download/0.9.0/grafana-map-panel-0.9.0.zip plugins install grafana-worldmap-panel-ng
```
#### Other
- Add option `HTTP_BINDING_ADDRESS` to control the bound IP address ([#665](https://github.com/adriankumpf/teslamate/pull/665) by [dyxyl](https://github.com/dyxyl))
- Docker image: Pre-install Grafana plugins
- Drop unused indexes
### Bug Fixes
- Fix an issue that could cause a missed firmware update not to be logged retroactively
- Fix an issue where the vehicle process could crash when logging was suspended manually
- Improve error message for an invalid tokens table
- Fix `min. distance per drive` on Efficiency dashboard to filter correctly in miles ([#672](https://github.com/adriankumpf/teslamate/pull/672) by [Dulanic](https://github.com/Dulanic))
## [1.19.2] - 2020-04-26
### Enhancements
#### Translations
- Add Chinese (Simplified) translation ([#625](https://github.com/adriankumpf/teslamate/pull/625) by [edward4hgl](https://github.com/edward4hgl))
- Add Chinese (Traditional) translation ([#633](https://github.com/adriankumpf/teslamate/pull/633) by [occultsound](https://github.com/occultsound))
- Fix typo in French translation ([#638](https://github.com/adriankumpf/teslamate/pull/638) by [tobiasehlert](https://github.com/tobiasehlert))
- Add Dutch translation ([#647](https://github.com/adriankumpf/teslamate/pull/647) by [wooter](https://github.com/wooter))
#### Dashboards
- Updates: Show update duration and time since last update ([#632](https://github.com/adriankumpf/teslamate/pull/632) by [Dulanic](https://github.com/Dulanic))
- Charging Stats: Show kWh at non-decimal level and MWh at the 3 decimal point level ([#642](https://github.com/adriankumpf/teslamate/pull/642) and [#646](https://github.com/adriankumpf/teslamate/pull/646) by [Dulanic](https://github.com/Dulanic))
### Bug Fixes
- Do not publish NULL or incorrect values to MQTT topics if TeslaMate is restarted while the car is asleep
## [1.19.1] - 2020-04-20
### Enhancements
#### Translations
- Add Korean translation ([#614](https://github.com/adriankumpf/teslamate/pull/614) by [dongbum](https://github.com/dongbum))
### Bug Fixes
- Fix an issue where the map tiles would disappear when editing a geofence
- Fix a few things in the docs ([#611](https://github.com/adriankumpf/teslamate/pull/611) by [tobiasehlert](https://github.com/tobiasehlert))
## [1.19.0] - 2020-04-19
### Enhancements
#### Streaming API
As the first and only Tesla logging app out there, TeslaMate now use the Tesla streaming API! This brings the following improvements:
- **High precision drive data**. Rather than active polling, the streaming API allows for passive consumption of a high frequency data stream with the most important drive data (position, heading, speed, power, elevation etc.).
- **Actual elevation above sea level**. Up until now TeslaMate used satellite terrain data to get the elevation. Driving through tunnels or across a bridges therefore resulted in inaccurate recordings. This is no longer the case!
- **Bluetooth hints are no longer needed!** Using the streaming API does not prevent the vehicle from falling asleep, thus enabling continuous monitoring. This allows the car to fall asleep more quickly (no more idle timer) and we don't miss up to 21 minutes of driving because of halted polling.
**Many thanks to everyone who participated in testing this release and contributed improvements!**
#### Translations
- Add Danish translation ([#584](https://github.com/adriankumpf/teslamate/pull/584) by [MartinNielsen](https://github.com/MartinNielsen))
- Update Norwegian translation ([#544](https://github.com/adriankumpf/teslamate/pull/544) and [#591](https://github.com/adriankumpf/teslamate/pull/591) by [spacecosmos](https://github.com/spacecosmos))
- Update Swedish translation ([#522](https://github.com/adriankumpf/teslamate/pull/522) by [tobiasehlert](https://github.com/tobiasehlert))
- Update French translation ([#598](https://github.com/adriankumpf/teslamate/pull/598) by [tomS3210](https://github.com/tomS3210) and [MaxG88](https://github.com/MaxG88))
- Updated Labels to Title Case ([#578](https://github.com/adriankumpf/teslamate/pull/578) by [jmiverson](https://github.com/jmiverson))
#### Other enhancements
- Send credentials with manifest request ([#555](https://github.com/adriankumpf/teslamate/pull/555) by [MaxG88](https://github.com/MaxG88))
- Add option to change the language of the web interface
- Reduce docker image size
- Display an arrow instead of a generic marker to indicate in which direction the vehicle is heading
- Show spinner before the map is initialized
- Wait until the doors/trunk/frunk are closed before attempting to fall asleep
- Inform if a new TeslaMate update is available
- Add icons to navbar items
- Add 'About' section to the settings page
- Publish only those values via MQTT that have actually changed
- Improve detection of available vehicle software updates
#### New MQTT Topics
- `teslamate/cars/$car_id/elevation`
- `teslamate/cars/$car_id/trunk_open`
- `teslamate/cars/$car_id/frunk_open`
#### Documentation
The docs were revised (once again). You can find them at **[docs.teslamate.org](https://docs.teslamate.org)**.
- Add portainer guide to the documentation ([#581](https://github.com/adriankumpf/teslamate/pull/581) by [DrMichael](https://github.com/DrMichael))
- Improve Apache2 guide ([#570](https://github.com/adriankumpf/teslamate/pull/570) by [DrMichael](https://github.com/DrMichael))
- Bump traefik to v2.2 ([#603](https://github.com/adriankumpf/teslamate/pull/603) by [oittaa](https://github.com/oittaoittaaa))
### Bug Fixes
- Display vampire drain range loss per hour in the correct units ([#543](https://github.com/adriankumpf/teslamate/pull/543) by [ograff](https://github.com/ograff)).
- Trip dashboard: Add title to the drives table to allow sorting ([#592](https://github.com/adriankumpf/teslamate/pull/592) by [MaxG88](https://github.com/MaxG88))
- Add `tini` as the init process for the TeslaMate Docker container to avoid zombie processes ([#606](https://github.com/adriankumpf/teslamate/pull/606) by [dbussink](https://github.com/dbussink))
- Sort "Drives" table properly by drive date ([#595](https://github.com/adriankumpf/teslamate/pull/595) by [Dulanic](https://github.com/Dulanic))
- Fix flashing modal on the geofence page
- Publish an MQTT message when the health check succeeds again
- Handle various invalid API responses that could previously cause problems
- Fix an issue where ambiguous dates could cause the TeslaFi import to fail
- Terminate an in progress drive when the car is put into service mode
### Changed
- Increase the minimum Elixir version to 1.10
### Removed
- Remove sleep mode requirements that are no longer needed
- Remove option to disable sleep mode
## [1.18.2] - 2020-03-28
### Bug Fixes
- Fix an issue that could cause charging sessions not to be properly recorded if the API reported incomplete charge data
- Fix a problem that could cause the TeslaFi import to fail
## [1.18.1] - 2020-03-23
### Bug Fixes
- Fix settings dropdown and Swedish translation ([#525](https://github.com/adriankumpf/teslamate/pull/525) by [tobiasehlert](https://github.com/tobiasehlert))
## [1.18.0] - 2020-03-21
### Enhancements
- Add Swedish translation ([#485](https://github.com/adriankumpf/teslamate/pull/485) and [#522](https://github.com/adriankumpf/teslamate/pull/522) by [tobiasehlert](https://github.com/tobiasehlert))
- Add Norwegian translation ([#500](https://github.com/adriankumpf/teslamate/pull/500) by [spacecosmos](https://github.com/spacecosmos))
- Add Spanish translation ([#519](https://github.com/adriankumpf/teslamate/pull/519) by [alceasan](https://github.com/alceasan))
- Overview: Add states panel ([#520](https://github.com/adriankumpf/teslamate/pull/520) by [DrMichael](https://github.com/DrMichael))
- Immediately display the current car software version after restarting TeslaMate
- Add mileage to the summary page
- Add option to calculate charging costs retroactively
- Allow to enter total cost or cost per KWh used
- Indicate if any of the doors are open
- Add support for session fees
- Store more vehicle config attributes (`exterior_color`, `wheel_type`, `spoiler_type`)
- Bump Grafana to 6.7.1
#### New MQTT Topics
- `teslamate/cars/$car_id/doors_open`
- `teslamate/cars/$car_id/model`
- `teslamate/cars/$car_id/trim_badging`
- `teslamate/cars/$car_id/exterior_color`
- `teslamate/cars/$car_id/wheel_type`
- `teslamate/cars/$car_id/spoiler_type`
### Bug Fixes
- Drive Stats: Show stats in desired units ([#484](https://github.com/adriankumpf/teslamate/pull/484) by [pichalite](https://github.com/pichalite))
- Drive Details: Fix odometer units ([#487](https://github.com/adriankumpf/teslamate/pull/487) by [pichalite](https://github.com/pichalite))
- Update address formatting to avoid showing obscure names instead of towns/cities
- Charge Details: Hide empty series
- Suppress `Cldr.NoMatchingLocale` warnings
- Trip: Prevent 'division by zero' error
- Open dashboard links in a new tab to work around Grafana regression
- Use the maximum kWh to calculate the charge cost
## [1.17.1] - 2020-02-23
### Bug Fixes
- Fix an error that could prevent new users from logging in, among other things
- Overview dashboard: Display odometer in desired units
## [1.17.0] - 2020-02-23
### Enhancements
[olexs](https://github.com/olexs) has developed a toolkit to export data from the [tesla-apiscraper](https://github.com/lephisto/tesla-apiscraper) InfluxDB backend and convert it to a CSV format that can be imported using the [TeslaFi Import](https://teslamate.readthedocs.io/en/latest/import/teslafi.html). Check it out if you want to migrate data to TeslaMate: [**Import from tesla-apiscraper (BETA)**](https://teslamate.readthedocs.io/en/latest/import/tesla_apiscraper.html)
- Simplify geofence editing: The radius can now be changed interactively.
- Allow geofences to overlap: If multiple geofences cover a position, the geofence whose centre is closest is selected.
- Increase charge cost scale / kWh ([#440](https://github.com/adriankumpf/teslamate/pull/440) by [baylanger](https://github.com/baylanger))
- Charge cost view: Show zoom controls
- TeslaFi Import: Preselect the timezone
- Add configuration option [`DATABASE_SSL`](https://teslamate.readthedocs.io/en/latest/configuration/environment_variables.html)
- Use 'rated' as default preferred range
- Collapse 'Dashboards' dropdown on mobile
#### Dashboards
- Add **Trip dashboard**: This dashboard was built to visualize longer trips. It provides an overview of all drives and charges that were logged over a period of several hours or days.
- _All:_ Link to the web interface and other dashboards
- _Overview:_ Speed up database queries
- _Charges:_ Add geofence filter
- _Charge Details:_ Add cost overview ([#460](https://github.com/adriankumpf/teslamate/pull/460) by [Niek](https://github.com/Niek))
- _Drive Details:_ Add usable battery level graph
#### New MQTT Topics
- `teslamate/cars/$car_id/geofence`: The name of the geofence at the current position
#### Documentation
- Add docs for tesla-apiscraper import ([#454](https://github.com/adriankumpf/teslamate/pull/454) by [olexs](https://github.com/olexs))
- Update Backup & Restore docs ([#438](https://github.com/adriankumpf/teslamate/pull/438) by [AlwindB](https://github.com/AlwindB))
- Revamp manual install docs
### Bug Fixes
- Fix an issue where some CSV files could not be imported
## [1.16.0] - 2020-02-07
### Enhancements
- [Import from TeslaFi (BETA)](https://teslamate.readthedocs.io/en/latest/import/teslafi.html)
- Calculate charge cost based on location and kWh
- Automatically set charge cost to zero if free supercharging is enabled (configurable on the settings page)
- Add French translation ([#397](https://github.com/adriankumpf/teslamate/pull/397) by [tomS3210](https://github.com/tomS3210))
- Improve language detection
- Show odometer on 'Drive Details' dashboard
- Bump Grafana to 6.6.1
- Bump Elixir to 1.10
#### Documentation
- New FAQ entry for adding API tokens directly into the database instead of using username/password ([#412](https://github.com/adriankumpf/teslamate/pull/412) by [wishbone1138](https://github.com/wishbone1138))
- Improve standalone install documentation ([#416](https://github.com/adriankumpf/teslamate/pull/416) by [Niek](https://github.com/Niek))
- Improve iOS Shortcuts guide ([#405](https://github.com/adriankumpf/teslamate/pull/405) by [DP19](https://github.com/DP19))
### Bug Fixes
- Re-add charge annotations to the 'Projected Range' dashboard ([#393](https://github.com/adriankumpf/teslamate/pull/393) by [ctraber](https://github.com/ctraber))
- Correct typos in projected-range.json ([#395](https://github.com/adriankumpf/teslamate/pull/395) by [shagberg](https://github.com/shagberg))
- Increase height of the pie charts panels
- Address an issue where a drive would not be properly completed if the vehicle was suddenly reported as asleep after being offline for a while
- Fix energy used in 'Drive Details'
## [1.15.1] - 2020-01-25
### Enhancements
- Tweak polling intervals
- Make the web interface feel snappier
### Bug Fixes
- Fix an issue where distance, energy used and duration were missing on the Drive Details dashboard if the length unit was set to miles
## [1.15.0] - 2020-01-23
### Enhancements
- Add charge cost interface
- Display usable SOC and show snowflake icon on summary page ([#338](https://github.com/adriankumpf/teslamate/pull/338) by [ctraber](https://github.com/ctraber))
- Log missed software updates
- Add tooltip with the estimated range at 100%
- Remove software version commit hash
- Format remaining charge time
- Add option to use a custom namespace for MQTT topics
- Periodically store vehicle data while online
- Use the Accept-Language HTTP header get the locale (Supported languages: English, German)
- Add setting to change the preferred language of OpenStreetMap results
- Show spinner while fetching vehicle data
- Add dropdown with dashboard links to the navigation bar
#### New MQTT Topics
- `teslamate/cars/$car_id/usable_battery_level`
#### Dashboards
- Projected Range: Use `usable_battery_level` to calculate the projected range and add more panels ([#338](https://github.com/adriankumpf/teslamate/pull/338), [#367](https://github.com/adriankumpf/teslamate/pull/367) by [ctraber](https://github.com/ctraber))
- Add `tesla` tag ([#369](https://github.com/adriankumpf/teslamate/pull/369) by [TechForze](https://github.com/TechForze))
- Vampire Drain: show SOC difference and ❄ (reduced range)
- Charging Stats: Show share of AC/DC charging
- Charging Stats: Show top charging stations by cost
- Overview dashboard: Use the preferred range
- Overview dashboard: Always show latest voltage and power while charging
- Add Charge Level dashboard
- Add Drive Stats dashboard
- Revamp Drives/Drive Details and Charges/Charge Details dashboards
#### Documentation
- Add docs for an advanced Docker install with Apache2 ([#361](https://github.com/adriankumpf/teslamate/pull/361) by [DrMichael](https://github.com/DrMichael))
- Add docs for backup and restore ([#361](https://github.com/adriankumpf/teslamate/pull/361) by [DrMichael](https://github.com/DrMichael))
- Update the macrodroid docs ([#359](https://github.com/adriankumpf/teslamate/pull/359) by [markusdd](https://github.com/markusdd))
- Add docs for manually fixing data
- Add docs for updating Postgres
### Bug Fixes
- Fix tooltips in Safari (iOS)
- Always publish the shift state via MQTT
- Fix an issue where he charge location was not be displayed
- Fix an issue that could cause the added charge kWh to be shown as 0
**⚠️ Please note:** Due to internal changes, all addresses will be recalculated on first startup. Depending on the amount of data, this process may take up to 30 minutes or longer.
## [1.14.3] - 2020-01-06
### Enhancements
- Locations dashboard: Visualize cities and states with the most stored addresses
### Bug Fixes
- Fix an issue where a broken rear window sensor could cause the windows to always be displayed as open
- Address an issue where a charge wouldn't be properly logged if the Tesla API reported invalid charge data
- Fix a bug that could cause the geo-fence form to become unresponsive
## [1.14.2] - 2020-01-03
### Bug Fixes
- Fix an issue where invalid or revoked tokens could cause the application to crash after startup
- Change default time range in the 'Updates' dashboard
## [1.14.1] - 2019-12-24
### Bug Fixes
- Fix an issue where the database migrations would not succeed if there were charges without any data points
## [1.14.0] - 2019-12-22
### Enhancements
#### Documentation
[@gundalow](https://github.com/gundalow) has revamped the docs ([#292](https://github.com/adriankumpf/teslamate/pull/292), [#314](https://github.com/adriankumpf/teslamate/pull/314)). The new documentation is available here: [teslamate.readthedocs.io](https://teslamate.readthedocs.io)
#### Automatic phase correction
The phase correction is now applied automatically.
Background: some vehicles incorrectly report 2 instead of 1 or 3 phases when charging. This led to an incorrect calculation of the 'kWh used'. Furthermore, the calculation did not work reliably in three-phase networks with e.g. 127/220V. Therefore it was necessary in the past to manually activate a phase correction for specific geo-fences. With this update the correction is now applied automatically.
#### Other enhancements
- Refactored API module
- Increased polling frequency in asleep state
- New OSM aliases
- ... and other minor improvements
### Bug Fixes
- Efficiency Dashboard: convert km/h to mph in the temperature efficiency table
- Fix an issue where the application could crash because the database pool was too small
- Fix an issue where a drive/charge could be split into two parts due to API timeouts
## [1.13.2] - 2019-12-07
### Enhancements
- Enable the time range control in the "Charging Stats" dashboard ([#278](https://github.com/adriankumpf/teslamate/pull/278) by [@nnoally](https://github.com/nnoally))
- Various docs improvements ([#285](https://github.com/adriankumpf/teslamate/pull/285) by [@gundalow](https://github.com/gundalow))
### Bug Fixes
- Fix issue where on a brand new installation suspending logging would only work after a restart
- Fix the elevation scale in the Drive Details
## [1.13.1] - 2019-11-26
### Enhancements
Add a database column that will allow tracking charge costs:
- Merge 20191117042320_add_cost_field_to_charges.exs (Charge Cost field) ([#258](https://github.com/adriankumpf/teslamate/pull/258) by [@ngardiner](https://github.com/ngardiner))
- Grafana Dashboard Integration for Charge Cost ([#273](https://github.com/adriankumpf/teslamate/pull/273) by [@ngardiner](https://github.com/ngardiner))
Note: There is no charging cost interface either manual or automatic at this point but there will be in the future.
### Bug Fixes
- Downgrade the Grafana docker image to v6.3.7 because there are still issues with ARM-compatible images
- Fix an issue where the selected car was not displayed when opening the drive or charging details
## [1.13.0] - 2019-11-25
### New Features
- Display link "Dashboards" inside the navigation bar (it becomes visible after clicking an address in one of the Grafana dashboards. Alternatively the Grafana URL can be added manually on the settings page)
- Enable or disable the sleep mode depending on the location. For example, the car can be allowed to sleep at home or work, but nowhere else.
- Extend Charge Stats Dashboard with discharge stats, a charge delta graph and a charge heatmap ([#270](https://github.com/adriankumpf/teslamate/pull/270) by [@marcogabriel](https://github.com/marcogabriel))
### Enhancements
- Make sleep mode separately configurable for each car
- Reduce default "Time to try sleeping" to 12 minutes for newer vehicles
- The "States" dashboard now includes software updates
- Automatically repair trips and charges with missing addresses (e.g. because OpenStreetMap was temporarily unavailable)
- Update thresholds of the battery level gauge ([#256](https://github.com/adriankumpf/teslamate/pull/256) by [@marcogabriel](https://github.com/marcogabriel))
### Bug Fixes
- Fix issue where consumption values were displayed as 0
- Fix issue where installing a software update when charging would produce an incomplete charge record
## [1.12.2] - 2019-11-06
### Bug Fixes
- Fix an issue where the "states" graph would not show every drive/charge
- Fix an issue where the application would not start if the vehicle was parked at a place with poor reception
- Remove duplicate table row "Remaining Time"
## [1.12.1] - 2019-11-03
### Enhancements
- Display remaining time while charging
### New MQTT Topics
- `teslamate/cars/$car_id/heading`
### Bug Fixes
- Consistent language for label of charging events ([#299](https://github.com/adriankumpf/teslamate/pull/229))
- Cap charging efficiency to 100%
## [1.12.0] - 2019-10-28
We finally have **documentation**! Many thanks to [@ngardiner](https://github.com/ngardiner), who gave the impulse and did most of the work and also to [@krezac](https://github.com/krezac), who contributed a guide to creating iOS Shortcuts for TeslaMate!
### New Features
#### Vehicle Efficiency
Previous versions of TeslaMate shipped with hard-coded efficiency values for the various Tesla models. These efficiency values are needed to calculate trip consumptions, because the Tesla API does not provide them directly.
The hard-coded values were _probably_ pretty accurate, but it was impossible to ensure the correctness of all of them. In addition, the new Model S and X "Raven" could not be reliably identified because the Tesla API returns wrong option codes for both.
This version eliminates the need to use these hard-coded values and instead calculates them based on the recorded charging data. It takes **at least two** charges to display the first estimate. Each subsequent charge will then continue to improve the accuracy of the estimate, which is applied retroactively to all data.
#### Charge energy used
In addition to the kWh added to the battery during the charge TeslaMate now calculates the actual energy used by the charger, which in most cases is higher than the energy added to the battery.
Consider this feature somewhat experimental. Theoretically, however, it should be pretty accurate as long as the vehicle has a stable internet connection while charging (other paid Tesla loggers use the same calculation method).
Currently, a firmware bug in some vehicles may cause the wrong number of phases to be reported when charging at some chargers. As a workaround, a phase correction can be activated per geo-fence.
#### New MQTT Topics
- `teslamate/cars/$car_id/update_available`
- `teslamate/cars/$car_id/is_climate_on`
- `teslamate/cars/$car_id/is_preconditioning`
- `teslamate/cars/$car_id/is_user_present`
### Enhancements
- Show icon indicators for various states (sentry mode, vehicle locked, windows open, pre-conditioning etc.)
- Various UI Tweaks
- Grafana: show the precise duration of a trip in a tooltip
- Serve gzipped assets
- Disable origin check by default to simplify the installation of TeslaMate. (⚠️ For publicly exposed TeslaMate instances it is advisable to re-enable the check by adding the environment variable `CHECK_ORIGIN=true`.)
### Bug Fixes
- Set the correct end date for charges where the vehicle remains plugged in after completion
- Fix an issue with vehicles that were removed from the Tesla Account
- Correctly handle API responses which indicate that the vehicle is in service
- Display effects of range gains (e.g. from supercharging pre-conditioning a cold battery) as NULL
## [1.11.1] - 2019-10-13
### Bug Fixes
- Show all cars in the Overview dashboard
## [1.11.0] - 2019-10-12
### New Features
- Add overview dashboard (by DBemis;
[#196](https://github.com/adriankumpf/teslamate/pull/196))
- Make :check_origin option configurable via environment variable
`CHECK_ORIGIN`
- Open GitHub release page when clicking the version tag in the navbar
- Display the current software version
### New MQTT topics
- `teslamate/cars/$car_id/version`: Current software version
### Enhancements
- Tweak the mobile and desktop views
- Add GIST index based on `ll_to_earth` to speed up geo-fence lookups
- Improve accuracy of geo-fence lookups for some edge cases
- Log option codes as well if the vehicle identification fails
- Delete trips with less than 10m driven
- Add/Update efficiency factors
### Bug Fixes
- Fix an issue where postgres' automatic analyze couldn't succeed
- Fix an issue where the derived efficiency factors could not be calculated
- Exit early if migrations fail
- Downgrade Grafana to v6.3.5
## [1.10.0] - 2019-10-05
### Enhancements
- Allow editing of geo-fence positions
- Show warning icon if the health check fails for a vehicle
- Use the best available SRTM data source which provides global elevation data
including 60N and above
- Optimize the comparison of geo-fences by moving the lookup into the database
- Use the exact position instead of the center of an address for the geo-fence
lookup
- Generally improve error handling and error messages
- Improve landscape mode on devices with a notch
- Open the geo-fence editor by clicking on the start or destination address of
a trip
**Note:** For this feature to work Grafana needs to know the base URL of the
TeslaMate web interface. To automatically set the base URL open the web
interface once after upgrading to this version. Manually changing the base
URL is possible via the settings page.
#### New MQTT topics
- `teslamate/cars/$car_id/healthy`: Reports the health status of the logger
- `teslamate/cars/$car_id/windows_open`
- `teslamate/cars/$car_id/shift_state`
- `teslamate/cars/$car_id/latitude`
- `teslamate/cars/$car_id/longitude`
- `teslamate/cars/$car_id/odometer`
- `teslamate/cars/$car_id/charge_port_door_open`
- `teslamate/cars/$car_id/charger_actual_current`
- `teslamate/cars/$car_id/charger_phases`
- `teslamate/cars/$car_id/charger_power`
- `teslamate/cars/$car_id/charger_voltage`
- `teslamate/cars/$car_id/time_to_full_charge`
### Bug Fixes
- Automatically restart parts of the application if Tesla decides yet again to
change the IDs of some vehicles
- Request to sign in again if the access tokens become invalid e.g. because the
password of the Tesla Account has been changed
- Protect against empty payloads during an update to prevent an update from
not being fully logged
- Log the number of charging phases as returned by the API
### ⚠️ Running Migrations
_Users of the default `docker-compose.yml` can skip this part._
To run the migrations successfully, the database user has to have
superuser rights (temporarily):
- To add superuser rights: `ALTER USER teslamate WITH SUPERUSER;`
- To remove superuser rights: `ALTER USER teslamate WITH NOSUPERUSER;`
## [1.9.1] - 2019-09-24
### Fixed
- Set position when selecting a search entry
- Fix deletion of geo-fences
## [1.9.0] - 2019-09-24
### Added
- Show a map with the current vehicle position on the web interface
- Add a satellite/hybrid layer to the geo-fence map
- Use elevation data with 1 arc second (~30m) accuracy everywhere not just in
the US
- Add support for MQTT SSL ([#140](https://github.com/adriankumpf/teslamate/pull/140))
- Add "Charged" annotation to the degradation dashboard
- Add preferred range setting: you can now choose between "ideal" and "rated"
range to use as the basis for efficiency and other metrics
### Changed
- Require a data source named "TeslaMate":
If you don't run the `teslamate/grafana` docker container the Grafana data
source has to have the name "TeslaMate". Prior to this change the default
data source was used.
- Renamed the MQTT topic `teslamate/cars/$car_id/battery_range_km` to
`teslamate/cars/$car_id/rated_battery_range_km`.
### Fixed
- Prevent suspending when an update is in progress
- Fix charge counter when using with multi vehicles
([#175](https://github.com/adriankumpf/teslamate/pull/175))
### Removed
- Drop support for the deprecated env variables `TESLA_USERNAME` and
`TESLA_PASSWORD`
## [1.8.0] - 2019-09-03
### Added
- Identify cars by VIN: This hopefully eliminates any upcoming problems when
Tesla decides yet again to change the IDs of their cars ...
- Pick geo-fences from a map and show their radius
### Fixed
- Only add elevation to positions for which SRTM elevation data is available
- [Security] Bump Grafana version
## [1.7.0] - 2019-08-29
### Added
- Locally (!) query all locations for elevation data from the NASA Shuttle
Radar Topography Mission (SRTM)
- Add elevation graph to the `Drive Details` dashboard
- Display rated range on the web interface and on the `Drive Details` dashboard
- Switch to the `vehicle_config` API endpoint to identify vehicles
- Display the default and derived efficiency factor on the `Efficiency` dashboard
to detect inaccuracies and to **crowdsource** the correct factors:
**Note:** If there is no default efficiency factor or you think the default factor for
your vehicle might be wrong, please open an issue and attach a screenshot of
the table showing the efficiency factor(s) for your vehicle.
- Display charger power on the web interface
### Fixed
- Fix calculation of `charge_energy_added` if a previously stopped charge
session is resumed
## [1.6.2] - 2019-08-26
### Fixed
- Fix migration that could panic when upgrading from v1.4 to v1.6
- Fix efficiency calculation
## [1.6.1] - 2019-08-25
### Added
- Add separately configurable sleep requirements
### Fixed
- Improve identification of performance models
- Fix Model X identification
- Improve browser compatibility of the web interface
- Disable basic auth in Grafana
- Remove pre-calculated consumption columns and instead calculate consumption
values dynamically based on the given efficiency factor
- Add various database constraints to keep data in a consistent state
## [1.6.0] - 2019-08-18
### Added / Changed
#### Dashboards
- Display car name instead of its id and replace dropdown with separate row for each car
- Improve States dashboard:
- show state names instead of arbitrary numbers
- include drives and charge sessions
- Vampire Drain: include offline state when calculating the standby value
- Drive Details: add estimated range graph
- Degradation: Increase resolution of projected 100% range
#### Web UI
- Add favicons
- Fetch last known values from database after (re)starting TeslaMate
- Show duration of current state
- Show estimated range
- Hide stale temperature data
- Hide some metrics when they're not needed
### Fixed
- Interpret a significant offline period with SOC gains as a charge session
- Timeout drive after being offline for too long
- Dashboards: Dynamically calculate consumption values based on stored `car.efficiency`
## [1.5.3] - 2019-08-14
### Fixed
- Add extra values to the "Time to Try Sleeping" dropdown
- Rollback the "Time to Try Sleeping" setting to previous pre v1.5 value (21 min) to play it safe
**Note to Model 3 owners and everyone who likes to tweak things a bit**: most
cars seem to handle a value of 12 min just fine. Doing so reduces the
likelihood of potential data gaps. Just keep an eye on your car afterwards to
see if it still goes into sleep mode.
- Enable filtering of charges by date
- Fix charges query to include the very first charge
## [1.5.2] - 2019-08-13
### Fixed
- Fix migration that could panic if upgrading from <v1.4.3 to v1.5
## [1.5.1] - 2019-08-13
### Fixed
- Remove `shift_state` condition which could prevent some cars from falling asleep
## [1.5.0] - 2019-08-12
### Added
- Add geo-fence feature
- Make units of length and temperature separately configurable
- Make `time to try sleeping` and `idle time before trying to sleep` configurable
- Show buttons `try to sleep` and `cancel sleep attempt` on status screen if possible
- Add charging stats: charged in total, total number of charges, top charging stations
### Changed
- Reduce time to try sleeping from 21 to 12 minutes
- Increase test coverage
- Rename some dashboards / panels
### Fixed
- Add order by clause to degradation query
- Read `LOCALE` at runtime
## 1.4
### 1. New custom grafana image: `teslamate/grafana`
Starting with this release there is a customized Grafana docker image
(`teslamate/grafana`) that auto provisions the datasource and dashboards which
makes upgrading a breeze! I strongly recommend to use it instead of manually
re-importing dashboards.
Just replace the `grafana` service in your `docker-compose.yml`:
```YAML
# ...
grafana:
image: teslamate/grafana:latest
environment:
- DATABASE_USER=teslamate
- DATABASE_PASS=secret
- DATABASE_NAME=teslamate
- DATABASE_HOST=db
ports:
- 3000:3000
volumes:
- teslamate-grafana-data:/var/lib/grafana
# ...
```
And add a new volume at the bottom of the file:
```YAML
volumes:
# ...
teslamate-grafana-data:
# ...
```
Find the full example in the updated README.
### 2. Switch to imperial units
There is a new settings view in the web interface. To use imperial measurements
in grafana and on the status screen just tick the checkbox it shows!
### 3. Deprecation of TESLA_USERNAME and TESLA_PASSWORD
With this release API tokens are stored in the database. After starting
TeslaMate v1.4 once, you can safely remove both environment variables.
New users need to sign in via the web interface.
**Full Changelog:**
## [1.4.3] - 2019-08-05
### Added
- Status screen: show additional charging related information
- MQTT: add new topics
```text
teslamate/cars/$car_id/plugged_in
teslamate/cars/$car_id/scheduled_charging_start_time
teslamate/cars/$car_id/charge_limit_soc
```
### Fixed
- Fix an issue where charging processes were not completed and new charging
processes were created after waking up from sleep mode while still plugged in
to a charger.
- Add migration to fix incomplete charging processes
- Use local time in debug logs:
Add a `TZ` variable with your local timezone name to the environment of the
`teslamate` container. Otherwise timestamps use UTC.
- Charging History: hide entries with 0kWh charge energy added
- Charging History: include current `car-id` in links to `Charging` dashboard
- Charging History: use slightly earlier start date in links to `Charging`
dashboard to always show the current position
## [1.4.2] - 2019-08-01
### Fixed
- Persists tokens after auto refresh
## [1.4.1] - 2019-07-31
### Fixed
- Convert to imperial measurements on status screen
- Fix warnings
## [1.4.0] - 2019-07-31
### Dashboards
#### Added
- Introduce custom teslamate/grafana Docker image
- Fetch unit variables from database
#### Fixed
- Fix syntax errors in consumption and charging dashboard
- The consumption and charging dashboards can now be viewed without having to
select a drive / charging process first.
#### Removed
- The German dashboard translations have been removed. It was too time
consuming to keep everything up to date.
### TeslaMate
#### Added
- Show version on web UI
- Persist API tokens
- Add sign in view
- Add settings view
#### Changed
- Log :car_id
#### Fixed
- Fix generation of `secret_key_base`
## [1.3.0] - 2019-07-29
### Changed
- Fix / inverse efficiency calculation: if distance traveled is less than the
ideal rated distance the efficiency will now be lower tha
gitextract_eqx17o02/
├── .credo.exs
├── .dialyzer_ignore.exs
├── .dockerignore
├── .envrc
├── .formatter.exs
├── .github/
│ ├── ISSUE_TEMPLATE/
│ │ ├── bug_report.yml
│ │ └── config.yml
│ ├── actions/
│ │ ├── build/
│ │ │ └── action.yml
│ │ ├── grafana/
│ │ │ └── action.yml
│ │ ├── merge/
│ │ │ └── action.yml
│ │ └── setup-elixir-and-cache-deps/
│ │ └── action.yml
│ ├── dependabot.yml
│ └── workflows/
│ ├── buildx.yml
│ ├── check_if_pr_from_outside_repo.yml
│ ├── check_paths.yml
│ ├── cleanup_caches.yml
│ ├── cleanup_largest_caches.yml
│ ├── devops.yml
│ ├── elixir_dep_verification_and_static_analysis.yml
│ ├── elixir_test.yml
│ ├── ensure_linting.yml
│ ├── ghcr_build.yml
│ ├── ghcr_purge.yml
│ ├── spell_check.yml
│ ├── stale.yml
│ └── update-flake-lock.yml
├── .gitignore
├── .markdownlint.yaml
├── .node-version
├── .typos.toml
├── CHANGELOG.md
├── CONTRIBUTING
├── Dockerfile
├── LICENSE
├── Makefile
├── README.md
├── SECURITY.md
├── TRADEMARK.md
├── VERSION
├── assets/
│ ├── css/
│ │ ├── app.scss
│ │ ├── themes/
│ │ │ ├── dark.scss
│ │ │ └── light.scss
│ │ └── vendor/
│ │ └── modal-fx.scss
│ ├── js/
│ │ ├── app.js
│ │ ├── hooks.js
│ │ ├── main.js
│ │ └── socket.js
│ ├── package.json
│ └── scripts/
│ └── build.js
├── config/
│ ├── config.exs
│ ├── dev.exs
│ ├── prod.exs
│ ├── runtime.exs
│ └── test.exs
├── coveralls.json
├── entrypoint.sh
├── flake.nix
├── grafana/
│ ├── Dockerfile
│ ├── dashboards/
│ │ ├── battery-health.json
│ │ ├── charge-level.json
│ │ ├── charges.json
│ │ ├── charging-stats.json
│ │ ├── database-info.json
│ │ ├── drive-stats.json
│ │ ├── drives.json
│ │ ├── efficiency.json
│ │ ├── internal/
│ │ │ ├── charge-details.json
│ │ │ ├── drive-details.json
│ │ │ └── home.json
│ │ ├── locations.json
│ │ ├── mileage.json
│ │ ├── overview.json
│ │ ├── projected-range.json
│ │ ├── reports/
│ │ │ └── dutch-tax.json
│ │ ├── states.json
│ │ ├── statistics.json
│ │ ├── timeline.json
│ │ ├── trip.json
│ │ ├── updates.json
│ │ ├── vampire-drain.json
│ │ └── visited.json
│ ├── dashboards.sh
│ ├── dashboards.yml
│ └── datasource.yml
├── lib/
│ ├── tesla_api/
│ │ ├── auth/
│ │ │ └── refresh.ex
│ │ ├── auth.ex
│ │ ├── error.ex
│ │ ├── middleware/
│ │ │ ├── follow_redirects.ex
│ │ │ └── token_auth.ex
│ │ ├── stream/
│ │ │ └── data.ex
│ │ ├── stream.ex
│ │ ├── vehicle/
│ │ │ └── state.ex
│ │ └── vehicle.ex
│ ├── tesla_api.ex
│ ├── teslamate/
│ │ ├── api.ex
│ │ ├── application.ex
│ │ ├── auth/
│ │ │ └── tokens.ex
│ │ ├── auth.ex
│ │ ├── convert.ex
│ │ ├── custom_expressions.ex
│ │ ├── database_check.ex
│ │ ├── dependency.ex
│ │ ├── http.ex
│ │ ├── import/
│ │ │ ├── csv.ex
│ │ │ ├── fake_api.ex
│ │ │ └── line_parser.ex
│ │ ├── import.ex
│ │ ├── locations/
│ │ │ ├── address.ex
│ │ │ ├── geo_fence.ex
│ │ │ └── geocoder.ex
│ │ ├── locations.ex
│ │ ├── log/
│ │ │ ├── car.ex
│ │ │ ├── charge.ex
│ │ │ ├── charging_process.ex
│ │ │ ├── drive.ex
│ │ │ ├── position.ex
│ │ │ ├── state.ex
│ │ │ └── update.ex
│ │ ├── log.ex
│ │ ├── mqtt/
│ │ │ ├── handler.ex
│ │ │ ├── publisher.ex
│ │ │ ├── pubsub/
│ │ │ │ └── vehicle_subscriber.ex
│ │ │ └── pubsub.ex
│ │ ├── mqtt.ex
│ │ ├── release.ex
│ │ ├── repair.ex
│ │ ├── repo.ex
│ │ ├── settings/
│ │ │ ├── car_settings.ex
│ │ │ └── global_settings.ex
│ │ ├── settings.ex
│ │ ├── terrain.ex
│ │ ├── updater.ex
│ │ ├── vault.ex
│ │ ├── vehicles/
│ │ │ ├── vehicle/
│ │ │ │ └── summary.ex
│ │ │ └── vehicle.ex
│ │ └── vehicles.ex
│ ├── teslamate.ex
│ ├── teslamate_web/
│ │ ├── cldr.ex
│ │ ├── controllers/
│ │ │ ├── car_controller.ex
│ │ │ ├── drive_controller.ex
│ │ │ └── fallback_controller.ex
│ │ ├── endpoint.ex
│ │ ├── gettext.ex
│ │ ├── health_check.ex
│ │ ├── live/
│ │ │ ├── car_live/
│ │ │ │ ├── index.ex
│ │ │ │ ├── index.html.heex
│ │ │ │ ├── summary.ex
│ │ │ │ └── summary.html.heex
│ │ │ ├── charge_live/
│ │ │ │ ├── cost.ex
│ │ │ │ └── cost.html.heex
│ │ │ ├── geofence_live/
│ │ │ │ ├── form.ex
│ │ │ │ ├── form.html.heex
│ │ │ │ ├── index.ex
│ │ │ │ └── index.html.heex
│ │ │ ├── import_live/
│ │ │ │ ├── index.ex
│ │ │ │ └── index.html.heex
│ │ │ ├── init_assigns.ex
│ │ │ ├── settings_live/
│ │ │ │ ├── index.ex
│ │ │ │ └── index.html.heex
│ │ │ └── signin_live/
│ │ │ ├── index.ex
│ │ │ └── index.html.heex
│ │ ├── plugs/
│ │ │ └── put_session.ex
│ │ ├── router.ex
│ │ ├── templates/
│ │ │ ├── drive/
│ │ │ │ └── gpx.xml.eex
│ │ │ └── layout/
│ │ │ ├── app.html.heex
│ │ │ ├── live.html.heex
│ │ │ ├── root.html.heex
│ │ │ └── root.xml.eex
│ │ └── views/
│ │ ├── car_view.ex
│ │ ├── changeset_view.ex
│ │ ├── drive_view.ex
│ │ ├── error_helpers.ex
│ │ ├── error_view.ex
│ │ └── layout_view.ex
│ └── teslamate_web.ex
├── mix.exs
├── nix/
│ ├── backup_and_restore.nix
│ ├── flake-modules/
│ │ ├── checks.nix
│ │ ├── devenv.nix
│ │ ├── formatter.nix
│ │ └── package.nix
│ ├── maintenance.nix
│ └── module.nix
├── priv/
│ ├── gettext/
│ │ ├── ca/
│ │ │ └── LC_MESSAGES/
│ │ │ ├── default.po
│ │ │ └── errors.po
│ │ ├── da/
│ │ │ └── LC_MESSAGES/
│ │ │ ├── default.po
│ │ │ └── errors.po
│ │ ├── de/
│ │ │ └── LC_MESSAGES/
│ │ │ ├── default.po
│ │ │ └── errors.po
│ │ ├── default.pot
│ │ ├── en/
│ │ │ └── LC_MESSAGES/
│ │ │ ├── default.po
│ │ │ └── errors.po
│ │ ├── errors.pot
│ │ ├── es/
│ │ │ └── LC_MESSAGES/
│ │ │ ├── default.po
│ │ │ └── errors.po
│ │ ├── fi/
│ │ │ └── LC_MESSAGES/
│ │ │ ├── default.po
│ │ │ └── errors.po
│ │ ├── fr/
│ │ │ └── LC_MESSAGES/
│ │ │ ├── default.po
│ │ │ └── errors.po
│ │ ├── it/
│ │ │ └── LC_MESSAGES/
│ │ │ ├── default.po
│ │ │ └── errors.po
│ │ ├── ja/
│ │ │ └── LC_MESSAGES/
│ │ │ ├── default.po
│ │ │ └── errors.po
│ │ ├── ko/
│ │ │ └── LC_MESSAGES/
│ │ │ ├── default.po
│ │ │ └── errors.po
│ │ ├── nb/
│ │ │ └── LC_MESSAGES/
│ │ │ ├── default.po
│ │ │ └── errors.po
│ │ ├── nl/
│ │ │ └── LC_MESSAGES/
│ │ │ ├── default.po
│ │ │ └── errors.po
│ │ ├── sv/
│ │ │ └── LC_MESSAGES/
│ │ │ ├── default.po
│ │ │ └── errors.po
│ │ ├── th/
│ │ │ └── LC_MESSAGES/
│ │ │ ├── default.po
│ │ │ └── errors.po
│ │ ├── tr/
│ │ │ └── LC_MESSAGES/
│ │ │ ├── default.po
│ │ │ └── errors.po
│ │ ├── uk/
│ │ │ └── LC_MESSAGES/
│ │ │ ├── default.po
│ │ │ └── errors.po
│ │ ├── zh_Hans/
│ │ │ └── LC_MESSAGES/
│ │ │ ├── default.po
│ │ │ └── errors.po
│ │ └── zh_Hant/
│ │ └── LC_MESSAGES/
│ │ ├── default.po
│ │ └── errors.po
│ ├── repo/
│ │ ├── migrations/
│ │ │ ├── .formatter.exs
│ │ │ ├── 20190330150000_create_car.exs
│ │ │ ├── 20190330160000_create_trips.exs
│ │ │ ├── 20190330170000_create_positions.exs
│ │ │ ├── 20190330180000_create_states.exs
│ │ │ ├── 20190330190000_create_charging_processes.exs
│ │ │ ├── 20190330200000_create_charges.exs
│ │ │ ├── 20190408203117_create_updates.exs
│ │ │ ├── 20190415103933_add_inside_temp.exs
│ │ │ ├── 20190415115227_add_battery_heater_fields.exs
│ │ │ ├── 20190415130006_create_addresses.exs
│ │ │ ├── 20190415130705_add_addresses_to_trips.exs
│ │ │ ├── 20190415192200_add_address_to_charging_process.exs
│ │ │ ├── 20190416125429_add_indexes_on_dates.exs
│ │ │ ├── 20190525125700_rename_soc_fields.exs
│ │ │ ├── 20190717184003_add_fkey_indexes.exs
│ │ │ ├── 20190729142656_add_conversion_functions.exs
│ │ │ ├── 20190729181314_fix_trip_efficiency.exs
│ │ │ ├── 20190730101523_create_tokens.exs
│ │ │ ├── 20190731154452_create_settings.exs
│ │ │ ├── 20190805092941_fix_incomplete_charging_processes.exs
│ │ │ ├── 20190810105216_unit_of_length_and_temperature.exs
│ │ │ ├── 20190810131321_persist_suspend_settings.exs
│ │ │ ├── 20190810151901_create_geofences.exs
│ │ │ ├── 20190812191616_rename_trips_to_drives.exs
│ │ │ ├── 20190813184320_fix_incomplete_charging_processes_v2.exs
│ │ │ ├── 20190814152810_increase_suspend_min.exs
│ │ │ ├── 20190816165713_extend_car_table.exs
│ │ │ ├── 20190816200723_add_est_battery_range_km.exs
│ │ │ ├── 20190821143938_add_constraints.exs
│ │ │ ├── 20190821155748_drop_consumption_columns.exs
│ │ │ ├── 20190823173437_add_sleep_requirements.exs
│ │ │ ├── 20190826142828_fix_incomplete_charging_processes_v3.exs
│ │ │ ├── 20190828094708_add_battery_range.exs
│ │ │ ├── 20190828104902_add_elevation.exs
│ │ │ ├── 20190828122529_add_m_to_ft_conversion_helper.exs
│ │ │ ├── 20190828150058_do_not_require_efficiency.exs
│ │ │ ├── 20190903151524_add_unique_index_on_vins.exs
│ │ │ ├── 20190913165850_add_range_enum.exs
│ │ │ ├── 20190913175011_add_rated_range_to_drives.exs
│ │ │ ├── 20190913175543_set_start_and_end_rated_range_km.exs
│ │ │ ├── 20190925152807_create_geo_extensions.exs
│ │ │ ├── 20190925161034_create_index_on_address_positions.exs
│ │ │ ├── 20190925182253_add_geofence_id_to_addresses.exs
│ │ │ ├── 20190928155641_add_base_url_setting.exs
│ │ │ ├── 20191003130650_add_start_and_end_position_to_drives.exs
│ │ │ ├── 20191003132415_add_position_ids_and_apply_geofences.exs
│ │ │ ├── 20191007105010_add_new_fkey_indexes.exs
│ │ │ ├── 20191008191431_fix_ll_to_earth.exs
│ │ │ ├── 20191017003836_add_est_total_charge_energy.exs
│ │ │ ├── 20191020130234_increase_datetime_precision.exs
│ │ │ ├── 20191026144449_drop_cp_confidence_and_interval.exs
│ │ │ ├── 20191026145925_phase_correction.exs
│ │ │ ├── 20191026185642_calculate_charge_energy_used.exs
│ │ │ ├── 20191117042320_add_cost_field_to_charges.exs
│ │ │ ├── 20191117143038_add_grafana_url.exs
│ │ │ ├── 20191117171307_car_settings.exs
│ │ │ ├── 20191119162847_geofence_sleep.exs
│ │ │ ├── 20191212215130_remove_phase_correction.exs
│ │ │ ├── 20191212230527_recalc_energy_used.exs
│ │ │ ├── 20200103073606_add_usable_battery_level.exs
│ │ │ ├── 20200116190926_charges_add_usable_battery_level.exs
│ │ │ ├── 20200120130125_add_language.exs
│ │ │ ├── 20200120142602_replace_place_id_with_osmid.exs
│ │ │ ├── 20200203120311_cascade_delete.exs
│ │ │ ├── 20200203180529_location_based_charge_cost.exs
│ │ │ ├── 20200212001245_location_based_charge_cost_increase_scale.exs
│ │ │ ├── 20200216121330_use_rated_as_default_preferred_range.exs
│ │ │ ├── 20200302100654_add_vehicle_config_attrbitues.exs
│ │ │ ├── 20200306130218_update_cities.exs
│ │ │ ├── 20200306133847_add_flat_fee.exs
│ │ │ ├── 20200318164021_use_streaming_api.exs
│ │ │ ├── 20200320140020_drop_power_avg.exs
│ │ │ ├── 20200401170940_remove_sleep_mode_toggles.exs
│ │ │ ├── 20200401171402_remove_sleep_mode_requirements.exs
│ │ │ ├── 20200401171923_enable_streaming.exs
│ │ │ ├── 20200410112005_database_efficiency_improvements.exs
│ │ │ ├── 20200502140646_drop_unused_indexes.exs
│ │ │ ├── 20200528163852_cost_by_minute.exs
│ │ │ ├── 20200528173223_rename_unit_enums.exs
│ │ │ ├── 20200528175158_optimize_conversion_helpers.exs
│ │ │ ├── 20200709165119_change_sleep_requirements_default.exs
│ │ │ ├── 20210130174838_use_variable_length_type_for_tokens.exs
│ │ │ ├── 20210812173700_car_priorities.exs
│ │ │ ├── 20210831153305_add_not_null_constraint_to_display_priority.exs
│ │ │ ├── 20211022103654_add_not_null_constraint_to_start_date.exs
│ │ │ ├── 20220123131732_encrypt_api_tokens.exs
│ │ │ ├── 20220422132017_add_marketing_name_to_car.exs
│ │ │ ├── 20220617170400_add_tire_pressures.exs
│ │ │ ├── 20220718085412_add_unit_of_pressure_to_global_settings.exs
│ │ │ ├── 20230417225712_composite_index_to_position.exs
│ │ │ ├── 20240603152807_add_enabled_to_car_settings.exs
│ │ │ ├── 20240627021414_add_lfp_battery_car_setting.exs
│ │ │ ├── 20240915193446_composite_index_with_predicate_to_position.exs
│ │ │ ├── 20240929084639_recreate_geo_extensions.exs
│ │ │ ├── 20250407155134_upgrade_earthdistance.exs
│ │ │ ├── 20250613133700_add_and_calculate_elevation_changes.exs
│ │ │ ├── 20250924215353_create_private_schema.exs
│ │ │ ├── 20251207212310_add_theme_mode_to_settings.exs
│ │ │ └── 20251225150000_replace_positions_date_indexes.exs
│ │ └── seeds.exs
│ └── static/
│ ├── browserconfig.xml
│ ├── robots.txt
│ └── site.webmanifest
├── test/
│ ├── fixtures/
│ │ └── import/
│ │ ├── 01_complete/
│ │ │ ├── TeslaFi62016.csv
│ │ │ └── TeslaFi72016.csv
│ │ ├── 02_timezone/
│ │ │ └── TeslaFi92019.csv
│ │ ├── 03_empty/
│ │ │ ├── TeslaFi52018.csv
│ │ │ └── TeslaFi62018.csv
│ │ ├── 04_error/
│ │ │ ├── TeslaFi110017.csv
│ │ │ ├── TeslaFi112017.csv
│ │ │ └── TeslaFi122017.csv
│ │ ├── 05_dst/
│ │ │ └── TeslaFi102019.csv
│ │ ├── 06_two_cars/
│ │ │ └── TeslaFi62020.csv
│ │ └── 07_alternative_variant/
│ │ └── 112023.csv
│ ├── support/
│ │ ├── conn_case.ex
│ │ ├── data_case.ex
│ │ ├── mocks/
│ │ │ ├── api.ex
│ │ │ ├── auth.ex
│ │ │ ├── geocoder.ex
│ │ │ ├── locations.ex
│ │ │ ├── log.ex
│ │ │ ├── mqtt_publisher.ex
│ │ │ ├── pubsub.ex
│ │ │ ├── settings.ex
│ │ │ ├── srtm.ex
│ │ │ ├── terrain.ex
│ │ │ ├── vehicle.ex
│ │ │ └── vehicles.ex
│ │ ├── test_helper.ex
│ │ └── vehicle_case.ex
│ ├── teslamate/
│ │ ├── api_test.exs
│ │ ├── auth_test.exs
│ │ ├── http_test.exs
│ │ ├── import_test.exs
│ │ ├── locations/
│ │ │ ├── addresses_test.exs
│ │ │ ├── geocoder_test.exs
│ │ │ └── geofences_test.exs
│ │ ├── log/
│ │ │ ├── log_car_test.exs
│ │ │ ├── log_charging_test.exs
│ │ │ ├── log_drive_test.exs
│ │ │ ├── log_state_test.exs
│ │ │ └── log_update_test.exs
│ │ ├── mqtt/
│ │ │ └── pubsub/
│ │ │ └── vehicle_subscriber_test.exs
│ │ ├── settings_test.exs
│ │ ├── terrain/
│ │ │ └── update_positions_test.exs
│ │ ├── terrain_test.exs
│ │ ├── updater_test.exs
│ │ ├── vault_test.exs
│ │ ├── vehicles/
│ │ │ ├── identification_test.exs
│ │ │ ├── vehicle/
│ │ │ │ ├── charging_sync_test.exs
│ │ │ │ ├── charging_test.exs
│ │ │ │ ├── driving_test.exs
│ │ │ │ ├── streaming_test.exs
│ │ │ │ ├── suspend_logging_test.exs
│ │ │ │ ├── suspend_test.exs
│ │ │ │ └── updating_test.exs
│ │ │ ├── vehicle_sync_test.exs
│ │ │ └── vehicle_test.exs
│ │ └── vehicles_test.exs
│ ├── teslamate_web/
│ │ ├── controllers/
│ │ │ ├── car_controller_test.exs
│ │ │ └── drive_controller_test.exs
│ │ ├── live/
│ │ │ ├── car_index_live_test.exs
│ │ │ ├── car_summary_live_test.exs
│ │ │ ├── charge_cost_live_test.exs
│ │ │ ├── geofence_live_test.exs
│ │ │ ├── import_test.exs
│ │ │ ├── settings_test.exs
│ │ │ └── sign_in_test.exs
│ │ └── views/
│ │ ├── error_view_test.exs
│ │ ├── layout_view_test.exs
│ │ └── page_view_test.exs
│ └── test_helper.exs
├── treefmt.toml
└── website/
├── .gitignore
├── README.md
├── docs/
│ ├── advanced_guides/
│ │ ├── apache.md
│ │ ├── traefik.md
│ │ └── unix_domain_sockets.md
│ ├── configuration/
│ │ ├── api.md
│ │ └── environment_variables.md
│ ├── development.mdx
│ ├── faq.md
│ ├── import/
│ │ ├── tesla_apiscraper.md
│ │ └── teslafi.md
│ ├── installation/
│ │ ├── docker.md
│ │ ├── nixos.md
│ │ └── unsupported/
│ │ ├── debian.md
│ │ ├── freebsd.md
│ │ └── unraid.md
│ ├── integrations/
│ │ ├── Node-RED/
│ │ │ └── Teslamate-flows.json.example
│ │ ├── Node-RED.md
│ │ ├── home_assistant.md
│ │ └── mqtt.md
│ ├── maintenance/
│ │ ├── backup_restore.mdx
│ │ ├── manually_fixing_data.mdx
│ │ └── upgrading_postgres.md
│ ├── projects.md
│ ├── screenshots.mdx
│ └── upgrading.mdx
├── docusaurus.config.js
├── package.json
├── sidebars.js
└── src/
├── css/
│ └── custom.css
└── pages/
├── index.js
└── styles.module.css
SYMBOL INDEX (1236 symbols across 240 files)
FILE: assets/js/hooks.js
constant LANG (line 1) | const LANG = navigator.languages
function toLocalTime (line 5) | function toLocalTime(dateStr, opts) {
function toLocalDate (line 13) | function toLocalDate(dateStr, opts) {
method mounted (line 22) | mounted() {
method mounted (line 37) | mounted() {
method updated (line 41) | updated() {
method exec (line 47) | exec() {
method mounted (line 67) | mounted() {
method updated (line 70) | updated() {
method mounted (line 76) | mounted() {
method initialize (line 109) | initialize(latLng, heading, options) {
method setHeading (line 118) | setHeading(heading) {
method _updatePath (line 123) | _updatePath() {
function createMap (line 141) | function createMap(opts) {
method mounted (line 168) | mounted() {
method updated (line 216) | updated() {
method mounted (line 225) | mounted() {
method _freeze (line 305) | _freeze() {
method _unfreeze (line 309) | _unfreeze() {
method mounted (line 313) | mounted() {
method updated (line 317) | updated() {
method destroyed (line 321) | destroyed() {
method mounted (line 327) | mounted() {
method mounted (line 336) | mounted() {
FILE: assets/js/main.js
function setCustomVh (line 28) | function setCustomVh() {
function applyTheme (line 37) | function applyTheme() {
FILE: assets/scripts/build.js
constant ENTRY_FILE (line 6) | const ENTRY_FILE = "app.js";
constant OUTPUT_DIR (line 7) | const OUTPUT_DIR = path.resolve(__dirname, "../../priv/static/assets");
constant OUTPUT_FILE (line 8) | const OUTPUT_FILE = "app.js";
constant MODE (line 9) | const MODE = process.env["NODE_ENV"] || "production";
constant TARGET (line 10) | const TARGET = "es2017";
method setup (line 16) | setup(build) {
function build (line 51) | async function build() {
FILE: config/runtime.exs
class Util (line 3) | defmodule Util
method random_string (line 4) | def random_string(length) do
method to_integer (line 8) | def to_integer(nil), do: nil
method to_integer (line 9) | def to_integer(str), do: String.to_integer(str)
method validate_namespace! (line 11) | def validate_namespace!(nil), do: nil
method validate_namespace! (line 12) | def validate_namespace!(""), do: nil
method parse_check_origin! (line 21) | def parse_check_origin!("true"), do: true
method parse_check_origin! (line 22) | def parse_check_origin!("false"), do: false
method parse_check_origin! (line 24) | def parse_check_origin!(hosts), do: raise("Invalid check_origin option...
method validate_import_dir (line 26) | def validate_import_dir(nil), do: nil
method validate_import_dir (line 28) | def validate_import_dir(path) do
method choose_http_binding_address (line 52) | def choose_http_binding_address() do
method fetch_env! (line 89) | def fetch_env!(varname, defaults \\ []) do
method get_env (line 96) | def get_env(varname, defaults \\ []) do
FILE: lib/tesla_api.ex
class TeslaApi (line 1) | defmodule TeslaApi
method log_level (line 16) | defp log_level(%Tesla.Env{}), do: :debug
FILE: lib/tesla_api/auth.ex
class TeslaApi.Auth (line 1) | defmodule TeslaApi.Auth
method web_client_id (line 9) | def web_client_id, do: @web_client_id
method redirect_uri (line 10) | def redirect_uri, do: @redirect_uri
method issuer_url (line 30) | def issuer_url(%__MODULE__{token: access_token}) do
method region (line 43) | def region(%__MODULE__{} = auth) do
method derive_issuer_url_from_oat (line 59) | defp derive_issuer_url_from_oat("qts-" <> _),
method derive_issuer_url_from_oat (line 65) | defp derive_issuer_url_from_oat("eu-" <> _),
method derive_issuer_url_from_oat (line 71) | defp derive_issuer_url_from_oat("cn-" <> _),
method derive_issuer_url_from_oat (line 77) | defp derive_issuer_url_from_oat(_), do: :error
method decode_jwt_payload (line 79) | defp decode_jwt_payload(jwt) do
method log_level (line 97) | defp log_level(%Tesla.Env{}), do: :info
FILE: lib/tesla_api/auth/refresh.ex
class TeslaApi.Auth.Refresh (line 1) | defmodule TeslaApi.Auth.Refresh
method refresh (line 8) | def refresh(%Auth{} = auth) do
FILE: lib/tesla_api/error.ex
class TeslaApi.Error (line 1) | defmodule TeslaApi.Error
method message (line 7) | def message(%__MODULE__{reason: reason}), do: inspect(reason)
method into (line 9) | def into(response, reason \\ :unknown)
method into (line 11) | def into({:ok, %Tesla.Env{} = env}, reason) do
method into (line 34) | def into({:error, error}, reason) do
FILE: lib/tesla_api/middleware/follow_redirects.ex
class TeslaApi.Middleware.FollowRedirects (line 1) | defmodule TeslaApi.Middleware.FollowRedirects
method call (line 30) | def call(env, next, opts \\ []) do
method redirect (line 50) | defp redirect(env, next, except, left) do
method new_request (line 85) | defp new_request(env, 303, location), do: %{env | url: location, metho...
method new_request (line 91) | defp new_request(env, 307, location), do: %{env | url: location}
method new_request (line 93) | defp new_request(env, _, location), do: %{env | url: location, query: []}
method parse_location (line 95) | defp parse_location("https://" <> _rest = location, _env), do: URI.par...
method parse_location (line 96) | defp parse_location("http://" <> _rest = location, _env), do: URI.pars...
method parse_location (line 97) | defp parse_location(location, env), do: env.url |> URI.parse() |> URI....
method filter_headers (line 102) | defp filter_headers(env, prev, next) do
FILE: lib/tesla_api/middleware/token_auth.ex
class TeslaApi.Middleware.TokenAuth (line 1) | defmodule TeslaApi.Middleware.TokenAuth
method call (line 5) | def call(%Tesla.Env{} = env, next, _opts) do
FILE: lib/tesla_api/stream.ex
class TeslaApi.Stream (line 1) | defmodule TeslaApi.Stream
method start_link (line 26) | def start_link(args) do
method disconnect (line 56) | def disconnect(pid) do
method handle_cast (line 61) | def handle_cast(:disconnect, %State{vehicle_id: vid} = state) do
method handle_connect (line 67) | def handle_connect(_conn, state) do
method handle_info (line 74) | def handle_info(:subscribe, %State{auth: %Auth{token: token}, vehicle_...
method handle_info (line 91) | def handle_info(:timeout, %State{timeouts: t, receiver: receiver} = st...
method handle_info (line 101) | def handle_info({:ssl, _, _} = msg, state) do
method handle_info (line 106) | def handle_info(:exit, _state) do
method handle_frame (line 111) | def handle_frame({_type, msg}, %State{vehicle_id: vid} = state) do
method terminate (line 245) | def terminate(:normal, _state), do: :ok
method terminate (line 247) | def terminate(reason, _state) do
method cancel_timer (line 270) | defp cancel_timer(nil), do: :ok
class State (line 8) | defmodule State
FILE: lib/tesla_api/stream/data.ex
class TeslaApi.Stream.Data (line 1) | defmodule TeslaApi.Stream.Data
method into! (line 5) | def into!(raw) do
method to_s (line 25) | defp to_s(""), do: nil
method to_s (line 26) | defp to_s(str), do: str
method to_f (line 28) | defp to_f(""), do: nil
method to_f (line 29) | defp to_f(str), do: parse(Float, str)
method to_i (line 31) | defp to_i(""), do: nil
method to_i (line 32) | defp to_i(str), do: parse(Integer, str)
FILE: lib/tesla_api/vehicle.ex
class TeslaApi.Vehicle (line 1) | defmodule TeslaApi.Vehicle
method list (line 25) | def list(%Auth{} = auth) do
method get (line 38) | def get(%Auth{} = auth, id) do
method get_with_state (line 51) | def get_with_state(%Auth{} = auth, id) do
method list_result (line 69) | def list_result(result) do
method result (line 75) | def result(v) do
method handle_response (line 98) | defp handle_response({:ok, %Tesla.Env{} = env}, opts) do
method handle_response (line 143) | defp handle_response({:error, reason}, _opts) do
FILE: lib/tesla_api/vehicle/state.ex
class TeslaApi.Vehicle.State (line 1) | defmodule TeslaApi.Vehicle.State
class Charge (line 2) | defmodule Charge
class Climate (line 96) | defmodule Climate
class Drive (line 168) | defmodule Drive
class VehicleConfig (line 216) | defmodule VehicleConfig
class VehicleState (line 276) | defmodule VehicleState
class SoftwareUpdate (line 326) | defmodule SoftwareUpdate
FILE: lib/teslamate.ex
class TeslaMate (line 1) | defmodule TeslaMate
FILE: lib/teslamate/api.ex
class TeslaMate.Api (line 1) | defmodule TeslaMate.Api
method start_link (line 23) | def start_link(opts) do
method list_vehicles (line 31) | def list_vehicles(name \\ @name) do
method get_vehicle (line 38) | def get_vehicle(name \\ @name, id) do
method get_vehicle_with_state (line 45) | def get_vehicle_with_state(name \\ @name, id) do
method stream (line 52) | def stream(name \\ @name, vid, receiver) do
method signed_in? (line 60) | def signed_in?(name \\ @name) do
method sign_in (line 67) | def sign_in(name \\ @name, args)
method sign_in (line 69) | def sign_in(name, %Tokens{} = tokens) do
method sign_in (line 76) | def sign_in(name, {email, password}) do
method sign_out (line 83) | def sign_out(name \\ @name) do
method init (line 93) | def init(opts) do
method handle_call (line 142) | def handle_call({:sign_in, args}, _, %State{} = state) do
method handle_info (line 177) | def handle_info(:refresh_auth, %State{name: name} = state) do
method handle_info (line 206) | def handle_info(msg, state) do
method refresh_tokens (line 213) | defp refresh_tokens(%Auth{} = tokens) do
method schedule_refresh (line 227) | defp schedule_refresh(%Auth{} = auth, %State{} = state) do
method insert_auth (line 249) | defp insert_auth(name, %Auth{} = auth) do
method fetch_auth (line 253) | defp fetch_auth(name) do
method handle_result (line 262) | defp handle_result(result, auth, name) do
method preload_vehicle (line 302) | defp preload_vehicle(%TeslaApi.Vehicle{state: "online", id: id} = vehi...
method preload_vehicle (line 313) | defp preload_vehicle(%TeslaApi.Vehicle{} = vehicle, _state), do: vehicle
method fuse_name (line 315) | defp fuse_name(name), do: :"#{name}.unauthorized"
class State (line 14) | defmodule State
FILE: lib/teslamate/application.ex
class TeslaMate.Application (line 1) | defmodule TeslaMate.Application
method start (line 6) | def start(_type, _args) do
method children (line 19) | defp children do
method system_info (line 55) | defp system_info do
method otp_release (line 62) | defp otp_release do
method emu_flavor (line 68) | defp emu_flavor do
method config_change (line 76) | def config_change(changed, _new, removed) do
FILE: lib/teslamate/auth.ex
class TeslaMate.Auth (line 1) | defmodule TeslaMate.Auth
method change_tokens (line 15) | def change_tokens(attrs \\ %{}) do
method can_decrypt_tokens? (line 19) | def can_decrypt_tokens? do
method get_tokens (line 29) | def get_tokens do
method save (line 46) | def save(%{token: access, refresh_token: refresh}) do
method create_tokens (line 60) | defp create_tokens(attrs) do
method update_tokens (line 66) | defp update_tokens(%Tokens{} = tokens, attrs) do
FILE: lib/teslamate/auth/tokens.ex
class TeslaMate.Auth.Tokens (line 1) | defmodule TeslaMate.Auth.Tokens
method changeset (line 18) | def changeset(tokens, attrs) do
FILE: lib/teslamate/convert.ex
class TeslaMate.Convert (line 1) | defmodule TeslaMate.Convert
method mph_to_kmh (line 9) | def mph_to_kmh(nil), do: nil
method mph_to_kmh (line 10) | def mph_to_kmh(mph = %D{}), do: mph |> D.div(@km_factor_d) |> D.round()
method mph_to_kmh (line 11) | def mph_to_kmh(mph), do: round(mph / @km_factor)
method miles_to_km (line 13) | def miles_to_km(nil, _precision), do: nil
method miles_to_km (line 14) | def miles_to_km(mi = %D{}, p), do: mi |> D.div(@km_factor_d) |> D.roun...
method miles_to_km (line 15) | def miles_to_km(mi, 0), do: round(mi / @km_factor)
method miles_to_km (line 16) | def miles_to_km(mi, precision), do: Float.round(mi / @km_factor, preci...
method km_to_miles (line 18) | def km_to_miles(nil, _precision), do: nil
method km_to_miles (line 19) | def km_to_miles(km = %D{}, p), do: km |> D.mult(@km_factor_d) |> D.rou...
method km_to_miles (line 20) | def km_to_miles(km, 0), do: round(km * @km_factor)
method km_to_miles (line 21) | def km_to_miles(km, precision), do: Float.round(km * @km_factor, preci...
method m_to_ft (line 23) | def m_to_ft(nil), do: nil
method m_to_ft (line 24) | def m_to_ft(m = %D{}), do: D.mult(m, @ft_factor_d)
method m_to_ft (line 25) | def m_to_ft(m), do: m * @ft_factor
method ft_to_m (line 27) | def ft_to_m(nil), do: nil
method ft_to_m (line 28) | def ft_to_m(ft = %D{}), do: D.div(ft, @ft_factor_d)
method ft_to_m (line 29) | def ft_to_m(ft), do: ft / @ft_factor
method celsius_to_fahrenheit (line 31) | def celsius_to_fahrenheit(nil, _precision), do: nil
method celsius_to_fahrenheit (line 32) | def celsius_to_fahrenheit(c = %D{}, p), do: D.mult(c, 9) |> D.div(5) |...
method celsius_to_fahrenheit (line 33) | def celsius_to_fahrenheit(c, 0), do: round(c * 9 / 5 + 32)
method celsius_to_fahrenheit (line 34) | def celsius_to_fahrenheit(c, precision), do: Float.round(c * 9 / 5 + 3...
FILE: lib/teslamate/custom_expressions.ex
class TeslaMate.CustomExpressions (line 1) | defmodule TeslaMate.CustomExpressions
FILE: lib/teslamate/database_check.ex
class TeslaMate.DatabaseCheck (line 1) | defmodule TeslaMate.DatabaseCheck
method check_postgres_version (line 17) | def check_postgres_version do
method get_postgres_version (line 26) | defp get_postgres_version do
method check_compatibility (line 49) | defp check_compatibility(%Version{
class Version (line 7) | defmodule Version
FILE: lib/teslamate/dependency.ex
class Core.Dependency (line 1) | defmodule Core.Dependency
method call (line 2) | def call(m, f, a \\ [])
method call (line 3) | def call({m, a}, fun, args), do: apply(m, fun, [a] ++ args)
method call (line 4) | def call(m, f, a), do: apply(m, f, a)
FILE: lib/teslamate/http.ex
class TeslaMate.HTTP (line 1) | defmodule TeslaMate.HTTP
method pools (line 4) | def pools do
method build_proxy_opts_from_env (line 25) | defp build_proxy_opts_from_env(var) do
method child_spec (line 67) | def child_spec(_arg) do
method get (line 71) | def get(url, opts \\ []) do
method post (line 81) | def post(url, body \\ nil, opts \\ []) do
FILE: lib/teslamate/import.ex
class TeslaMate.Import (line 1) | defmodule TeslaMate.Import
method start_link (line 46) | def start_link(opts) do
method run (line 50) | def run(timezone), do: GenStateMachine.call(@name, {:run, timezone})
method running? (line 51) | def running?, do: GenStateMachine.call(@name, :running?)
method enabled? (line 52) | def enabled?, do: is_pid(Process.whereis(@name))
method valid_file_name? (line 53) | def valid_file_name?(fname), do: parse_fname(fname) != nil
method get_status (line 54) | def get_status, do: GenStateMachine.call(@name, :get_status)
method reload_directory (line 55) | def reload_directory, do: GenStateMachine.call(@name, :reload_directory)
method subscribe (line 56) | def subscribe, do: Phoenix.PubSub.subscribe(TeslaMate.PubSub, @topic)
method init (line 59) | def init(opts) do
method handle_event (line 68) | def handle_event({:call, from}, {:run, tz}, :idle, %Data{} = data) do
method handle_event (line 77) | def handle_event({:call, from}, {:run, _tz}, _, _data) do
method handle_event (line 81) | def handle_event({:call, from}, :running?, state, _data) do
method handle_event (line 85) | def handle_event({:call, from}, :get_status, state, data) do
method handle_event (line 89) | def handle_event({:call, from}, :reload_directory, _state, _data) do
method handle_event (line 95) | def handle_event(:internal, :broadcast, state, data) do
method handle_event (line 100) | def handle_event(:internal, :read_directory, :idle, %Data{path: path} ...
method handle_event (line 116) | def handle_event(:internal, :read_directory, _state, _data) do
method handle_event (line 120) | def handle_event(:internal, :import, :running, %Data{files: files} = d...
method handle_event (line 163) | def handle_event(:info, {:done, chunk}, :running, %Data{completed: com...
method handle_event (line 170) | def handle_event(:info, :done, :running, %Data{car: car, pids: %{api: ...
method handle_event (line 183) | def handle_event(:info, {:EXIT, _from, :normal}, _state, _data), do: :...
method handle_event (line 184) | def handle_event(:info, {:EXIT, _from, :killed}, _state, _data), do: :...
method handle_event (line 186) | def handle_event(:info, {:EXIT, _from, reason}, _state, data) do
method parse_fname (line 193) | defp parse_fname(name) do
method parse_date (line 209) | defp parse_date(year, month) do
method create_event_streams (line 218) | defp create_event_streams(%Data{files: files, timezone: tz}, car \\ ni...
method create_car (line 277) | defp create_car([]), do: raise("vehicle data is incomplete")
method create_car (line 279) | defp create_car([{_date, %Stream{} = stream} | rest]) do
class Status (line 26) | defmodule Status
method into (line 29) | def into(state, %Data{files: files, completed: completed}) do
FILE: lib/teslamate/import/csv.ex
class TeslaMate.Import.CSV (line 1) | defmodule TeslaMate.Import.CSV
method parse (line 4) | def parse(file_stream) do
FILE: lib/teslamate/import/fake_api.ex
class TeslaMate.Import.FakeApi (line 1) | defmodule TeslaMate.Import.FakeApi
method start_link (line 20) | def start_link(opts) do
method get_vehicle (line 24) | def get_vehicle(name, _id) do
method get_vehicle_with_state (line 28) | def get_vehicle_with_state(name, _id) do
method stream (line 32) | def stream(_name, _vid, _receiver) do
method init (line 39) | def init(opts) do
method handle_call (line 53) | def handle_call(_action, from, %State{} = state) do
method handle_info (line 73) | def handle_info({:processed_events, max_idx}, %State{} = state) do
method handle_info (line 77) | def handle_info({:events, events, idx}, %State{from: nil} = state) do
method handle_info (line 81) | def handle_info({:events, events, idx}, %State{from: from} = state) do
method handle_info (line 104) | def handle_info(:abort, %State{} = state) do
method pop (line 115) | defp pop(%State{events: [], event_chunks: {_, i, i}, event_streams: [{...
method pop (line 152) | defp pop(%State{events: [], event_chunks: {event_chunks, idx, max_idx}...
method pop (line 162) | defp pop(%State{events: [event | events]} = state) do
method insert_event_chunk (line 166) | defp insert_event_chunk({chunks, chunk_idx, chunk_max_idx}, idx, event...
method set_max_chunk_idx (line 170) | defp set_max_chunk_idx({chunks, chunk_idx, _}, chunk_max_idx) do
method processing_complete (line 174) | defp processing_complete(%State{} = state) do
class State (line 8) | defmodule State
FILE: lib/teslamate/import/line_parser.ex
class TeslaMate.Import.LineParser (line 1) | defmodule TeslaMate.Import.LineParser
method map_value (line 31) | defp map_value(_, ""), do: nil
method map_value (line 32) | defp map_value(_, "None"), do: nil
method map_value (line 33) | defp map_value(_, "none"), do: nil
method map_value (line 35) | defp map_value(_, "TRUE"), do: true
method map_value (line 36) | defp map_value(_, "True"), do: true
method map_value (line 37) | defp map_value(_, "true"), do: true
method map_value (line 38) | defp map_value(_, "FALSE"), do: false
method map_value (line 39) | defp map_value(_, "False"), do: false
method map_value (line 40) | defp map_value(_, "false"), do: false
method map_value (line 42) | defp map_value("display_name", name), do: name
method map_value (line 43) | defp map_value("vehicle_name", name), do: name
method map_value (line 44) | defp map_value("state", "waking"), do: "online"
method map_value (line 45) | defp map_value("state", "shutdown"), do: "online"
method map_value (line 47) | defp map_value("scheduled_charging_start_time", _val), do: nil
method map_value (line 58) | defp map_value(_key, val) do
method to_float (line 66) | defp to_float(val) do
method into_vehicle (line 74) | defp into_vehicle({key, val}, acc, tz) do
FILE: lib/teslamate/locations.ex
class TeslaMate.Locations (line 1) | defmodule TeslaMate.Locations
method create_address (line 18) | def create_address(attrs \\ %{}) do
method update_address (line 24) | def update_address(%Address{} = address, attrs) do
method find_address (line 35) | def find_address(%{latitude: lat, longitude: lng}) do
method refresh_addresses (line 50) | def refresh_addresses(lang) do
method merge_addresses (line 115) | defp merge_addresses(addresses, attrs) do
method apply_geofence (line 128) | defp apply_geofence(%GeoFence{latitude: lat, longitude: lng, radius: r...
method list_geofences (line 163) | def list_geofences do
method get_geofence! (line 169) | def get_geofence!(id) do
method find_geofence (line 173) | def find_geofence(%{latitude: _, longitude: _} = point) do
method create_geofence (line 182) | def create_geofence(attrs) do
method update_geofence (line 193) | def update_geofence(%GeoFence{id: id} = geofence, attrs) do
method delete_geofence (line 205) | def delete_geofence(%GeoFence{id: id} = geofence) do
method change_geofence (line 216) | def change_geofence(%GeoFence{} = geofence, attrs \\ %{}) do
method count_charging_processes_without_costs (line 222) | def count_charging_processes_without_costs(%{latitude: _, longitude: _...
method calculate_charge_costs (line 231) | def calculate_charge_costs(%GeoFence{id: id}) do
FILE: lib/teslamate/locations/address.ex
class TeslaMate.Locations.Address (line 1) | defmodule TeslaMate.Locations.Address
method changeset (line 27) | def changeset(address, attrs) do
FILE: lib/teslamate/locations/geo_fence.ex
class TeslaMate.Locations.GeoFence (line 1) | defmodule TeslaMate.Locations.GeoFence
method changeset (line 20) | def changeset(geofence, attrs) do
FILE: lib/teslamate/locations/geocoder.ex
class TeslaMate.Locations.Geocoder (line 1) | defmodule TeslaMate.Locations.Geocoder
method reverse_lookup (line 15) | def reverse_lookup(lat, lon, lang \\ "en") do
method query (line 66) | defp query(url, lang, params) do
method into_address (line 134) | defp into_address(%{"error" => "Unable to geocode"} = raw) do
method into_address (line 147) | defp into_address(%{"error" => reason}) do
method into_address (line 151) | defp into_address(raw) do
method get_first (line 176) | defp get_first(nil, _aliases), do: nil
method get_first (line 177) | defp get_first(_address, []), do: nil
method get_first (line 179) | defp get_first(address, [key | aliases]) do
method log_level (line 184) | defp log_level(%Tesla.Env{}), do: :info
FILE: lib/teslamate/log.ex
class TeslaMate.Log (line 1) | defmodule TeslaMate.Log
method list_cars (line 18) | def list_cars do
method get_car! (line 22) | def get_car!(id) do
method get_car_by (line 26) | def get_car_by([{_key, nil}]), do: nil
method get_car_by (line 27) | def get_car_by([{_key, _val}] = opts), do: Repo.get_by(Car, opts)
method create_car (line 29) | def create_car(attrs) do
method create_or_update_car (line 35) | def create_or_update_car(%Ecto.Changeset{} = changeset) do
method update_car (line 41) | def update_car(%Car{} = car, attrs, opts \\ []) do
method recalculate_efficiencies (line 48) | def recalculate_efficiencies(%GlobalSettings{} = settings) do
method get_current_state (line 80) | def get_current_state(%Car{id: id}) do
method create_current_state (line 86) | def create_current_state(%Car{id: id} = car) do
method complete_current_state (line 103) | def complete_current_state(%Car{id: id} = car) do
method get_earliest_state (line 130) | def get_earliest_state(%Car{id: id}) do
method create_state (line 138) | defp create_state(%Car{id: id}, attrs) do
method insert_position (line 146) | def insert_position(%Drive{id: id, car_id: car_id}, attrs) do
method insert_position (line 152) | def insert_position(%Car{id: id}, attrs) do
method get_latest_position (line 158) | def get_latest_position do
method get_latest_position (line 165) | def get_latest_position(%Car{id: id}) do
method get_positions_without_elevation (line 173) | def get_positions_without_elevation(min_id \\ 0, opts \\ []) do
method update_position (line 229) | def update_position(%Position{} = position, attrs) do
method start_drive (line 237) | def start_drive(%Car{id: id}) do
method close_drive (line 243) | def close_drive(%Drive{id: id} = drive, opts \\ []) do
method put_address (line 377) | defp put_address(attrs, key, position) do
method put_geofence (line 388) | defp put_geofence(attrs, key, position) do
method get_charging_process! (line 397) | def get_charging_process!(id) do
method update_charging_process (line 404) | def update_charging_process(%ChargingProcess{} = charge, attrs) do
method start_charging_process (line 410) | def start_charging_process(%Car{id: id}, %{latitude: _, longitude: _} ...
method insert_charge (line 439) | def insert_charge(%ChargingProcess{id: id}, attrs) do
method complete_charging_process (line 445) | def complete_charging_process(%ChargingProcess{} = charging_process) do
method update_energy_used (line 511) | def update_energy_used(%ChargingProcess{} = charging_process) do
method calculate_energy_used (line 517) | defp calculate_energy_used(%ChargingProcess{id: id} = charging_process...
method determine_phases (line 543) | defp determine_phases(%ChargingProcess{id: id, car_id: car_id}) do
method put_cost (line 582) | defp put_cost(stats, %ChargingProcess{} = charging_process) do
method recalculate_efficiency (line 632) | defp recalculate_efficiency(car, settings, opts \\ [{5, 8}, {4, 5}, {3...
method recalculate_efficiency (line 633) | defp recalculate_efficiency(car, _settings, []), do: {:ok, car}
method recalculate_efficiency (line 635) | defp recalculate_efficiency(%Car{id: id} = car, settings, [{precision,...
method start_update (line 679) | def start_update(%Car{id: id}, opts \\ []) do
method cancel_update (line 687) | def cancel_update(%Update{} = update) do
method finish_update (line 691) | def finish_update(%Update{} = update, version, opts \\ []) do
method get_latest_update (line 699) | def get_latest_update(%Car{id: id}) do
method insert_missed_update (line 704) | def insert_missed_update(%Car{id: id}, version, opts \\ []) do
FILE: lib/teslamate/log/car.ex
class TeslaMate.Log.Car (line 1) | defmodule TeslaMate.Log.Car
method changeset (line 34) | def changeset(car, attrs) do
FILE: lib/teslamate/log/charge.ex
class TeslaMate.Log.Charge (line 1) | defmodule TeslaMate.Log.Charge
method changeset (line 33) | def changeset(charge, attrs) do
FILE: lib/teslamate/log/charging_process.ex
class TeslaMate.Log.ChargingProcess (line 1) | defmodule TeslaMate.Log.ChargingProcess
method changeset (line 32) | def changeset(charging_state, attrs) do
FILE: lib/teslamate/log/drive.ex
class TeslaMate.Log.Drive (line 1) | defmodule TeslaMate.Log.Drive
method changeset (line 42) | def changeset(drive, attrs) do
FILE: lib/teslamate/log/position.ex
class TeslaMate.Log.Position (line 1) | defmodule TeslaMate.Log.Position
method changeset (line 42) | def changeset(position, attrs) do
FILE: lib/teslamate/log/state.ex
class TeslaMate.Log.State (line 1) | defmodule TeslaMate.Log.State
method changeset (line 17) | def changeset(state, attrs) do
FILE: lib/teslamate/log/update.ex
class TeslaMate.Log.Update (line 1) | defmodule TeslaMate.Log.Update
method changeset (line 16) | def changeset(update, attrs) do
FILE: lib/teslamate/mqtt.ex
class TeslaMate.Mqtt (line 1) | defmodule TeslaMate.Mqtt
method start_link (line 8) | def start_link(opts) do
method init (line 13) | def init(opts) do
method connection_config (line 29) | defp connection_config(opts) do
method generate_client_id (line 61) | defp generate_client_id do
FILE: lib/teslamate/mqtt/handler.ex
class TeslaMate.Mqtt.Handler (line 1) | defmodule TeslaMate.Mqtt.Handler
method connection (line 7) | def connection(:up, state) do
method connection (line 12) | def connection(:down, state) do
method connection (line 17) | def connection(:terminating, state) do
method terminate (line 23) | def terminate(reason, _state) do
FILE: lib/teslamate/mqtt/publisher.ex
class TeslaMate.Mqtt.Publisher (line 1) | defmodule TeslaMate.Mqtt.Publisher
method start_link (line 16) | def start_link(opts) do
method publish (line 20) | def publish(topic, msg \\ nil, opts \\ []) do
method init (line 27) | def init(opts) do
method handle_call (line 32) | def handle_call({:publish, topic, msg, opts}, from, %State{client_id: ...
method handle_info (line 47) | def handle_info({{Tortoise311, id}, ref, result}, %State{client_id: id...
FILE: lib/teslamate/mqtt/pubsub.ex
class TeslaMate.Mqtt.PubSub (line 1) | defmodule TeslaMate.Mqtt.PubSub
method start_link (line 9) | def start_link(opts) do
method init (line 14) | def init(opts) do
FILE: lib/teslamate/mqtt/pubsub/vehicle_subscriber.ex
class TeslaMate.Mqtt.PubSub.VehicleSubscriber (line 1) | defmodule TeslaMate.Mqtt.PubSub.VehicleSubscriber
method child_spec (line 14) | def child_spec(arg) do
method start_link (line 21) | def start_link(opts) do
method clear_retained (line 30) | defp clear_retained(car_id, namespace, publisher) do
method init (line 42) | def init(opts) do
method handle_info (line 62) | def handle_info(%Summary{} = summary, %State{} = state) do
method publish_values (line 74) | defp publish_values(values, %State{last_values: values} = state) do
method publish_values (line 82) | defp publish_values(values, state) do
method add_simple_values (line 117) | defp add_simple_values(map, %Summary{} = summary) do
method add_car_latitude_longitude (line 121) | defp add_car_latitude_longitude(map, %Summary{} = summary) do
method add_geofence (line 146) | defp add_geofence(map, %Summary{} = summary) do
method add_active_route (line 156) | defp add_active_route(map, %Summary{active_route_destination: nil}) do
method add_active_route (line 174) | defp add_active_route(map, %Summary{} = summary) do
method publish (line 201) | defp publish({key, value}, %State{car_id: car_id, namespace: namespace...
method to_str (line 214) | defp to_str(%DateTime{} = datetime), do: DateTime.to_iso8601(datetime)
method to_str (line 215) | defp to_str(value), do: to_string(value)
FILE: lib/teslamate/release.ex
class TeslaMate.Release (line 1) | defmodule TeslaMate.Release
method migrate (line 7) | def migrate do
method rollback (line 13) | def rollback(repo, version) do
method seconds_since_last_migration (line 19) | def seconds_since_last_migration do
method repos (line 28) | defp repos do
FILE: lib/teslamate/repair.ex
class TeslaMate.Repair (line 1) | defmodule TeslaMate.Repair
method start_link (line 17) | def start_link(opts) do
method trigger_run (line 21) | def trigger_run do
method init (line 26) | def init(opts) do
method handle_cast (line 40) | def handle_cast(:repair, %State{limit: limit} = state) do
method handle_info (line 76) | def handle_info(:repair, state) do
method handle_info (line 81) | def handle_info(msg, state) do
method repair (line 88) | defp repair([]), do: :ok
method repair (line 90) | defp repair([entity | rest]) do
method get_address_id (line 117) | defp get_address_id(nil), do: nil
method get_address_id (line 119) | defp get_address_id(%Position{} = position) do
class State (line 11) | defmodule State
FILE: lib/teslamate/repo.ex
class TeslaMate.Repo (line 1) | defmodule TeslaMate.Repo
FILE: lib/teslamate/settings.ex
class TeslaMate.Settings (line 1) | defmodule TeslaMate.Settings
method get_global_settings! (line 14) | def get_global_settings! do
method get_car_settings (line 21) | def get_car_settings do
method get_car_settings! (line 26) | def get_car_settings!(%Car{settings_id: id}) do
method update_global_settings (line 32) | def update_global_settings(%GlobalSettings{} = pre, attrs) do
method update_car_settings (line 47) | def update_car_settings(%CarSettings{car: %Car{}} = pre, attrs) do
method change_global_settings (line 59) | def change_global_settings(%GlobalSettings{} = settings, attrs \\ %{}) do
method change_car_settings (line 63) | def change_car_settings(%CarSettings{} = car_settings, attrs \\ %{}) do
method topic (line 67) | def topic(%Car{id: id}), do: inspect(CarSettings) <> to_string(id)
method subscribe_to_changes (line 69) | def subscribe_to_changes(car) do
method on_range_change (line 73) | defp on_range_change(%GlobalSettings{preferred_range: pf}, %GlobalSett...
method on_range_change (line 77) | defp on_range_change(%GlobalSettings{}, %GlobalSettings{} = new) do
method on_language_change (line 81) | defp on_language_change(%GlobalSettings{language: l}, %GlobalSettings{...
method on_language_change (line 85) | defp on_language_change(%GlobalSettings{}, %GlobalSettings{language: l...
method on_enabled_change (line 89) | def on_enabled_change(%CarSettings{enabled: preEnabled}, %CarSettings{...
method broadcast (line 97) | defp broadcast(car, settings) do
FILE: lib/teslamate/settings/car_settings.ex
class TeslaMate.Settings.CarSettings (line 1) | defmodule TeslaMate.Settings.CarSettings
method changeset (line 30) | def changeset(units, attrs) do
FILE: lib/teslamate/settings/global_settings.ex
class TeslaMate.Settings.GlobalSettings (line 1) | defmodule TeslaMate.Settings.GlobalSettings
method supported_languages (line 81) | def supported_languages do
method changeset (line 86) | def changeset(units, attrs) do
method trim_url (line 115) | defp trim_url(url) do
method validate_url (line 122) | def validate_url(changeset, field) do
FILE: lib/teslamate/terrain.ex
class TeslaMate.Terrain (line 1) | defmodule TeslaMate.Terrain
method start_link (line 16) | def start_link(opts) do
method get_elevation (line 20) | def get_elevation(name \\ @name, coordinates) do
method init (line 27) | def init(opts) do
method handle_event (line 49) | def handle_event({:call, from}, {:get_elevation, {lat, lng}}, :ready, ...
method handle_event (line 69) | def handle_event({:call, from}, {:get_elevation, _coords}, _state, _da...
method handle_event (line 92) | def handle_event(:cast, :process, {:update, [], next, nil}, data) do
method handle_event (line 96) | def handle_event(:cast, :process, {:update, [%Position{} = p | rest], ...
method handle_event (line 131) | def handle_event(:info, {ref, result}, {:waiting, ref}, data) do
method handle_event (line 143) | def handle_event(:info, {ref, result}, {:update, [%Position{} = p | re...
method handle_event (line 158) | def handle_event(:info, {:DOWN, _ref, :process, _pid, :normal}, _state...
method handle_event (line 162) | def handle_event(:info, :garbage_collect, _state, _data) do
method do_get_elevation (line 169) | defp do_get_elevation({lat, lng}, %Data{deps: %{srtm: srtm}, name: nam...
method schedule_fetch (line 188) | defp schedule_fetch do
method log_warning (line 192) | defp log_warning(reason) do
method cache_path (line 196) | defp cache_path do
FILE: lib/teslamate/updater.ex
class TeslaMate.Updater (line 1) | defmodule TeslaMate.Updater
method start_link (line 20) | def start_link(opts) do
method get_update (line 24) | def get_update(name \\ @name) do
method init (line 32) | def init(opts) do
method handle_continue (line 50) | def handle_continue(:check_for_updates, %State{version: current_vsv} =...
method handle_info (line 76) | def handle_info(:check_for_updates, state) do
method handle_call (line 81) | def handle_call(:get_update, _from, %State{update: update} = state) do
method fetch_release (line 87) | defp fetch_release do
method parse_release (line 100) | defp parse_release(release) do
method log_level (line 117) | defp log_level(%Tesla.Env{}), do: :debug
class State (line 17) | defmodule State
class Release (line 18) | defmodule Release
FILE: lib/teslamate/vault.ex
class TeslaMate.Vault (line 1) | defmodule TeslaMate.Vault
method default_cipher (line 37) | def default_cipher(key) do
method encryption_key_provided? (line 41) | def encryption_key_provided? do
method init (line 49) | def init(config) do
method pad (line 88) | defp pad(string, width) do
method get_encryption_key_from_config (line 100) | defp get_encryption_key_from_config do
method get_encryption_key_from (line 113) | defp get_encryption_key_from(dir) do
method import_dir (line 129) | defp import_dir do
class Encrypted.Binary (line 5) | defmodule Encrypted.Binary
FILE: lib/teslamate/vehicles.ex
class TeslaMate.Vehicles (line 1) | defmodule TeslaMate.Vehicles
method start_link (line 13) | def start_link(opts) do
method list (line 17) | def list do
method kill (line 30) | def kill do
method restart (line 35) | def restart do
method init (line 51) | def init(opts) do
method block_until_started (line 68) | defp block_until_started(0), do: {:error, :restart_failed}
method list_vehicles! (line 81) | defp list_vehicles! do
method fallback_vehicles (line 98) | defp fallback_vehicles do
method create_or_update! (line 112) | def create_or_update!(%TeslaApi.Vehicle{} = vehicle) do
FILE: lib/teslamate/vehicles/vehicle.ex
class TeslaMate.Vehicles.Vehicle (line 1) | defmodule TeslaMate.Vehicles.Vehicle
method interval (line 35) | def interval(env_var, default) do
method asleep_interval (line 43) | def asleep_interval, do: interval("POLLING_ASLEEP_INTERVAL", @asleep_i...
method driving_interval (line 44) | def driving_interval, do: interval("POLLING_DRIVING_INTERVAL", 2.5)
method default_interval (line 45) | def default_interval, do: interval("POLLING_DEFAULT_INTERVAL", 15)
method online_interval (line 46) | def online_interval, do: interval("POLLING_ONLINE_INTERVAL", 60)
method charging_interval (line 47) | def charging_interval, do: interval("POLLING_CHARGING_INTERVAL", 5)
method minimum_interval (line 48) | def minimum_interval, do: interval("POLLING_MINIMUM_INTERVAL", 0)
method identify (line 50) | def identify(%Vehicle{display_name: name, vehicle_config: config}) do
method child_spec (line 115) | def child_spec(arg) do
method start_link (line 122) | def start_link(opts) do
method subscribe_to_summary (line 128) | def subscribe_to_summary(car_id) do
method subscribe_to_fetch (line 132) | def subscribe_to_fetch(car_id) do
method healthy? (line 136) | def healthy?(car_id) do
method summary (line 146) | def summary(car_id), do: GenStateMachine.call(:"#{car_id}", :summary)
method busy? (line 148) | def busy?(car_id), do: GenStateMachine.call(:"#{car_id}", :busy?)
method suspend_logging (line 150) | def suspend_logging(car_id) do
method resume_logging (line 154) | def resume_logging(car_id) do
method init (line 161) | def init(opts) do
method handle_event (line 206) | def handle_event({:call, from}, :summary, state, %Data{last_response: ...
method handle_event (line 222) | def handle_event({:call, from}, :busy?, _state, %Data{task: task}) do
method handle_event (line 228) | def handle_event({:call, from}, :resume_logging, {:suspended, prev_sta...
method handle_event (line 245) | def handle_event({:call, from}, :resume_logging, _state, %Data{} = dat...
method handle_event (line 251) | def handle_event({:call, from}, :suspend_logging, {:offline, _}, _data...
method handle_event (line 255) | def handle_event({:call, from}, :suspend_logging, {:asleep, _}, _data) do
method handle_event (line 259) | def handle_event({:call, from}, :suspend_logging, {:suspended, _}, _da...
method handle_event (line 263) | def handle_event({:call, from}, :suspend_logging, {:driving, _, _}, _d...
method handle_event (line 267) | def handle_event({:call, from}, :suspend_logging, {:updating, _}, _dat...
method handle_event (line 271) | def handle_event({:call, from}, :suspend_logging, {:charging, _}, _dat...
method handle_event (line 275) | def handle_event({:call, from}, :suspend_logging, _online, %Data{car: ...
method handle_event (line 442) | def handle_event(:info, {:stream, %Stream.Data{} = stream_data}, :onli...
method handle_event (line 490) | def handle_event(
method handle_event (line 514) | def handle_event(
method handle_event (line 566) | def handle_event(:info, {:stream, :inactive}, {:suspended, _prev_state...
method handle_event (line 576) | def handle_event(:info, {_ref, {:online, %Vehicle{}}}, {:suspended, _}...
method handle_event (line 610) | def handle_event(:info, {:stream, stream_data}, _state, data) do
method handle_event (line 625) | def handle_event(:info, {:DOWN, r, :process, _, :normal}, _, %Data{tas...
method handle_event (line 630) | def handle_event(:info, {:DOWN, _ref, :process, _pid, :normal}, _state...
method handle_event (line 634) | def handle_event(:info, %CarSettings{} = settings, state, %Data{} = da...
method handle_event (line 666) | def handle_event(:info, message, _state, data) do
method handle_event (line 692) | def handle_event(:internal, :fetch_state, _state, %Data{car: car} = da...
method handle_event (line 705) | def handle_event(:internal, :broadcast_summary, state, %Data{last_resp...
method handle_event (line 724) | def handle_event(:internal, {:broadcast_fetch, status}, _state, data) do
method handle_event (line 747) | def handle_event({:timeout, :store_position}, :store_position, _state,...
method handle_event (line 755) | def handle_event(:internal, {:update, {:asleep, vehicle}}, :start, %Da...
method handle_event (line 768) | def handle_event(:internal, {:update, {:offline, vehicle}}, :start, %D...
method handle_event (line 781) | def handle_event(:internal, {:update, {:online, vehicle}} = evt, :star...
method handle_event (line 929) | def handle_event(:internal, {:update, {:offline, _vehicle}}, {:chargin...
method handle_event (line 935) | def handle_event(:internal, {:update, {:asleep, _vehicle}} = event, {:...
method handle_event (line 944) | def handle_event(:internal, {:update, {:online, vehicle}}, {:charging,...
method handle_event (line 981) | def handle_event(
method handle_event (line 1004) | def handle_event(
method handle_event (line 1014) | def handle_event(
method handle_event (line 1023) | def handle_event(
method handle_event (line 1043) | def handle_event(
method handle_event (line 1099) | def handle_event(:internal, {:update, {:asleep, _vehicle}}, {:driving,...
method handle_event (line 1106) | def handle_event(
method handle_event (line 1118) | def handle_event(
method handle_event (line 1167) | def handle_event(:internal, {:update, {:offline, _}}, {:updating, _upd...
method handle_event (line 1172) | def handle_event(:internal, {:update, {:online, vehicle}}, {:updating,...
method handle_event (line 1237) | def handle_event(:internal, {:update, {:offline, _}}, {:asleep, _inter...
method handle_event (line 1241) | def handle_event(:internal, {:update, {:asleep, _}}, {:offline, _inter...
method restore_last_known_values (line 1253) | defp restore_last_known_values(%Vehicle{} = vehicle, data) do
method fetch (line 1314) | defp fetch(%Data{car: car, deps: deps}, expected_state: expected_state...
method fetch_with_reachable_assumption (line 1334) | defp fetch_with_reachable_assumption(id, deps) do
method fetch_with_unreachable_assumption (line 1340) | defp fetch_with_unreachable_assumption(id, deps) do
method fetch_strict (line 1346) | defp fetch_strict(id, deps) do
method create_position (line 1366) | defp create_position(%Vehicle{} = vehicle, %Data{car: car}) do
method create_position (line 1405) | defp create_position(%Stream.Data{} = stream_data, %Data{}) do
method insert_charge (line 1418) | defp insert_charge(charging_process, %Vehicle{} = vehicle, data) do
method try_to_suspend (line 1460) | defp try_to_suspend(vehicle, current_state, %Data{car: car} = data) do
method can_fall_asleep (line 1546) | defp can_fall_asleep(vehicle, %Data{car: car}) do
method start_drive (line 1593) | defp start_drive(position, %Data{car: car, deps: deps} = data) do
method timeout_drive (line 1610) | defp timeout_drive(drive, %Data{} = data) do
method merge (line 1617) | defp merge(
method put_charge_defaults (line 1653) | defp put_charge_defaults(vehicle) do
method synchronize_updates (line 1668) | defp synchronize_updates(%Vehicle{vehicle_state: vehicle_state}, %Data...
method stale? (line 1703) | defp stale?(%Stream.Data{} = stream_data, %Vehicle{} = last_response) do
method streaming? (line 1714) | defp streaming?(%Data{stream_pid: pid}), do: is_pid(pid) and Process.a...
method connect_stream (line 1716) | defp connect_stream(%Data{car: car} = data) do
method disconnect_stream (line 1734) | defp disconnect_stream(%Data{stream_pid: nil}), do: :ok
method determince_interval (line 1745) | defp determince_interval(n), do: round(250 / n) |> min(20) |> max(char...
method fuse_name (line 1747) | defp fuse_name(:vehicle_not_found, car_id), do: :"#{__MODULE__}_#{car_...
method fuse_name (line 1748) | defp fuse_name(:api_error, car_id), do: :"#{__MODULE__}_#{car_id}_api_...
method broadcast_summary (line 1750) | defp broadcast_summary, do: {:next_event, :internal, :broadcast_summary}
method broadcast_fetch (line 1751) | defp broadcast_fetch(status), do: {:next_event, :internal, {:broadcast...
method schedule_position_storing (line 1753) | defp schedule_position_storing do
method date_opts (line 1757) | defp date_opts(%Vehicle{drive_state: %Drive{timestamp: nil}}), do: []
method date_opts (line 1758) | defp date_opts(%Vehicle{drive_state: %Drive{timestamp: ts}}), do: [dat...
method date_opts (line 1759) | defp date_opts(%Vehicle{}), do: []
method parse_timestamp (line 1761) | defp parse_timestamp(ts), do: DateTime.from_unix!(ts, :millisecond)
method schedule_fetch (line 1763) | defp schedule_fetch(%Data{} = data), do: schedule_fetch(10, :seconds, ...
method schedule_fetch (line 1765) | defp schedule_fetch(n, %Data{} = data),
method schedule_fetch (line 1768) | defp schedule_fetch(_n, _unit, %Data{import?: true}), do: {:state_time...
method schedule_fetch (line 1769) | defp schedule_fetch(n, unit, _), do: {:state_timeout, fetch_timeout(n,...
class Data (line 17) | defmodule Data
FILE: lib/teslamate/vehicles/vehicle/summary.ex
class TeslaMate.Vehicles.Vehicle.Summary (line 1) | defmodule TeslaMate.Vehicles.Vehicle.Summary
method into (line 24) | def into(nil, %{state: :start, healthy?: healthy?, car: car}) do
method into (line 37) | def into(vehicle, attrs) do
method format_state (line 63) | defp format_state({:driving, {:offline, _}, _id}), do: :offline
method format_state (line 64) | defp format_state({:driving, _state, _id}), do: :driving
method get_car_attr (line 69) | defp get_car_attr(%Car{exterior_color: v}, :exterior_color), do: v
method get_car_attr (line 70) | defp get_car_attr(%Car{spoiler_type: v}, :spoiler_type), do: v
method get_car_attr (line 71) | defp get_car_attr(%Car{trim_badging: v}, :trim_badging), do: v
method get_car_attr (line 72) | defp get_car_attr(%Car{wheel_type: v}, :wheel_type), do: v
method get_car_attr (line 73) | defp get_car_attr(%Car{model: v}, :model), do: v
method get_car_attr (line 74) | defp get_car_attr(nil, _key), do: nil
method format_vehicle (line 76) | defp format_vehicle(%Vehicle{} = vehicle) do
method charge (line 156) | defp charge(vehicle, key), do: get_in_struct(vehicle, [:charge_state, ...
method speed (line 159) | defp speed(_vehicle), do: nil
method plugged_in (line 161) | defp plugged_in(%Vehicle{charge_state: nil}), do: nil
method plugged_in (line 162) | defp plugged_in(%Vehicle{charge_state: %Charge{charge_port_door_open: ...
method plugged_in (line 164) | defp plugged_in(%Vehicle{charge_state: %Charge{} = c}) do
method plugged_in (line 168) | defp plugged_in(_vehicle), do: nil
method window_open (line 170) | defp window_open(%Vehicle{vehicle_state: vehicle_state}) do
method doors_open (line 181) | defp doors_open(%Vehicle{vehicle_state: vehicle_state}) do
method driver_front_door_open (line 195) | defp driver_front_door_open(_vehicle), do: nil
method driver_rear_door_open (line 200) | defp driver_rear_door_open(_vehicle), do: nil
method passenger_front_door_open (line 206) | defp passenger_front_door_open(_vehicle), do: nil
method passenger_rear_door_open (line 212) | defp passenger_rear_door_open(_vehicle), do: nil
method trunk_open (line 215) | defp trunk_open(_vehicle), do: nil
method frunk_open (line 218) | defp frunk_open(_vehicle), do: nil
method version (line 220) | defp version(vehicle) do
method update_available (line 229) | defp update_available(vehicle) do
method update_version (line 237) | defp update_version(vehicle) do
method to_datetime (line 245) | defp to_datetime(ts), do: DateTime.from_unix!(ts)
method get_in_struct (line 247) | defp get_in_struct(struct, keys) do
FILE: lib/teslamate_web.ex
class TeslaMateWeb (line 1) | defmodule TeslaMateWeb
method static_paths (line 20) | def static_paths, do: ~w(assets fonts images favicon.ico robots.txt an...
method controller (line 25) | def controller do
method view (line 37) | def view do
method live_view (line 52) | def live_view do
method live_component (line 61) | def live_component do
method router (line 69) | def router do
method channel (line 79) | def channel do
method view_helpers (line 86) | defp view_helpers do
method verified_routes (line 106) | def verified_routes do
FILE: lib/teslamate_web/cldr.ex
class TeslaMateWeb.Cldr (line 1) | defmodule TeslaMateWeb.Cldr
FILE: lib/teslamate_web/controllers/car_controller.ex
class TeslaMateWeb.CarController (line 1) | defmodule TeslaMateWeb.CarController
method index (line 16) | def index(conn, _) do
method suspend_logging (line 25) | def suspend_logging(conn, %{"id" => id}) do
method resume_logging (line 41) | def resume_logging(conn, %{"id" => id}) do
method redirect_if_importing (line 52) | defp redirect_if_importing(conn, _) do
method redirect_unless_signed_in (line 59) | defp redirect_unless_signed_in(%Plug.Conn{assigns: %{signed_in?: true}...
method redirect_unless_signed_in (line 60) | defp redirect_unless_signed_in(conn, _opts), do: conn |> redirect(to: ...
method sign_in (line 62) | defp sign_in(conn), do: Routes.live_path(conn, TeslaMateWeb.SignInLive...
method import_page (line 63) | defp import_page(conn), do: Routes.live_path(conn, TeslaMateWeb.Import...
FILE: lib/teslamate_web/controllers/drive_controller.ex
class TeslaMateWeb.DriveController (line 1) | defmodule TeslaMateWeb.DriveController
method gpx (line 10) | def gpx(conn, %{"id" => id}) do
method send_gpx_file (line 22) | defp send_gpx_file(conn, drive) do
FILE: lib/teslamate_web/controllers/fallback_controller.ex
class TeslaMateWeb.FallbackController (line 1) | defmodule TeslaMateWeb.FallbackController
method call (line 9) | def call(conn, {:error, %Ecto.Changeset{} = changeset}) do
method call (line 16) | def call(conn, {:error, :not_found}) do
FILE: lib/teslamate_web/endpoint.ex
class TeslaMateWeb.Endpoint (line 1) | defmodule TeslaMateWeb.Endpoint
FILE: lib/teslamate_web/gettext.ex
class TeslaMateWeb.Gettext (line 1) | defmodule TeslaMateWeb.Gettext
FILE: lib/teslamate_web/health_check.ex
class TeslaMateWeb.HealthCheck (line 1) | defmodule TeslaMateWeb.HealthCheck
method init (line 4) | def init(opts), do: opts
method call (line 6) | def call(%Plug.Conn{request_path: "/health_check"} = conn, _opts) do
method call (line 12) | def call(conn, _opts), do: conn
FILE: lib/teslamate_web/live/car_live/index.ex
class TeslaMateWeb.CarLive.Index (line 1) | defmodule TeslaMateWeb.CarLive.Index
method mount (line 12) | def mount(_params, %{"settings" => settings}, socket) do
method update_base_url (line 42) | defp update_base_url(settings, _socket) do
FILE: lib/teslamate_web/live/car_live/summary.ex
class TeslaMateWeb.CarLive.Summary (line 1) | defmodule TeslaMateWeb.CarLive.Summary
method mount (line 13) | def mount(_params, %{"summary" => %Summary{car: car} = summary} = sess...
method handle_event (line 40) | def handle_event("suspend_logging", _val, socket) do
method handle_event (line 46) | def handle_event("resume_logging", _val, socket) do
method handle_info (line 52) | def handle_info(:update_duration, socket) do
method handle_info (line 57) | def handle_info(:resume_logging, socket) do
method handle_info (line 62) | def handle_info(:suspend_logging, socket) do
method handle_info (line 79) | def handle_info(:hide_error, socket) do
method handle_info (line 83) | def handle_info(%Summary{since: since} = summary, socket) do
method handle_info (line 88) | def handle_info({:status, true}, socket) do
method handle_info (line 103) | def handle_info({:status, false}, socket) do
method handle_info (line 120) | def handle_info(:set_status_to_false, socket) do
method translate_state (line 132) | defp translate_state(:start), do: ""
method translate_state (line 133) | defp translate_state(:driving), do: gettext("driving")
method translate_state (line 134) | defp translate_state(:charging), do: gettext("charging")
method translate_state (line 135) | defp translate_state(:updating), do: gettext("updating")
method translate_state (line 136) | defp translate_state(:suspended), do: gettext("falling asleep")
method translate_state (line 137) | defp translate_state(:online), do: gettext("online")
method translate_state (line 138) | defp translate_state(:offline), do: gettext("offline")
method translate_state (line 139) | defp translate_state(:asleep), do: gettext("asleep")
method translate_state (line 140) | defp translate_state(:unavailable), do: gettext("unavailable")
method error_to_str (line 142) | defp error_to_str(:unlocked), do: gettext("Car is unlocked")
method error_to_str (line 143) | defp error_to_str(:doors_open), do: gettext("Doors are open")
method error_to_str (line 144) | defp error_to_str(:trunk_open), do: gettext("Trunk is open")
method error_to_str (line 145) | defp error_to_str(:sentry_mode), do: gettext("Sentry mode is enabled")
method error_to_str (line 146) | defp error_to_str(:preconditioning), do: gettext("Preconditioning")
method error_to_str (line 147) | defp error_to_str(:dogmode), do: gettext("Dog mode is enabled")
method error_to_str (line 148) | defp error_to_str(:user_present), do: gettext("Driver present")
method error_to_str (line 149) | defp error_to_str(:downloading_update), do: gettext("Downloading update")
method error_to_str (line 150) | defp error_to_str(:update_in_progress), do: gettext("Update in progress")
method error_to_str (line 151) | defp error_to_str(:timeout), do: gettext("Timeout")
method error_to_str (line 152) | defp error_to_str(_other), do: gettext("An error occurred")
method cancel_timer (line 154) | defp cancel_timer(nil), do: :ok
method humanize_duration (line 157) | defp humanize_duration(nil), do: nil
method humanize_duration (line 159) | defp humanize_duration(date) do
FILE: lib/teslamate_web/live/charge_live/cost.ex
class TeslaMateWeb.ChargeLive.Cost (line 1) | defmodule TeslaMateWeb.ChargeLive.Cost
method mount (line 15) | def mount(%{"id" => id}, _session, socket) do
method handle_params (line 27) | def handle_params(_params, uri, socket) do
method handle_event (line 40) | def handle_event("save", %{"charging_process" => params}, socket) do
method handle_info (line 102) | def handle_info({:remove_notification, id}, %{assigns: %{notification:...
method handle_info (line 111) | def handle_info({:remove_notification, _id}, socket) do
method assign_charging_process (line 117) | defp assign_charging_process(socket, %ChargingProcess{} = c, mode \\ "...
method create_notification (line 121) | defp create_notification(key, msg) do
FILE: lib/teslamate_web/live/geofence_live/form.ex
class TeslaMateWeb.GeoFenceLive.Form (line 1) | defmodule TeslaMateWeb.GeoFenceLive.Form
method mount (line 16) | def mount(%{"id" => id}, %{"settings" => settings}, socket) do
method mount (line 22) | def mount(%{"lat" => lat, "lng" => lng}, %{"settings" => settings}, so...
method mount (line 34) | def mount(_params, %{"settings" => settings}, socket) do
method handle_event (line 51) | def handle_event("validate", %{"geo_fence" => params}, socket) do
method handle_event (line 60) | def handle_event("save", %{"geo_fence" => params}, socket) do
method handle_event (line 70) | def handle_event("calc-costs", %{"result" => result}, socket) do
method handle_event (line 84) | def handle_event("close-modal", _, socket) do
method handle_event (line 88) | def handle_event("keyup", %{"code" => "Escape"}, socket) do
method handle_event (line 92) | def handle_event("keyup", _, socket) do
method validate (line 116) | defp validate(params, %{assigns: assigns}) do
method show_modal_or_save (line 124) | defp show_modal_or_save(%GeoFence{} = geofence, changeset, socket) do
method save (line 152) | defp save(%{assigns: assigns} = socket) do
method set_grafana_url (line 170) | defp set_grafana_url(settings, socket) do
method has_changed? (line 184) | defp has_changed?(%Ecto.Changeset{changes: changes}, keys) do
method flash_msg (line 188) | defp flash_msg(:new, name), do: gettext("Geo-fence \"%{name}\" created...
method flash_msg (line 189) | defp flash_msg(:edit, name), do: gettext("Geo-fence \"%{name}\" update...
FILE: lib/teslamate_web/live/geofence_live/index.ex
class TeslaMateWeb.GeoFenceLive.Index (line 1) | defmodule TeslaMateWeb.GeoFenceLive.Index
method mount (line 12) | def mount(_params, %{"settings" => settings}, socket) do
method handle_event (line 29) | def handle_event("delete", %{"id" => id}, %{assigns: %{geofences: geof...
FILE: lib/teslamate_web/live/import_live/index.ex
class TeslaMateWeb.ImportLive.Index (line 1) | defmodule TeslaMateWeb.ImportLive.Index
method mount (line 19) | def mount(_params, %{"settings" => _}, socket) do
method handle_event (line 43) | def handle_event("change", %{"settings" => attrs}, socket) do
method handle_event (line 47) | def handle_event(
method handle_event (line 62) | def handle_event("reload", _params, socket) do
method handle_info (line 68) | def handle_info(%Import.Status{} = status, socket) do
method get_timezone (line 74) | defp get_timezone do
class Settings (line 4) | defmodule Settings
method changeset (line 10) | def changeset(attrs), do: cast(%__MODULE__{}, attrs, [:timezone])
method apply (line 11) | def apply(changeset), do: apply_changes(changeset)
FILE: lib/teslamate_web/live/init_assigns.ex
class TeslaMateWeb.InitAssigns (line 1) | defmodule TeslaMateWeb.InitAssigns
method on_mount (line 8) | def on_mount(:locale, _params, %{"gettext_locale" => locale}, socket) do
FILE: lib/teslamate_web/live/settings_live/index.ex
class TeslaMateWeb.SettingsLive.Index (line 1) | defmodule TeslaMateWeb.SettingsLive.Index
method mount (line 12) | def mount(_params, %{"settings" => settings}, socket) do
method handle_params (line 28) | def handle_params(params, _uri, socket) do
method handle_event (line 44) | def handle_event("car", %{"id" => id}, socket) do
method handle_event (line 53) | def handle_event("change", %{"global_settings" => params}, %{assigns: ...
method handle_event (line 86) | def handle_event("change", params, %{assigns: %{car_settings: settings...
method handle_event (line 106) | def handle_event("sign_out", _params, socket) do
method handle_info (line 112) | def handle_info({:assigns, assigns}, socket) do
method handle_info (line 121) | def handle_info(msg, socket) do
method supported_ui_languages (line 143) | defp supported_ui_languages, do: @supported_ui_languages
method addresses_migrated? (line 145) | defp addresses_migrated? do
method add_params (line 173) | defp add_params(socket, params) do
method prepare (line 177) | defp prepare(%GlobalSettings{} = settings) do
method prepare (line 181) | defp prepare(settings) do
FILE: lib/teslamate_web/live/signin_live/index.ex
class TeslaMateWeb.SignInLive.Index (line 1) | defmodule TeslaMateWeb.SignInLive.Index
method mount (line 10) | def mount(_params, _session, socket) do
method handle_event (line 25) | def handle_event("validate", %{"tokens" => tokens}, socket) do
method handle_event (line 34) | def handle_event("sign_in", _, socket) do
method handle_info (line 46) | def handle_info({ref, result}, %{assigns: %{task: %Task{ref: ref}}} = ...
method get_api (line 74) | defp get_api(socket) do
method redirect_to_carlive (line 81) | defp redirect_to_carlive(socket) do
FILE: lib/teslamate_web/plugs/put_session.ex
class TeslaMateWeb.Plugs.PutSession (line 1) | defmodule TeslaMateWeb.Plugs.PutSession
method init (line 16) | def init(_options) do
method call (line 21) | def call(conn, _options) do
FILE: lib/teslamate_web/router.ex
class TeslaMateWeb.Router (line 1) | defmodule TeslaMateWeb.Router
method fetch_settings (line 57) | def fetch_settings(conn, _opts) do
FILE: lib/teslamate_web/views/car_view.ex
class TeslaMateWeb.CarView (line 1) | defmodule TeslaMateWeb.CarView
method render (line 4) | def render("command_failed.json", %{reason: reason}) do
FILE: lib/teslamate_web/views/changeset_view.ex
class TeslaMateWeb.ChangesetView (line 1) | defmodule TeslaMateWeb.ChangesetView
method translate_errors (line 10) | def translate_errors(changeset) do
method render (line 14) | def render("error.json", %{changeset: changeset}) do
FILE: lib/teslamate_web/views/drive_view.ex
class TeslaMateWeb.DriveView (line 1) | defmodule TeslaMateWeb.DriveView
FILE: lib/teslamate_web/views/error_helpers.ex
class TeslaMateWeb.ErrorHelpers (line 1) | defmodule TeslaMateWeb.ErrorHelpers
method error_tag (line 12) | def error_tag(form, field) do
method translate_error (line 24) | def translate_error({msg, opts}) do
FILE: lib/teslamate_web/views/error_view.ex
class TeslaMateWeb.ErrorView (line 1) | defmodule TeslaMateWeb.ErrorView
method template_not_found (line 13) | def template_not_found(template, _assigns) do
FILE: lib/teslamate_web/views/layout_view.ex
class TeslaMateWeb.LayoutView (line 1) | defmodule TeslaMateWeb.LayoutView
method list_dashboards (line 18) | defp list_dashboards, do: @dashboards
FILE: mix.exs
class TeslaMate.MixProject (line 1) | defmodule TeslaMate.MixProject
method project (line 4) | def project do
method cli (line 20) | def cli do
method application (line 33) | def application do
method elixirc_paths (line 40) | defp elixirc_paths(:test), do: ["lib", "test/support"]
method elixirc_paths (line 41) | defp elixirc_paths(_), do: ["lib"]
method deps (line 43) | defp deps do
method aliases (line 83) | defp aliases do
method dialyzer (line 94) | defp dialyzer do
method releases (line 105) | defp releases do
method version (line 114) | defp version do
FILE: priv/repo/migrations/20190330150000_create_car.exs
class TeslaMate.Repo.Migrations.CreateCar (line 1) | defmodule TeslaMate.Repo.Migrations.CreateCar
method change (line 4) | def change do
FILE: priv/repo/migrations/20190330160000_create_trips.exs
class TeslaMate.Repo.Migrations.CreateTrips (line 1) | defmodule TeslaMate.Repo.Migrations.CreateTrips
method change (line 4) | def change do
FILE: priv/repo/migrations/20190330170000_create_positions.exs
class TeslaMate.Repo.Migrations.CreatePositions (line 1) | defmodule TeslaMate.Repo.Migrations.CreatePositions
method change (line 4) | def change do
FILE: priv/repo/migrations/20190330180000_create_states.exs
class TeslaMate.Repo.Migrations.CreateStates (line 1) | defmodule TeslaMate.Repo.Migrations.CreateStates
method change (line 4) | def change do
FILE: priv/repo/migrations/20190330190000_create_charging_processes.exs
class TeslaMate.Repo.Migrations.CreateChargingProcesses (line 1) | defmodule TeslaMate.Repo.Migrations.CreateChargingProcesses
method change (line 4) | def change do
FILE: priv/repo/migrations/20190330200000_create_charges.exs
class TeslaMate.Repo.Migrations.CreateCharges (line 1) | defmodule TeslaMate.Repo.Migrations.CreateCharges
method change (line 4) | def change do
FILE: priv/repo/migrations/20190408203117_create_updates.exs
class TeslaMate.Repo.Migrations.CreateUpdates (line 1) | defmodule TeslaMate.Repo.Migrations.CreateUpdates
method change (line 4) | def change do
FILE: priv/repo/migrations/20190415103933_add_inside_temp.exs
class TeslaMate.Repo.Migrations.AddInsideTemp (line 1) | defmodule TeslaMate.Repo.Migrations.AddInsideTemp
method change (line 4) | def change do
FILE: priv/repo/migrations/20190415115227_add_battery_heater_fields.exs
class TeslaMate.Repo.Migrations.AddBatteryHeaterFields (line 1) | defmodule TeslaMate.Repo.Migrations.AddBatteryHeaterFields
method change (line 4) | def change do
FILE: priv/repo/migrations/20190415130006_create_addresses.exs
class TeslaMate.Repo.Migrations.CreateAddresses (line 1) | defmodule TeslaMate.Repo.Migrations.CreateAddresses
method change (line 4) | def change do
FILE: priv/repo/migrations/20190415130705_add_addresses_to_trips.exs
class TeslaMate.Repo.Migrations.AddAddressesToTrips (line 1) | defmodule TeslaMate.Repo.Migrations.AddAddressesToTrips
method change (line 4) | def change do
FILE: priv/repo/migrations/20190415192200_add_address_to_charging_process.exs
class TeslaMate.Repo.Migrations.AddAddressToChargingProcess (line 1) | defmodule TeslaMate.Repo.Migrations.AddAddressToChargingProcess
method change (line 4) | def change do
FILE: priv/repo/migrations/20190416125429_add_indexes_on_dates.exs
class TeslaMate.Repo.Migrations.AddIndexesOnDates (line 1) | defmodule TeslaMate.Repo.Migrations.AddIndexesOnDates
method change (line 4) | def change do
FILE: priv/repo/migrations/20190525125700_rename_soc_fields.exs
class TeslaMate.Repo.Migrations.RenameSocFields (line 1) | defmodule TeslaMate.Repo.Migrations.RenameSocFields
method change (line 4) | def change do
FILE: priv/repo/migrations/20190717184003_add_fkey_indexes.exs
class TeslaMate.Repo.Migrations.AddFkeyIndexes (line 1) | defmodule TeslaMate.Repo.Migrations.AddFkeyIndexes
method change (line 4) | def change do
FILE: priv/repo/migrations/20190729142656_add_conversion_functions.exs
class TeslaMate.Repo.Migrations.AddConversionFunctions (line 1) | defmodule TeslaMate.Repo.Migrations.AddConversionFunctions
method up (line 4) | def up do
method down (line 34) | def down do
FILE: priv/repo/migrations/20190729181314_fix_trip_efficiency.exs
class TeslaMate.Repo.Migrations.FixTripEfficiency (line 1) | defmodule TeslaMate.Repo.Migrations.FixTripEfficiency
method up (line 6) | def up do
method down (line 14) | def down do
FILE: priv/repo/migrations/20190730101523_create_tokens.exs
class TeslaMate.Repo.Migrations.CreateTokens (line 1) | defmodule TeslaMate.Repo.Migrations.CreateTokens
method change (line 4) | def change do
FILE: priv/repo/migrations/20190731154452_create_settings.exs
class TeslaMate.Repo.Migrations.CreateSettings (line 1) | defmodule TeslaMate.Repo.Migrations.CreateSettings
method up (line 6) | def up do
method down (line 25) | def down do
FILE: priv/repo/migrations/20190805092941_fix_incomplete_charging_processes.exs
class TeslaMate.Repo.Migrations.FixIncompleteChargingProcesses (line 1) | defmodule TeslaMate.Repo.Migrations.FixIncompleteChargingProcesses
method up (line 4) | def up do
method down (line 8) | def down do
FILE: priv/repo/migrations/20190810105216_unit_of_length_and_temperature.exs
class TeslaMate.Repo.Migrations.UnitOfLengthAndTemperature (line 1) | defmodule TeslaMate.Repo.Migrations.UnitOfLengthAndTemperature
method up (line 8) | def up do
method down (line 41) | def down do
FILE: priv/repo/migrations/20190810131321_persist_suspend_settings.exs
class TeslaMate.Repo.Migrations.PersistSuspendSettings (line 1) | defmodule TeslaMate.Repo.Migrations.PersistSuspendSettings
method change (line 4) | def change do
FILE: priv/repo/migrations/20190810151901_create_geofences.exs
class TeslaMate.Repo.Migrations.CreateGeofences (line 1) | defmodule TeslaMate.Repo.Migrations.CreateGeofences
method change (line 4) | def change do
FILE: priv/repo/migrations/20190812191616_rename_trips_to_drives.exs
class TeslaMate.Repo.Migrations.RenameTripsToDrives (line 1) | defmodule TeslaMate.Repo.Migrations.RenameTripsToDrives
method up (line 4) | def up do
method down (line 14) | def down do
FILE: priv/repo/migrations/20190813184320_fix_incomplete_charging_processes_v2.exs
class TeslaMate.Repo.Migrations.FixIncompleteChargingProcessesV2 (line 1) | defmodule TeslaMate.Repo.Migrations.FixIncompleteChargingProcessesV2
method up (line 4) | def up do
method down (line 8) | def down do
FILE: priv/repo/migrations/20190814152810_increase_suspend_min.exs
class TeslaMate.Repo.Migrations.IncreaseSuspendMin (line 1) | defmodule TeslaMate.Repo.Migrations.IncreaseSuspendMin
method up (line 8) | def up do
method down (line 22) | def down do
FILE: priv/repo/migrations/20190816165713_extend_car_table.exs
class TeslaMate.Repo.Migrations.ExtendCarTable (line 1) | defmodule TeslaMate.Repo.Migrations.ExtendCarTable
method change (line 4) | def change do
FILE: priv/repo/migrations/20190816200723_add_est_battery_range_km.exs
class TeslaMate.Repo.Migrations.AddEstBatteryRangeKm (line 1) | defmodule TeslaMate.Repo.Migrations.AddEstBatteryRangeKm
method change (line 4) | def change do
FILE: priv/repo/migrations/20190821143938_add_constraints.exs
class TeslaMate.Repo.Migrations.AddConstraints (line 1) | defmodule TeslaMate.Repo.Migrations.AddConstraints
method change (line 4) | def change do
FILE: priv/repo/migrations/20190821155748_drop_consumption_columns.exs
class TeslaMate.Repo.Migrations.DropConsumptionColumns (line 1) | defmodule TeslaMate.Repo.Migrations.DropConsumptionColumns
method change (line 4) | def change do
FILE: priv/repo/migrations/20190823173437_add_sleep_requirements.exs
class TeslaMate.Repo.Migrations.AddSleepRequirements (line 1) | defmodule TeslaMate.Repo.Migrations.AddSleepRequirements
method change (line 4) | def change do
FILE: priv/repo/migrations/20190826142828_fix_incomplete_charging_processes_v3.exs
class TeslaMate.Repo.Migrations.FixIncompleteChargingProcessesV3 (line 1) | defmodule TeslaMate.Repo.Migrations.FixIncompleteChargingProcessesV3
method up (line 9) | def up do
method down (line 33) | def down do
FILE: priv/repo/migrations/20190828094708_add_battery_range.exs
class TeslaMate.Repo.Migrations.AddBatteryRange (line 1) | defmodule TeslaMate.Repo.Migrations.AddBatteryRange
method change (line 4) | def change do
FILE: priv/repo/migrations/20190828104902_add_elevation.exs
class TeslaMate.Repo.Migrations.AddElevation (line 1) | defmodule TeslaMate.Repo.Migrations.AddElevation
method change (line 4) | def change do
FILE: priv/repo/migrations/20190828122529_add_m_to_ft_conversion_helper.exs
class TeslaMate.Repo.Migrations.AddMToFtConversionHelper (line 1) | defmodule TeslaMate.Repo.Migrations.AddMToFtConversionHelper
method up (line 4) | def up do
method down (line 20) | def down do
FILE: priv/repo/migrations/20190828150058_do_not_require_efficiency.exs
class TeslaMate.Repo.Migrations.DoNotRequireEfficiency (line 1) | defmodule TeslaMate.Repo.Migrations.DoNotRequireEfficiency
method up (line 4) | def up do
method down (line 13) | def down do
FILE: priv/repo/migrations/20190903151524_add_unique_index_on_vins.exs
class TeslaMate.Repo.Migrations.AddUniqueIndexOnVins (line 1) | defmodule TeslaMate.Repo.Migrations.AddUniqueIndexOnVins
method change (line 4) | def change do
FILE: priv/repo/migrations/20190913165850_add_range_enum.exs
class TeslaMate.Repo.Migrations.AddRangeEnum (line 1) | defmodule TeslaMate.Repo.Migrations.AddRangeEnum
method change (line 4) | def change do
FILE: priv/repo/migrations/20190913175011_add_rated_range_to_drives.exs
class TeslaMate.Repo.Migrations.AddRatedRangeToDrives (line 1) | defmodule TeslaMate.Repo.Migrations.AddRatedRangeToDrives
method change (line 4) | def change do
FILE: priv/repo/migrations/20190913175543_set_start_and_end_rated_range_km.exs
class Drive (line 3) | defmodule Drive
method changeset (line 15) | def changeset(drive, attrs) do
class Position (line 26) | defmodule Position
method changeset (line 39) | def changeset(position, attrs) do
class TeslaMate.Repo.Migrations.SetStartAndEndRatedRangeKm (line 49) | defmodule TeslaMate.Repo.Migrations.SetStartAndEndRatedRangeKm
method add_rated_range (line 55) | defp add_rated_range(%Drive{id: drive_id} = drive) do
method up (line 86) | def up do
method down (line 97) | def down do
FILE: priv/repo/migrations/20190925152807_create_geo_extensions.exs
class TeslaMate.Repo.Migrations.CreateGeoExtensions (line 1) | defmodule TeslaMate.Repo.Migrations.CreateGeoExtensions
method change (line 4) | def change do
FILE: priv/repo/migrations/20190925161034_create_index_on_address_positions.exs
class TeslaMate.Repo.Migrations.CreateIndexOnAddressPositions (line 1) | defmodule TeslaMate.Repo.Migrations.CreateIndexOnAddressPositions
method change (line 4) | def change do
FILE: priv/repo/migrations/20190925182253_add_geofence_id_to_addresses.exs
class New (line 1) | defmodule New
class GeoFence (line 2) | defmodule GeoFence
method changeset (line 50) | def changeset(geofence, attrs) do
class Address (line 14) | defmodule Address
method changeset (line 28) | def changeset(address, attrs) do
class Old (line 36) | defmodule Old
class GeoFence (line 37) | defmodule GeoFence
method changeset (line 50) | def changeset(geofence, attrs) do
class Address (line 57) | defmodule Address
method changeset (line 28) | def changeset(address, attrs) do
class TeslaMate.Repo.Migrations.AddGeofenceIdToAddresses (line 66) | defmodule TeslaMate.Repo.Migrations.AddGeofenceIdToAddresses
method up (line 72) | def up do
method down (line 115) | def down do
FILE: priv/repo/migrations/20190928155641_add_base_url_setting.exs
class TeslaMate.Repo.Migrations.AddBaseUrlSetting (line 1) | defmodule TeslaMate.Repo.Migrations.AddBaseUrlSetting
method change (line 4) | def change do
FILE: priv/repo/migrations/20191003130650_add_start_and_end_position_to_drives.exs
class TeslaMate.Repo.Migrations.AddStartAndEndPositionToDrives (line 1) | defmodule TeslaMate.Repo.Migrations.AddStartAndEndPositionToDrives
method change (line 4) | def change do
FILE: priv/repo/migrations/20191003132415_add_position_ids_and_apply_geofences.exs
class TeslaMate.Repo.Migrations.AddPositionIdsAndApplyGeofences (line 1) | defmodule TeslaMate.Repo.Migrations.AddPositionIdsAndApplyGeofences
method up (line 68) | def up do
method down (line 84) | def down do
method add_position_ids (line 88) | defp add_position_ids(%Drive{id: drive_id}) do
method apply_geofence_to_drives (line 125) | defp apply_geofence_to_drives(%GeoFence{id: id, latitude: lat, longitu...
method apply_geofence_to_charges (line 161) | defp apply_geofence_to_charges(%GeoFence{id: id, latitude: lat, longit...
class Position (line 8) | defmodule Position
class Drive (line 18) | defmodule Drive
method changeset (line 30) | def changeset(drive, attrs) do
class ChargingProcess (line 40) | defmodule ChargingProcess
method changeset (line 50) | def changeset(charging_state, attrs) do
class GeoFence (line 57) | defmodule GeoFence
FILE: priv/repo/migrations/20191007105010_add_new_fkey_indexes.exs
class TeslaMate.Repo.Migrations.AddNewFkeyIndexes (line 1) | defmodule TeslaMate.Repo.Migrations.AddNewFkeyIndexes
method change (line 4) | def change do
FILE: priv/repo/migrations/20191008191431_fix_ll_to_earth.exs
class TeslaMate.Repo.Migrations.FixLlToEarth (line 1) | defmodule TeslaMate.Repo.Migrations.FixLlToEarth
method up (line 4) | def up do
method down (line 15) | def down do
FILE: priv/repo/migrations/20191017003836_add_est_total_charge_energy.exs
class TeslaMate.Repo.Migrations.AddEstTotalChargeEnergy (line 1) | defmodule TeslaMate.Repo.Migrations.AddEstTotalChargeEnergy
method change (line 4) | def change do
FILE: priv/repo/migrations/20191020130234_increase_datetime_precision.exs
class TeslaMate.Repo.Migrations.IncreaseDatetimePrecision (line 1) | defmodule TeslaMate.Repo.Migrations.IncreaseDatetimePrecision
method change (line 4) | def change do
FILE: priv/repo/migrations/20191026144449_drop_cp_confidence_and_interval.exs
class TeslaMate.Repo.Migrations.DropCpConfidenceAndInterval (line 1) | defmodule TeslaMate.Repo.Migrations.DropCpConfidenceAndInterval
method change (line 4) | def change do
FILE: priv/repo/migrations/20191026145925_phase_correction.exs
class TeslaMate.Repo.Migrations.PhaseCorrection (line 1) | defmodule TeslaMate.Repo.Migrations.PhaseCorrection
method change (line 4) | def change do
FILE: priv/repo/migrations/20191026185642_calculate_charge_energy_used.exs
class CustomExpressions (line 1) | defmodule CustomExpressions
class TeslaMate.Repo.Migrations.CalculateChargeEnergyUsed (line 16) | defmodule TeslaMate.Repo.Migrations.CalculateChargeEnergyUsed
method up (line 58) | def up do
method down (line 67) | def down do
method calculate_energy_used (line 73) | defp calculate_energy_used(%ChargingProcess{id: id}) do
class ChargingProcess (line 24) | defmodule ChargingProcess
method changeset (line 33) | def changeset(charging_state, attrs) do
class Charge (line 40) | defmodule Charge
FILE: priv/repo/migrations/20191117042320_add_cost_field_to_charges.exs
class TeslaMate.Repo.Migrations.AddCostFieldToCharges (line 1) | defmodule TeslaMate.Repo.Migrations.AddCostFieldToCharges
method change (line 4) | def change do
FILE: priv/repo/migrations/20191117143038_add_grafana_url.exs
class TeslaMate.Repo.Migrations.AddGrafanaUrl (line 1) | defmodule TeslaMate.Repo.Migrations.AddGrafanaUrl
method change (line 4) | def change do
FILE: priv/repo/migrations/20191117171307_car_settings.exs
class TeslaMate.Repo.Migrations.CarSettings (line 1) | defmodule TeslaMate.Repo.Migrations.CarSettings
method up (line 64) | def up do
method down (line 107) | def down do
class Settings (line 4) | defmodule Settings
class CarSettings (line 17) | defmodule CarSettings
method changeset (line 37) | def changeset(settings, attrs) do
class Car (line 46) | defmodule Car
method changeset (line 55) | def changeset(car, attrs) do
FILE: priv/repo/migrations/20191119162847_geofence_sleep.exs
class TeslaMate.Repo.Migrations.GeofenceSleep (line 1) | defmodule TeslaMate.Repo.Migrations.GeofenceSleep
method change (line 4) | def change do
FILE: priv/repo/migrations/20191212215130_remove_phase_correction.exs
class TeslaMate.Repo.Migrations.RemovePhaseCorrection (line 1) | defmodule TeslaMate.Repo.Migrations.RemovePhaseCorrection
method change (line 4) | def change do
FILE: priv/repo/migrations/20191212230527_recalc_energy_used.exs
class TeslaMate.Repo.Migrations.RecalcEnergyUsed (line 38) | defmodule TeslaMate.Repo.Migrations.RecalcEnergyUsed
class TeslaMate.Repo.Migrations.RecalcEnergyUsed.CustomExpressions (line 1) | defmodule TeslaMate.Repo.Migrations.RecalcEnergyUsed.CustomExpressions
method up (line 116) | def up do
method down (line 122) | def down do
method complete_charging_process (line 126) | defp complete_charging_process(%ChargingProcess{} = charging_process) do
method calculate_energy_used (line 166) | defp calculate_energy_used(%ChargingProcess{id: id} = charging_process...
method determine_phases (line 199) | defp determine_phases(%ChargingProcess{id: id}) do
class Charge (line 43) | defmodule Charge
class ChargingProcess (line 65) | defmodule ChargingProcess
method changeset (line 89) | def changeset(charging_state, attrs) do
FILE: priv/repo/migrations/20200103073606_add_usable_battery_level.exs
class TeslaMate.Repo.Migrations.AddUsableBatteryLevel (line 1) | defmodule TeslaMate.Repo.Migrations.AddUsableBatteryLevel
method change (line 4) | def change do
FILE: priv/repo/migrations/20200116190926_charges_add_usable_battery_level.exs
class TeslaMate.Repo.Migrations.ChargesAddUsableBatteryLevel (line 1) | defmodule TeslaMate.Repo.Migrations.ChargesAddUsableBatteryLevel
method change (line 4) | def change do
FILE: priv/repo/migrations/20200120130125_add_language.exs
class TeslaMate.Repo.Migrations.AddLanguage (line 1) | defmodule TeslaMate.Repo.Migrations.AddLanguage
method change (line 4) | def change do
FILE: priv/repo/migrations/20200120142602_replace_place_id_with_osmid.exs
class TeslaMate.Repo.Migrations.ReplacePlaceIdWithOsmid (line 1) | defmodule TeslaMate.Repo.Migrations.ReplacePlaceIdWithOsmid
method change (line 4) | def change do
FILE: priv/repo/migrations/20200203120311_cascade_delete.exs
class TeslaMate.Repo.Migrations.CascadeDelete (line 1) | defmodule TeslaMate.Repo.Migrations.CascadeDelete
method up (line 4) | def up do
method down (line 91) | def down do
FILE: priv/repo/migrations/20200203180529_location_based_charge_cost.exs
class TeslaMate.Repo.Migrations.LocationBasedChargeCost (line 1) | defmodule TeslaMate.Repo.Migrations.LocationBasedChargeCost
method change (line 4) | def change do
FILE: priv/repo/migrations/20200212001245_location_based_charge_cost_increase_scale.exs
class TeslaMate.Repo.Migrations.LocationBasedChargeCostIncreaseScale (line 1) | defmodule TeslaMate.Repo.Migrations.LocationBasedChargeCostIncreaseScale
method up (line 4) | def up do
method down (line 10) | def down do
FILE: priv/repo/migrations/20200216121330_use_rated_as_default_preferred_range.exs
class TeslaMate.Repo.Migrations.UseRatedAsDefaultPreferredRange (line 1) | defmodule TeslaMate.Repo.Migrations.UseRatedAsDefaultPreferredRange
method up (line 4) | def up do
method down (line 10) | def down do
FILE: priv/repo/migrations/20200302100654_add_vehicle_config_attrbitues.exs
class TeslaMate.Repo.Migrations.AddVehicleConfigAttrbitues (line 1) | defmodule TeslaMate.Repo.Migrations.AddVehicleConfigAttrbitues
method change (line 4) | def change do
FILE: priv/repo/migrations/20200306130218_update_cities.exs
class TeslaMate.Repo.Migrations.UpdateCities (line 1) | defmodule TeslaMate.Repo.Migrations.UpdateCities
method change (line 4) | def change do
FILE: priv/repo/migrations/20200306133847_add_flat_fee.exs
class TeslaMate.Repo.Migrations.AddFlatFee (line 1) | defmodule TeslaMate.Repo.Migrations.AddFlatFee
method change (line 4) | def change do
FILE: priv/repo/migrations/20200318164021_use_streaming_api.exs
class TeslaMate.Repo.Migrations.UseStreamingApi (line 1) | defmodule TeslaMate.Repo.Migrations.UseStreamingApi
method change (line 4) | def change do
FILE: priv/repo/migrations/20200320140020_drop_power_avg.exs
class TeslaMate.Repo.Migrations.DropPowerAvg (line 1) | defmodule TeslaMate.Repo.Migrations.DropPowerAvg
method change (line 4) | def change do
FILE: priv/repo/migrations/20200401170940_remove_sleep_mode_toggles.exs
class TeslaMate.Repo.Migrations.RemoveSleepModeToggles (line 1) | defmodule TeslaMate.Repo.Migrations.RemoveSleepModeToggles
method up (line 4) | def up do
method down (line 13) | def down do
FILE: priv/repo/migrations/20200401171402_remove_sleep_mode_requirements.exs
class TeslaMate.Repo.Migrations.RemoveSleepModeRequirements (line 1) | defmodule TeslaMate.Repo.Migrations.RemoveSleepModeRequirements
method change (line 4) | def change do
FILE: priv/repo/migrations/20200401171923_enable_streaming.exs
class TeslaMate.Repo.Migrations.EnableStreaming (line 1) | defmodule TeslaMate.Repo.Migrations.EnableStreaming
method up (line 7) | def up, do: Repo.update_all(CarSettings, set: [use_streaming_api: true])
method down (line 8) | def down, do: :ok
FILE: priv/repo/migrations/20200410112005_database_efficiency_improvements.exs
class TeslaMate.Repo.Migrations.DatabaseEfficiencyImprovements (line 1) | defmodule TeslaMate.Repo.Migrations.DatabaseEfficiencyImprovements
method change (line 4) | def change do
FILE: priv/repo/migrations/20200502140646_drop_unused_indexes.exs
class TeslaMate.Repo.Migrations.DropUnusedIndexes (line 1) | defmodule TeslaMate.Repo.Migrations.DropUnusedIndexes
method change (line 4) | def change do
FILE: priv/repo/migrations/20200528163852_cost_by_minute.exs
class TeslaMate.Repo.Migrations.CostByMinute (line 1) | defmodule TeslaMate.Repo.Migrations.CostByMinute
method up (line 4) | def up do
method down (line 14) | def down do
FILE: priv/repo/migrations/20200528173223_rename_unit_enums.exs
class TeslaMate.Repo.Migrations.RenameUnitEnums (line 1) | defmodule TeslaMate.Repo.Migrations.RenameUnitEnums
method change (line 4) | def change do
FILE: priv/repo/migrations/20200528175158_optimize_conversion_helpers.exs
class TeslaMate.Repo.Migrations.OptimizeConversionHelpers (line 1) | defmodule TeslaMate.Repo.Migrations.OptimizeConversionHelpers
method change (line 4) | def change do
method noop (line 44) | defp noop, do: :ok
FILE: priv/repo/migrations/20200709165119_change_sleep_requirements_default.exs
class TeslaMate.Repo.Migrations.ChangeSleepRequirementsDefault (line 1) | defmodule TeslaMate.Repo.Migrations.ChangeSleepRequirementsDefault
method up (line 4) | def up do
method down (line 10) | def down do
FILE: priv/repo/migrations/20210130174838_use_variable_length_type_for_tokens.exs
class TeslaMate.Repo.Migrations.UseVariableLengthTypeForTokens (line 1) | defmodule TeslaMate.Repo.Migrations.UseVariableLengthTypeForTokens
method change (line 4) | def change do
FILE: priv/repo/migrations/20210812173700_car_priorities.exs
class TeslaMate.Repo.Migrations.CarPriorities (line 1) | defmodule TeslaMate.Repo.Migrations.CarPriorities
method change (line 4) | def change do
FILE: priv/repo/migrations/20210831153305_add_not_null_constraint_to_display_priority.exs
class TeslaMate.Repo.Migrations.AddNotNullConstraintToDisplayPriority (line 1) | defmodule TeslaMate.Repo.Migrations.AddNotNullConstraintToDisplayPriority
method up (line 4) | def up do
method down (line 10) | def down do
FILE: priv/repo/migrations/20211022103654_add_not_null_constraint_to_start_date.exs
class TeslaMate.Repo.Migrations.AddNotNullConstraintToStartDate (line 1) | defmodule TeslaMate.Repo.Migrations.AddNotNullConstraintToStartDate
method up (line 4) | def up do
method down (line 10) | def down do
FILE: priv/repo/migrations/20220123131732_encrypt_api_tokens.exs
class TeslaMate.Repo.Migrations.EncryptApiTokens (line 1) | defmodule TeslaMate.Repo.Migrations.EncryptApiTokens
method change (line 72) | def change do
class Encrypted.Binary (line 6) | defmodule Encrypted.Binary
class Tokens (line 10) | defmodule Tokens
class Encryption (line 22) | defmodule Encryption
method setup (line 23) | def setup do
method setup_vault (line 39) | defp setup_vault(key) do
class Cache (line 48) | defmodule Cache
method store (line 51) | def store(encryption_key) do
method import_dir (line 61) | defp import_dir do
FILE: priv/repo/migrations/20220422132017_add_marketing_name_to_car.exs
class TeslaMate.Repo.Migrations.AddMarketingNameToCar (line 1) | defmodule TeslaMate.Repo.Migrations.AddMarketingNameToCar
method change (line 4) | def change do
FILE: priv/repo/migrations/20220617170400_add_tire_pressures.exs
class TeslaMate.Repo.Migrations.AddTirePressures (line 1) | defmodule TeslaMate.Repo.Migrations.AddTirePressures
method change (line 4) | def change do
method noop (line 30) | defp noop, do: :ok
FILE: priv/repo/migrations/20220718085412_add_unit_of_pressure_to_global_settings.exs
class TeslaMate.Repo.Migrations.AddUnitOfPressureToGlobalSettings (line 1) | defmodule TeslaMate.Repo.Migrations.AddUnitOfPressureToGlobalSettings
method change (line 4) | def change do
FILE: priv/repo/migrations/20230417225712_composite_index_to_position.exs
class TeslaMate.Repo.Migrations.AddCompositeIndexToPositions (line 1) | defmodule TeslaMate.Repo.Migrations.AddCompositeIndexToPositions
method change (line 4) | def change do
FILE: priv/repo/migrations/20240603152807_add_enabled_to_car_settings.exs
class TeslaMate.Repo.Migrations.AddEnabledToCarSettings (line 1) | defmodule TeslaMate.Repo.Migrations.AddEnabledToCarSettings
method change (line 4) | def change do
FILE: priv/repo/migrations/20240627021414_add_lfp_battery_car_setting.exs
class TeslaMate.Repo.Migrations.AddLFPBatteryCarSetting (line 1) | defmodule TeslaMate.Repo.Migrations.AddLFPBatteryCarSetting
method change (line 4) | def change do
FILE: priv/repo/migrations/20240915193446_composite_index_with_predicate_to_position.exs
class TeslaMate.Repo.Migrations.AddCompositeIndexWithPredicateToPositions (line 1) | defmodule TeslaMate.Repo.Migrations.AddCompositeIndexWithPredicateToPosi...
method change (line 4) | def change do
FILE: priv/repo/migrations/20240929084639_recreate_geo_extensions.exs
class TeslaMate.Repo.Migrations.RecreateGeoExtensions (line 1) | defmodule TeslaMate.Repo.Migrations.RecreateGeoExtensions
method change (line 4) | def change do
FILE: priv/repo/migrations/20250407155134_upgrade_earthdistance.exs
class TeslaMate.Repo.Migrations.UpgradeEarthdistance (line 1) | defmodule TeslaMate.Repo.Migrations.UpgradeEarthdistance
method change (line 4) | def change do
FILE: priv/repo/migrations/20250613133700_add_and_calculate_elevation_changes.exs
class TeslaMate.Repo.Migrations.AddAndCalculateElevationChanges (line 1) | defmodule TeslaMate.Repo.Migrations.AddAndCalculateElevationChanges
method up (line 4) | def up do
method down (line 37) | def down do
FILE: priv/repo/migrations/20250924215353_create_private_schema.exs
class TeslaMate.Repo.Migrations.CreatePrivateSchema (line 1) | defmodule TeslaMate.Repo.Migrations.CreatePrivateSchema
method up (line 4) | def up do
method down (line 9) | def down do
FILE: priv/repo/migrations/20251207212310_add_theme_mode_to_settings.exs
class TeslaMate.Repo.Migrations.AddThemeModeToSettings (line 1) | defmodule TeslaMate.Repo.Migrations.AddThemeModeToSettings
method change (line 4) | def change do
FILE: priv/repo/migrations/20251225150000_replace_positions_date_indexes.exs
class TeslaMate.Repo.Migrations.ReplaceDateBtreeIndexesWithBrin (line 1) | defmodule TeslaMate.Repo.Migrations.ReplaceDateBtreeIndexesWithBrin
method change (line 4) | def change do
FILE: test/support/conn_case.ex
class TeslaMateWeb.ConnCase (line 1) | defmodule TeslaMateWeb.ConnCase
FILE: test/support/data_case.ex
class TeslaMate.DataCase (line 1) | defmodule TeslaMate.DataCase
method errors_on (line 48) | def errors_on(changeset) do
FILE: test/support/mocks/api.ex
class ApiMock (line 1) | defmodule ApiMock
method start_link (line 10) | def start_link(opts) do
method get_vehicle (line 14) | def get_vehicle(name, id), do: GenServer.call(name, {:get_vehicle, id})
method get_vehicle_with_state (line 15) | def get_vehicle_with_state(name, id), do: GenServer.call(name, {:get_v...
method stream (line 16) | def stream(name, vid, receiver), do: GenServer.call(name, {:stream, vi...
method sign_in (line 18) | def sign_in(name, tokens), do: GenServer.call(name, {:sign_in, tokens})
method init (line 23) | def init(opts) do
method handle_call (line 43) | def handle_call({:sign_in, _tokens} = event, _from, %State{pid: pid} =...
method handle_call (line 48) | def handle_call({:stream, _vid, _receiver} = event, _from, %State{pid:...
method exec (line 54) | defp exec(event), do: event
class State (line 4) | defmodule State
FILE: test/support/mocks/auth.ex
class AuthMock (line 1) | defmodule AuthMock
method start_link (line 9) | def start_link(opts) do
method get_tokens (line 13) | def get_tokens(name), do: GenServer.call(name, :get_tokens)
method save (line 14) | def save(name, auth), do: GenServer.call(name, {:save, auth})
method init (line 19) | def init(opts) do
method handle_call (line 28) | def handle_call(:get_tokens, _from, state) do
method handle_call (line 32) | def handle_call({:save, _auth} = event, _from, %State{pid: pid} = stat...
FILE: test/support/mocks/geocoder.ex
class GeocoderMock (line 1) | defmodule GeocoderMock
method reverse_lookup (line 4) | def reverse_lookup(%Decimal{} = lat, %Decimal{} = lon, lang) do
method reverse_lookup (line 8) | def reverse_lookup(99.9, 99.9, _lang) do
method reverse_lookup (line 12) | def reverse_lookup(-99.9, -99.9, _lang) do
method reverse_lookup (line 56) | def reverse_lookup(52.394246, 13.542552, _lang) do
method reverse_lookup (line 89) | def reverse_lookup(-25.066188, -130.100502, _lang) do
method details (line 146) | def details(addresses, lang) do
FILE: test/support/mocks/locations.ex
class LocationsMock (line 1) | defmodule LocationsMock
method start_link (line 11) | def start_link(opts) do
method find_geofence (line 15) | def find_geofence(name, point) do
method init (line 22) | def init(opts) do
method handle_call (line 27) | def handle_call({:find_geofence, %{latitude: 90, longitude: 45}}, _fro...
method handle_call (line 32) | def handle_call({:find_geofence, %{latitude: _, longitude: _}}, _from,...
FILE: test/support/mocks/log.ex
class LogMock (line 1) | defmodule LogMock
method start_link (line 12) | def start_link(opts) do
method start_state (line 16) | def start_state(name, car, state, opts) do
method get_current_state (line 20) | def get_current_state(name, car), do: GenServer.call(name, {:get_curre...
method start_drive (line 22) | def start_drive(name, car), do: GenServer.call(name, {:start_drive, car})
method close_drive (line 23) | def close_drive(name, drive, opts \\ []), do: GenServer.call(name, {:c...
method start_update (line 25) | def start_update(name, car, opts), do: GenServer.call(name, {:start_up...
method cancel_update (line 26) | def cancel_update(name, update), do: GenServer.call(name, {:cancel_upd...
method finish_update (line 28) | def finish_update(name, update, vsn, opts) do
method get_latest_update (line 32) | def get_latest_update(name, car) do
method insert_missed_update (line 36) | def insert_missed_update(name, car, vsn, opts) do
method start_charging_process (line 40) | def start_charging_process(name, car, position_attrs, opts \\ []) do
method complete_charging_process (line 44) | def complete_charging_process(name, cproc) do
method insert_position (line 48) | def insert_position(name, car_or_drive, attrs) do
method insert_charge (line 52) | def insert_charge(name, cproc, attrs) do
method get_positions_without_elevation (line 56) | def get_positions_without_elevation(name, min_id, opts) do
method update_car (line 60) | def update_car(name, car, attrs, opts) do
method get_latest_position (line 64) | def get_latest_position(name, car) do
method init (line 71) | def init(opts) do
method handle_call (line 81) | def handle_call({:start_state, _car, s, _} = action, _from, %State{pid...
method handle_call (line 86) | def handle_call({:get_current_state, _}, _from, state) do
method handle_call (line 90) | def handle_call({:insert_position, _, attrs} = action, _from, %State{p...
method handle_call (line 95) | def handle_call({:insert_charge, _, _attrs} = action, _from, %State{pi...
method handle_call (line 100) | def handle_call({:start_charging_process, _, _, _} = action, _from, %S...
method handle_call (line 105) | def handle_call(
method handle_call (line 115) | def handle_call({:start_drive, _car} = action, _from, %State{pid: pid}...
method handle_call (line 120) | def handle_call({:close_drive, _drive, _} = action, _from, %State{pid:...
method handle_call (line 125) | def handle_call({:start_update, _car, _} = action, _from, %State{pid: ...
method handle_call (line 130) | def handle_call({:cancel_update, _update} = action, _from, %State{pid:...
method handle_call (line 135) | def handle_call({:finish_update, _, _, _} = action, _from, %State{pid:...
method handle_call (line 140) | def handle_call({:get_latest_update, _car}, _from, %State{last_update:...
method handle_call (line 144) | def handle_call({:insert_missed_update, _, _, _} = action, _from, %Sta...
method handle_call (line 149) | def handle_call({:get_positions_without_elevation, min_id, _opts}, _fr...
method handle_call (line 154) | def handle_call({:update_car, car, attrs, _opts} = _action, _from, %St...
method handle_call (line 163) | def handle_call({:get_latest_position, _car}, _from, state) do
method handle_call (line 167) | def handle_call(action, _from, %State{pid: pid} = state) do
FILE: test/support/mocks/mqtt_publisher.ex
class MqttPublisherMock (line 1) | defmodule MqttPublisherMock
method start_link (line 9) | def start_link(opts) do
method publish (line 13) | def publish(name, topic, msg, opts), do: GenServer.call(name, {:publis...
method init (line 18) | def init(opts) do
method handle_call (line 23) | def handle_call({:publish, _topic, _msg, _opts} = action, _from, %Stat...
FILE: test/support/mocks/pubsub.ex
class PubSubMock (line 1) | defmodule PubSubMock
method start_link (line 9) | def start_link(opts) do
method broadcast (line 13) | def broadcast(name, server, topic, message) do
method init (line 20) | def init(opts) do
method handle_call (line 26) | def handle_call({:broadcast, _, "Elixir.TeslaMate.Vehicles.Vehicle/fet...
method handle_call (line 30) | def handle_call({:broadcast, _, _, _} = event, _from, %State{last_even...
method handle_call (line 34) | def handle_call({:broadcast, _, _, _} = event, _from, %State{pid: pid}...
FILE: test/support/mocks/settings.ex
class SettingsMock (line 1) | defmodule SettingsMock
method start_link (line 9) | def start_link(opts) do
method subscribe_to_changes (line 13) | def subscribe_to_changes(name, car) do
method init (line 20) | def init(opts) do
method handle_call (line 26) | def handle_call({:subscribe_to_changes = event, _car}, _from, %State{p...
FILE: test/support/mocks/srtm.ex
class SRTMMock (line 1) | defmodule SRTMMock
method start_link (line 9) | def start_link(opts) do
method get_elevation (line 13) | def get_elevation(name, lat, lng, opts \\ []) do
method init (line 20) | def init(opts) do
method handle_call (line 25) | def handle_call({:get_elevation, lat, lng, opts}, _, %State{responses:...
FILE: test/support/mocks/terrain.ex
class TerrainMock (line 1) | defmodule TerrainMock
method get_elevation (line 2) | def get_elevation({_lat, _lng}) do
FILE: test/support/mocks/vehicle.ex
class VehicleMock (line 1) | defmodule VehicleMock
method child_spec (line 4) | def child_spec(arg) do
FILE: test/support/mocks/vehicles.ex
class VehiclesMock (line 1) | defmodule VehiclesMock
method start_link (line 9) | def start_link(opts) do
method kill (line 13) | def kill(name), do: GenServer.call(name, :kill)
method restart (line 14) | def restart(name), do: GenServer.call(name, :restart)
method subscribe_to_summary (line 16) | def subscribe_to_summary(name, car_id) do
method init (line 23) | def init(opts) do
method handle_call (line 28) | def handle_call({:subscribe_to_summary, _car_id} = action, _from, %Sta...
method handle_call (line 33) | def handle_call(:kill, _from, %State{pid: pid} = state) do
method handle_call (line 38) | def handle_call(:restart, _from, %State{pid: pid} = state) do
FILE: test/support/test_helper.ex
class TestHelper (line 1) | defmodule TestHelper
method eventually (line 2) | def eventually(fun, opts \\ []) do
method eventually (line 6) | defp eventually(fun, attempts, delay) do
FILE: test/support/vehicle_case.ex
class TeslaMate.VehicleCase (line 1) | defmodule TeslaMate.VehicleCase
method online_event (line 88) | def online_event(opts \\ []) do
method drive_event (line 114) | def drive_event(ts, shift_state, speed_mph) do
method charging_event (line 126) | def charging_event(ts, charging_state, charge_energy_added, opts \\ []...
method update_event (line 141) | def update_event(ts, state, car_version, opts \\ []) do
FILE: test/teslamate/api_test.exs
class TeslaMate.ApiTest (line 1) | defmodule TeslaMate.ApiTest
method start_api (line 9) | def start_api(name, opts \\ []) do
method vehicle_mock (line 33) | defp vehicle_mock(pid) do
method auth_mock (line 51) | defp auth_mock(pid) do
FILE: test/teslamate/auth_test.exs
class TeslaMate.AuthTest (line 1) | defmodule TeslaMate.AuthTest
FILE: test/teslamate/http_test.exs
class TeslaMate.HTTPTest (line 1) | defmodule TeslaMate.HTTPTest
FILE: test/teslamate/import_test.exs
class TeslaMate.ImportTest (line 1) | defmodule TeslaMate.ImportTest
method ok_fn (line 558) | defp ok_fn(name, pid) do
method all (line 563) | defp all(struct) do
FILE: test/teslamate/locations/addresses_test.exs
class TeslaMate.LocationsAddressesTest (line 1) | defmodule TeslaMate.LocationsAddressesTest
FILE: test/teslamate/locations/geocoder_test.exs
class TeslaMate.Locations.GeocoderTest (line 1) | defmodule TeslaMate.Locations.GeocoderTest
method geocoder_mock (line 8) | defp geocoder_mock(lat, lon, body) do
FILE: test/teslamate/locations/geofences_test.exs
class TeslaMate.LocationsGeofencesTest (line 1) | defmodule TeslaMate.LocationsGeofencesTest
method geofence_fixture (line 433) | defp geofence_fixture(attrs \\ %{}) do
method car_fixture (line 442) | defp car_fixture(attrs \\ %{}) do
method create_drive (line 451) | defp create_drive(
method create_charging_process (line 496) | defp create_charging_process(car, %{latitude: lat, longitude: lng}) do
FILE: test/teslamate/log/log_car_test.exs
class TeslaMate.LogCarTest (line 1) | defmodule TeslaMate.LogCarTest
method car_fixture (line 46) | def car_fixture(attrs \\ %{}) do
FILE: test/teslamate/log/log_charging_test.exs
class TeslaMate.LogChargingTest (line 1) | defmodule TeslaMate.LogChargingTest
method car_fixture (line 17) | def car_fixture(attrs \\ %{}) do
method log_charging_process (line 26) | defp log_charging_process(charges, opts \\ []) do
FILE: test/teslamate/log/log_drive_test.exs
class TeslaMate.LogDriveTest (line 1) | defmodule TeslaMate.LogDriveTest
method car_fixture (line 9) | def car_fixture(attrs \\ %{}) do
FILE: test/teslamate/log/log_state_test.exs
class TeslaMate.LogStateTest (line 1) | defmodule TeslaMate.LogStateTest
method car_fixture (line 7) | def car_fixture(attrs \\ %{}) do
FILE: test/teslamate/log/log_update_test.exs
class TeslaMate.LogUpdateTest (line 1) | defmodule TeslaMate.LogUpdateTest
method car_fixture (line 7) | def car_fixture(attrs \\ %{}) do
FILE: test/teslamate/mqtt/pubsub/vehicle_subscriber_test.exs
class TeslaMate.Mqtt.PubSub.VehicleSubscriberTest (line 1) | defmodule TeslaMate.Mqtt.PubSub.VehicleSubscriberTest
method start_subscriber (line 8) | defp start_subscriber(name, car_id, namespace \\ nil) do
FILE: test/teslamate/settings_test.exs
class TeslaMate.SettingsTest (line 1) | defmodule TeslaMate.SettingsTest
method car_fixture (line 9) | defp car_fixture(attrs \\ %{}) do
FILE: test/teslamate/terrain/update_positions_test.exs
class TeslaMate.Terrain.UpdatePositionsTest (line 1) | defmodule TeslaMate.Terrain.UpdatePositionsTest
method start_terrain (line 7) | defp start_terrain(name, responses) do
method car_fixture (line 123) | defp car_fixture(attrs \\ %{}) do
FILE: test/teslamate/terrain_test.exs
class TeslaMate.TerrainTest (line 1) | defmodule TeslaMate.TerrainTest
method start_terrain (line 6) | def start_terrain(name, responses \\ %{}) do
FILE: test/teslamate/updater_test.exs
class TeslaMate.UpdaterTest (line 1) | defmodule TeslaMate.UpdaterTest
method start_updater (line 29) | defp start_updater(name, version, opts \\ []) do
class HTTPMocck (line 7) | defmodule HTTPMocck
method vsn (line 8) | def vsn(tag) do
method json (line 12) | def json(data) do
method response (line 16) | def response(resp) do
FILE: test/teslamate/vault_test.exs
class TeslaMate.VaultTest (line 1) | defmodule TeslaMate.VaultTest
method key_equals? (line 8) | defp key_equals?(key) do
FILE: test/teslamate/vehicles/identification_test.exs
class TeslaMate.Vehicles.Vehicle.IdentificationTest (line 1) | defmodule TeslaMate.Vehicles.Vehicle.IdentificationTest
method start_vehicles (line 64) | def start_vehicles(events \\ []) do
FILE: test/teslamate/vehicles/vehicle/charging_sync_test.exs
class TeslaMate.Vehicles.Vehicle.ChargingSyncTest (line 1) | defmodule TeslaMate.Vehicles.Vehicle.ChargingSyncTest
method car_fixture (line 46) | defp car_fixture(attrs \\ %{}) do
FILE: test/teslamate/vehicles/vehicle/charging_test.exs
class TeslaMate.Vehicles.Vehicle.ChargingTest (line 1) | defmodule TeslaMate.Vehicles.Vehicle.ChargingTest
FILE: test/teslamate/vehicles/vehicle/driving_test.exs
class TeslaMate.Vehicles.Vehicle.DrivingTest (line 1) | defmodule TeslaMate.Vehicles.Vehicle.DrivingTest
FILE: test/teslamate/vehicles/vehicle/streaming_test.exs
class TeslaMate.Vehicles.Vehicle.StreamingTest (line 1) | defmodule TeslaMate.Vehicles.Vehicle.StreamingTest
method stream (line 10) | defp stream(name, data) do
FILE: test/teslamate/vehicles/vehicle/suspend_logging_test.exs
class TeslaMate.Vehicles.Vehicle.SuspendLoggingTest (line 1) | defmodule TeslaMate.Vehicles.Vehicle.SuspendLoggingTest
FILE: test/teslamate/vehicles/vehicle/suspend_test.exs
class TeslaMate.Vehicles.Vehicle.SuspendTest (line 1) | defmodule TeslaMate.Vehicles.Vehicle.SuspendTest
FILE: test/teslamate/vehicles/vehicle/updating_test.exs
class TeslaMate.Vehicles.Vehicle.UpdatingTest (line 1) | defmodule TeslaMate.Vehicles.Vehicle.UpdatingTest
FILE: test/teslamate/vehicles/vehicle_sync_test.exs
class TeslaMate.Vehicles.VehicleSyncTest (line 1) | defmodule TeslaMate.Vehicles.VehicleSyncTest
FILE: test/teslamate/vehicles/vehicle_test.exs
class TeslaMate.Vehicles.VehicleTest (line 1) | defmodule TeslaMate.Vehicles.VehicleTest
FILE: test/teslamate/vehicles_test.exs
class TeslaMate.VehiclesTest (line 1) | defmodule TeslaMate.VehiclesTest
FILE: test/teslamate_web/controllers/car_controller_test.exs
class TeslaMateWeb.CarControllerTest (line 1) | defmodule TeslaMateWeb.CarControllerTest
method table_row (line 9) | defp table_row(html, key, value, opts \\ []) do
method icon (line 30) | defp icon(html, tooltip, icon) do
method car_fixture (line 40) | defp car_fixture(settings) do
method start_vehicles (line 614) | def start_vehicles(events \\ []) do
FILE: test/teslamate_web/controllers/drive_controller_test.exs
class TeslaMateWeb.DriveControllerTest (line 1) | defmodule TeslaMateWeb.DriveControllerTest
method car_fixture (line 7) | def car_fixture(attrs \\ %{}) do
method drive_fixture (line 16) | defp drive_fixture(car) do
FILE: test/teslamate_web/live/car_index_live_test.exs
class TeslaMateWeb.CarLive.Indextest (line 1) | defmodule TeslaMateWeb.CarLive.Indextest
method start_vehicles (line 55) | defp start_vehicles(events) do
FILE: test/teslamate_web/live/car_summary_live_test.exs
class TeslaMateWeb.CarLive.SummaryTest (line 1) | defmodule TeslaMateWeb.CarLive.SummaryTest
method table_row (line 8) | defp table_row(html, key, value, opts \\ []) do
method car_fixture (line 25) | defp car_fixture(settings) do
method now (line 45) | defp now, do: (DateTime.utc_now() |> DateTime.to_unix()) * 1000
method start_vehicles (line 487) | def start_vehicles(events \\ []) do
FILE: test/teslamate_web/live/charge_cost_live_test.exs
class TeslaMateWeb.ChargeLive.CostTest (line 1) | defmodule TeslaMateWeb.ChargeLive.CostTest
method car_fixture (line 353) | defp car_fixture(attrs \\ %{}) do
method charging_process_fixture (line 370) | defp charging_process_fixture(car, attrs \\ %{}) do
FILE: test/teslamate_web/live/geofence_live_test.exs
class TeslaMateWeb.GeoFenceLiveTest (line 1) | defmodule TeslaMateWeb.GeoFenceLiveTest
method geofence_fixture (line 10) | def geofence_fixture(attrs \\ %{}) do
method car_fixture (line 19) | defp car_fixture(attrs \\ %{}) do
FILE: test/teslamate_web/live/import_test.exs
class TeslaMateWeb.ImportLiveTest (line 1) | defmodule TeslaMateWeb.ImportLiveTest
FILE: test/teslamate_web/live/settings_test.exs
class TeslaMateWeb.SettingsLiveTest (line 1) | defmodule TeslaMateWeb.SettingsLiveTest
FILE: test/teslamate_web/live/sign_in_test.exs
class TeslaMateWeb.SignInLiveTest (line 1) | defmodule TeslaMateWeb.SignInLiveTest
method start_api (line 4) | defp start_api(name) do
FILE: test/teslamate_web/views/error_view_test.exs
class TeslaMateWeb.ErrorViewTest (line 1) | defmodule TeslaMateWeb.ErrorViewTest
FILE: test/teslamate_web/views/layout_view_test.exs
class TeslaMateWeb.LayoutViewTest (line 1) | defmodule TeslaMateWeb.LayoutViewTest
FILE: test/teslamate_web/views/page_view_test.exs
class TeslaMateWeb.PageViewTest (line 1) | defmodule TeslaMateWeb.PageViewTest
FILE: website/src/pages/index.js
function Home (line 6) | function Home() {
Condensed preview — 427 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (4,621K chars).
[
{
"path": ".credo.exs",
"chars": 8852,
"preview": "# This file contains the configuration for Credo and you are probably reading\n# this after creating it with `mix credo.g"
},
{
"path": ".dialyzer_ignore.exs",
"chars": 3,
"preview": "[]\n"
},
{
"path": ".dockerignore",
"chars": 122,
"preview": "_build/\ndeps/\n.git/\n.gitignore\nDockerfile\nMakefile\nREADME*\ntest/\npriv/static/assets\n**/node_modules\nimport/\nteslamate.bc"
},
{
"path": ".envrc",
"chars": 75,
"preview": "use flake . --override-input devenv-root \"file+file://\"<(printf %s \"$PWD\")\n"
},
{
"path": ".formatter.exs",
"chars": 242,
"preview": "[\n import_deps: [:ecto, :phoenix, :phoenix_live_view, :tesla],\n inputs: [\"*.{heex,ex,exs}\", \"priv/*/seeds.exs\", \"{conf"
},
{
"path": ".github/ISSUE_TEMPLATE/bug_report.yml",
"chars": 6302,
"preview": "name: Bug Report\ndescription: File a bug report\nlabels: []\nassignees: []\nbody:\n - type: checkboxes\n attributes:\n "
},
{
"path": ".github/ISSUE_TEMPLATE/config.yml",
"chars": 184,
"preview": "blank_issues_enabled: false\ncontact_links:\n - name: Community Support\n url: https://github.com/teslamate-org/teslama"
},
{
"path": ".github/actions/build/action.yml",
"chars": 3276,
"preview": "name: \"Build\"\ndescription: \"Build images\"\ninputs:\n is_dockerhub_pushed:\n description: \"Need docker hub login?\"\n r"
},
{
"path": ".github/actions/grafana/action.yml",
"chars": 1131,
"preview": "name: \"Grafana\"\ndescription: \"Grafana images\"\ninputs:\n tags:\n description: \"Tags\"\n required: false\n default: \""
},
{
"path": ".github/actions/merge/action.yml",
"chars": 1383,
"preview": "name: \"Merge\"\ndescription: \"Merge images\"\ninputs:\n tags:\n description: \"Tags\"\n required: false\n default: \"\"\n "
},
{
"path": ".github/actions/setup-elixir-and-cache-deps/action.yml",
"chars": 2199,
"preview": "name: \"Setup Elixir and Cache Dependencies\"\ndescription: \"Setup Elixir, OTP and cache dependencies\"\ninputs:\n elixir-ver"
},
{
"path": ".github/dependabot.yml",
"chars": 831,
"preview": "version: 2\nupdates:\n - package-ecosystem: \"mix\"\n directory: \"/\"\n schedule:\n interval: \"monthly\"\n\n - package"
},
{
"path": ".github/workflows/buildx.yml",
"chars": 3202,
"preview": "name: Publish Docker images\n\non:\n workflow_dispatch:\n workflow_call:\n schedule:\n - cron: \"0 3 * * *\"\n push:\n t"
},
{
"path": ".github/workflows/check_if_pr_from_outside_repo.yml",
"chars": 1273,
"preview": "name: Check if PR from outside repo\n\non:\n workflow_call:\n # Map the workflow outputs to job outputs\n outputs:\n "
},
{
"path": ".github/workflows/check_paths.yml",
"chars": 783,
"preview": "name: Check paths\n\non:\n workflow_call:\n # Map the workflow outputs to job outputs\n outputs:\n githubfolder:\n "
},
{
"path": ".github/workflows/cleanup_caches.yml",
"chars": 1315,
"preview": "name: Cleanup caches by a branch\n\non:\n pull_request:\n types:\n - closed\n paths:\n - \"**/*\"\n - \"!.git"
},
{
"path": ".github/workflows/cleanup_largest_caches.yml",
"chars": 812,
"preview": "name: Cleanup largest 100 caches\n\non:\n workflow_dispatch:\n\npermissions:\n contents: read\n packages: read\n actions: wr"
},
{
"path": ".github/workflows/devops.yml",
"chars": 1851,
"preview": "name: DevOps\n\non:\n workflow_dispatch:\n push:\n branches: [\"main\"]\n paths:\n - \"**/*\"\n - \"!.github/**\" # "
},
{
"path": ".github/workflows/elixir_dep_verification_and_static_analysis.yml",
"chars": 2401,
"preview": "name: Elixir Dependency Verification and Static Analysis\n\non:\n workflow_call:\n\nenv:\n CACHE_NAME_DEPS: cache-elixir-dep"
},
{
"path": ".github/workflows/elixir_test.yml",
"chars": 1437,
"preview": "name: Elixir Test and report coverage\n\non:\n workflow_call:\n\nenv:\n CACHE_NAME_DEPS: cache-elixir-deps\n CACHE_NAME_COMP"
},
{
"path": ".github/workflows/ensure_linting.yml",
"chars": 1606,
"preview": "name: Ensure Linting\n\non:\n workflow_call:\n\npermissions:\n contents: read\n\njobs:\n check_linting:\n runs-on: ubuntu-24"
},
{
"path": ".github/workflows/ghcr_build.yml",
"chars": 3852,
"preview": "name: Build GHCR images\n\non:\n push:\n branches: [\"main\"]\n paths:\n - \"**/*\"\n - \"!.github/**\" # Important:"
},
{
"path": ".github/workflows/ghcr_purge.yml",
"chars": 2636,
"preview": "name: Purge PR images\n\non:\n workflow_call:\n pull_request:\n types:\n - closed\n paths:\n - \"**/*\"\n - "
},
{
"path": ".github/workflows/spell_check.yml",
"chars": 341,
"preview": "name: Spell check\n\non:\n workflow_call:\n\npermissions:\n contents: read\n\njobs:\n spell_check:\n name: Spell check\n r"
},
{
"path": ".github/workflows/stale.yml",
"chars": 1285,
"preview": "name: \"Close Stale Issues and Pull Requests\"\n\non:\n schedule:\n - cron: \"45 0 * * *\" # every day at 00:45 UTC\n\npermiss"
},
{
"path": ".github/workflows/update-flake-lock.yml",
"chars": 1932,
"preview": "---\nname: Update flake.lock\non:\n workflow_dispatch:\n schedule:\n # runs weekly on Saturday at 00:00 UTC time\n - c"
},
{
"path": ".gitignore",
"chars": 1484,
"preview": "# The directory Mix will write compiled artifacts to.\n/_build/\n\n# If you run \"mix test --cover\", coverage assets end up "
},
{
"path": ".markdownlint.yaml",
"chars": 222,
"preview": "---\ndefault: true\nMD013:\n line_length: 500\nMD024:\n siblings_only: true # heading duplication is allowed for non-siblin"
},
{
"path": ".node-version",
"chars": 2,
"preview": "20"
},
{
"path": ".typos.toml",
"chars": 353,
"preview": "[default.extend-words]\nmosquitto = \"mosquitto\"\nHASS = \"HASS\"\nJuni = \"Juni\"\nbck = \"bck\"\nAutomations = \"Automations\"\nautom"
},
{
"path": "CHANGELOG.md",
"chars": 153236,
"preview": "# Changelog\n\n## [unreleased]\n\n### New features\n\n### Improvements and bug fixes\n\n- feat(webview): Sort vehicles by displa"
},
{
"path": "CONTRIBUTING",
"chars": 108,
"preview": "# Contributing Guidelines\n\nsee [Development and Contributing](https://docs.teslamate.org/docs/development/)\n"
},
{
"path": "Dockerfile",
"chars": 2329,
"preview": "FROM elixir:1.19.5-otp-26 AS builder\n\nSHELL [\"/bin/bash\", \"-o\", \"pipefail\", \"-c\"]\n\nRUN apt-get update \\\n && apt-get i"
},
{
"path": "LICENSE",
"chars": 34523,
"preview": " GNU AFFERO GENERAL PUBLIC LICENSE\n Version 3, 19 November 2007\n\n Copyright (C)"
},
{
"path": "Makefile",
"chars": 652,
"preview": ".PHONY: help vsn grafana teslamate\n\nAPP_NAME ?= `grep 'app:' mix.exs | sed -e 's/\\[//g' -e 's/ //g' -e 's/app://' -e 's/"
},
{
"path": "README.md",
"chars": 8097,
"preview": "# TeslaMate\n\n[](https://github.com/teslamate-org/tes"
},
{
"path": "SECURITY.md",
"chars": 137,
"preview": "# Security Policy\n\n## Reporting a Vulnerability\n\nFor reporting a security vulnerability, please contact `security AT tes"
},
{
"path": "TRADEMARK.md",
"chars": 3707,
"preview": "# TeslaMate Trademark Policy\n\nLast updated: February 2, 2026\n\n## 1. Purpose\n\nThis policy exists to protect the integrity"
},
{
"path": "VERSION",
"chars": 9,
"preview": "3.0.1-dev"
},
{
"path": "assets/css/app.scss",
"chars": 6092,
"preview": "@charset \"utf-8\";\n\n// Override global Sass variables from the /utilities folder\n@use \"bulma/sass/utilities\" with (\n $wi"
},
{
"path": "assets/css/themes/dark.scss",
"chars": 1464,
"preview": "// Dark theme overrides via CSS variables for TeslaMate\n// Applied when [data-theme=\"dark\"] is set on the html element\n\n"
},
{
"path": "assets/css/themes/light.scss",
"chars": 1254,
"preview": "// Light theme overrides via CSS variables for TeslaMate\n// Applied when [data-theme=\"light\"] is set on the html element"
},
{
"path": "assets/css/vendor/modal-fx.scss",
"chars": 695,
"preview": "// source: https://github.com/postare/bulma-modal-fx/blob/master/src/_scss/components/_modal-fx.scss\n\n$transition-durati"
},
{
"path": "assets/js/app.js",
"chars": 668,
"preview": "import \"../css/app.scss\";\n\nimport \"phoenix_html\";\nimport { Socket } from \"phoenix\";\nimport { LiveSocket } from \"phoenix_"
},
{
"path": "assets/js/hooks.js",
"chars": 8448,
"preview": "const LANG = navigator.languages\n ? navigator.languages[0]\n : navigator.language || navigator.userLanguage;\n\nfunction "
},
{
"path": "assets/js/main.js",
"chars": 2105,
"preview": "document.querySelector(\".navbar-burger\").addEventListener(\"click\", function () {\n const $target = document.getElementBy"
},
{
"path": "assets/js/socket.js",
"chars": 2257,
"preview": "// NOTE: The contents of this file will only be executed if\n// you uncomment its entry in \"assets/js/app.js\".\n\n// To use"
},
{
"path": "assets/package.json",
"chars": 732,
"preview": "{\n \"repository\": {},\n \"description\": \"...\",\n \"license\": \"AGPL-3.0-or-later\",\n \"scripts\": {\n \"deploy\": \"node scrip"
},
{
"path": "assets/scripts/build.js",
"chars": 1843,
"preview": "const fs = require(\"fs\");\nconst path = require(\"path\");\nconst { sassPlugin } = require(\"esbuild-sass-plugin\");\nconst esb"
},
{
"path": "config/config.exs",
"chars": 887,
"preview": "import Config\n\nconfig :teslamate,\n ecto_repos: [TeslaMate.Repo]\n\nconfig :teslamate, TeslaMateWeb.Endpoint,\n url: [host"
},
{
"path": "config/dev.exs",
"chars": 821,
"preview": "import Config\n\nconfig :teslamate, TeslaMateWeb.Endpoint,\n debug_errors: true,\n code_reloader: true,\n check_origin: fa"
},
{
"path": "config/prod.exs",
"chars": 327,
"preview": "import Config\n\nconfig :teslamate, TeslaMateWeb.Endpoint,\n cache_static_manifest: \"priv/static/cache_manifest.json\",\n r"
},
{
"path": "config/runtime.exs",
"chars": 5901,
"preview": "import Config\n\ndefmodule Util do\n def random_string(length) do\n :crypto.strong_rand_bytes(length) |> Base.encode64()"
},
{
"path": "config/test.exs",
"chars": 314,
"preview": "import Config\n\nconfig :logger, level: :warning\n\n# We don't run a server during test. If one is required,\n# you can enabl"
},
{
"path": "coveralls.json",
"chars": 375,
"preview": "{\n \"coverage_options\": {\n \"treat_no_relevant_lines_as_covered\": true,\n \"output_dir\": \"cover/\",\n \"minimum_cover"
},
{
"path": "entrypoint.sh",
"chars": 650,
"preview": "#!/usr/bin/env dash\nset -e\n\n: \"${DATABASE_HOST:=\"127.0.0.1\"}\"\n: \"${DATABASE_PORT:=5432}\"\n: \"${ULIMIT_MAX_NOFILE:=65536}\""
},
{
"path": "flake.nix",
"chars": 1021,
"preview": "{\n description = \"TeslaMate Logger\";\n\n inputs = {\n nixpkgs.url = \"github:NixOS/nixpkgs/nixos-25.11\";\n flake-part"
},
{
"path": "grafana/Dockerfile",
"chars": 1636,
"preview": "# Ensure selecting a tag that is available for arm/v7, arm64, and amd64\n# https://hub.docker.com/r/grafana/grafana/tags\n"
},
{
"path": "grafana/dashboards/battery-health.json",
"chars": 59440,
"preview": "{\n \"annotations\": {\n \"list\": [\n {\n \"builtIn\": 1,\n \"datasource\": {\n \"type\": \"grafana\",\n "
},
{
"path": "grafana/dashboards/charge-level.json",
"chars": 14554,
"preview": "{\n \"annotations\": {\n \"list\": [\n {\n \"builtIn\": 1,\n \"datasource\": {\n \"type\": \"grafana\",\n "
},
{
"path": "grafana/dashboards/charges.json",
"chars": 41180,
"preview": "{\n \"annotations\": {\n \"list\": [\n {\n \"builtIn\": 1,\n \"datasource\": {\n \"type\": \"grafana\",\n "
},
{
"path": "grafana/dashboards/charging-stats.json",
"chars": 69364,
"preview": "{\n \"annotations\": {\n \"list\": [\n {\n \"builtIn\": 1,\n \"datasource\": {\n \"type\": \"grafana\",\n "
},
{
"path": "grafana/dashboards/database-info.json",
"chars": 47205,
"preview": "{\n \"annotations\": {\n \"list\": [\n {\n \"builtIn\": 1,\n \"datasource\": {\n \"type\": \"grafana\",\n "
},
{
"path": "grafana/dashboards/drive-stats.json",
"chars": 43097,
"preview": "{\n \"annotations\": {\n \"list\": [\n {\n \"builtIn\": 1,\n \"datasource\": {\n \"type\": \"grafana\",\n "
},
{
"path": "grafana/dashboards/drives.json",
"chars": 45019,
"preview": "{\n \"annotations\": {\n \"list\": [\n {\n \"builtIn\": 1,\n \"datasource\": {\n \"type\": \"grafana\",\n "
},
{
"path": "grafana/dashboards/efficiency.json",
"chars": 30483,
"preview": "{\n \"annotations\": {\n \"list\": [\n {\n \"builtIn\": 1,\n \"datasource\": {\n \"type\": \"grafana\",\n "
},
{
"path": "grafana/dashboards/internal/charge-details.json",
"chars": 50608,
"preview": "{\n \"annotations\": {\n \"list\": [\n {\n \"builtIn\": 1,\n \"datasource\": {\n \"type\": \"grafana\",\n "
},
{
"path": "grafana/dashboards/internal/drive-details.json",
"chars": 66663,
"preview": "{\n \"annotations\": {\n \"list\": [\n {\n \"builtIn\": 1,\n \"datasource\": {\n \"type\": \"grafana\",\n "
},
{
"path": "grafana/dashboards/internal/home.json",
"chars": 2502,
"preview": "{\n \"annotations\": {\n \"list\": [\n {\n \"builtIn\": 1,\n \"datasource\": {\n \"type\": \"grafana\",\n "
},
{
"path": "grafana/dashboards/locations.json",
"chars": 30210,
"preview": "{\n \"annotations\": {\n \"list\": [\n {\n \"builtIn\": 1,\n \"datasource\": {\n \"type\": \"grafana\",\n "
},
{
"path": "grafana/dashboards/mileage.json",
"chars": 7332,
"preview": "{\n \"annotations\": {\n \"list\": [\n {\n \"builtIn\": 1,\n \"datasource\": {\n \"type\": \"grafana\",\n "
},
{
"path": "grafana/dashboards/overview.json",
"chars": 55121,
"preview": "{\n \"annotations\": {\n \"list\": [\n {\n \"builtIn\": 1,\n \"datasource\": {\n \"type\": \"grafana\",\n "
},
{
"path": "grafana/dashboards/projected-range.json",
"chars": 23730,
"preview": "{\n \"annotations\": {\n \"list\": [\n {\n \"builtIn\": 1,\n \"datasource\": {\n \"type\": \"grafana\",\n "
},
{
"path": "grafana/dashboards/reports/dutch-tax.json",
"chars": 12089,
"preview": "{\n \"annotations\": {\n \"list\": [\n {\n \"builtIn\": 1,\n \"datasource\": {\n \"type\": \"grafana\",\n "
},
{
"path": "grafana/dashboards/states.json",
"chars": 14372,
"preview": "{\n \"annotations\": {\n \"list\": [\n {\n \"builtIn\": 1,\n \"datasource\": {\n \"type\": \"grafana\",\n "
},
{
"path": "grafana/dashboards/statistics.json",
"chars": 38634,
"preview": "{\n \"annotations\": {\n \"list\": [\n {\n \"builtIn\": 1,\n \"datasource\": {\n \"type\": \"grafana\",\n "
},
{
"path": "grafana/dashboards/timeline.json",
"chars": 31349,
"preview": "{\n \"annotations\": {\n \"list\": [\n {\n \"builtIn\": 1,\n \"datasource\": {\n \"type\": \"grafana\",\n "
},
{
"path": "grafana/dashboards/trip.json",
"chars": 84085,
"preview": "{\n \"annotations\": {\n \"list\": [\n {\n \"builtIn\": 1,\n \"datasource\": {\n \"type\": \"grafana\",\n "
},
{
"path": "grafana/dashboards/updates.json",
"chars": 16615,
"preview": "{\n \"annotations\": {\n \"list\": [\n {\n \"builtIn\": 1,\n \"datasource\": {\n \"type\": \"grafana\",\n "
},
{
"path": "grafana/dashboards/vampire-drain.json",
"chars": 19366,
"preview": "{\n \"annotations\": {\n \"list\": [\n {\n \"builtIn\": 1,\n \"datasource\": {\n \"type\": \"grafana\",\n "
},
{
"path": "grafana/dashboards/visited.json",
"chars": 14258,
"preview": "{\n \"annotations\": {\n \"list\": [\n {\n \"builtIn\": 1,\n \"datasource\": {\n \"type\": \"grafana\",\n "
},
{
"path": "grafana/dashboards.sh",
"chars": 14805,
"preview": "#!/usr/bin/env bash\n\n# The script requires an API token. See\n# https://grafana.com/docs/grafana-cloud/security-and-accou"
},
{
"path": "grafana/dashboards.yml",
"chars": 714,
"preview": "apiVersion: 1\n\nproviders:\n - name: \"teslamate\"\n orgId: 1\n folder: TeslaMate\n folderUid: Nr4ofiDZk\n type: fi"
},
{
"path": "grafana/datasource.yml",
"chars": 409,
"preview": "apiVersion: 1\n\ndatasources:\n - name: TeslaMate\n type: postgres\n url: $DATABASE_HOST:$DATABASE_PORT\n user: $DAT"
},
{
"path": "lib/tesla_api/auth/refresh.ex",
"chars": 1111,
"preview": "defmodule TeslaApi.Auth.Refresh do\n import TeslaApi.Auth, only: [post: 2]\n\n alias TeslaApi.{Auth, Error}\n\n @web_clien"
},
{
"path": "lib/tesla_api/auth.ex",
"chars": 2892,
"preview": "defmodule TeslaApi.Auth do\n use Tesla\n\n alias TeslaApi.Error\n\n @web_client_id \"ownerapi\"\n @redirect_uri \"https://aut"
},
{
"path": "lib/tesla_api/error.ex",
"chars": 1025,
"preview": "defmodule TeslaApi.Error do\n defexception [:reason, :message, :env]\n\n @impl true\n def message(%__MODULE__{message: me"
},
{
"path": "lib/tesla_api/middleware/follow_redirects.ex",
"chars": 3535,
"preview": "defmodule TeslaApi.Middleware.FollowRedirects do\n @moduledoc \"\"\"\n Follow 3xx redirects\n\n Source: https://github.com/t"
},
{
"path": "lib/tesla_api/middleware/token_auth.ex",
"chars": 335,
"preview": "defmodule TeslaApi.Middleware.TokenAuth do\n @behaviour Tesla.Middleware\n\n @impl Tesla.Middleware\n def call(%Tesla.Env"
},
{
"path": "lib/tesla_api/stream/data.ex",
"chars": 1278,
"preview": "defmodule TeslaApi.Stream.Data do\n defstruct ~w(time speed odometer soc elevation est_heading est_lat est_lng power shi"
},
{
"path": "lib/tesla_api/stream.ex",
"chars": 7921,
"preview": "defmodule TeslaApi.Stream do\n use WebSockex\n\n require Logger\n alias TeslaApi.Auth\n alias __MODULE__.Data\n\n defmodul"
},
{
"path": "lib/tesla_api/vehicle/state.ex",
"chars": 15107,
"preview": "defmodule TeslaApi.Vehicle.State do\n defmodule Charge do\n defstruct [\n :charge_miles_added_rated,\n :charge"
},
{
"path": "lib/tesla_api/vehicle.ex",
"chars": 5236,
"preview": "defmodule TeslaApi.Vehicle do\n alias __MODULE__.State.{Charge, Climate, Drive, VehicleConfig, VehicleState}\n alias Tes"
},
{
"path": "lib/tesla_api.ex",
"chars": 628,
"preview": "defmodule TeslaApi do\n use Tesla\n\n @version Mix.Project.config()[:version]\n\n adapter Tesla.Adapter.Finch, name: Tesla"
},
{
"path": "lib/teslamate/api.ex",
"chars": 9132,
"preview": "defmodule TeslaMate.Api do\n use GenServer\n\n require Logger\n\n alias TeslaMate.Auth.Tokens\n alias TeslaMate.{Vehicles,"
},
{
"path": "lib/teslamate/application.ex",
"chars": 2169,
"preview": "defmodule TeslaMate.Application do\n use Application\n\n require Logger\n\n def start(_type, _args) do\n Logger.info(\"Sy"
},
{
"path": "lib/teslamate/auth/tokens.ex",
"chars": 442,
"preview": "defmodule TeslaMate.Auth.Tokens do\n use Ecto.Schema\n\n import Ecto.Changeset\n\n alias TeslaMate.Vault.Encrypted\n\n @sch"
},
{
"path": "lib/teslamate/auth.ex",
"chars": 1349,
"preview": "defmodule TeslaMate.Auth do\n @moduledoc \"\"\"\n The Auth context.\n \"\"\"\n\n import Ecto.Query, warn: false\n require Logge"
},
{
"path": "lib/teslamate/convert.ex",
"chars": 1854,
"preview": "defmodule TeslaMate.Convert do\n @km_factor 0.62137119223733\n @km_factor_d Decimal.from_float(@km_factor)\n @ft_factor "
},
{
"path": "lib/teslamate/custom_expressions.ex",
"chars": 2573,
"preview": "defmodule TeslaMate.CustomExpressions do\n import Ecto.Query, warn: false\n\n defmacro c_if(condition, do: do_clause, els"
},
{
"path": "lib/teslamate/database_check.ex",
"chars": 2131,
"preview": "defmodule TeslaMate.DatabaseCheck do\n require Logger\n\n alias Ecto.Adapters.SQL\n alias TeslaMate.Repo\n\n defmodule Ver"
},
{
"path": "lib/teslamate/dependency.ex",
"chars": 161,
"preview": "defmodule Core.Dependency do\n def call(m, f, a \\\\ [])\n def call({m, a}, fun, args), do: apply(m, fun, [a] ++ args)\n d"
},
{
"path": "lib/teslamate/http.ex",
"chars": 2563,
"preview": "defmodule TeslaMate.HTTP do\n require Logger\n\n def pools do\n nominatim_proxy =\n case build_proxy_opts_from_env("
},
{
"path": "lib/teslamate/import/csv.ex",
"chars": 661,
"preview": "defmodule TeslaMate.Import.CSV do\n NimbleCSV.define(Parser, separator: \",\", escape: \"\\\"\", newlines: [\"\\r\\n\", \"\\n\"])\n\n "
},
{
"path": "lib/teslamate/import/fake_api.ex",
"chars": 5010,
"preview": "defmodule TeslaMate.Import.FakeApi do\n use GenServer\n\n require Logger\n\n alias TeslaApi.Vehicle\n\n defmodule State do\n"
},
{
"path": "lib/teslamate/import/line_parser.ex",
"chars": 4244,
"preview": "defmodule TeslaMate.Import.LineParser do\n use Timex\n\n require Logger\n\n alias TeslaApi.Vehicle.State.{Charge, Climate,"
},
{
"path": "lib/teslamate/import.ex",
"chars": 8839,
"preview": "defmodule TeslaMate.Import do\n use GenStateMachine\n\n require Logger\n\n alias TeslaMate.Settings.CarSettings\n alias Te"
},
{
"path": "lib/teslamate/locations/address.ex",
"chars": 1213,
"preview": "defmodule TeslaMate.Locations.Address do\n use Ecto.Schema\n import Ecto.Changeset\n\n schema \"addresses\" do\n field :c"
},
{
"path": "lib/teslamate/locations/geo_fence.ex",
"chars": 978,
"preview": "defmodule TeslaMate.Locations.GeoFence do\n use Ecto.Schema\n\n import Ecto.Changeset\n\n schema \"geofences\" do\n field "
},
{
"path": "lib/teslamate/locations/geocoder.ex",
"chars": 4835,
"preview": "defmodule TeslaMate.Locations.Geocoder do\n use Tesla, only: [:get]\n\n @version Mix.Project.config()[:version]\n\n adapte"
},
{
"path": "lib/teslamate/locations.ex",
"chars": 7457,
"preview": "defmodule TeslaMate.Locations do\n @moduledoc \"\"\"\n The Locations context.\n \"\"\"\n\n require Logger\n\n import Ecto.Query,"
},
{
"path": "lib/teslamate/log/car.ex",
"chars": 1251,
"preview": "defmodule TeslaMate.Log.Car do\n use Ecto.Schema\n import Ecto.Changeset\n\n alias TeslaMate.Log.{ChargingProcess, Positi"
},
{
"path": "lib/teslamate/log/charge.ex",
"chars": 1988,
"preview": "defmodule TeslaMate.Log.Charge do\n use Ecto.Schema\n import Ecto.Changeset\n\n alias TeslaMate.Log.ChargingProcess\n\n sc"
},
{
"path": "lib/teslamate/log/charging_process.ex",
"chars": 1980,
"preview": "defmodule TeslaMate.Log.ChargingProcess do\n use Ecto.Schema\n import Ecto.Changeset\n\n alias TeslaMate.Locations.{Addre"
},
{
"path": "lib/teslamate/log/drive.ex",
"chars": 2201,
"preview": "defmodule TeslaMate.Log.Drive do\n use Ecto.Schema\n import Ecto.Changeset\n\n alias TeslaMate.Locations.{Address, GeoFen"
},
{
"path": "lib/teslamate/log/position.ex",
"chars": 2316,
"preview": "defmodule TeslaMate.Log.Position do\n use Ecto.Schema\n import Ecto.Changeset\n\n alias TeslaMate.Log.{Car, Drive}\n\n sch"
},
{
"path": "lib/teslamate/log/state.ex",
"chars": 799,
"preview": "defmodule TeslaMate.Log.State do\n use Ecto.Schema\n import Ecto.Changeset\n\n alias TeslaMate.Log.Car\n\n schema \"states\""
},
{
"path": "lib/teslamate/log/update.ex",
"chars": 604,
"preview": "defmodule TeslaMate.Log.Update do\n use Ecto.Schema\n import Ecto.Changeset\n\n alias TeslaMate.Log.Car\n\n schema \"update"
},
{
"path": "lib/teslamate/log.ex",
"chars": 20863,
"preview": "defmodule TeslaMate.Log do\n @moduledoc \"\"\"\n The Log context.\n \"\"\"\n\n require Logger\n\n import TeslaMate.CustomExpress"
},
{
"path": "lib/teslamate/mqtt/handler.ex",
"chars": 589,
"preview": "defmodule TeslaMate.Mqtt.Handler do\n use Tortoise311.Handler\n\n require Logger\n\n @impl true\n def connection(:up, stat"
},
{
"path": "lib/teslamate/mqtt/publisher.ex",
"chars": 1251,
"preview": "defmodule TeslaMate.Mqtt.Publisher do\n use GenServer\n\n require Logger\n\n @name __MODULE__\n @timeout :timer.seconds(10"
},
{
"path": "lib/teslamate/mqtt/pubsub/vehicle_subscriber.ex",
"chars": 6719,
"preview": "defmodule TeslaMate.Mqtt.PubSub.VehicleSubscriber do\n use GenServer\n\n require Logger\n import Core.Dependency, only: ["
},
{
"path": "lib/teslamate/mqtt/pubsub.ex",
"chars": 437,
"preview": "defmodule TeslaMate.Mqtt.PubSub do\n use Supervisor\n\n alias __MODULE__.VehicleSubscriber\n alias TeslaMate.Vehicles\n\n "
},
{
"path": "lib/teslamate/mqtt.ex",
"chars": 1428,
"preview": "defmodule TeslaMate.Mqtt do\n use Supervisor\n\n alias __MODULE__.{Publisher, PubSub, Handler}\n\n # API\n\n def start_link"
},
{
"path": "lib/teslamate/release.ex",
"chars": 817,
"preview": "defmodule TeslaMate.Release do\n @app :teslamate\n\n import Ecto.Query\n alias TeslaMate.Repo\n\n def migrate do\n for r"
},
{
"path": "lib/teslamate/repair.ex",
"chars": 3684,
"preview": "defmodule TeslaMate.Repair do\n use GenServer\n\n require Logger\n import Ecto.Query\n\n alias TeslaMate.Log.{Drive, Posit"
},
{
"path": "lib/teslamate/repo.ex",
"chars": 110,
"preview": "defmodule TeslaMate.Repo do\n use Ecto.Repo,\n otp_app: :teslamate,\n adapter: Ecto.Adapters.Postgres\nend\n"
},
{
"path": "lib/teslamate/settings/car_settings.ex",
"chars": 865,
"preview": "defmodule TeslaMate.Settings.CarSettings do\n use Ecto.Schema\n import Ecto.Changeset\n\n alias TeslaMate.Log.Car\n\n sche"
},
{
"path": "lib/teslamate/settings/global_settings.ex",
"chars": 3330,
"preview": "defmodule TeslaMate.Settings.GlobalSettings do\n use Ecto.Schema\n import Ecto.Changeset\n\n schema \"settings\" do\n fie"
},
{
"path": "lib/teslamate/settings.ex",
"chars": 2696,
"preview": "defmodule TeslaMate.Settings do\n @moduledoc \"\"\"\n The Settings context.\n \"\"\"\n\n import Ecto.Query, warn: false\n alias"
},
{
"path": "lib/teslamate/terrain.ex",
"chars": 5774,
"preview": "defmodule TeslaMate.Terrain do\n use GenStateMachine\n\n require Logger\n import Core.Dependency, only: [call: 3]\n alias"
},
{
"path": "lib/teslamate/updater.ex",
"chars": 3355,
"preview": "defmodule TeslaMate.Updater do\n use GenServer\n use Tesla, only: [:get]\n\n require Logger\n\n @version Mix.Project.confi"
},
{
"path": "lib/teslamate/vault.ex",
"chars": 4338,
"preview": "defmodule TeslaMate.Vault do\n use Cloak.Vault,\n otp_app: :teslamate\n\n defmodule Encrypted.Binary do\n use Cloak.E"
},
{
"path": "lib/teslamate/vehicles/vehicle/summary.ex",
"chars": 10982,
"preview": "defmodule TeslaMate.Vehicles.Vehicle.Summary do\n import TeslaMate.Convert, only: [miles_to_km: 2, mph_to_kmh: 1]\n\n ali"
},
{
"path": "lib/teslamate/vehicles/vehicle.ex",
"chars": 60436,
"preview": "defmodule TeslaMate.Vehicles.Vehicle do\n use GenStateMachine\n\n require Logger\n\n alias __MODULE__.Summary\n alias Tesl"
},
{
"path": "lib/teslamate/vehicles.ex",
"chars": 3768,
"preview": "defmodule TeslaMate.Vehicles do\n use Supervisor\n\n require Logger\n\n alias __MODULE__.Vehicle\n alias TeslaMate.Setting"
},
{
"path": "lib/teslamate.ex",
"chars": 255,
"preview": "defmodule TeslaMate do\n @moduledoc \"\"\"\n TeslaMate keeps the contexts that define your domain\n and business logic.\n\n "
},
{
"path": "lib/teslamate_web/cldr.ex",
"chars": 315,
"preview": "defmodule TeslaMateWeb.Cldr do\n use Cldr,\n gettext: TeslaMateWeb.Gettext,\n locales: [],\n otp_app: :teslamate,\n"
},
{
"path": "lib/teslamate_web/controllers/car_controller.ex",
"chars": 1910,
"preview": "defmodule TeslaMateWeb.CarController do\n use TeslaMateWeb, :controller\n\n require Logger\n import Phoenix.LiveView.Cont"
},
{
"path": "lib/teslamate_web/controllers/drive_controller.ex",
"chars": 731,
"preview": "defmodule TeslaMateWeb.DriveController do\n use TeslaMateWeb, :controller\n\n require Logger\n import Ecto.Query\n\n alias"
},
{
"path": "lib/teslamate_web/controllers/fallback_controller.ex",
"chars": 603,
"preview": "defmodule TeslaMateWeb.FallbackController do\n @moduledoc \"\"\"\n Translates controller action results into valid `Plug.Co"
},
{
"path": "lib/teslamate_web/endpoint.ex",
"chars": 1137,
"preview": "defmodule TeslaMateWeb.Endpoint do\n use Phoenix.Endpoint, otp_app: :teslamate\n\n @session_options [\n store: :cookie,"
},
{
"path": "lib/teslamate_web/gettext.ex",
"chars": 740,
"preview": "defmodule TeslaMateWeb.Gettext do\n @moduledoc \"\"\"\n A module providing Internationalization with a gettext-based API.\n\n"
},
{
"path": "lib/teslamate_web/health_check.ex",
"chars": 251,
"preview": "defmodule TeslaMateWeb.HealthCheck do\n import Plug.Conn\n\n def init(opts), do: opts\n\n def call(%Plug.Conn{request_path"
},
{
"path": "lib/teslamate_web/live/car_live/index.ex",
"chars": 1100,
"preview": "defmodule TeslaMateWeb.CarLive.Index do\n use TeslaMateWeb, :live_view\n\n require Logger\n\n alias TeslaMate.{Settings, V"
},
{
"path": "lib/teslamate_web/live/car_live/index.html.heex",
"chars": 226,
"preview": "<%= for summary <- @summaries do %>\n <%= live_render(@socket, TeslaMateWeb.CarLive.Summary,\n id: \"car_#{summary.car."
},
{
"path": "lib/teslamate_web/live/car_live/summary.ex",
"chars": 5271,
"preview": "defmodule TeslaMateWeb.CarLive.Summary do\n use TeslaMateWeb, :live_view\n\n use Gettext, backend: TeslaMateWeb.Gettext\n\n"
},
{
"path": "lib/teslamate_web/live/car_live/summary.html.heex",
"chars": 18146,
"preview": "<div class=\"car card\">\n <div class=\"card-image\">\n <figure\n id={\"map_#{@car.id}_container\"}\n data-id={@car."
},
{
"path": "lib/teslamate_web/live/charge_live/cost.ex",
"chars": 3547,
"preview": "defmodule TeslaMateWeb.ChargeLive.Cost do\n use TeslaMateWeb, :live_view\n\n require Logger\n\n alias TeslaMate.Locations."
},
{
"path": "lib/teslamate_web/live/charge_live/cost.html.heex",
"chars": 6104,
"preview": "<nav class=\"breadcrumb\" aria-label=\"breadcrumbs\">\n <ul>\n <li><.link navigate={~p\"/\"}><%= gettext(\"Home\") %></.link><"
},
{
"path": "lib/teslamate_web/live/geofence_live/form.ex",
"chars": 5737,
"preview": "defmodule TeslaMateWeb.GeoFenceLive.Form do\n use TeslaMateWeb, :live_view\n\n require Logger\n\n alias TeslaMateWeb.GeoFe"
},
{
"path": "lib/teslamate_web/live/geofence_live/form.html.heex",
"chars": 5473,
"preview": "<nav class=\"breadcrumb\" aria-label=\"breadcrumbs\">\n <ul>\n <li><.link navigate={~p\"/\"}><%= gettext(\"Home\") %></.link><"
},
{
"path": "lib/teslamate_web/live/geofence_live/index.ex",
"chars": 988,
"preview": "defmodule TeslaMateWeb.GeoFenceLive.Index do\n use TeslaMateWeb, :live_view\n\n alias TeslaMate.{Locations, Settings}\n a"
},
{
"path": "lib/teslamate_web/live/geofence_live/index.html.heex",
"chars": 2512,
"preview": "<nav class=\"breadcrumb\" aria-label=\"breadcrumbs\">\n <ul>\n <li><.link navigate={~p\"/\"}><%= gettext(\"Home\") %></.link><"
},
{
"path": "lib/teslamate_web/live/import_live/index.ex",
"chars": 2021,
"preview": "defmodule TeslaMateWeb.ImportLive.Index do\n use TeslaMateWeb, :live_view\n\n defmodule Settings do\n use Ecto.Schema\n "
},
{
"path": "lib/teslamate_web/live/import_live/index.html.heex",
"chars": 3619,
"preview": "<nav class=\"breadcrumb\" aria-label=\"breadcrumbs\">\n <ul>\n <li><.link navigate={~p\"/\"}><%= gettext(\"Home\") %></.link><"
},
{
"path": "lib/teslamate_web/live/init_assigns.ex",
"chars": 328,
"preview": "defmodule TeslaMateWeb.InitAssigns do\n @moduledoc \"\"\"\n Ensures common `assigns` are applied to all LiveViews attaching"
},
{
"path": "lib/teslamate_web/live/settings_live/index.ex",
"chars": 5509,
"preview": "defmodule TeslaMateWeb.SettingsLive.Index do\n use TeslaMateWeb, :live_view\n\n require Logger\n\n alias TeslaMate.Setting"
},
{
"path": "lib/teslamate_web/live/settings_live/index.html.heex",
"chars": 15146,
"preview": "<nav class=\"breadcrumb\" aria-label=\"breadcrumbs\">\n <ul>\n <li><.link navigate={~p\"/\"}><%= gettext(\"Home\") %></.link><"
},
{
"path": "lib/teslamate_web/live/signin_live/index.ex",
"chars": 2150,
"preview": "defmodule TeslaMateWeb.SignInLive.Index do\n use TeslaMateWeb, :live_view\n\n import Core.Dependency, only: [call: 3]\n a"
},
{
"path": "lib/teslamate_web/live/signin_live/index.html.heex",
"chars": 3294,
"preview": "<div class=\"mfa columns is-tablet is-centered\">\n <div class=\"column is-half\">\n <.form\n :let={f}\n for={@cha"
},
{
"path": "lib/teslamate_web/plugs/put_session.ex",
"chars": 901,
"preview": "defmodule TeslaMateWeb.Plugs.PutSession do\n @moduledoc \"\"\"\n Puts the CLDR and Gettext locale names in the session.\n\n "
},
{
"path": "lib/teslamate_web/router.ex",
"chars": 1608,
"preview": "defmodule TeslaMateWeb.Router do\n use TeslaMateWeb, :router\n\n alias TeslaMate.Settings\n\n pipeline :browser do\n plu"
},
{
"path": "lib/teslamate_web/templates/drive/gpx.xml.eex",
"chars": 775,
"preview": "<?xml version=\"1.0\"?>\n<gpx xmlns=\"http://www.topografix.com/GPX/1/1\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instanc"
},
{
"path": "lib/teslamate_web/templates/layout/app.html.heex",
"chars": 22,
"preview": "<%= @inner_content %>\n"
},
{
"path": "lib/teslamate_web/templates/layout/live.html.heex",
"chars": 22,
"preview": "<%= @inner_content %>\n"
},
{
"path": "lib/teslamate_web/templates/layout/root.html.heex",
"chars": 7162,
"preview": "<!DOCTYPE html>\n<html\n lang={Plug.Conn.get_session(@conn, :locale)}\n data-theme-mode={@conn.assigns.settings.theme_mod"
},
{
"path": "lib/teslamate_web/templates/layout/root.xml.eex",
"chars": 21,
"preview": "<%= @inner_content %>"
},
{
"path": "lib/teslamate_web/views/car_view.ex",
"chars": 150,
"preview": "defmodule TeslaMateWeb.CarView do\n use TeslaMateWeb, :view\n\n def render(\"command_failed.json\", %{reason: reason}) do\n "
},
{
"path": "lib/teslamate_web/views/changeset_view.ex",
"chars": 564,
"preview": "defmodule TeslaMateWeb.ChangesetView do\n use TeslaMateWeb, :view\n\n @doc \"\"\"\n Traverses and translates changeset error"
},
{
"path": "lib/teslamate_web/views/drive_view.ex",
"chars": 66,
"preview": "defmodule TeslaMateWeb.DriveView do\n use TeslaMateWeb, :view\nend\n"
},
{
"path": "lib/teslamate_web/views/error_helpers.ex",
"chars": 1592,
"preview": "defmodule TeslaMateWeb.ErrorHelpers do\n @moduledoc \"\"\"\n Conveniences for translating and building error messages.\n \"\""
},
{
"path": "lib/teslamate_web/views/error_view.ex",
"chars": 495,
"preview": "defmodule TeslaMateWeb.ErrorView do\n use TeslaMateWeb, :view\n\n # If you want to customize a particular status code\n #"
},
{
"path": "lib/teslamate_web/views/layout_view.ex",
"chars": 478,
"preview": "defmodule TeslaMateWeb.LayoutView do\n use TeslaMateWeb, :view\n\n import Phoenix.Component\n use PhoenixHTMLHelpers\n\n d"
},
{
"path": "lib/teslamate_web.ex",
"chars": 3002,
"preview": "defmodule TeslaMateWeb do\n @moduledoc \"\"\"\n The entrypoint for defining your web interface, such\n as controllers, view"
},
{
"path": "mix.exs",
"chars": 3228,
"preview": "defmodule TeslaMate.MixProject do\n use Mix.Project\n\n def project do\n [\n app: :teslamate,\n version: versio"
},
{
"path": "nix/backup_and_restore.nix",
"chars": 1214,
"preview": "{ stdenv\n, lib\n, pkgs\n, writeShellScript\n, databaseUser\n, databaseName\n, ...\n}:\nlet\n backup = writeShellScript \"teslama"
},
{
"path": "nix/flake-modules/checks.nix",
"chars": 1210,
"preview": "{ self, inputs, ... }:\n{\n perSystem =\n { self'\n , pkgs\n , lib\n , ...\n }:\n let\n inherit (inputs) "
},
{
"path": "nix/flake-modules/devenv.nix",
"chars": 3198,
"preview": "{ inputs, ... }:\n{\n imports = [\n inputs.devenv.flakeModule\n ];\n\n perSystem =\n { config\n , pkgs\n , lib\n "
},
{
"path": "nix/flake-modules/formatter.nix",
"chars": 2017,
"preview": "{ inputs, ... }:\n{\n imports = [\n inputs.treefmt-nix.flakeModule\n ];\n perSystem =\n { config, pkgs, ... }:\n {\n"
},
{
"path": "nix/flake-modules/package.nix",
"chars": 3270,
"preview": "{ ... }:\n{\n perSystem =\n { lib\n , pkgs\n , system\n , ...\n }:\n let\n elixir = pkgs.beam.packages.er"
},
{
"path": "nix/maintenance.nix",
"chars": 3608,
"preview": "{ stdenv\n, lib\n, pkgs\n, writeShellScript\n, databaseUser\n, databaseName\n, getExe\n, teslamate\n, environmentFilePath\n, ...\n"
},
{
"path": "nix/module.nix",
"chars": 11308,
"preview": "{ self }:\n{ config\n, lib\n, pkgs\n, ...\n}:\nlet\n teslamate = self.packages.${pkgs.stdenv.hostPlatform.system}.default;\n c"
},
{
"path": "priv/gettext/ca/LC_MESSAGES/default.po",
"chars": 18078,
"preview": "# # `msgid`s in this file come from POT (.pot) files.\n# #\n# # Do not add, change, or remove `msgid`s manually here as\n# "
},
{
"path": "priv/gettext/ca/LC_MESSAGES/errors.po",
"chars": 3043,
"preview": "## `msgid`s in this file come from POT (.pot) files.\n##\n## Do not add, change, or remove `msgid`s manually here as\n## th"
},
{
"path": "priv/gettext/da/LC_MESSAGES/default.po",
"chars": 20955,
"preview": "## `msgid`s in this file come from POT (.pot) files.\n##\n## Do not add, change, or remove `msgid`s manually here as\n## th"
},
{
"path": "priv/gettext/da/LC_MESSAGES/errors.po",
"chars": 2981,
"preview": "## `msgid`s in this file come from POT (.pot) files.\n##\n## Do not add, change, or remove `msgid`s manually here as\n## th"
},
{
"path": "priv/gettext/de/LC_MESSAGES/default.po",
"chars": 22802,
"preview": "## `msgid`s in this file come from POT (.pot) files.\n##\n## Do not add, change, or remove `msgid`s manually here as\n## th"
},
{
"path": "priv/gettext/de/LC_MESSAGES/errors.po",
"chars": 2163,
"preview": "## `msgid`s in this file come from POT (.pot) files.\n##\n## Do not add, change, or remove `msgid`s manually here as\n## th"
},
{
"path": "priv/gettext/default.pot",
"chars": 19612,
"preview": "## This file is a PO Template file.\n##\n## `msgid`s here are often extracted from source code.\n## Add new translations ma"
},
{
"path": "priv/gettext/en/LC_MESSAGES/default.po",
"chars": 18993,
"preview": "## `msgid`s in this file come from POT (.pot) files.\n##\n## Do not add, change, or remove `msgid`s manually here as\n## th"
},
{
"path": "priv/gettext/en/LC_MESSAGES/errors.po",
"chars": 2197,
"preview": "## `msgid`s in this file come from POT (.pot) files.\n##\n## Do not add, change, or remove `msgid`s manually here as\n## th"
},
{
"path": "priv/gettext/errors.pot",
"chars": 2225,
"preview": "## This is a PO Template file.\n##\n## `msgid`s here are often extracted from source code.\n## Add new translations manuall"
},
{
"path": "priv/gettext/es/LC_MESSAGES/default.po",
"chars": 22499,
"preview": "## `msgid`s in this file come from POT (.pot) files.\n##\n## Do not add, change, or remove `msgid`s manually here as\n## th"
},
{
"path": "priv/gettext/es/LC_MESSAGES/errors.po",
"chars": 3091,
"preview": "## `msgid`s in this file come from POT (.pot) files.\n##\n## Do not add, change, or remove `msgid`s manually here as\n## th"
},
{
"path": "priv/gettext/fi/LC_MESSAGES/default.po",
"chars": 20917,
"preview": "## This file is a PO Template file.\n##\n## `msgid`s here are often extracted from source code.\n## Add new translations ma"
},
{
"path": "priv/gettext/fi/LC_MESSAGES/errors.po",
"chars": 3013,
"preview": "## This is a PO Template file.\n##\n## `msgid`s here are often extracted from source code.\n## Add new translations manuall"
},
{
"path": "priv/gettext/fr/LC_MESSAGES/default.po",
"chars": 22757,
"preview": "## This file is a PO Template file.\n##\n## `msgid`s here are often extracted from source code.\n## Add new translations ma"
},
{
"path": "priv/gettext/fr/LC_MESSAGES/errors.po",
"chars": 3048,
"preview": "## This is a PO Template file.\n##\n## `msgid`s here are often extracted from source code.\n## Add new translations manuall"
},
{
"path": "priv/gettext/it/LC_MESSAGES/default.po",
"chars": 22593,
"preview": "## This file is a PO Template file.\n##\n## `msgid`s here are often extracted from source code.\n## Add new translations ma"
}
]
// ... and 227 more files (download for full content)
About this extraction
This page contains the full source code of the teslamate-org/teslamate GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 427 files (4.2 MB), approximately 1.1M tokens, and a symbol index with 1236 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.
Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.