Project

ownet

0.0
No commit activity in last 3 years
No release in over 3 years
A simple client that interfaces with owserver from the owfs project
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies
 Project Readme

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.