Configuration file - alex-konshin/f007th-rpi GitHub Wiki
Configuration file may contains configuration commands and long form of almost any command line option. You can also specify option config with path to another configuration file that will be included.
Symbol '#' starts a comment at any position of any line.
gpio 27
celsius # Temperature will be shown in degrees on the Celcius scale.
# The max time in minutes when the utility does not send new data to server if the value is not changed.
max-gap 5
Any command or option must start at the first position of the line. If a line starts with blanks or tabs then it is a continuation of the previous command.
# Example of a single configuration command
action_rule id=test2 sensor="Alex office"
metric=F bounds=72.5..73.5[10:00]73..74[17:00]72..75[8:00]
cmd_hi="echo \"test2 cmd_hi %F\""
cmd_lo="echo \"test2 cmd_lo %F\""
sensor <type> [<channel>] <rolling_code> <name>
Defines a sensor and gives a name to it. This name is printed or sent to server with sensor's data. An argument <name>
can be any word without blanks or quoted string.
Argument <type>
could be one of (case insensitive): f007th
, f007tp
, 00592txr
, hg02832
, tx6
, wh2
, ft007th
.
Argument <rolling_code>
may be decimal number or hex number started with 0x
.
Warning: Argument <channel>
is not optional: You must specify it if this particular sensor type has channels:
- For sensors of type 00592txr the value of channel is A, B or C.
- For sensors f007th and f007tp it should be a number 1..8.
- For sensors hg02832 it should be a number 1..3.
- For sensors tx141 it should be a number 1..4 even if if the channel cannot be set on a particular model.
- Sensors TX6/TX7U, WH2, ft007th(do not confuse with f007th) have no channels. They are distinguished by rolling code only.
- Sensors TFA Twin Plus 30.3049 (also known as Conrad KW9010 or Ea2 BL999) have 3 channels but I don't know how to change the channel - I do not see any dip switches. They have 6-bit rolling code.
httpd [port=]<port> [www_root=<www_content_director>]
Argument <port>
specifies TCP port number. There is no default value. If it is set then the utility will start listening of this port for incoming HTTP requests.
Please remember that any Linux process must run as root to be able to listen any port less then 1024.
Optional argument www_root
specifies the directory. If it is set then the utility may serve requests for files from this directory.
For example, if you put file index.html (or any other HTML file) in this directory then it can be read by any web browser.
Note that the utility intentionally does not provide any support for directory listing.
Example of index.html is provided in directory samples
in the project repository. This example shows a table of defined sensors and chart of temperature for last 24 hours.
action_rule id=<rule_id> sensor=<sensor_name> metric={F|C|H|B} [cmd_lo=<system_command>] [cmd_in=<system_command>] [cmd_hi=<system_command>] bounds=<schedule_with_ranges>
Defines the action to be executed when the current value (defined by metric) passes specified borders (defined by bounds).
# Commands/options MUST start at the first position of the line.
# If line starts with blanks then it continue the definition from the previous line.
# Any comments are started with hash. Empty lines are ignored.
gpio 27
#all-changes
#verbose
# Enable support of 1-wire sensors DS18B20 (it is experimental but should work on Raspberry Pi)
# Be sure that 1-wire support is enabled on your Raspberry Pi.
w1 enable_DS18B20=true
# Listen for HTTP requests on port 8888.
# It allows to send REST requests and/or download files or HTML pages from www_root directory.
# If the path in www_root is relative than it is based on the location of this configuration file.
httpd port=8888 www_root=www
#server-type InfluxDB
#send-to http://m700.dom:8086/write?db=smarthome
max-gap 5
# If the path is relative than it is based on the location of this configuration file.
log-file "f007th-send.log"
# Dump sequences to a file
dump f007th-send_dump.log decoded=false max_duration=4200 min_sequence_length=70
#sensor <type> <channel> <rolling_code> <name>
# Channel must be omitted if it is not supported by this sensor type.
sensor f007th 1 13 "Server room"
sensor f007th 2 184 "Main bedroom"
sensor f007th 3 85 "Roman room"
sensor f007th 4 12 "Alex office"
sensor tfa303049 1 41 "Alex office TFA"
sensor f007th 5 174 "Kitchen"
sensor f007th 6 139 "TV room"
sensor f007th 7 249 "Garage"
sensor f007th 7 196 "Attic"
sensor f007th 8 95 "Dirty room"
sensor f007th 8 227 "Dining room"
sensor f007th 1 191 "Neighbor 2"
sensor 00592txr A 1628 "Neighbor 1"
sensor 00592txr A 2450 "Backyard"
sensor tx6 109 "Attic TX7U"
sensor tx6 92 "LaCrosse TX7U 2"
sensor tx141 1 55 "LaCrosse TX141TH-BV3"
# Example of declaration of DS18B20 sensor.
# Identifier of the sensor is the last 8 characters of the folder in /sys/bus/w1/devices that is associated with the sensor.
# For example, if folder name is "28-000004ce62c7" then id is 04ce62c7.
sensor ds18b20 04ce62c7 "Server room DS18B20"
# definition of action with schedule, thresholds and commands to be executed
action_rule id=test1 sensor="Auriol" metric=F cmd_hi="echo \"test1 cmd_hi %F\"" cmd_lo="echo \"test1 cmd_lo %F\"" bounds=72.5..73.5[10:00]73..74[17:00]72..75[8:00]
# multiline definition: a line that starts with blanks continues definition of the command on the previous line
action_rule id=test2 sensor="Auriol"
metric=F bounds=72.5..73.5[10:00]73..74[17:00]72..75[8:00]
cmd_hi="echo \"test2 cmd_hi %F\""
cmd_lo="echo \"test2 cmd_lo %F\""