App::RPi::EnvUI::Configuration - Configuration options for App::RPi::EnvUI
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.
src/
envui-dist.json
config/envui.json
perl Makefile.PL
This is a JSON file, so both the key and value must be double-quoted.
JSON
Configure options are separated into separate sections based on their purpose.
The core configuration section contains the following configuration directives, which pertain to the core operation of the system.
core
Value: Integer, the number of seconds we'll poll the environment sensors and update the database with the new information.
Default: 15
15
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
3
Value: Integer, representing the interval (seconds) that the client UI will automatically refresh the page (asynchronously).
Default: 4
4
Value: A time zone as accepted by DateTime's new() method's time_zone parameter.
new()
time_zone
Default: America/Edmonton (MST)
America/Edmonton
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.
1
0
Default: 0
Value: Bool. True to have the RPi::DHT11 hygrometer sensor print out debug information.
Value: String, a filename to use to log to. By default, if logging is enabled, we log to STDOUT.
STDOUT
Default: "" (empty string, ie. no file)
""
Value: Integer, -1 through 7. Sets the debug logging level.
-1
7
Default: -1 (off)
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)
The control configuration section specifies parameters for specific actions within the system.
control
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
80
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
20
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)
1800
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.
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.
auxN
N
Default: aux1
aux1
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
aux2
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
aux3
This section manages the light control functionality.
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.
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).
HH:MM
18:30
Default: 18:00
18:00
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.
12
18
24
Default: 12
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.
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
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
Value: Bool. 0 will disable the ability to toggle the auxillary channel via the UI, and 1 will enable it.
Steve Bertrand, <steveb@cpan.org<gt>
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.
To install App::RPi::EnvUI, copy and paste the appropriate command in to your terminal.
cpanm
cpanm App::RPi::EnvUI
CPAN shell
perl -MCPAN -e shell install App::RPi::EnvUI
For more information on module installation, please visit the detailed CPAN module installation guide.