Commit Graph
14 Commits
Author SHA1 Message Date
James BakerandJakob Lichterfeld 21d3b520e1 feat: support accessing PostgreSQL on unix domain sockets (#4456)
* Support configuring teslamate with unix domain sockets for Postgres

* docs

* reorder

* format, cleanup

* style: update environment variables documentation for DATABASE_SOCKET_DIR formatting

---------

Co-authored-by: Jakob Lichterfeld <jakob-lichterfeld@gmx.de>
2025-01-13 17:15:38 +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
Brian May 2b5cdbdffd Add nix flake (#3485)
This will add support for nix flakes. Which really helps with my
development on nixos. This has two basic parts:

1. DEVELOPMENT

After this you can use the following commands on computer with nix and a
patched version of direnv:

direnv allow
devenv up

And it will automatically start and instance of postgresql and mosquitto
for development.

And the environment variables are already configured for teslamate.

So then can start teslamate with:

npm install --prefix ./assets && npm run deploy --prefix ./assets
iex -S mix phx.server

This part is all working as designed. And pretty simple and straight
forward.

2. NIX PACKAGE OF TESLA

This is 99% complete, but some pain points I haven't addressed yet.
Because I don't yet know of good solutions.

* There are two checksums in flake.nix that needs to be updated whenever
  mix.lock or package-lock.json changes.
2024-03-19 09:37:17 +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
Simon Shi 7329b2bf3a Support server_name_indication for ssl (#3497)
* Support server_name_indication for ssl

* update format
2023-11-26 11:04:38 +01:00
Adrian Kumpf 56a6aa3e7f Support self-signed certificates
Related to #3243
2023-06-13 13:55:47 +02:00
Brian May 4a11ef8421 If no geofence is found map then use default value (#2564)
This is required because the default value is "" which tells the mqtt
server to delete the retained value.

This in turn means that applications that care about when the car is in
a unknown location will not get the retained value.

This is a bit different from all of the other values in
`@always_published`. For them "" is only published if the value is
unknown or an error occurred. So it makes sense to delete the retained
value.

In this case however, a value of "" generally means "the car is outside
any known geofence" which is a valid condition it itself, and it should
be retained.

There was speculation this might affect the shift_state, but
unfortunately this was not followed up with any evidence or details. #1912

There are any number of solutions that could be deployed here. The
advantage of this solution however is it is not going to break anything
unless you specifically define the TESLAMATE_DEFAULT_GEOFENCE variable.

Fixes: #1336
2022-07-15 10:59:46 +02:00
Adrian Kumpf 0d6e288c70 Encrypt API tokens (#2360)
Store API tokens encrypted in the database.

During the database migration a randomly generated key will be used encrypt the tokens if no ENCRYPTION_KEY environment variable was provided.

If the application is started without the presence of an ENCRYPTION_KEY (or if the key failed to decrypt the existing tokens), the UI will display a warning with further instructions.
2022-02-18 17:03:13 +01:00
Adrian Kumpf a2129b1457 Hide sign-out button in import mode 2021-02-06 21:39:52 +01:00
Adrian Kumpf 294bb28034 Point out more clearly when starting into import mode 2021-02-06 20:53:36 +01:00
Adrian Kumpf ab7556e8af Allow to use non-standard MQTT ports 2021-01-03 22:40:07 +01:00
Adrian Kumpf 37a60829ab Allow to connect to MQTT broker via IPv6
Addresses #1000
2020-12-01 18:09:24 +01:00
Adrian Kumpf e0b3d3d6b5 Allow to connect to Postgres via IPv6 (#1006) 2020-11-05 12:20:09 +01:00
Adrian Kumpf 4b23c8604e Upgrade to Elixir v1.11 2020-10-08 22:17:56 +02:00