owfs.conf − owfs programs configuration file
An OWFS
configuration file is specified on the command line:
owfs -c config_file [other options]
The file name is arbitrary, there is no default configuration file used.
A configuration file can be invoked for any of the OWFS programs ( owfs (1) owhttpd (1) owserver (1) owftpd (1) ) or any of the language bindings ( owperl (1) owcapi (1) owtcl (1) owphp owpython ) to set command line parameters.
Similar to Unix
shell script or perl syntax
Comments
# Any # marks the start
of a comment
# blank lines are ignored
Options
option # some options
(like ’foreground’) take no values
option = value # other options need a value
option value # ’=’ can be omitted if
whitespace separates
Option # Case is ignored (for options, not values)
opt # non-ambiguous abbreviation allowed
-opt --opt # hyphens ignored
owserver
server: opt = value #
only owserver effected by this line
! server: opt = value # owserver NOT effected by
this line
owhttpd
http: opt = value # only
owhttpd effected by this line
! http: opt = value # owhttpd NOT effected by
this line
owftpd |
ftp: opt = value # only owftpd effected by this line |
! ftp: opt = value # owftpd NOT effected by this line
owfs |
owfs: opt = value # only owfs effected by this line |
! owfs: opt = value # owfs NOT effected by this line
Limits |
# maximum line length of 250 characters |
# no limit on number of lines
owfs.conf (5) allows a uniform set of command line parameters to be set.
Not all OWFS programs use the same command line options, but the non-relevant ones will be ignored.
Command line and configuration options can mixed. They will be invoked in the order presented. Left to right for the command line. Top to bottom for the configuration file.
Configuration files can call other configuration files. There is an arbitrary depth of 5 levels to prevent infinite loops. More than one configuration file can be specified.
Here is a sample
configuration file with all the possible parameters
included.
# Sources
device = /dev/ttyS0 # serial port: DS9097U DS9097 ECLO
or LINK
device = /dev/i2c-0 # i2c port: DS2482-100 or DS2482-800
usb # USB device: DS9490 PuceBaboon
usb = 2 # Second DS9490
usb = all # All DS9490s
altUSB # Willy Robison’s tweaks
LINK = /dev/ttyS0 # serial LINK in ascii mode
LINK = [address:]port # LINK-HUB-E (tcp access)
HA7 # HA7Net autodiscovery mode
HA7 = address[:port] # HA7Net at tcp address (port 80)
etherweather = address[:port] # Etherweather device
server = [address:]port # owserver tcp address
FAKE = 10,1B # Random simulated device with family codes
(hex)
TESTER = 28,3E # Predictable simulated device with
family codes
#
# Sinks
# # owfs specific
mountpoint = filelocation # FUSE mount point
allow_other # Short hand for FUSE mount option
"
# # owhttpd owserver owftpd specific
port = [address:]port # tcp out port
#
# Temperature scales
Celsius # default
Fahrenheit
Kelvin
Rankine
#
# Timeouts (all in seconds)
# cache for values that change on their own
timeout_volatile = value # seconds "volatile"
values remain in cache
# cache for values that change on command
timeout_stable = value # seconds "stable"
values remain in cache
# cache for directory lists (non-alarm)
timeout_directory = value # seconds
"directory" values remain in cache
# cache for 1-wire device location
timeout_presence = value # seconds "device
presence" (which bus)
timeout_serial = value # seconds to wait for serial
response
timeout_usb = value # seconds to wait for USB response
timeout_network = value # seconds to wait for tcp/ip
response
timeout_ftp = value # seconds inactivity before closing
ftp session
#
# Process control
configuration = filename # file (like this) of program
options
pid_file = filename # file to store PID number
foreground
background # default
readonly # prevent changing 1-wire device contents
write # default
error_print = 0-3 # 0-mixed 1-syslog 2-stderr
3-suppressed
error_level = 0-9 # increasing noise
#
# zeroconf / Bonjour
zero # turn on zeroconf announcement (default)
nozero # turn off zeroconf announcement
announce = name # name of announced service (optional)
autoserver # Add owservers descovered by
zeroconf/Bonjour
noautoserver # Don’t use zeroconf/Bonjour
owservers (default)
#
# tcp persistence
timeout_persistent_low = 600 # minimum time a persistent
socket will stay open
timeout_persistent_high = 3600 # max time an idle client
socket will stay around
#
# Display
format = f[.]i[[.]c] # 1-wire address f amily
i d code c rc
#
# Cache
cache_size = 1000000 # maximum cache size (in bytes) or
0 for no limit (default 0) #
# Information
# (silly in a configuration file)
version
help
morehelp
http://www.owfs.org
Paul Alfille ([email protected])