ownet

This is a simple client-side implementation of the owserver protocol from the owfs project. It allows you to query any owserver over the network (or locally).

Usage

To test actually using the connection run owserver with fake sensors:

owserver --fake 1F,10

And now list the contents of the root dir:

require 'ownet'
conn = OWNet::Connection.new
conn.dir('/')
#=> ["/1F.67C6697351FF", "/10.4AEC29CDBAAB", "/bus.0", "/uncached" ...

To read a value do:

conn.read('/10.4AEC29CDBAAB/temperature')
#=> 36.4784 (Returns a random value with owserver --fake)

To write a value do:

conn.write('/1F.67C6697351FF/clearevent', 1)
#=> 0

Author

Code written by Pedro CĂ´rte-Real <[email protected]> in part based on the ownet python client by Peter Kropf.