handler module

class handler.Scheduler(config: Dict)

Bases: object

Scheduler Job Object.

Parameters

config – config yaml file data

cleanup() None

cleanup by relay module.

is_use_flag(*args) bool

Get whether the use flag is set.

Parameters

*args – args

Returns

A boolean if the use flag is set.

monitoring_job() None

Create the monitoring job.

params_mapping = {'co2': {'name': 'CO2(ppm)', 'type': <class 'float'>, 'unit': 'ppm'}, 'distance': {'name': 'Distance(mm)', 'type': <class 'float'>, 'unit': 'mm'}, 'humidity': {'name': 'Humidity(%)', 'type': <class 'float'>, 'unit': '%'}, 'light': {'name': 'Light(lux)', 'type': <class 'float'>, 'unit': 'lux'}, 'power_flag': {'name': 'PowerFlag', 'type': <class 'int'>, 'unit': ''}, 'temperature': {'name': 'Temperature(C)', 'type': <class 'float'>, 'unit': 'C'}, 'time': {'name': 'Time', 'type': 'datetime64[ns]', 'unit': ''}}
relay_module_job() None

Create the relay module job to turn on power.

summary_mail_job() None

Create the summary email job.

turn_off_power() None

Turn off power by relay module.

web_camera_module_job() None

Create the web camera module job to take a photo.

handler.cleanup() None

turn off power and cleanup function.

handler.main() None

main function.