General Architecture
This page provides an overview of the general architecture of the PureLife Cloud and the communication between the components.
Basic information
At its core, PureLife Cloud is a single compiled binary that provides a Restful web server.
The binary usually communicates with PostgreSQL, Mosquitto and the local file storage.
Vayyar connection setup
The Vayyar sensor's connection setup follows a fixed process:
- The sensor sends an HTTP request to the PureLife Cloud and tells it that it wants to connect to it.
- The PureLife Cloud sends the sensor the MQTT server and the MQTT access data in response
- The sensor connects to the specified MQTT server
- The MQTT server tells the PureLife Cloud that a sensor wants to connect with the access data
- The PureLife Cloud checks whether the sensor is allowed to connect with these access data
- If the access data is correct, the connection is released
- The sensor now sends its events to the MQTT broker
Vayyar firmware update
The Vayyar sensor checks every time it starts whether a firmware update is available. The firmware update is delivered via the PureLife Cloud. The PureLife Cloud frontend can be used to finely control which sensor should install which version.
It should be noted that with older sensor versions, the firmware files must be downloaded via HTTP (unencrypted). The PureLife Cloud automatically selects whether the download is encrypted or unencrypted for the sensor. In order for this to work reliably, however, the appropriate URLs of the host must be stored in the configuration file under HTTP.SiteURL
and HTTP.LegacyFirmwareURL
.
The sensor firmware updates are part of the PureLife Cloud binary and are automatically stored in the file system when the PureLife Cloud is started.