Skip to content
This repository

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

branch: master

Fetching latest commit…

Octocat-spinner-32-eaf2f5

Cannot retrieve the latest commit at this time

Octocat-spinner-32 examples
Octocat-spinner-32 lib
Octocat-spinner-32 test
Octocat-spinner-32 .gitignore
Octocat-spinner-32 LICENSE
Octocat-spinner-32 README.rdoc
Octocat-spinner-32 Rakefile
Octocat-spinner-32 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.