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

irrigationsystem

v0.0.1-alpha.1

Published

HomeKit irrigation system using HAP-NodeJS library

Downloads

8

Readme

HomeKit Irrigation System

version

Parts

Built with readily available 'off the shelf' parts, housed in a sealed ABS enclosure. As the system is housed externally to the house and exposed to yhe weather, 240v wiring to the 24v AC transformer has also been house in a seperate sealed ABS enclosure for extra protection

  • Raspberry Pi Zero W
  • 24v AC transformer (Hunter irrigation one)
  • LM2596HV AC/DC stepdown buck converter (DC output adjusted to 5v)
  • JSN-SR04T ultrasonic sensor
  • 8 channel solid-state relay board (highlevel trigger)
  • Water flow sensor - pulsed output
  • Waterproof push-on/push-off LED lit switch
  • Mains power cable
  • Irrigation wire

Water Tank Configuration

The following options are available in IrrigationSystem_config.json tanks object, which is a array of defined watertanks.

eg:

    "tanks": [
        {
            "name": "Test Tank",
            "enabled": true,
            "capacity": 5000,
            "sensorTrigPin": 20,
            "sensorEchoPin": 21,
            "sensorHeight": 1970,
            "minimumLevel": 200
        }
    ],

| Name | Description | Default | |-------------------|-----------------------------------------------------------------------------------------------|------------| | name | Name of this water tank | | | enabled | Is the tank enabled when running | false | | capacity | Litre(s) capacity of this tank | | | minimumLevel | Minimum reading distance (in mm) for ultrasonic sensor | | | sensorEchoPin | RPi GPIO pin to which ultrasonic sensor echo is attached | | | sensorHeight | Height (in mm) above tank base where ultrasonic sensor is mounted | | | sensorTrigPin | RPi GPIO pin to which ultrasonic sensor trigger is attached | | | uuid | This is automatically generated. DO NOT CHANGE once populated | |

Irrigation Zone Configuration

The following options are available in IrrigationSystem_config.json zones object, which is a array of defined irrigation zones.

eg:

    "zones": [
        {
            "name": "Zone 1",
            "enabled": false,
            "runtime": 300,
            "relayPin": 14
        },
        {
            "name": "Zone 2",
            "enabled": true,
            "relayPin": 15,
            "runtime": 300
        },
    ]

| Name | Description | Default | |-------------------|-----------------------------------------------------------------------------------------------|------------| | name | Name of this irrigation zone | | | enabled | Is the zone enabled | false | | replayPin | RPi GPIO pin to which relay is attached to operate the irrigation valve | | | runtime | Runtime (in seconds) for this irrigation zone | 300 | | uuid | This is automatically generated. DO NOT CHANGE once populated | |

Configuration Options

The following options are available in IrrigationSystem_config.json options object.

| Name | Description | Default | |-------------------|-----------------------------------------------------------------------------------------------|------------| | debug | Detailed debugging | false | | elevation | Height above sea level for the weather station | 0 | | eveHistory | Provide history in EveHome application where applicable | true | | flowRate | Water sensor pulse flow rate in Litres Per Minute (LPM) at 1Hz | | | latitude | Latitude for current location | 0.0 | | leakSensor | Create a leak sensor for irrigation system. Requires flowRate and sensorFlowPin to be defined | false | | longitude | Longitude for current location | 0.0 | | powerSwitch | Create a switch to 'virtually' power on/off the irrigation system | false | | maxRuntime | Maxmium runtime (in seconds) for any defined irrigation zone | 7200 | | sensorFlowPin | RPi GPIO pin to which a water flow sensor is attached | | | waterLeakAlert | Trigger an alert in HomeKit when a water leak is detected | false |

Ultrasonic Waterlevel Measuring

I've included 'C' source code (usonic_measure.c) for a program which reads distances via an ultrasonic sensor. I used a JSN-SR04T waterproof ultrasonic sensor in my progect. The particular model has a minimum reading distance of 200mm and a maximum distance of 4500mm. This is mounted ontop of my watertank at 200mm above the maximum waterlevel for the tank.

This program requires the wiringPI library to be installed before compiliation of the program

  • sudo apt install wiringPI

It can be compiled with:

  • gcc -o dist/usonic_measure -lwiringPi usonic_measure.c

Disclaimer

This is a personal hobby project, provided "as-is," with no warranty whatsoever, express or implied, including but not limited to warranties of merchantability or fitness for a particular purpose. Building and running this project is done entirely at your own risk.

As this project involves wiring from a mains power source, it is strongly recommended that you seek the assistance of a licensed electrician. While I’ve been running this project successfully at my home, your experience may vary.

Please note that I am not affiliated with any companies, including but not limited to Apple, or any other entities. The author of this project shall not be held liable for any damages or issues arising from its use. If you do encounter any problems with the source code, feel free to reach out, and we can discuss possible solutions