npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

node-rainbird

v2.0.1

Published

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

Downloads

34

Readme

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.