Skip to content
/ ownet Public

Ruby client for owserver from the one wire filesystem project

License

Notifications You must be signed in to change notification settings

pedrocr/ownet

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

41 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

Ruby client for owserver from the one wire filesystem project

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages