Profile
Back to NewsBack
GitHub Trending 5 min
Reader Mode
OpenSprinkler/OpenSprinkler-App: A mobile interface for the OpenSprinkler irrigation device. Designed to allow manual control, program management (preview, add, edit, and delete), initiation of a run-once program, viewing graphical and tabulated repr

OpenSprinkler/OpenSprinkler-App: A mobile interface for the OpenSprinkler irrigation device. Designed to allow manual control, program management (preview, add, edit, and delete), initiation of a run-once program, viewing graphical and tabulated repr

6 hours ago

OpenSprinkler App

GitHub version</a> License</a>

[Official Site][official] | [Support][help] | [Changelog][changelog]

© 2013-2016 [Samer Albahra][salbahra] (@salbahra)

A mobile interface for the OpenSprinkler irrigation device. This app provides manual control, program management, run-once programs, device status viewing, rain delay adjustment, and OpenSprinkler settings changes.

[official]: https://opensprinkler.com [help]: http://support.opensprinkler.com [changelog]: https://github.com/OpenSprinkler/OpenSprinkler-App/releases [salbahra]: http://albahra.com

Features

  • Manual Control: Water your lawn instantly with easy-to-use controls.
  • Program Management: View, edit, add, or delete watering programs to fit your schedule.
  • Run-Once Programs: Quickly set up a one-time watering program for special needs.
  • Device Status: Monitor the status of your OpenSprinkler device in real-time.
  • Rain Delay: Adjust the rain delay to avoid overwatering during rainy periods.
  • Settings: Customize OpenSprinkler settings directly from the app.

Getting Started

Download:

Prerequisites:
  • An OpenSprinkler device with Unified firmware (version 2.0.3 or later).
Instructions:
  1. Download and install the OpenSprinkler app on your device.
  2. Connect your mobile device to the same network as your OpenSprinkler device.
  3. Launch the app and follow the on-screen instructions to connect to your OpenSprinkler.

Screenshot of the OpenSprinkler app home screen Screenshot of the OpenSprinkler app preview screen Screenshot of the OpenSprinkler app logs timeline screen Screenshot of the OpenSprinkler app program screen Screenshot of the OpenSprinkler app rain delay screen Screenshot of the OpenSprinkler app run once screen


Unified Firmware

Starting with firmware 2.0.3, an option has been added to change the Javascript URL path for the UI. The application now offers an injection method which takes over Ray's OpenSprinkler UI. Just follow the simple steps below to switch your UI:

Firmware 2.1.0 and newer have the following settings by default.
  1. Navigate to http://x.x.x.x/su (replace x.x.x.x with your OpenSprinkler IP)
  2. For "Javascript URL" field use the following: https://ui.opensprinkler.com/js
  3. Enter your password in the field and push "Submit"
  4. Your page will reload and you will now see the application

Troubleshooting

If you encounter any issues, please check the following resources:

Before reporting an issue, please provide the following information:
  • App version:
  • OpenSprinkler firmware version:
  • Device type: (e.g., iPhone, Android, etc.)
  • Steps to reproduce the issue:
  • Screenshots or error messages: (if applicable)

Contributing

We welcome contributions to the OpenSprinkler app! If you'd like to contribute, please follow these guidelines:

  • Fork the repository: Create your own copy of the repository.
  • Create a branch: Make a new branch for your feature or bug fix.
  • Make your changes: Implement your changes with clear commit messages.
  • Submit a pull request: Open a pull request to the main repository. Please be sure to include either a short demo video or screenshots to show your change.
Please ensure your code adheres to the existing coding style and includes tests for any new functionality. Please note that during the git commit step, husky will automatically run grunt to check for syntax and styling errors before the commit will be accepted.

Local Development

Fork this repository then:

npm install
npm start

From here you can open your browser to http://localhost:8080 and begin your development.

Grunt Tasks

This project uses Grunt to automate various development tasks. Here are some of the key Grunt tasks available:

Code Quality and Testing

  • grunt eslint: Checks JavaScript code for potential errors and style issues.
  • grunt csslint: Analyzes CSS code for potential errors and style issues.

Building and Deployment

  • grunt prepareFW: Builds the hosted firmware UI and its build/firmware/UI.zip archive.

Firmware UI caching

The firmware loads the stable js/home.js URL. Each build stamps this loader with an assets// directory. That directory contains the matching module list, scripts, styles, HTML, images, and translations. The hash changes when any packaged file changes, even when the application version stays the same. Root files remain available for older loaders. The source files and native app bundles remain unchanged.

Firebase requires revalidation for mutable URLs, including js/home.js, modules.json, and index.html. Files under assets/ can use long cache lifetimes because their paths identify their contents.

The UI hosts are ui.opensprinkler.com, betaui.opensprinkler.com, and devui.opensprinkler.com. Before deploying this change, the release owner must configure Cloudflare to respect origin cache headers for these hosts:

  • Set Browser Cache TTL to Respect Existing Headers.
  • For matching Cache Rules, set Browser TTL to Respect origin and Edge TTL to use the origin's cache-control header.
  • Remove conflicting cache rules or page rules that override these headers.
Browser Cache TTL and Cache Rules settings explain these controls. The deployment workflow purges the selected host after deployment. A successful Firebase preview does not verify Cloudflare settings on these public hosts.

After each deployment, check the selected public host, including Cloudflare, with curl -I:

  • /js/home.js and /modules.json must return Cache-Control: no-cache, max-age=0, must-revalidate.
  • /assets//js/main.js must return Cache-Control: public, max-age=31536000, immutable.
Do not complete the release while these header checks fail. Purging Cloudflare does not remove browser copies. These copies can persist until they expire or the user reloads without cached files. If a versioned loader requests a removed build, it shows a Reload button instead of mixing files from different builds. Verify a returning browser after deployment, including the controller password prompt and the loaded application.

Localization

  • npm run translations:extract: Extracts English strings and source context locally.
  • npm run translations:coverage: Reports translation gaps per language.
  • npm run translations:compile: Merges human and machine sources into bundled dictionaries.
  • npm run translations:check: Verifies the catalog and compiled files are current, without network access.
  • grunt pushEng: Extracts English strings and uploads them to Transifex. No Git commit or push.
  • grunt updateLang: Pulls Transifex translations into the human source layer and compiles the dictionaries. No Git commit or push.
See the translation maintainer guide for assisted translation and review.

Unit Tests

This project uses Karma as the test runner utilizing a headless Chrome browser (be sure that Chrome is installed on your workstation).

  • npm test: Executes entire test suite located under /test/
Chat with me