Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Ruby client for owserver from the one wire filesystem project
Ruby
branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
examples
lib
test
.gitignore
LICENSE
README.rdoc
Rakefile
ownet.gemspec

README.rdoc

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 <pedro@pedrocr.net> in part based on the ownet python client by Peter Kropf.

Something went wrong with that request. Please try again.