Files
archived-hipudding-teslamate/website/docs/configuration/environment_variables.md
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

10 KiB

id, title, sidebar_label
id title sidebar_label
environment_variables Environment Variables Environment Variables

TeslaMate accepts the following environment variables for runtime configuration:

Variable Name Description Default Value
ENCRYPTION_KEY A key used to encrypt the Tesla API tokens (required)
DATABASE_USER Username (required)
DATABASE_PASS User password (required)
DATABASE_NAME The database to connect to (required)
DATABASE_HOST Hostname of the database server (required)
DATABASE_PORT Port of the database server 5432
DATABASE_POOL_SIZE Size of the database connection pool 10
DATABASE_TIMEOUT The time in milliseconds to wait for database query calls to finish 60000
DATABASE_SSL Set to true if SSL should be used false
DATABASE_IPV6 Set to true if IPv6 should be used false
VIRTUAL_HOST Host part used for generating URLs throughout the app localhost
CHECK_ORIGIN Configures whether to check the origin header or not. May be true (recommended), false (default) or a comma-separated list of hosts that are allowed (e.g. https://example.com,//another.com:8080). Hosts also support wildcards. If true, it will check against the host value in VIRTUAL_HOST. false
PORT Port where the web interface is exposed 4000
HTTP_BINDING_ADDRESS IP address where the web interface is exposed, or blank (default) meaning all addresses.
DISABLE_MQTT Disables the MQTT feature if true false
MQTT_HOST Hostname of the broker (required unless DISABLE_MQTT is true)
MQTT_PORT Port of the broker 1883 (8883 for MQTT over TLS)
MQTT_USERNAME Username
MQTT_PASSWORD Password
MQTT_TLS Enables TLS if true false
MQTT_TLS_ACCEPT_INVALID_CERTS Accepts invalid certificates if true false
MQTT_IPV6 Set to true if IPv6 should be used false
MQTT_NAMESPACE Inserts a custom namespace into the MQTT topic . For example, with MQTT_NAMESPACE=account_0: teslamate/account_0/cars/$car_id/state.
IMPORT_DIR The path of the directory for the import of data (e.g. TeslaFi) ./import
TZ Used to establish the local time zone, e.g. to use the local time in logs. See List of tz database time zones.
DEFAULT_GEOFENCE The default GEOFENCE to send via GEOFENCE if car not in geofence. Overrides the default of "" which will delete any retained value. "" (no quotes)