Commit Graph

186 Commits

Author SHA1 Message Date
dependabot[bot]
1b89ae7fd3 build(deps): bump elixir from 1.16.2-otp-26 to 1.17.2-otp-27 (#4296)
* build(deps): bump elixir from 1.16.2-otp-26 to 1.17.2-otp-27

Bumps elixir from 1.16.2-otp-26 to 1.17.2-otp-27.

---
updated-dependencies:
- dependency-name: elixir
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* build(deps): bump elixir from 1.16.2-otp-26 to 1.17.2-otp-27 in workflow, flake and docs

* docs: update changelog

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Jakob Lichterfeld <jakob-lichterfeld@gmx.de>
2024-10-23 11:27:20 +02:00
Matthias Wirtz
93fb64e846 docs: add best practice section to contribution guide (#4288)
* add some notes about db performance to contribution guide

* add docs for usage of timestamp columns

* format prettier

* fix: remove unneeded apostrophe

---------

Co-authored-by: Jakob Lichterfeld <jakob-lichterfeld@gmx.de>
2024-10-21 16:04:13 +02:00
JakobLichterfeld
c87b8976c3 docs: add recommended RAM size (#4278)
* docs: add recommended RAM size

* docs: update changelog
2024-10-19 16:22:55 +02:00
Long Zheng
123f7ab63c docs: fix Home Assistant MQTT sensor JSON templates warnings (#4257)
* Fix Home Assistant active route MQTT sensor JSON templates

More gracefully handles JSONs with error (not actively routing)

* Fix tesla_active_route_distance_to_arrival_km sensor

* Fix template sensors

Conditionally convert values if the sensor actually has a value, to prevent converting invalid non-numeric values

* Fix copy/paste mistakes
2024-10-19 15:51:28 +02:00
JakobLichterfeld
fdf8185ce2 ci: add treefmt as code formatting multiplexer, refactor CI to avoid duplication, reorg CI into DevOps workflow (#4219)
* ci: add treefmt as code formatting multiplexer

* style: linter findings in entrypoint.sh script

* style: linter findings for yaml and yml

* style: linter findings for json files

* style: linter findings for nix files

* style: linter findings for js files

* style: linter findings for dashboards.sh

* style: linter findings for md and mdx files

* chore: remove unused clang formatter in treefmt config

* style: linter findings for mdx files

* ci: exclude Grafana dashboard JSON files from prettier formatting

* Revert "style: linter findings for json files"

This reverts commit f40c2e175992f66f887a3f4fc5aa1a1a89393147.

* ci: exclude Grafana dashboard JSON files from all formatting as we use the grafana export style

* style: linter findings for json files

* doc: update changelog

* ci(refactor): use composite action to avoid duplication in elixir workflow

* doc: update changelog

* ci: prevent workflow runs for certain conditions and allow scheduled runs

* ci(refactor): use reusable workflow to check paths

* ci(fix): correct output syntax for check_paths workflow and setting base branch

* ci(refactor): use reusable workflows for streamlined DevOps pipeline

* ci(fix): add write permission for packages in DevOps workflow

* ci(test): test DevOps workflow

* ci(test): test DevOps workflow

* ci(fix): Update condition for spell_check, ensure_linting, elixir, and ghcr_build workflows to reflect empty result instead of false

* ci: revert test DevOps

* ci(refactor): allow ghcr_build parallel to elixir test

* ci(refactor): Remove redundant check_paths job from elixir.yml, elixir_test.yml, and spell_check.yml workflows, check is done in devops.yml

* feat: add treefmt-nix to nix flake (#4219 - @JakobLichterfeld)

* ci: ensure proper linting via treefmt

* ci(test): test ensure_linting workflow

* ci(fix): checkout code for spell_checker to access file to check

* ci(fix): allow impure in ensure_linting workflow

* Revert "ci(test): test ensure_linting workflow"

This reverts commit a67b17ec098a628a8b093ec20b34b0e2696811cc.

* ci(fix): correct use of flake-utils for formatter and checks

Co-authored-by: scottbot95 <scottbot95@gmail.com>

* ci(fix): correct use of flake-utils for treefmt

Co-authored-by: scottbot95 <scottbot95@gmail.com>

* refactor: Remove unnecessary imports in flake

* ci(fix): correct syntax in flake

* ci(refactor): Remove unused code in flake.nix

* style: standardised style for input url in flake

* ci(fix): treefmt-nix config with existing options

* ci(feat): Add Nix binary cache and update treefmt command in CI workflow

* ci(refactor): Remove unused code in flake.nix

* fix: include devShell packages only on supported platforms

* fix: update hash for mix-deps package in flake.nix

* ci(fix): Update treefmt command in CI workflow

* ci(test): test ensure_linting workflow

* feat: ensure mix deps are present in devShell

* ci(feat): use flake-parts to enable treefmt-nix

* feat: use flake-parts

* fix: correct use of flake-parts for package build

* doc: update CI badge URL for devops workflow

* ci(fix): handle empty path filter output

* ci: remove --impure flag from treefmt command in CI workflow

* fix: correct treefmt.config settings in formatter.nix

* fix: correct flake-parts inputs, avoid with in imports

* fix: correct program name for mix-format in formatter.nix

* feat: devenv via flake-parts

* fix: correct use of legacy nix code with flake-parts

* ci(fix): correct nix develop command in ensure_linting.yml

* refactor: list imports explicitly in flake, rename folder to flake-modules to be precise

* style: use tabs for indent size to format sh

* style: use nixfmt-rfc-style

* Revert "style: use nixfmt-rfc-style"

This reverts commit 082056159e611c2c0639f8b4dc509446f5308a92.

* style: use nixfmt style

* fix: remove glibcLocales from optional dependencies to avoid  "A definition for option `packages."[definition 4-entry 16]"' is not of type `package'."

* fix: remove inotify-tools from optional dependencies to avoid  "A definition for option `packages."[definition 4-entry 16]"' is not of type `package'."

* fix: Remove inotify-tools and glibcLocales from optional dependencie

* fix: correct file paths in flake.nix to version

* fix: add ELIXIR_ERL_OPTIONS to shell environment to force utf8 locale

* fix: add LOCALE_ARCHIVE to shell environment in flake.nix

* Revert "fix: add LOCALE_ARCHIVE to shell environment in flake.nix"

This reverts commit d45f6e32eea1fcaf55cd03733e648cda4dbb764b.

* ci(refactor): rename workflow to elixir_dep_verification_and_static_analysis.yml to better reflect the intention,, remove duplicate checks

* ci(debug): debug locale settings

* Revert "ci(debug): debug locale settings"

This reverts commit 9b402f3c5f9b41ff4716dc4fc99f711fc9ef8135.

* Revert "fix: add ELIXIR_ERL_OPTIONS to shell environment to force utf8 locale"

This reverts commit d02419cba44055d55978ad36d23493d8790ce21b.

* fix: add LOCALE_ARCHIVE to shell environment in flake.nix

* Revert "fix: add LOCALE_ARCHIVE to shell environment in flake.nix"

This reverts commit 761b437e699d8381a0726dd969052b1e85c3f08f.

* fix: add LANG=C.UTF-8 to shell environment in flake.nix

* fix: add mix local.rebar and mix local.hex commands to flake.nix

* fix: pin devenv to version without unix socket bug

* chore: update nixpkgs to nixos-24.05 and update dependencies

* doc: add treefmt config comments

* ci: do not expose treefmt formatter programs in devshell

* fix: correct use of module option to enable PostgreSQL server in flake.nix

* Revert "chore: update nixpkgs to nixos-24.05 and update dependencies"

This reverts commit a6ea3f25aa393c32d9c2494b21e6330de2482496.

* feat: consistent use of erlang 26 and elixir 1_16 in flake

* ci: switch to macOS runner for linting workflow

* Revert "ci: do not expose treefmt formatter programs in devshell"

This reverts commit 1ecfa451dcf4199554a5d96d241ee846601862d9.

* Revert "ci: switch to macOS runner for linting workflow"

This reverts commit 7b430667d8737e5adf91f5ba59bbf83eb15bcb7a.

* ci: Remove nixpkgs channel specification in ensure_linting workflow

* ci(debug): Add debug output for PATH and NIX_PATH in flake.nix

* Revert "ci(debug): Add debug output for PATH and NIX_PATH in flake.nix"

This reverts commit 07faec5ddf88195969f89f3e74791d030c980b03.

* fix: avoid the need for impure for devenv

see #4245

* fix: remove invalid custom build.check for formatter and use default

* style: linter findings

* fix: Add emptyTest to avoid nix flake check test execution on non-Linux systems

* chore: Remove LANG=C.UTF-8 from enterShell in flake.nix

* ci(fix): Remove --impure flag from treefmt command in CI mode

* ci(fix): avoid impure mode in ensure_linting workflow

* style: linter findings

* ci(debug): debug elixir version and locale

* chore: Update flake.lock dependencies

* feat: use newer devenv as unix socket bug is fixed in upstream

https://github.com/cachix/devenv/issues/1497

* fix: set rebar3 path in devenv

* Revert "ci(debug): debug elixir version and locale"

This reverts commit 7ecdc77c163cd6ef9c913689c1f75e86ce8587cb.

* ci: re-enable path check in DevOps workflow

* doc: update Development and Contributing guide with nix and treefmt

* ci: use PostgreSQL 17

* style: linter findings

* ci(fix): ensure cache name in build action does not contain invalid characters to avoid invalid reference format

* doc: update changelog

* Revert "ci(fix): ensure cache name in build action does not contain invalid characters to avoid invalid reference format"

This reverts commit 02abb0359db4f22e5a28283476b3ced0d99729ff.

* ci: remove branch restriction for check_paths workflow to increase sec

* ci(fix): run ghcr build workflow only for specific conditions

- Ensure workflow only run if there are no changes to the .github folder
- Allow workflow to run on workflow call or PRs from forks
- Prevent duplicate runs for PRs from non-forks
- Avoid invalid reference format for cache name in PRs from our repository

* doc: update changelog

* fix: update hash for mix-deps package in flake.nix

* fix: disable flakeCheck for formatter, as mix format need the dep to be fetched beforehand

* ci(fix): run ghcr build workflow only for specific conditions

* fix: move nixosModules.default to top-level attribute set

* refactor: remove unnecessary config nesting in formatter.nix

* ci(fix): ensure version for buildx is set to correct name

---------

Co-authored-by: scottbot95 <scottbot95@gmail.com>
2024-10-14 08:54:10 +02:00
Matthias Wirtz
c67573e708 feat: PostgreSQL 17 (#4231) 2024-09-29 11:17:31 +02:00
JakobLichterfeld
fedb206f50 doc: clarify using fleet api has lots of drawbacks (#4173)
* doc: fix markdownlint warnings in fleet api documentation

* doc: update changelog

* doc: clarify using fleet api has lots of drawbacks
2024-08-31 16:32:15 +02:00
Juan Carlos Heredia
cdd489fb53 doc: Update screenshots and rearrange links (#4151) 2024-08-22 18:25:57 +02:00
Herman van Rink
94da8f6d92 doc: align TPMS Pressure naming in sensor config to match ui config for home assistant (#4104) 2024-07-29 11:14:55 +02:00
yangiak
92baa5a330 doc: add steps to the guide regarding how to switch to Fleet API (#4103)
* Added steps to the guide regarding how to switching from Owners API to Fleet API from my experience

* minor heading change adopted

---------

Co-authored-by: Yangkai Lyu <lyk119@gmail.com>
2024-07-28 09:21:19 +02:00
JakobLichterfeld
a36610e2bd build: update website dependencies, doc: fix markdown linter warnings in faq (#4046)
* chore: update @docusaurus/core and @docusaurus/preset-classic dependencies to v3.4.0

* Revert "chore: update @docusaurus/core and @docusaurus/preset-classic dependencies to v3.4.0"

This reverts commit d5b38711a10e385d745f7860f3ffdd1527dfcca0.

* chore: npm audit fix

* chore: update @docusaurus/core and @docusaurus/preset-classic dependencies to v3.4.0 and react and react-dom to 18.3.1

* build: specify node.js version for Netlify

* doc: fix markdown linter warnings to trigger new Netlify build

* build: specify node.js version for Netlify in base dir

* doc: update changelog

* build: specify node.js version for Netlify in base dir as major version

* build: specify node.js version for Netlify in base dir as latest lts major version

* doc: update changelog
2024-07-06 15:15:14 +02:00
JakobLichterfeld
4a32f6eb28 doc: fix typo in MQTT location JSON format (#4047)
* doc: fix typo in MQTT location JSON format

* doc: fix typo in MQTT location JSON format
2024-07-06 14:47:13 +02:00
Atrox
21439f1a14 publish center_display_state to mqtt (#3813) 2024-07-05 16:55:03 +02:00
JakobLichterfeld
be00a2e9f3 doc: Add Grafana VS Code extension documentation (#4025)
* doc: Add Grafana VS Code extension documentation

* doc: update changelog
2024-07-02 18:42:41 +02:00
jlestel
2ca545aea3 doc: Documentation for new endpoint changes (#3978)
* Update docs

* Update for streaming

* Update guides and add a reference in the project page

* Update for readability

* readability

* format

* update fleet api price

* Update direct Tesla API part

---------

Co-authored-by: Julien <julien@citio.digital>
2024-07-02 15:47:29 +02:00
jlestel
c8159cfc51 Customize intervals between vehicle_data calls (#3940)
* feat: endpoints by env

* fix: typo

* fix: useless env

* fix: format

* fix: distinct auth domain and url

* format

* fix: force issuer url if needed

* feat: new streaming based on vin

* fix refresh

* revert

* up

* feat: no need for access token / refresh token if the TOKEN env var is present

* feat: update login if token env var exists

* feat: add ENV var to allow insecure wss

* fix: remove TESLA_CN

* fix(naming): TESLA_API_URL to TESLA_API_DOMAIN

* feat: add an env var to allo invalid certs on WSS

* doc: add API domains env vars description

* fix: typo

* feat: add env var to change log level

* fix: APP_LOG_LEVEL

* feat: add TOKEN documention and wording

* fix: refacto insecure param

* feat: naming and doc

* fix: missing env var usage

* fix: rebound variable issuer_url

* fix: compilation warning on the issuer_url variable

* fix: format code

* fix: issuer_url assignments

* feat: customize polling intervals

* typo

* update doc

* typo

* add online interval

* add POLLING_ONLINE_INTERVAL

* format

* add minimum interval

* Add minimum on fetch parameter

* typo

* format

* respect immediate fetch, add charging interval

* add log level

* Respect log_level

* format

* use LOG_LEVEL env var to facilitate debug

* revert on log_level

* format

* typo

* format again

* revert on default error intervals

* Add a note in MD about polling settings

* not let the user set intervals via env variables shorter than our defaults

---------

Co-authored-by: Julien <julien@citio.digital>
2024-07-02 15:36:46 +02:00
JakobLichterfeld
feede9b8da doc: update the Contributor's Guide with the latest requirements (#4017)
* doc: update the Contributor's Guide with the latest requirements

* doc: update changelog
2024-06-30 13:24:12 +02:00
jlestel
2c4639e32d feat: allow Fleet API users to change client_id (#3984)
Co-authored-by: Julien <julien@citio.digital>
2024-06-26 10:58:31 +02:00
Saswat Padhi
195433c319 Track open/close states for individual doors (#3962)
* feat: track open/close states for individual doors

* doc: add individual door open states
2024-06-19 10:28:19 +02:00
Olex S
be2609c475 doc: fix MMM-Teslamate and ha-addon-teslamate project links (#3973)
Fixes an incorrect change made in #3953
2024-06-18 19:03:29 +02:00
JakobLichterfeld
eaa518d8a5 doc: remove outdated, unsupported, unmaintained portainer doc (#3972)
* doc:remove outdated, unmaintained portainer doc

* doc: Remove unmaintained Portainer documentation

* doc: update changelog
2024-06-18 19:01:49 +02:00
top-gun
8876759df8 Update projects.md mit new MMM (#3953)
MMM-Teslamate has a new maintainer, updated the link to the new repo
2024-06-11 08:36:02 +02:00
FL42
0dec13ca9c Add network flows that should be authorized (#3886) 2024-06-09 09:28:37 +02:00
Long Zheng
55baa5e3dc Update HomeAssistant docs to use new MQTT values (#3923)
* Update HomeAssistant docs to use new MQTT values

* Update name to `mi`

* Update website/docs/integrations/home_assistant.md
2024-05-30 15:03:51 +02:00
Long Zheng
5b029bc043 Update MQTT examples of location/active_route (#3919) 2024-05-30 14:25:09 +02:00
jlestel
4313409323 feat: Dynamic endpoints and token to use official Tesla API (self-hosted or from third party provider) (#3903)
* feat: endpoints by env

* fix: typo

* fix: useless env

* fix: format

* fix: distinct auth domain and url

* format

* fix: force issuer url if needed

* feat: new streaming based on vin

* fix refresh

* revert

* up

* feat: no need for access token / refresh token if the TOKEN env var is present

* feat: update login if token env var exists

* feat: add ENV var to allow insecure wss

* fix: remove TESLA_CN

* fix(naming): TESLA_API_URL to TESLA_API_DOMAIN

* feat: add an env var to allo invalid certs on WSS

* doc: add API domains env vars description

* fix: typo

* feat: add env var to change log level

* fix: APP_LOG_LEVEL

* feat: add TOKEN documention and wording

* fix: refacto insecure param

* feat: naming and doc

* fix: missing env var usage

* fix: rebound variable issuer_url

* fix: compilation warning on the issuer_url variable

* fix: format code

* fix: issuer_url assignments

---------

Co-authored-by: Julien <julien@citio.digital>
2024-05-27 11:03:23 +02:00
Daniel Hansson
95d899dec7 feat: Upgrade PostgreSQL to v16 (#3884)
* Upgrade PostgreSQL to v16

Just tested, and seems to work!

* also add `pg_dumpall` as default command for backup

* revert pg_dumpall

* further version change

* further version change
2024-05-25 09:08:20 +02:00
Wilfried Chauveau
0db778e06c feat: Update TeslaFi importer to accept newer export formats (#3431)
* Update TeslaFi importer to accept newer export formats

* Update documentation
2024-05-24 09:01:50 +02:00
JakobLichterfeld
69b0b40a0d doc: update backup path location to current directory to work around no write access to placeholder directory issue (#3908)
* doc: update backup path location to current directory to work around no write access to placeholder directory issue

* doc: update changelog
2024-05-23 11:55:21 +02:00
Jakob Lichterfeld
10995a3ce5 Revert "Dynamic endpoints and token to use official Tesla API (self-hosted or from third party provider) (#3866)"
This reverts commit 263f207dc9.
2024-05-20 14:07:26 +02:00
jlestel
263f207dc9 Dynamic endpoints and token to use official Tesla API (self-hosted or from third party provider) (#3866)
* feat: endpoints by env

* fix: typo

* fix: useless env

* fix: format

* fix: distinct auth domain and url

* format

* fix: force issuer url if needed

* feat: new streaming based on vin

* fix refresh

* revert

* up

* feat: no need for access token / refresh token if the TOKEN env var is present

* feat: update login if token env var exists

* feat: add ENV var to allow insecure wss

* fix: remove TESLA_CN

* fix(naming): TESLA_API_URL to TESLA_API_DOMAIN

* feat: add an env var to allo invalid certs on WSS

* doc: add API domains env vars description

* fix: typo

* feat: add env var to change log level

* fix: APP_LOG_LEVEL

* feat: add TOKEN documention and wording

* fix: refacto insecure param

* feat: naming and doc

* fix: missing env var usage

---------

Co-authored-by: Julien <julien@citio.digital>
2024-05-20 13:11:13 +02:00
spinecho31
1f2e6240bc Update teslafi.md (#3872)
Specifing the importance of the TeslaFixxxxx.csv filename.
2024-04-28 08:53:48 +02:00
JakobLichterfeld
a0ad5c4276 doc: add testing with ci build docker images to contributing guide (#3856)
* doc: add testing with ci build docker images to contributing guide

* doc: update changelog
2024-04-17 15:33:39 +02:00
JakobLichterfeld
43435524ad doc: update links to token apps in FAQ (#3833)
* doc: update links to token apps in FAQ

* doc: update changelog
2024-04-10 13:46:59 +02:00
Brian May
c684252940 Publish extra active_route fields to mqtt output (#3789)
This refactors the existing code to make it more maintainable.

Nil values are published as "nil" string. This ensures that they will
get published, and ensures that MQTT doesn't drop the retained data.

Fixes #3748
2024-04-05 17:29:00 +11:00
Brian May
cd9c9c80d4 Fix broken link from Docker page to upgrading page (#3794)
I think this was broken in dbf23faa31.

Also remove link from header, seems redundant.
2024-03-30 15:40:31 +01:00
Jakob Lichterfeld
3ab8ee8535 doc: add instructions how to update pot files to development guide 2024-03-28 09:10:07 +01:00
Jakob Lichterfeld
dbf23faa31 doc: remove update steps in installation instructions and link to maintenance section 2024-03-28 08:58:05 +01:00
b1c1l1
97cfb79493 feat: Add URL_PATH environment variable for reverse proxy deployments (#3771)
* Add URL_PATH environment variable for reverse proxy deployments

For example, this can be used to run TeslaMate behind a reverse proxy, using a
URL path such as "/teslamate".

* gettext: update pot and po files

Generated using:
  mix gettext.extract --merge

* web: run mix format

* gettext: update pot and po files

Re-generating gettext files after running mix format.

Generated using:
  mix gettext.extract --merge
2024-03-25 09:21:34 +01:00
Jakob Lichterfeld
ed6b4e7629 doc: version tag in docker-compose.yml is obsolete since docker 25.05
closes: #3761
2024-03-22 09:12:36 +01:00
Brian May
b5285d2ace Add location topic (lat and long in one json blob) (#3729)
* Add location topic

Fixes #3660.

* doc: update mqtt topics with new location topic

---------

Co-authored-by: Jakob Lichterfeld <jakob-lichterfeld@gmx.de>
2024-03-18 08:36:21 +01:00
Jakob Lichterfeld
bf50f79994 doc: Updated links for TeslaMate projects 2024-03-16 09:01:40 +01:00
Jan
6078915981 doc: Hint for null value in Grafana if car has not been renamed yet (#3720)
* Hint for null value in Grafana if car has not been renamed yet

* Grammar fix
2024-03-07 12:46:56 +01:00
Jan
131651845a Fix name in lovelace example to match sensor name (#3718) 2024-03-04 11:36:31 +01:00
Long Zheng
78fe8116ad Add navigation active route drive state data (#3657)
* Add navigation active route drive state data

* Add active_route data to MQTT

* Update MQTT documentation

* Fix streaming test drive state
2024-02-08 08:45:42 +01:00
JakobLichterfeld
acbeb5e9d6 doc: add instructions, how to connect to database before editing cars (#3656) 2024-02-06 08:57:07 +01:00
PhracturedBlue
3cc0102090 Support listening on unix domain socket (#3328)
* Support connection on unix domain socket

* Better support for unix domain sockets

* Document Unix Domain sockets

* Fix typos caught by review
2024-01-29 13:43:45 +01:00
Justin Lee
294b7c7a85 update docker-compose.yml for Docker Compose version v2.24.1 (#3626) 2024-01-21 18:05:45 +01:00
Juan Carlos Heredia
f4fdedb2d7 Improve Battery health derived efficiency estimations and Fix error divided by zero (#3593)
* Improve Battery health derived efficiency estimations and Fix error divided by zero

* Fix unit convert

* Update screenshot

* Keep iteration value

* Remove name mention.
2024-01-19 15:38:46 +01:00
Kenni Lund
6a19ec257e doc: Fix TPMS sensor names to match binary_sensor.yaml (#3613) 2024-01-19 14:06:52 +01:00