SYNOPSIS

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.

USAGE

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.

SYNTAX

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

DESCRIPTION

1-Wire

1-wire is a wiring protocol and series of devices designed and manufactured by Dallas Semiconductor, Inc. The bus is a low-power low-speed low-connector scheme where the data line can also provide power.

Each device is uniquely and unalterably numbered during manufacture. There are a wide variety of devices, including memory, sensors (humidity, temperature, voltage, contact, current), switches, timers and data loggers. More complex devices (like thermocouple sensors) can be built with these basic devices. There are also 1-wire devices that have encryption included.

The 1-wire scheme uses a single bus master and multiple slaves on the same wire. The bus master initiates all communication. The slaves can be individually discovered and addressed using their unique ID.

Bus masters come in a variety of configurations including serial, parallel, i2c, network or USB adapters.

OWFS design

OWFS is a suite of programs that designed to make the 1-wire bus and its devices easily accessible. The underlying priciple is to create a virtual filesystem, with the unique ID being the directory, and the individual properties of the device are represented as simple files that can be read and written.

Details of the individual slave or master design are hidden behind a consistent interface. The goal is to provide an easy set of tools for a software designer to create monitoring or control applications. There are some performance enhancements in the implementation, including data caching, parallel access to bus masters, and aggregation of device communication. Still the fundemental goal has been ease of use, flexibility and correctness rather than speed.

Configuration

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.

SAMPLE

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

annouce = 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

RELATED TO owfs…

Programs

owfs (1) owhttpd (1) owftpd (1) owserver (1) owdir (1) owread (1) owwrite (1) owpresent (1) owtap (1)

Configuration and testing

owfs (5) owtap (1) owmon (1)

Language bindings

owtcl (3) owperl (3) owcapi (3)

Clocks

DS1427 (3) DS1904(3) DS1994 (3) DS2404 (3) DS2404S (3) DS2415 (3) DS2417 (3)

ID

DS2401 (3) DS2411 (3) DS1990A (3)

Memory

DS1982 (3) DS1985 (3) DS1986 (3) DS1991 (3) DS1992 (3) DS1993 (3) DS1995 (3) DS1996 (3) DS2430A (3) DS2431 (3) DS2433 (3) DS2502 (3) DS2506 (3) DS28E04 (3) DS28EC20 (3)

Switches

DS2405 (3) DS2406 (3) DS2408 (3) DS2409 (3) DS2413 (3) DS28EA00 (3)

Temperature

DS1822 (3) DS1825 (3) DS1820 (3) DS18B20 (3) DS18S20 (3) DS1920 (3) DS1921 (3) DS1821 (3) DS28EA00 (3) DS28E04 (3)

Humidity

DS1922 (3)

Voltage

DS2450 (3)

Resistance

DS2890 (3)

Multifunction (current, voltage, temperature)

DS2436 (3) DS2437 (3) DS2438 (3) DS2751 (3) DS2755 (3) DS2756 (3) DS2760 (3) DS2770 (3) DS2780 (3) DS2781 (3) DS2788 (3) DS2784 (3)

Counter

DS2423 (3)

LCD Screen

LCD (3) DS2408 (3)

Crypto

DS1977 (3)

Pressure

DS2406 (3) -- TAI8570

AVAILABILITY

http://www.owfs.org

AUTHOR

Paul Alfille ([email protected])