{"id":16133437,"url":"https://github.com/deckerego/sprinklerswitch","last_synced_at":"2026-01-22T11:33:39.832Z","repository":{"id":36549533,"uuid":"40855384","full_name":"deckerego/SprinklerSwitch","owner":"deckerego","description":"A service to manage your home lawn irrigation controller and intelligently enable or disable your sprinkler system.","archived":false,"fork":false,"pushed_at":"2025-11-17T17:28:44.000Z","size":693,"stargazers_count":0,"open_issues_count":9,"forks_count":2,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-11-17T19:20:19.897Z","etag":null,"topics":["home-automation","irrigation-controller","lawncare","raspberrypi","water-conservation"],"latest_commit_sha":null,"homepage":"https://hackaday.io/project/7566-sprinkler-switch","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/deckerego.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2015-08-17T02:04:38.000Z","updated_at":"2025-07-09T13:26:24.000Z","dependencies_parsed_at":"2024-09-06T03:28:55.248Z","dependency_job_id":"d038ceae-c4c9-4d5f-8c10-2fa29a8948b3","html_url":"https://github.com/deckerego/SprinklerSwitch","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"purl":"pkg:github/deckerego/SprinklerSwitch","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deckerego%2FSprinklerSwitch","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deckerego%2FSprinklerSwitch/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deckerego%2FSprinklerSwitch/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deckerego%2FSprinklerSwitch/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/deckerego","download_url":"https://codeload.github.com/deckerego/SprinklerSwitch/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deckerego%2FSprinklerSwitch/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28662130,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-22T01:17:37.254Z","status":"online","status_checked_at":"2026-01-22T02:00:07.137Z","response_time":144,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["home-automation","irrigation-controller","lawncare","raspberrypi","water-conservation"],"created_at":"2024-10-09T22:44:41.136Z","updated_at":"2026-01-22T11:33:39.817Z","avatar_url":"https://github.com/deckerego.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# SprinklerSwitch\n\nA service to manage your home lawn irrigation controller and intelligently enable or disable your sprinkler system.\n\nCurrently includes a Node.JS app that can be run as a cron entry in order to set a GPIO pin to high/low if there was\nrain in the recent past or rain coming up soon. It is assumed that you have already wired a GPIO pin to a relay\nor a MOSFET so you can switch on or off your irrigation system.\n\n_Fair warning_: if you take a deeper look under the hood you may realize that the math makes no sense, and that I'm \nmaking wild assumptions about weather \u0026 soil conditions that often confuse causation and correlation. These are all\nvalid and good points! The rules engine that determines if the irrigation system should be enabled or disabled was largely\ninformed by about three months of data collection \u0026 subjective observations as summer became fall, so the science\nis pretty slim. If you can improve on the logic, submit a pull request or create an issue with a suggested solution\n(rather than just pointing out the obvious problems) and I will happily review it!\n\n## Installing\n\nInstalling the sprinkler switch requires some hardware installation and installing the SprinklerSwitch scripts:\n\n1. Build a relay or MOSFET switch (see the [Hackaday Project Page](https://hackaday.io/project/7566-sprinkler-switch) for details)\n1. Install `apt-get install nodejs`\n1. Get the latest version of SprinklerSwitch with `wget https://github.com/deckerego/SprinklerSwitch/releases/latest/download/SprinklerSwitch.zip`\n1. Unzip the latest release into a new directory: `unzip SprinklerSwitch.zip -d SprinklerSwitch`\n1. Switch to the unzipped directory  `cd SprinklerSwitch`\n1. Run the installer script: `sudo sh ./install.sh`\n\n## Configuring\n\nEnsure you update `/etc/sprinklerswitch/config.json` to set your location using your latitude and longitude.\n\nBy default SprinklerSwitch uses the GPIO 23 pin on the Raspberry Pi to open/close the sprinkler sensor switch.\nWith the latest Raspian builds this maps to `gpio-535` but you can map this to any GPIO device you like by\nupdating `config.json`. Run `cat /sys/kernel/debug/gpio` to get a list of all GPIO pins and their device IDs.\n\n## Testing Locally\n\nAutomated tests can be run with:\n```\nnpm ci\nnpm test\n```\n\nYou can test locally without setting GPIO pins using:\n```\nnpm ci\nnpm start\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdeckerego%2Fsprinklerswitch","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdeckerego%2Fsprinklerswitch","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdeckerego%2Fsprinklerswitch/lists"}