Configuration
config.json
Example File
{
"general": {
"config_revision": 1,
"software_version": "1.1.0",
"system_identifier": "my-system-1"
},
"logging_verbosity": {
"file_archive": "DEBUG",
"console_prints": "INFO",
"message_sending": "WARNING"
},
"updater": {
"repository": "tum-esm/ivy",
"provider": "github",
"provider_host": "github.com",
"access_token": null,
"source_conflict_behaviour": "reuse"
},
"backend": {
"provider": "tenta",
"mqtt_connection": {
"host": "localhost",
"port": 1883,
"client_id": "test_client",
"username": "test_username",
"password": "test_password"
},
"max_parallel_messages": 50,
"max_drain_time": 300
},
"dummy_procedure": {
"seconds_between_datapoints": 10
},
"system_checks": {
"seconds_between_checks": 120
}
}Schema definition
root*(object)
Schema of the config file for this version of the software.
A rendered API reference can be found in the documentation.
additional properties allowed: false
general*(object)
additional properties allowed: false
config_revision*(integer)
The revision of this config file. This should be incremented when the config file is changed. It is used to tag messages with the settings that were active at the time of sending.
min.: -1
software_version*(string)
A version string in the format of MAJOR.MINOR.PATCH[-(alpha|beta|rc).N]
regex pattern: "^\\d+\\.\\d+\\.\\d+(-(alpha|beta|rc)\\.\\d+)?$"
system_identifier*(string)
The identifier of this system. If possible, it is convenient to use the hostname of the system.
min. length: 1
max. length: 512
logging_verbosity*(object)
How verbose to log to the different data streams.
For example, If the level is set to "WARNING", only warnings, errors
and exceptions will be written to the respective data stream. If the
level is set to "DEBUG", all logs will be written to the respective
data stream.
Importance: DEBUG > INFO > WARNING > ERROR > EXCEPTION
If the level is set to None, no logs will be written to the respective
data stream.
additional properties allowed: false
file_archive*(enum)
The minimum log level for the file archive in `data/logs`
allowed values: [
"DEBUG",
"INFO",
"WARNING",
"ERROR",
"EXCEPTION",
null
]
console_prints*(enum)
The minimum log level for the console prints
allowed values: [
"DEBUG",
"INFO",
"WARNING",
"ERROR",
"EXCEPTION",
null
]
message_sending*(enum)
The minimum log level for the message sending
allowed values: [
"DEBUG",
"INFO",
"WARNING",
"ERROR",
"EXCEPTION",
null
]
updater*(union)
If this is not set, the updater will not be used.
option 1(object)
additional properties allowed: false
repository*(string)
The repository in which this source code is hosted, i.e. `orgname/reponame`
regex pattern: "[a-zA-Z0-9-]+/[a-zA-Z0-9-]+"
provider*(enum)
You can suggest more providers in the issue tracker
allowed values: [
"github",
"gitlab"
]
provider_host*(string)
The host of the code provider.
min. length: 3
examples: [
"github.com",
"gitlab.com",
"gitlab.yourcompany.com"
]
access_token*(union)
The access token to use for the provider. If the repository is public, this can be left empty.
option 1(string)
min. length: 3
max. length: 256
option 2(null)
source_conflict_strategy(enum)
The strategy to follow, when upgrading to a new version and the source code already exists. 'reuse' will keep the existing source code but create a new venv. 'overwrite' will remove the existing code directory and create a new one. You can keep this at 'reuse' by default and if a version upgrade fails during the download phase, temporarily change this to 'overwrite' to force a redownload of the source code.
allowed values: [
"overwrite",
"reuse"
]
default: "reuse"
option 2(null)
backend*(union)
If this is not set, the backend will not be used.
option 1(object)
additional properties allowed: false
provider*(enum)
The provider to use for the backend. The template ships with these two providers but is easily extendable to support other backends.
allowed values: [
"tenta",
"thingsboard"
]
mqtt_connection*(object)
additional properties allowed: false
host*(string)
The host to use for the MQTT connection
min. length: 1
max. length: 512
port*(integer)
The port to use for the MQTT connection
min.: 1
max.: 65535
client_id*(string)
The client ID to use for the MQTT connection. Not necessarily the same as the username.
min. length: 1
max. length: 512
username*(string)
The username to use for the MQTT connection.
min. length: 1
max. length: 512
password*(string)
The password to use for the MQTT connection.
min. length: 1
max. length: 512
max_parallel_messages(integer)
How many messages that are not published yet should be passed to the backend at once
min.: 1
max.: 10000
default: 50
max_drain_time(integer)
When the mainloop wants to shut down (after a config change, or an update), how many seconds should the backend be allowed to continue sending out unsent messages.
min.: 0
max.: 7200
default: 600
option 2(null)
dummy_procedure*(object)
additional properties allowed: false
seconds_between_datapoints*(integer)
How many seconds should be between each datapoint in the dummy procedure
min.: 1
max.: 7200
system_checks*(object)
additional properties allowed: false
seconds_between_checks*(integer)
How many seconds should be between each run of the system checks
min.: 1
max.: 7200
Foreign config.json
Schema definition
root*(object)
Schema of a foreign config file for any other version of the software
to update to. It probably has more fields than listed in the schema. This
schema only includes the fields that are required in any new config to be
accepted by the updater in this version of the software.
A rendered API reference can be found in the documentation.
additional properties allowed: true
general*(object)
additional properties allowed: true
config_revision*(integer)
The revision of this config file. This should be incremented when the config file is changed. It is used to tag messages with the settings that were active at the time of sending.
min.: -1
software_version*(string)
A version string in the format of MAJOR.MINOR.PATCH[-(alpha|beta|rc).N]
regex pattern: "^\\d+\\.\\d+\\.\\d+(-(alpha|beta|rc)\\.\\d+)?$"