Software Overview

PVP software overview block diagram: the GUI accepts input from a user and displays system status. The GUI sends sensor values and receives alarms from the alarm manager. The GUI sends control values and receives sensor values from the coordinator. The coordinator runs the ventilation logic and sends control signals to HAL, the hardware abstraction layer. HAL translates control messages from the coordinator to the particular hardware device and sends them to the pigpio daemon.

PVP is modularly designed to facilitate future adaptation to new hardware configurations and ventilation modes. APIs were designed for each of the modules to a) make them easily inspected and configured and b) make it clear to future developers how to adapt the system to their needs.

PVP runs as multiple independent processes The GUI provides an interface to control and monitor ventilation, and the controller process handles the ventilation logic and interfaces with the hardware. Inter-process communication is mediated by a coordinator module via xml-rpc. Several ’common’ modules facilitate system configuration and constitute the inter-process API. We designed the API around a uni-fied, configurablevaluesmodule that allow the GUI andcontroller to be reconfigured while also ensuring system robustness and simplicity.

PVP is configured by

  • The Values module parameterizes the different sensor and control values displayed by the GUI and used by the controller

  • The Prefs module creates a prefs.json file in ~/pvp that defines user-specific preferences.

PVP is launched like:

python3 -m pvp.main

And launch options can be displayed with the --help flag.

Folder Structure

The repository is organized as follows:

  • pvp/assets/ contains technical information like CAD drawings, circuit diagrams.

  • pvp/data/ contains information for calibrating sensors; data and information.

  • pvp/_docs and pvp/docs is raw, and built documentation.

  • pvp/tests contains automated tests for all software modules.

  • pvp/sandbox is experimental code, that is not necessary to operate pvp. Place your toy programs here.

  • pvp/pvp is the main code. It contains individual files for all modules of PVP1. Binary files like audio/graphics are deposited with the respective module, and not collected in a central site.

PVP Modules


A modular GUI with intuitive controls and a clear alarm system that can be configured to control any parameter or display values from any sensor.


A module to handle the ventilation logic, build around a gain-adjusted PID controller.


A hardware abstraction layer powered by pigpio that can read/write at >300 Hz


Define complex and responsive alarm triggering criteria with human-readable Alarm Rules


Modules that provide the API between the GUI and controller, user preferences, and other utilities