App-RPi-EnvUI
view release on metacpan or search on metacpan
lib/App/RPi/EnvUI/Configuration.pod view on Meta::CPAN
=head1 NAME
App::RPi::EnvUI::Configuration - Configuration options for L<App::RPi::EnvUI>
=head1 CONFIGURATION FILE
A default distribution configuration file is housed in the C<src/> directory
named C<envui-dist.json>. This file gets copied into C<config/envui.json> for
normal usage during the C<perl Makefile.PL> stage. Edit this file to modify the
web application before runtime.
This is a C<JSON> file, so both the key and value must be double-quoted.
=head1 CONFIGURATIIION OPTIONS
Configure options are separated into separate sections based on their purpose.
=head2 CORE CONFIGURATION SECTION
The C<core> configuration section contains the following configuration
directives, which pertain to the core operation of the system.
=head3 event_fetch_timer
Value: Integer, the number of seconds we'll poll the environment sensors and
update the database with the new information.
Default: C<15>
=head3 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: C<3>
=head3 event_display_timer
Value: Integer, representing the interval (seconds) that the client UI will
automatically refresh the page (asynchronously).
Default: C<4>
=head3 time_zone
Value: A time zone as accepted by L<DateTime>'s C<new()> method's C<time_zone>
parameter.
Default: C<America/Edmonton> (MST)
=head3 testing
Value: Bool. True (C<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
(C<0>) to disable this and run in normal mode.
Default: C<0>
=head3 debug_sensor
Value: Bool. True to have the L<RPi::DHT11> hygrometer sensor print out debug
information.
Default: C<0>
=head3 log_file
Value: String, a filename to use to log to. By default, if logging is enabled,
we log to C<STDOUT>.
Default: C<""> (empty string, ie. no file)
=head3 debug_level
Value: Integer, C<-1> through C<7>. Sets the debug logging level.
Default: C<-1> (off)
=head3 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: C<0> (off)
=head2 CONTROL CONFIGURATION SECTION
The C<control> configuration section specifies parameters for specific actions
within the system.
=head3 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
( run in 1.168 second using v1.01-cache-2.11-cpan-39bf76dae61 )