pi_portal.modules.integrations.gpio.components.temperature_monitor

Temperature sensor monitor class.

class pi_portal.modules.integrations.gpio.components.temperature_monitor.TemperatureSensorMonitor(gpio_pins)[source]

Temperature sensor monitor and logger.

Parameters:

gpio_pins (Sequence[TemperatureSensor]) – A list of DHT11 sensors to monitor.

check_state_for_changes()

Log any detected differences in state.

Return type:

None

configure_logger()

Configure a standardized logger for this class.

Return type:

None

hook_log_state(gpio_pin)[source]

Log customized messages when a state change is detected.

Parameters:

gpio_pin (TemperatureSensor) – A GPIO pin to log an event for.

Return type:

None

hook_setup_gpio()

Initialize the GPIO mode, specific to the RPi library.

Return type:

None

is_running()

Indicate if the polling loop is active. Override for testing.

Return type:

bool

start()

Begin the monitoring loop.

Return type:

None

update_state()

Poll GPIO and update the known state for the doors.

Return type:

None