Skip to main content

measurement_conditions

module core.modules.measurement_conditions


class MeasurementConditions

MeasurementConditions allows operation in three different modes: Manual, Automatic, Manual, and CLI. Whenever a decision is made the parameter measurements_should_be_running in StateInterface is updated.

In Manual mode, the user has full control over whether measurements should be active. The user-controlled state can be controlled by the Pyra UI.

In Automatic mode, three different triggers are considered: Sun Elevation, Time, and Helios State. These triggers may also be active in any combination at the same time. Measurements are only set to be running if all triggers agree, while measurements will be set to be not active if at least one of the active triggers decides to stop measurements.

In CLI mode, triggers from external sources can be considered. This option is available for custom-built systems or sensors not part of Pyra 4. It is also possible in this mode to move the measurement control to remote systems i.e. by SSH.

method __init__

__init__(initial_config: Config)None

method run

run(new_config: Config)None

Called in every cycle of the main loop. Updates the state based on the selected mode, triggers and present conditions.