The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

App::RPi::EnvUI::Configuration - Configuration options for App::RPi::EnvUI

CONFIGURATION FILE

A default distribution configuration file is housed in the src/ directory named envui-dist.json. This file gets copied into config/envui.json for normal usage during the perl Makefile.PL stage. Edit this file to modify the web application before runtime.

This is a JSON file, so both the key and value must be double-quoted.

CONFIGURATIIION OPTIONS

Configure options are separated into separate sections based on their purpose.

CORE CONFIGURATION SECTION

The core configuration section contains the following configuration directives, which pertain to the core operation of the system.

event_fetch_timer

Value: Integer, the number of seconds we'll poll the environment sensors and update the database with the new information.

Default: 15

event_action_timer

Value: Integer, representing the interval (seconds) that the server will read the current state of the system, and will enable/disable any functional GPIO pins.

Default: 3

event_display_timer

Value: Integer, representing the interval (seconds) that the client UI will automatically refresh the page (asynchronously).

Default: 4

time_zone

Value: A time zone as accepted by DateTime's new() method's time_zone parameter.

Default: America/Edmonton (MST)

testing

Value: Bool. True (1) to enable testing. We will mock out all portions that are non-Perl in order to allow for unit test runs on non-Pi boards. Set to False (0) to disable this and run in normal mode.

Default: 0

debug_sensor

Value: Bool. True to have the RPi::DHT11 hygrometer sensor print out debug information.

Default: 0

log_file

Value: String, a filename to use to log to. By default, if logging is enabled, we log to STDOUT.

Default: "" (empty string, ie. no file)

debug_level

Value: Integer, -1 through 7. Sets the debug logging level.

Default: -1 (off)

devel

Value: Bool. True to signify that this is not a production system, False to signify it is.

When enabled, the UI's time/date bar's background colour will change to red for easy identification of a development system.

Default: 0 (off)

CONTROL CONFIGURATION SECTION

The control configuration section specifies parameters for specific actions within the system.

temp_limit

Value: Integer. A limit (in Farenheit), that when the temperature goes above, the colour of the temperature in the UI will change from green to red, and we'll enable the assoiated GPIO pin, if set.

Default: 80

humidity_limit

Value: Integer. A limit, that when the humidity goes below, the colour of the humidity in the UI will change from green to red, and we'll enable the assoiated GPIO pin, if set.

Default: 20

temp_aux_on_time

Value: Integer (seconds). This is the minimum length of time that the auxillary associated with the temperature limit reached event will remain on once turned on. Setting this to a reasonable number will prevent repeated on/off events if the temperature fluctuates right around the limit.

Default: 1800 (30 minutes)

humidity_aux_on_time

Value: Integer (seconds). This is the minimum length of time that the auxillary associated with the humidity limit reached event will remain on once turned on. Setting this to a reasonable number will prevent repeated on/off events if the humidity fluctuates right around the limit.

Default: 1800 (30 minutes)

temp_aux

Value: String, in the form auxN, where N is a value from 1-8. This specifies that we'll associate that auxillary (an auxillary represents a GPIO pin) to the temperature button in the UI, and the temperature limit reached event.

Default: aux1

humidity_aux

Value: String, in the form auxN, where N is a value from 1-8. This specifies that we'll associate that auxillary (an auxillary represents a GPIO pin) to the humidity button in the UI, and the humidity limit reached event.

Default: aux2

light_aux

Value: String, in the form auxN, where N is a value from 1-8. This specifies that we'll associate that auxillary with the light on/off event.

Default: aux3

LIGHT CONFIGURATION SECTION

This section manages the light control functionality.

enable

Value: Bool. Set to 1 (true) to enable the light management functionality, and 0 (false) to disable it. If this is false, we won't show the light management table in the UI, and we will not perform any light on/off events.

Default: 0

on_at

Value: A time, in HH:MM format, in 24 hour clock (eg: 18:30). This is the time that the light will be enabled (turned on).

Default: 18:00

on_hours

Value: Integer, the number of hours the light shall remain on, before being turned back off.

Note: 12 hours is typical for a flowering cycle, and either 18 or 24 hours are typical for a vegitative plant cycle.

Default: 12

AUXILLARY CONFIGURATION SECTION

An auxillary (ie. aux) is the representation of a Raspberry Pi GPIO pin. There are eight auxillaries built into the system, all are disabled by default.

Each auxillary has its own little configuration section, and each contains the following directives.

pin

Value: Integer. The GPIO pin number (in Broadcom BCM GPIO numbering scheme).

Disable an aux by setting this value to -1 (by default all of them are).

Default: -1

desc

Value: String. A one-word description of what the pin is used for. This value is operationally irrelevant.

Default:

    aux1: temp
    aux2: humidity
    aux3: light
    aux4: none
    aux5: none
    aux6: none
    aux7: none
    aux8: none

toggle

Value: Bool. 0 will disable the ability to toggle the auxillary channel via the UI, and 1 will enable it.

AUTHOR

Steve Bertrand, <steveb@cpan.org<gt>

LICENSE AND COPYRIGHT

Copyright 2016 Steve Bertrand.

This program is free software; you can redistribute it and/or modify it under the terms of either: the GNU General Public License as published by the Free Software Foundation; or the Artistic License.

See http://dev.perl.org/licenses/ for more information.