#####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.
$ npm install node-rainbird
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);
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
Enables verbose console logging
rainbird.setDebug()
Sets the rainbird ip address. Not needed when provided in constructor.
rainbird.setIp('your ip')
Sets the rainbird password. Not needed when provided in constructor.
rainbird.setPassword()
Returns the Rainbird mode and firmware version
rainbird.getModelAndVersion()
Returns the currrent time of the Rainbird controller
rainbird.getTime()
Returns the currrent date of the Rainbird controller
rainbird.getDate()
Returns the controller's serial number. For ESP-RZXe this is always 0000000000000000
rainbird.getSerialNumber()
Returns the state of the rain sensor (true or false)
rainbird.getRainSensorState()
Returns the watering delay in days.
rainbird.getRainDelay()
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()
Returns if the controller is active or irrigation is switched off I think (boolean)
rainbird.getIrrigationState()
Returns the decimal number of the currently active zone, or 0 when no zones are active.
rainbird.getActiveZones()
Stops all irrigation
rainbird.stopIrrigation()
Sets the watering delay in days. Parse the delay as a decimal between 0 and 14
rainbird.setRainDelay(days)
Manually activates a zone for x minutes. When another zone is active, it will be de-activated.
rainbird.startZone(zone, minutes)
Manually activates all zones in chronological order with x minutes.
rainbird.startAllZones(minutes)
Manually start program x. Not supported on ESP-RZXe but might work on other controllers
rainbird.startProgram(programNr)
More methods are available but not all are supported by my Rainbird controller. Please feel free to contribute by adding more API methods.