Commit Graph
13 Commits
Author SHA1 Message Date
jlestelandJulien c8fed077bb Fix 401 on direct Fleet API calls (#4095)
* 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

* Fix 401 on direct Fleet API

* try to fix in prod context

* log test

* up

* up

* format

* revert on log

* Update refresh.ex

---------

Co-authored-by: Julien <julien@citio.digital>
2024-07-27 14:06:57 +02:00
jlestelandJulien 60135c1433 Fix hard coded informations (timezone and orgId) (#4056)
Co-authored-by: Julien <julien@citio.digital>
2024-07-08 13:53:42 +02:00
jlestelandJulien 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
jlestelandJulien 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
jlestelandJulien 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
jlestelandJulien b900a98d08 feat: Respect Retry-After header on 429 response code (#3943)
* Respect 429 response code instructions

* format

* up

* up

---------

Co-authored-by: Julien <julien@citio.digital>
2024-06-07 10:10:35 +02:00
jlestelandJulien 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
jlestelandJulien 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
jlestelandJulien 2f910fa291 fix: login to docker hub before build&push action (#3491)
Co-authored-by: Julien <julien@citio.digital>
2023-11-26 08:53:45 +01:00
jlestelandJulien eadf08261f [CI] Build PR images on GHCR (#3445)
* Upgrade CI

* Tmp Test

* Test tmp

* Test master

* Distinct cache by branch

* Correct version name

* Dynamic dockerhub push

* correct cache name

---------

Co-authored-by: Julien <julien@citio.digital>
2023-11-21 09:41:08 +01:00
jlestelandJulien 036aa5b817 fix: Dashboard links (#3443)
Co-authored-by: Julien <julien@citio.digital>
2023-11-17 09:11:17 +01:00
jlestelandJulien b65b3f3992 [CI] Build PR images on GHCR (#3432)
* Upgrade CI

* Keep lint and test on tags

* Keep actions/checkout@v3

* Consider CI on branches named v*

* Fix write packages

* Distinct Elixir CI and PR Build

* Rename build

* Fix type

* Add workflow_dispatch

* Add timeout to prevent stuck jobs

* Add actions for buildx and merge

* fix username ?

* Add grafana images from PR

* fix typo

* Finih merge action refactoring

* Exclude PRs related to .github from auto-run

* Don't try to auth on DockerHub when we can't

* tmp allow myself to execute

* Update ghcr_build.yml to be able to write on packages from public fork

* Revert ghcr_build.yml

* Update ghcr_build.yml

* Update to build on source repo

* Update ghcr_build.yml to test

* Use correct repo with REGISTRY_IMAGE

* Update ghcr_build.yml

* Update ghcr_build.yml

* Update ghcr_build.yml

* Update ghcr_build.yml

* Update ghcr_build.yml

* Use dynamic variables to work in all repos

* Purge in source repo

* Update ghcr_build.yml

* Update ghcr_build.yml

* Update ghcr_build.yml

* Update action.yaml

* Update ghcr_build.yml

* Update buildx.yml

* Update action.yaml

* Fix vars

* Trace digests

* Update action.yml

* Update action.yml

* Fix typo

* Fox repo name

* Update buildx.yml

* Update action.yaml

* Fix repository name

* Run on any branch pushed

* Exclude PRs related to .github from auto-run

* Add buildjet dependency

* lint

* lint actions

* fix: links in dashboards

---------

Co-authored-by: Julien <julien@citio.digital>
2023-11-17 02:37:04 +01:00
jlestelandJulien 2261cc4ed7 Fix: broken links when orgId is not 1 (#3380)
* fix: broken links when orgId is not 1

* fix

---------

Co-authored-by: Julien <julien@citio.digital>
2023-11-12 18:28:12 +01:00