Skip to content

bbreukelen/node-rainbird

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Node-Rainbird

#####Node.js library for interacting with WiFi LNK module of the Rain Bird Irrigation system


Note: The API and encryption are based on pyrainbird by jbarrancos. All credits for reverse engineering the rainbird api go to him.

Note: This project has no affiliation with Rain Bird. This module works with the Rain Bird LNK WiFi Module


You can start/stop the irrigation, get the currently active zone, set the watering delay, etc.
This module communicates directly with the IP Address of the WiFi module it does NOT support the cloud.
The library is Promise based.

Installation

$ npm install node-rainbird

Usage

const RainBirdClass = require('node-rainbird');

let rainbird = new RainBirdClass("_your_ip_address_", "_your_password_");

rainbird.setDebug(); // Only set this for verbose logging information 

rainbird
    .stopIrrigation()
    .then(console.log)
    .catch(console.error);

License

GNU

Author

Created by Boudewijn van Breukelen @ Future Software
Please consider donating if you use this code in your project.
Donating a Euro will make my day :-P
paypal

API

setDebug

Enables verbose console logging

rainbird.setDebug()
setIp

Sets the rainbird ip address. Not needed when provided in constructor.

rainbird.setIp('your ip')
setPassword

Sets the rainbird password. Not needed when provided in constructor.

rainbird.setPassword()

getModelAndVersion

Returns the Rainbird mode and firmware version

rainbird.getModelAndVersion()

getTime

Returns the currrent time of the Rainbird controller

rainbird.getTime()

getDate

Returns the currrent date of the Rainbird controller

rainbird.getDate()

getSerialNumber

Returns the controller's serial number. For ESP-RZXe this is always 0000000000000000

rainbird.getSerialNumber()

getRainSensorState

Returns the state of the rain sensor (true or false)

rainbird.getRainSensorState()

getRainDelay

Returns the watering delay in days.

rainbird.getRainDelay()

getAvailableZones

Returns the number of zones/stations for the controller. For ESP-RZXe this is always 3F000000 where 3F is binary 111111. Each bit is 1 zone.

rainbird.getAvailableZones()

getIrrigationState

Returns if the controller is active or irrigation is switched off I think (boolean)

rainbird.getIrrigationState()

getActiveZones

Returns the decimal number of the currently active zone, or 0 when no zones are active.

rainbird.getActiveZones()

stopIrrigation

Stops all irrigation

rainbird.stopIrrigation()

setRainDelay(days)

Sets the watering delay in days. Parse the delay as a decimal between 0 and 14

rainbird.setRainDelay(days)

startZone(zone, minutes)

Manually activates a zone for x minutes. When another zone is active, it will be de-activated.

rainbird.startZone(zone, minutes)

startAllZones(minutes)

Manually activates all zones in chronological order with x minutes.

rainbird.startAllZones(minutes)

startProgram(programNr)

Manually start program x. Not supported on ESP-RZXe but might work on other controllers

rainbird.startProgram(programNr)

Contribute

More methods are available but not all are supported by my Rainbird controller. Please feel free to contribute by adding more API methods.

About

Rainbird controller in Node.js

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published