Pan Module

Pan’s responsibility is running all your rules. A rule might be toggling a light on a button push or controlling a heating based on a temperature sensor.

It’s configuration has a form of a Python package (a folder with an __init__.py file) which is imported by Pan at its startup and is expected that the configuration package will setup all its rules.

Note

It is not supported to have multiple Pan modules within one application.

application.yaml

Recommended basic configuration example:

pan:

Full configuration example:

pan:                // module's name, always use "pan"
    type: pan
    config: ./pan
    storage: ./pan
    environment:
        MY_ENVIRONMENT_VARIABLE: "value"
type

pan (You can omit this, as the type will be infered from the module’s name.)

config

Path to the pan’s configuration package relative to the application.yaml file.

Default: ./<module name>

storage

Path where runtime data should be stored relative to the storage directory.

Default: ./<module name>

environment

Dictionary with additional environment variables required by the configuration package.

Configuration package

Example of a minimal Pan’s configuration directory structure:

├── application.yaml
├── pan
    ├── __init__.py
    ├── requirements.txt

Todo

Configuration examples, Best Practices.