First steps

After installing the PureLife Cloud, some basic steps and adjustments are required for the system to function correctly. This section describes how to get started.

After changing the configuration, the PureLife Cloud instance must be restarted.

System identification

In order to specify the cloud for your own environment, the service name of the instance can be adjusted. To do this, adjust the ServiceName parameter in the [Service] section of the central configuration file config.toml.

Example configuration:

[Service]

  # Name of this service. Sometimes used in mails and sent messages.
  # Useful to change if multiple PureLife Cloud instances are used.
  ServiceName = "PureLife Cloud Production"

Configuration of the HTTP server

During operation, the PureLife Cloud creates links for the sensors, through which the sensors can exchange files with the PureLife Cloud. To ensure that the created links are valid and can be used, the URL of the PureLife Cloud must be stored.

[HTTP]

  # HTTP/s URL under which the PureLife Cloud instance can be reached.
  SiteURL = "https://purelife-cloud.my-domain.com"

Sensors with firmware version < 0.36 do not support transfer of files over an encrypted HTTPS connection. If the PureLife Cloud is accessed via an encrypted connection (strongly recommended), an unencrypted connection must also be possible and the URL for the unencrypted connection must be stored in the configuration.

[HTTP]

  # URL that sensors with a firmware version < 0.36 should use for file exchange.
  # Must also point to PureLife Cloud, but must use HTTP.
  LegacyFirmwareURL = "http://purelife-cloud.my-domain.com"

Even if it is not planned to use sensors with a firmware version < 0.36, an update from an older firmware version is still often necessary (e.g. after resetting a sensor). An unencrypted connection is also required for this update.

System Mail Server

To notify the cloud administrator about system events, the section [System_SMTP] in the central configuration file config.toml with the corresponding parameters of the mail server.

Example configuration:

[System_SMTP]

  # Activates or deactivates the SMTP service
  Enabled = true

  # Name of the sender (For example 'John Doe')
  FromName = "PureLife Cloud"

  # Sender email address
  FromAddress = "purelife-cloud@domain.com"

  # Optional. Mail address to which the reply should be sent.
  ReplyToAddress = "it@domain.com"

  # Host of the SMTP server.
  Host = "mail.domain.com"

  # Port of the SMTP server.
  Port = 587
  ServerTimeout = 45

  # Whether to log in to the SMTP server using the 'LOGIN' mechanism or not.
  EnableSMTPAuth = true

  # Username with which to log on to the SMTP server.
  Username = "purelife-cloud@domain.com"

  # Password with which to log on to the SMTP server.
  Password = "Secret-Password"

  # How to encrypt communication with the mail server.
  # Possible values are: "PLAIN", "TLS", "STARTTLS" and ""
  ConnectionSecurity = "STARTTLS"

  # If true, crypto/tls accepts any certificate presented by the server and any host name in that certificate
  SkipServerCertificateVerification = false

The configuration can be checked with the following command via the console and a test mail can be sent:

./purelife-cloud config test-mail --to your@mail-address.com

System Admin Mail

After the relevant parameters for the system mail server have been stored, the administrator’s mail address must be configured. This can be found in the [Service] section of the central configuration file config.toml.

Example configuration:

[Service]

# .....

  # E-mail address of an administrator.
  # Used to send system mails concerning general things.
  # Attention: System SMTP must be configured before.
  AdminMail = "admin@domain.com"
  MessageRetryIntervall = 5
  MessageRetryMaxAge = 60

Publisher

A publisher is a shortcut to a service, service, or protocol to inform users about specific situations. The PureLife Cloud supports different publishers, which must be defined in the central configuration file config.toml in the section [Publisher]. The publishers can then be applied in the rules.

Telegram

In order for the PureLife Cloud instance to be able to communicate via Telegram, a Telegram Bot must be created and its token stored in the central configuration file config.toml.

See the Telegram Bot guide to learn how to create the bot and enter it in the configuration file.

E-mail

In order to be able to use mail as a publisher, the mail server-specific parameters must be stored in the central configuration file config.toml in the section [Publisher.SMTP].

These may or may not differ from the System Mail Server [System_SMTP]. The configuration of the parameters for the [Publisher.SMTP] is required if you want to use email as a publisher.

Example configuration:

[Publisher.SMTP]

  # Activates or deactivates the SMTP service
  Enabled = true

  # Name of the sender (For example 'John Doe')
  FromName = "PureLife Cloud"

  # Sender email address
  FromAddress = "purelife-cloud@domain.com"

  # Optional. Mail address to which the reply should be sent.
  ReplyToAddress = "it@domain.com"

  # Host of the SMTP server.
  Host = "mail.domain.com"

  # Port of the SMTP server.
  Port = 587
  ServerTimeout = 45

  # Whether to log in to the SMTP server using the 'LOGIN' mechanism or not.
  EnableSMTPAuth = true

  # Username with which to log on to the SMTP server.
  Username = "purelife-cloud@domain.com"

  # Password with which to log on to the SMTP server.
  Password = "Secret-Password"

  # How to encrypt communication with the mail server.
  # Possible values are: "PLAIN", "TLS", "STARTTLS" and ""
  ConnectionSecurity = "STARTTLS"

  # If true, crypto/tls accepts any certificate presented by the server and any host name in that certificate
  SkipServerCertificateVerification = false

The configuration can be checked with the following command via the console and a test mail can be sent:

./purelife-cloud config test-mail --use-publisher --to your@mail-address.com

MessageBird

The MessageBird service can be used to send notifications about defined situations via SMS or call. To do this, you must first create an account, load it with credit and generate an access key. The access key must then be stored in the central configuration file config.toml in the section [Publisher.Message_Bird].

Example configuration:

# Configuration for the MessageBird publisher.
# Used for sending SMS.
[Publisher.Message_Bird]

  # Activates SMS delivery via MessageBird.
  SMSEnabled = false

  # Enables the publisher for voice messaging via MessageBird.
  VoiceMessageEnabled = true

  # Sets the gender of the voice that will call.
  # Possible values are: "male" and "female"
  VoiceGender = "female"

  # The number of times the voice message needs to be repeated. Maximum is 10 times.
  VoiceRepeats = 1

  # Access key which is used for communication with the MessageBird API.
  # To get a access key, see the MessageBird documentation.
  AccessKey = "ab12cd34ef56gh78ij90kl"

GRPC

gRPC (gRPC Remote Procedure Calls) is a protocol for calling functions in distributed computer systems. It is based on the HTTP/2 standard and protocol buffers. This protocol can be used by the cloud to send notifications about defined situations. In this case, a corresponding receiver system is required.

ESPA

ESPA 4.4.4 is a serial port protocol defined by the European Selective Paging Manufacturers Association (ESPA). This protocol enables data to be exchanged between radio paging systems, paging systems, nurse call systems, personal emergency signal systems or alarm servers. The PureLife Cloud is able to use notifications about defined situations via this protocol. In this case, a corresponding receiver system is required.

Change passwort

In the case of a server installation, the first cloud administrator including password is created individually as part of the installation routine.

With a Docker installation, the first cloud administrator including password is specified by the installation routine. By default, the access data are:

Benutzer: admin
Passwort: admin

These access data should be changed before further use, especially when accessing from the Internet. There are two ways to do this:

  1. Change via the PureLife Cloud Frontend
  2. Change via console

The change via the cloud frontend is described in the Edit user chapter.

Use the following command to change via the console:

{installationsort}/purelife-cloud user password admin new-password

Create customer

At least one customer must be created so that the sensors associated with this instance can be used. The sensors must then be assigned to this customer so that the sensors can be configured. The creation is described in the Customers chapter.