Environment settings
Django settings/overrides
DSMR-reader utilizes the Python Django framework. All settings below directly affect or override Django, and therefor your DSMR-reader installation as well.
Tip
You can either specify the following settings:
in a
.env
file in the root of the DSMR-reader project folder (manual installations)or as system environments variables (Docker installations)
DJANGO_SECRET_KEY
The secret key Django should use. This should be randomly generated for your installation.
Generate or refresh it by running ./tools/generate-secret-key.sh
.
Zie ook
See SECRET_KEY
in Django docs.
Hint
This setting is required
Nieuw in versie v4.5.
Verouderd sinds versie 4.5: Former SECRET_KEY
env var.
DJANGO_DATABASE_ENGINE
The database engine to use. Officially DSMR-reader only supports django.db.backends.postgresql
, but others supported by Django may work as well.
Experiment at your own risk!
Zie ook
See DATABASES.ENGINE
in Django docs.
Hint
This setting is required
Nieuw in versie v4.5.
Verouderd sinds versie 4.5: Former DB_ENGINE
env var.
DJANGO_DATABASE_HOST
Zie ook
See DATABASES.HOST
in Django docs.
Hint
This setting is required for the default DJANGO_DATABASE_ENGINE
, but can be optional for some engines.
Nieuw in versie v4.5.
Verouderd sinds versie 4.5: Former DB_HOST
env var.
DJANGO_DATABASE_PORT
Zie ook
See DATABASES.PORT
in Django docs.
Hint
This setting is required for the default DJANGO_DATABASE_ENGINE
, but can be optional for some engines.
Nieuw in versie v4.5.
Verouderd sinds versie 4.5: Former DB_PORT
env var.
DJANGO_DATABASE_NAME
Zie ook
See DATABASES.NAME
in Django docs.
Hint
This setting is required for the default DJANGO_DATABASE_ENGINE
, but can be optional for some engines.
Nieuw in versie v4.5.
Verouderd sinds versie 4.5: Former DB_NAME
env var.
DJANGO_DATABASE_USER
Zie ook
See DATABASES.USER
in Django docs.
Hint
This setting is required for the default DJANGO_DATABASE_ENGINE
, but can be optional for some engines.
Nieuw in versie v4.5.
Verouderd sinds versie 4.5: Former DB_USER
env var.
DJANGO_DATABASE_PASSWORD
Zie ook
See DATABASES.PASSWORD
in Django docs.
Hint
This setting is required for the default DJANGO_DATABASE_ENGINE
, but can be optional for some engines.
Nieuw in versie v4.5.
Verouderd sinds versie 4.5: Former DB_PASS
env var.
DJANGO_DATABASE_CONN_MAX_AGE
Zie ook
See DATABASES.CONN_MAX_AGE
in Django docs. Omit to use the default.
Hint
This setting is optional
Nieuw in versie v4.5.
Verouderd sinds versie 4.5: Former CONN_MAX_AGE
env var.
DJANGO_TIME_ZONE
The timezone Django should use. Alter at your own risk. Omit to use the default, using the CET/CEST timezone (applicable to the Netherlands).
Zie ook
See TIME_ZONE
in Django docs.
Hint
This setting is optional
Nieuw in versie v4.5.
Verouderd sinds versie 4.5: Former TZ
env var.
DJANGO_STATIC_URL
Zie ook
See STATIC_URL
in Django docs. Omit to use the default.
Hint
This setting is situational
Nieuw in versie v4.5.
DJANGO_FORCE_SCRIPT_NAME
Zie ook
See FORCE_SCRIPT_NAME
in Django docs. Omit to use the default.
Hint
This setting is situational
Nieuw in versie v4.5.
DJANGO_USE_X_FORWARDED_HOST
Zie ook
See USE_X_FORWARDED_HOST
in Django docs. Omit to use the default.
Hint
This setting is situational
Nieuw in versie v4.5.
DJANGO_USE_X_FORWARDED_PORT
Zie ook
See USE_X_FORWARDED_PORT
in Django docs. Omit to use the default.
Hint
This setting is situational
Nieuw in versie v4.5.
DJANGO_X_FRAME_OPTIONS
Zie ook
See X_FRAME_OPTIONS
in Django docs. Omit to use the default.
Hint
This setting is situational
Nieuw in versie v4.5.
DJANGO_STATIC_ROOT
Zie ook
See STATIC_ROOT
in Django docs. Omit to use the default.
Hint
This setting is situational
Nieuw in versie v4.6.
DSMR-reader settings
These settings are for DSMR-reader only.
Tip
You can either specify the following settings:
in a
.env
file in the root of the DSMR-reader project folder (manual installations)or as system environments variables (Docker installations)
DSMRREADER_ADMIN_USER
The username of the webinterface (super)user to create when running ./manage.py dsmr_superuser
.
Hint
This setting is situational
Nieuw in versie v4.5.
Verouderd sinds versie 4.5: Former DSMR_USER
env var.
DSMRREADER_ADMIN_PASSWORD
The password of the DSMRREADER_ADMIN_USER
user to create (or update if the user exists) when running ./manage.py dsmr_superuser
.
Hint
This setting is situational
Nieuw in versie v4.5.
Verouderd sinds versie 4.5: Former DSMR_PASSWORD
env var.
DSMRREADER_LOGLEVEL
The log level DSMR-reader should use. Choose either ERROR
(omit for this default), WARNING
or DEBUG
(should be temporary due to file I/O).
Zie ook
For more information, see Troubleshooting.
Hint
This setting is optional
Nieuw in versie v4.5.
DSMRREADER_PLUGINS
The plugins DSMR-reader should use. Omit to use the default of no plugins. Note that this should be a comma separated list when specifying multiple plugins. E.g.:
DSMRREADER_PLUGINS=dsmr_plugins.modules.plugin_name1
DSMRREADER_PLUGINS=dsmr_plugins.modules.plugin_name1,dsmr_plugins.modules.plugin_name2
Zie ook
For more information, see Plugins.
Hint
This setting is optional
Nieuw in versie v4.5.
DSMRREADER_SUPPRESS_STORAGE_SIZE_WARNINGS
Whether to suppress any warnings regarding too many readings stored or the database size.
Set it to True
to disable the warnings or omit it to use the default (False
).
Suppress at your own risk.
Hint
This setting is optional
Nieuw in versie v4.6.
DSMRREADER_MQTT_MAX_MESSAGES_IN_QUEUE
The maximum amount of MQTT messages queued in DSMR-reader until new ones will be rejected. This prevents creating an infinite backlog of messages queued.
However, situationally you may increase the maximum for whatever reason along your local setup. Omit to use the default.
Hint
This setting is optional
Veranderd in versie v5.0: (default value: 5000
)
Nieuw in versie v4.16: (default value: 500
)
DSMRREADER_MQTT_MAX_CACHE_TIMEOUT
DSMR-reader sends MQTT messages to your broker with a retain
flag, resulting the broker keeping the last value received for every topic.
Updating MQTT topics consecutively with the same value has no effect, depending on its usage.
Therefor DSMR-reader can be set to cache the last value sent for each topic. It will cause DSMR-reader to not send the same value to the same topic consecutively.
This was enabled by default in DSMR-reader v4.x
, but has been changed to being disabled by default since DSMR-reader v5.0
.
Set this value (cache duration in seconds) to > 0
to enable.
Hint
This setting is optional
Veranderd in versie v5.0: (default value: 0
)
Nieuw in versie v4.16: (default value: 3600
)