Table of Contents

Name

owdir owread owwrite owpresent - lightweight owserver access

Synopsis

owget -s [host:]port [directory] | filepath
owdir -s [host:]port [directory]
owread -s [host:]port filepath
owwrite -s [host:]port filepath value
owpresent -s [host:]port filepath

owget --autoserver [directory] | filepath
owdir --autoserver [directory]
owread --autoserver filepath
owwrite --autoserver filepath value
owpresent --autoserver filepath

owget -C --celsius -K --kelvin -F --fahrenheit -R --rankine -f --format f[.]i[[.]c] -s [host:]port [path] [path2 ...]
owdir -C --celsius -K --kelvin -F --fahrenheit -R --rankine -f --format f[.]i[[.]c] -s [host:]port [directory] [directory2 ...]
owread -C --celsius -K --kelvin -F --fahrenheit -R --rankine -f --format f[.]i[[.]c] -s [host:]port filepath [filepath2 ...]
owwrite -C --celsius -K --kelvin -F --fahrenheit -R --rankine -f --format f[.]i[[.]c] -s [host:]port filepath value [filepath2 value2 ...]
owpresent -C --celsius -K --kelvin -F --fahrenheit -R --rankine -f --format f[.]i[[.]c] -s [host:]port filepath [filepath2 ...]

owget -V --version
owdir -V --version
owread -V --version
owwrite -V --version
owpresent -V --version

owget -h | --help
owdir -h | --help
owread -h | --help
owwrite -h | --help
owpresent -h | --help

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 unalterably numbered during manufacture. There is 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 bus is accessed via one of a number of serial, parallel, i2c, network or USB adapters.

OWFS design

OWFS is a suite of programs that fundementally 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 files.

There is optional data caching to improved performance, but possible confusion over stale data.

OWSHELL programs

owget owdir owread owwrite owpresent are collectively called the owshell programs. They allow lightweight access to an owserver (1) for use in command line scripts.

Unlike owserver (1) owhttpd (1) owftpd (1) owhttpd (1) there is not persistent connection with the 1-wire bus, no caching and no multithreading. Instead, each program connects to a running owserver (1) and performs a quick set of queries.

owserver (1) performs the actual 1-wire connection (to physical 1-wire busses or other owserver programs), performs concurrency locking, caching, and error collection.

owshell programs are intended for use in command line scripts. An alternative approach is to mount an owfs (1) filesystem and perform direct file lists, reads and writes.

owdir

owdir performs a directory listing. With no argument, all the devices on the main 1-wire bus will be listed. Given the name of a 1-wire device, the available properties will be listed. It is the equivalent of
ls directory
in the owfs (1) filesystem.

owread

owread performs a file read. e.g. 28.0080BE21AA00/temperature gives the DS18B20 temperature. It is the equivalent of
cat filepath
in the owfs (1) filesystem.

owget

owget combines the function of owdir and owread depending on whether the arguments are directories or files. Multiple arguments are handled independently, printing on separate lines.

owwrite

owwrite performs a file update. e.g. 29.3C80BE21AA00/PIO.3 is switch pin 3 of the DS2408. It is the equivalent of
echo "value" > filepath
in the owfs (1) filesystem.

owpresent

owpresent reports whether a particular 1-wire chip exists on owserver. e.g. 26.3C80BE21DD00 is a DS2438. owpresent prints 1 for device present, else 0.

Standard Options

--autoserver

Find an owserver using the Service Discovery protocol. Essentially Apple's Bonjour (aka zeroconf). Only the first owserver will be used, and that choice is probably arbitrary.

-s [host:]port

Connect via tcp (network) to an owserver process that is connected to a physical 1-wire bus. This allows multiple processes to share the same bus. The owserver process can be local or remote.

Help Options

-h --help

Shows basic summary of options.

-V --version

Version of this program and related libraries.

-f --format "f[.]i[[.]c]"

Display format for the 1-wire devices. Each device has a 8 byte address, consisting of:
f
family code, 1 byte
i
ID number, 6 bytes
c
CRC checksum, 1 byte

Possible formats are f.i (default, 01.A1B2C3D4E5F6), fi fic f.ic f.i.c and fi.c

All formats are accepted as input, but the output will be in the specified format.

Example

owdir -s 3000 --format fic
Get the device listing (full 16 hex digits, no dots) from the local owserver at port 3000
owread -F --autoserver 51.125499A32000/typeK/temperature
Read temperature from the DS2751-based thermocouple on an auto-discovered owserver Temperature in fahrenheit.
owwrite -s 10.0.1.2:3001 32.000800AD23110/pages/page.1 "Passed"
Connect to a OWFS server process ( owserver ) that was started on another machine at tcp port 3001 and write to the memory of a DS2780

See Also

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 (palfille@earthlink.net)


Table of Contents