Project

rain8net

0.0
No commit activity in last 3 years
No release in over 3 years
Rain8net irrigation controllers are serial port RS-232 devices for remote control of irrigation zones. This gem provides a ruby interface to control them.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

>= 1.0.0
~> 1.8.3
~> 3.12

Runtime

 Project Readme

rain8net

The Rain8net device is an RS232 controlled sprinkler controller. The "net" in Rain8net refers to the device's ability to be expanded with with several networked modules. This ruby library can be used to control any number of Rain8net devices from your ruby app.

More information about the Rain8 series of products can be found at WGL Designs. http://www.wgldesigns.com

If you aren't quite sure how to use this gem, take a look at the sample rails application https://github.com/adamtao/irrigatomatic

Installation

sudo gem install rain8net

or, put this in your Gemfile:

gem 'rain8net'

Usage

r8 = Rain8net.new(tty: 0)
r8.turn_on_zone(1)
sleep(30) # run for 30 seconds...
puts r8.zone_status(1) # => true
puts r8.zone_status(2) # => false
r8.turn_off_zone(1)

Tips

  • Be sure the user running your rails application has R/W access to the serial port. (try: chmod 777 /dev/ttyS0)
  • If you have more than 1 module in your setup, be sure to configure the address of each device using the manufacturer's configuration program.