Skip to content
This repository has been archived by the owner on Feb 21, 2022. It is now read-only.

ConfigurationOptions

Alexander Thoukydides edited this page Mar 19, 2015 · 2 revisions

Configuration Files

Many of the common options for this software can be placed in a global configuration file. This is necessary for the daemon used to log thermostat status to a database but useful for the other tools too.

Each script searches for configuration options in the following sequence (with the last value for each option being used):

  1. Built-in defaults
  2. /etc/heatmiser.conf
  3. ~/.heatmiser
  4. Command line options

File Format

A minimal /etc/heatmiser.conf or ~/.heatmiser configuration file to connect to thermostat with hostname heatmiser using PIN access code 1234 would look like:

HOST        heatmiser
PIN         1234

Each option appears on a line by itself, with the option name followed by spaces and then the value(s). Blank lines and those starting with a hash character (#) are ignored.

Configuration Settings

The following options can be configured:

File Option Command Line Option Default Value Description
DBPASSWORD -a password Password for connecting to the database
DBSOURCE -s source dbi:mysql:heatmiser The data source name used for connecting to the database
DBUSER -u username heatmiser The user for connecting to the database
DEBUG -d 0 Set to 1 to output information for debug purposes
HOST -h hostname Space separated list of IP addresses or hostnames for the thermostats (also used as database key, so should ideally be short and invariant)
LOGFILE -l filename /var/log/heatmiser The name of the file that the daemon should use for logging its operation
LOGSECONDS -i seconds 60 The interval in seconds between logging the thermostat's data to the database
PIN -p pincode PIN access code for the thermostat's Wi-Fi system protocol interface
VERBOSE -v 0 Set to 1 to output additional information about the scripts' operation
WKEY -k apikey API key for the online weather service (only required for metoffice and wunderground)
WLOCATION -g location Location to request from the online weather service in the appropriate format for the service being used
WLOGRATE -r factor 5 How much slower should the online weather service be polled than the main logging rate
WSERVICE -w service Optional online weather service (metoffice, wunderground, yahoo or unset for none) for external temperature
WUNITS -f units C Temperature units to request from the online weather service (C or F); should match the thermostats' configuration