Appearance
Configuration
Modules
CORS Module
Config-Name: cors
Name | Description |
---|---|
trustedOriginsarray string optional | List of all trusted origins. Will have no effect if `disable` is set to true. Default: [] |
allowToolsboolean optional | Whenever to allow tools e.g. curl or postman. Tools that are no browser so to say. Default: true |
disableboolean optional | Whenever to allow requests from all origins. |
IAM Module
Config-Name: iam
Name | Description |
---|---|
initialAdminAccountobject optional | An object that contains all information required to create an initial admin. This object can be deleted once an initial admin has been created. Will not overwrite an existing account. |
initialAdminAccount.groupstring | The group for the initial admin. Will be created if not present. |
initialAdminAccount.rolestring | The role for the initial admin. Will be created if not present. |
initialAdminAccount.userstring | The name for the initial account that will be the admin. |
initialAdminAccount.passwordstring | The password for the initial admin account. |
enableOAuthProviderboolean optional | The backend comes with its own OAuth provider. In the event, that only external OAuth provider are used, you can disable the internal provider. Default: true |
providerarray optional | External OAuth provider. Currently supported are `Okta` and `Viessmann` within the coldwave-backend-environment by default. Default: [] |
refreshTokenDurationMSinteger optional | The refresh token lifetime in milliseconds. Defaults to a day. Default: 86400000 |
twoFactorAuthobject optional | This object contains settings regarding two-factor-authentication. Default: { "name": "Coldwave 2FA Login" } |
twoFactorAuth.namestring optional | The name of the application. This name will be shown in the users 2FA manager. Default: Coldwave 2FA Login |
enforceSecureDevicePairingboolean optional | Only allows secure pairings of devices with a token signature that will be checked by the backend. In other words, the user who wants to pair the device to their account must have local access to the device. |
DEVICELINK Module
Config-Name: deviceLink
Name | Description |
---|---|
portStartinteger | The beginning of the port range. Every client facing socket will be bound to a port greater or equal than the value set. |
portEndinteger | The end of the port range. Every client facing socket will be bound to a port lesser or equal than the value set. |
maxConcurrentConnectionsinteger | The maximum amount of concurrent connections. Once this amount has been reached, no more sockets are opened until resources are available again. |
defaultPortinteger optional | The port any package should be sent to on the device. This value is optional. However, if it is not set in the config, it is required in the endpoint that creates a device link. |
defaultTimeoutinteger optional | The default timeout in milliseconds after which a UDP socket is closed. If unset, and unspecified when creating a device link via the API, the socket does never timeout. In this case, the client needs to free up any remaining resources, which is highly advised against. |
networkSeparationobject optional | This object can be used to separate the private and the public part of the network. If set will bind the specific sockets to the specific interfaces. |
networkSeparation.privateBindingAddressstring | The address on which to bind the private facing socket to. |
networkSeparation.publicBindingAddressstring | The address on which to bind the public facing socket to. |
LOGGER Module
Config-Name: logger
Name | Description |
---|---|
initialLogLevelstring optional enum | The available log level of the current logger implementation. Default: info Possible values: error, warn, info, verbose, debug, trace, protocol |
namespacesarray string optional | The namespaces to activate. Topics not present in this list will be set to silent. If the key is omitted, all topics will be set to log messages. |
UPDATES Module
Config-Name: updates
Name | Description |
---|---|
auth | The auth object that contains the means to authenticate this backend against the update server. |
Alternative 1object | |
auth.typestring constant | Constant value: API_KEY |
auth.keystring | The API key used to sign requests to the update server with. |
Alternative 2object | |
auth.typestring constant | Constant value: USER |
auth.namestring | The name of the user for the update server. |
auth.passwordstring | The password for the user for the update server. |
urlstring | The URL the backend will communicate with the update server. This should be the full path, so as of right now it should end with `api/v1`. |
hostnamestring optional | The hostname that will be transmitted to the device in order for the device to verify the hostname. If not set, will be the URL without the path. E.g if the address is `https://path.to.server/api/v1` the hostname will be `path.to.server`. |
webHookUrlstring optional | The webhook URL parameter should contain the address of this specific server or in more detail the address where the update server can reach this backend. If set, the webhook will be used to automatically update the status for the devices. |
autoUpdatestring optional | This field allows for cron-like updates on a interval basis and expects a cron-like scheduler expression such as 0 0 * * * *, which means every hour on the full hour. For more references please check out the library documentation: https://github.com/kelektiv/node-cron#readme. The library at hand does support a granularity of seconds. |
checkRequestDelayinteger optional | The delay in milliseconds between each check request. They are handled in a serialized manner, but this parameter allows for further throttling of the requests. |
bookRequestDelayinteger optional | The delay in milliseconds between each book request. They are handled in a serialized manner, but this parameter allows for further throttling of the requests. Default: 1000 |
outOfResourcesDelayinteger optional | The delay in milliseconds of how long to wait until retrying a firmware update after the update server has responded with a 429 on a book request. Indicating that all server resources are currently in use. Default: 300000 |
disableConnectUpdateboolean optional | Whenever or not to disable a connect update. Devices might connect and have an update available. Setting this option to true will not trigger an update in the case an update is available. |
pinOnlyWebhookboolean optional | Set this to true to not trigger updates over the webhook when a rollout starts. This is useful if you want to enable time based updates, e.g. at midnight, and do want to start rollouts beforehand. Without this set to false rollouts would start immediately. |
SERVICE Module
Config-Name: service
Name | Description |
---|---|
keepStateWhenOfflineboolean optional | Whenever to keep the service state when the device is goes offline or not. Default: true |
TIMESTREAM Module
Config-Name: timestream
Name | Description |
---|---|
retentionobject optional | Retention information that handle the duration of data storage. |
retention.memoryStoreRetentionPeriodInHoursinteger optional | The duration data should be stored in the write-optimized memory store. Default: 6 |
retention.magneticStoreRetentionPeriodInDaysinteger optional | The duration data should be stored in the read-optimized magnetic store. Default: 73000 |
writeConfigobject optional | If the default write endpoint is not available, use this config to setup the write endpoint by hand. |
writeConfig.regionstring | The region the endpoint is located in. |
writeConfig.endpointstring | The url for the endpoint. |
queryConfigobject optional | If the default query endpoint is not available, use this config to setup the query endpoint by hand. |
queryConfig.regionstring | The region the endpoint is located in. |
queryConfig.endpointstring | The url for the endpoint. |
tablePrefixstring | The prefix for the table. Required in order to support multiple tables in the same database. |
databaseNamestring | The database name the data will be stored in. |
credentialsobject optional | Credentials required to connect to the timestream service. Optional only if auto resolve is set to `true`. |
credentials.accessKeyIdstring | The key id for the aws key in order to connect to the timestream service. |
credentials.secretAccessKeystring | The value for the access key in order to connect to the timestream service. |
enableCostSavingboolean optional | The minimum billable unit for AWS Timestream writes is 1KB. Therefore, it is advised to sent properties once this threshold has been reached. However, this might not be an option for small demo projects that only contain a few devices and reach that 1KB threshold very slowly. Default: true |
checkIntervalinteger optional | The timestream module periodically checks if data should be send to AWS. A smaller interval will lead to more but smaller messages. Unit is milliseconds. Only applicable when cost saving is disabled. Default: 5000 |
filteroptional | Option to filter certain properties. |
Alternative 1object | |
filter.typestring constant | Constant value: blacklist |
filter.propertiesarray number | List of properties that should not be monitored and stored historically. All other properties will be handled as expected. |
Alternative 2object | |
filter.typestring constant | Constant value: whitelist |
filter.propertiesarray number | List of properties that should be monitored and stored historically. |
createEntitiesboolean optional | DEPRECATED - The application itself will check (if possible) whenever or not the database and tables have been already created. |
handleEventsboolean optional | Whenever or not to store event data like alarm entries or device connectivity information. Default: true |
handleDataboolean optional | Whenever or not to store data events in AWS timestream. This config parameter will be used to transition from the first iteration of the timestream module to the second and allows the backend to use both the v1 and the v2 version while only the first version will pollute the data part of AWS Timestream.. It will be removed in parallel to the v1 timestream module. Default: true |
batchSizenumber optional | The amount of requests to batch between AWS timestream and the backend before the result is sent to the client. A greater batch size means more RAM usage on the backend and an increases duration for an answer to the client, while reducing the overhead of sending lots of messages between the client and the backend. Default: 10 |
resolveCredentialsFromInstanceProfileboolean optional | While running within an EC2 instance one might want to resolve the credentials from the instance profile. Setting this config parameter to true, the credentials config parameter will not be checkend and an [internal aws function](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-credential-providers/#fromcontainermetadata-and-frominstancemetadata) will be called. |
ALARM Module
Config-Name: alarm
Name | Description |
---|---|
storeStateboolean optional | Whenever or not to store the current state to every alarm occurrence. Setting this to true will drastically increase the amount of data stored in the database. |
maxStatusEntriesnumber optional | The amount of status entries to store. Note that one entry is a status change. Meaning to store e.g. one hundred occurrence you have a max entries of two hundred. Default: 100 |
apnarray optional | Options for the Apple Push Notification service. Default: [] |
apn.[ ].key | The connection key in order to use the APN service. |
Alternative 1string | The filename for the key to load from disk. |
Alternative 2 | A Buffer-Object. Best practice is to use `fs.readFileSync` to generate this buffer directly inside the config. |
apn.[ ].keyIdstring | The key ID for the key. |
apn.[ ].teamIdstring | The teamId to use for the push notification service. |
apn.[ ].productionboolean | Whenever to run in production mode |
apn.[ ].pfxoptional | File path for private key, certificate and CA certs in PFX or PKCS12 format, or a Buffer containing the PFX data. If supplied will always be used instead of certificate and key above. |
Alternative 1string | The filename for the pfx file to load from disk. |
Alternative 2 | A Buffer-Object. Best practice is to use `fs.readFileSync` to generate this buffer directly inside the config. |
apn.[ ].topicstring | The topic the push notification will be published at. |
apn.[ ].soundstring optional | An optional sound name to play when the notification is sent. |
gcmarray optional | [DEPRECATED] Options for the Google Cloud Messaging service. Default: [] |
gcm.[ ].senderstring | Sender information for the google cloud messaging service. |
gcm.[ ].linkstring | Link information for the google cloud messaging service. |
gcm.[ ].iconstring optional | The icon to show within the notification. |
fcmarray optional | Options for the Firebase Cloud Messaging service. Default: [] |
fcm.[ ].linkstring | Link information for the firebase cloud messaging service. |
fcm.[ ].iconstring optional | The icon to show within the notification. |
fcm.[ ].jsonPathstring | The path to the json file to use for authentication. |
UI Module
Config-Name: ui
Name | Description |
---|
REMOTE Module
Config-Name: remote
Name | Description |
---|---|
wireobject optional | Default: { "port": 9982, "protocol": "TCP" } |
wire.portnumber optional | Default: 9986 |
wire.hoststring optional | |
wire.protocolstring enum | Possible values: UDP, TCP |
providerarray optional | Default: [] |
ALEXA Module
Config-Name: alexa
Name | Description |
---|---|
setupoptional | The alexa handler settings |
providerarray optional | Auth provider to be able to interact with alexa. Default: [] |
identifierstring | The skill identifier. Used to sent events proactively to the AWS cloud. |
secretstring | The skill secret. Used to sent events proactively to the AWS cloud. |
serviceIdentifierstring | The service identifier for a service of the device. Can be seen as the interface name where services with the same identifier contain the same properties. |
propertiesarray number | Property identifier to track. |
pathstring optional | Path option to overwrite the default path property. Useful, when dealing with multiple smart home applications |
namestring optional | Name property can be used to add multiple google smart home modules. Each needs a unique name. Note: The underlying pairings for user-devices will be stored inside a database with the name as the prefix. Changing the name in production WILL render active smart home users unable to use their devices. Handle with care, you have been warned! Default: alexa |
GOOGLE Module
Config-Name: google
Name | Description |
---|---|
setupoptional | The alexa handler settings |
serviceIdentifierstring | The service identifier for a service of the device. Can be seen as the interface name where services with the same identifier contain the same properties. |
serviceWorkerFilePathstring optional | Path to the service worker file in order to ensure that events can be sent proactively to google. |
propertiesarray number | Property identifier to track. |
pathstring optional | Path option to overwrite the default path property. Useful, when dealing with multiple smart home applications |
namestring optional | Name property can be used to add multiple google smart home modules. Each needs a unique name. Note: The underlying pairings for user-devices will be stored inside a database with the name as the prefix. Changing the name in production WILL render active smart home users unable to use their devices. Handle with care, you have been warned! Default: google |
SLACK Module
Config-Name: slack
Name | Description |
---|---|
instanceNamestring | The instance name that will be used in Slack messages. |
webhookstring | The webhook that will be used to send messages. |
GEOLOCATION Module
Config-Name: geolocation
Name | Description |
---|---|
informationSourcearray optional | Array that includes property information regarding properties that are cell ids. Default: [] |
informationSource.[ ].serviceIdentifierstring | The service identifier for a service of the device. Can be seen as the interface name where services with the same identifier contain the same properties. |
informationSource.[ ].propertiesobject | Object containing all required mobile network information |
informationSource.[ ].properties.cellIdnumber | The identifier of the property that represents the cell id. |
informationSource.[ ].properties.mobileCountryCodenumber | The identifier of the property that represents the mobile country code. |
informationSource.[ ].properties.mobileNetworkCodenumber | The identifier of the property that represents the mobile network code. |
informationSource.[ ].properties.locationAreaCodenumber | The identifier of the property that represents location area code. |
keystring | The key that will be used to identify against the google geolocation API. |
cacheDurationnumber optional | The duration Default: 31536000000 |
Build
Name | Description |
---|---|
basePathstring optional | Base path that can be used by the modules to further specify their routes. Default: /api/v1 |
portnumber optional | Port the API will be available at Default: 8080 |
enableDefaultAccessboolean optional | Whenever to use the access property of each path. Can be left as is. Access will be granted by default unless the access management module is used Default: true |
useReduxDevtoolsboolean optional | |
devtoolsOptionsobject optional | |
devtoolsOptions.realtimeboolean optional | Specifies whether to allow remote monitoring. Defaults to NODE_ENV === development |
devtoolsOptions.hostnamestring optional | Used to specify host for remotedev-server. If port is specified, default value is localhost. |
devtoolsOptions.portnumber optional | Used to specify the host port for remotedev-server |
devtoolsOptions.secureboolean optional | Specifies whether to use https protocol for remotedev-server. |
devtoolsOptions.maxAgenumber optional | Maximum allowed actions to be stored in the history tree. The oldest actions are removed once maxAge is reached. It is critical for performance. |
Database
Name | Description |
---|---|
connectionStringstring optional | https://www.mongodb.com/docs/manual/reference/connection-string/ Default: mongodb://127.0.0.1:27017 |
databaseNamestring optional | Default: database |
persistenceIntervalnumber optional | Milliseconds interval in where an event is triggered that allows modules to persist their data. |
clientOptionsobject optional | |
clientOptions.tlsCAFilestring optional | |
clientOptions.connectTimeoutMSnumber optional |
Adapter
Name | Description |
---|