Irrigation Component V4 providing support for a custom card

Overview

Irrigation Component V4

This release sees the delivery of a custom card https://github.com/petergridge/irrigation_card to render the program options specified in the configuration.

The driver for this project is to provide an easy to configure user interface for the gardener of the house. The goal is that once the inital configuration is done all the features can be modified lovelace cards.

The provided working test harness is self contained with dummy switches and rain sensor that can be used to become familiar with the capabilities of the component.

irrigation|690x469,50% Image 1: All attributes rendered using the companion custom card

All the inputs of the platform are Home Assistant entities for example the start time is provided via a input_datetime entity. The information is evaluated to trigger the irrigation action according to the inputs provided.

Watering can occur in an Eco mode where a water/wait/repeat cycle is run to minimise run off by letting water soak in using several short watering cycles. The wait and repeat configuration is optional.

The rain sensor is implemented as a binary_sensor, this allows practically any combination of sensors to suspend the irrigation. This can be defined at the zone level to allow for covered ares to continue watering while exposed areas are suspended.

Implemented as a switch, you can start a program manually or using an automation. Manually starting a program by turning the switch on will not evaluate the rain sensorany rules it will just run the shedule, as there is an assumption that there is an intent to run the program.

Only one program can run at a time by default to prevent multiple solenoids being activated. If program start times result in an overlap the running program will be stopped. This can be modified with the allow_multiple attribute to achieve the required outcome you need to set this on each defined program.

INSTALLATION

To create a working sample

  • Copy the irrigationprogram folder to the ‘config/custom components/’ directory
  • Restart Home Assistant
  • Copy the 'irrigationtest.yaml' file to the packages directory or into configuration.yaml
  • Restart Home Assistant
  • Install irrigation_custom_card from this repository https://github.com/petergridge/irrigation_card
  • Follow the custom card instructions to add a card for each of: switch.morning, switch.afternoon and switch.night

Important

  • Make sure that all of the objects you reference i.e. input_boolean, switch etc are defined or you will get errors when the irrigationprogram is triggered. Check the log for errors.

Pre-requisite

  • The time_date integration is required
sensor:
  - platform: time_date
    display_options:
      - 'time'
      - 'date'

Debug

Add the following to your logger section configuration.yaml

logger:
    default: warning
    logs:
        custom_components.irrigationprogram: debug

Rain Sensor feature

If a rain sensor is not defined the zone will always run at the nominated start time.

If the irrigation program is run manually the rain sensor value is ignored and all zones will run.

The rain sensor can be optionally defined in each zone. You can:

  • Define the same sensor for each zone
  • Have a different sensor for different areas
  • Configure the ability to ignore the rain sensor

Monitor Controller feature

If this binary sensor is defined it will not execute a schedule if the controller is offline. This is ideal for ESP Home implementations.

Watering Adjuster feature

As an alternative to the rain sensor you can also use the watering adjustment. With this feature the integrator is responsible to provide the value using a input_number component. I imagine that this would be based on weather data or a moisture sensor.

See the https://github.com/petergridge/openweathremaphistory for a companion custom comsensor that may be useful.

Setting water_adjustment attribute allows a factor to be applied to the watering time.

  • If the factor is 0 no watering will occur
  • If the factor is 0.5 watering will run for only half the configured watering time. Wait and repeat attributes are unaffected.

The following automation is an example of how the input_number.adjust_run_time could be maintained

automation:
- id: '1553507967550'
  alias: rain adjuster
  mode: restart
  trigger:
  - platform: time_pattern
    minutes: "/1"
  action:
    - service: input_number.set_value
      entity_id: input_number.rain_adjuster
      data:
        value: "{{ value template calculation }}"

Run Days and Run Frequency

Run frequency allows the definition of when the program will run.

This can be a specific set of days or the number of days between watering events. This can be defined at the Program or zone level. Application at the zone level allows different zones to execute at the same time but using varying frquencies. for example: Vege Patch every two days and the Lawn once a week.

  • Run Freq allows the water to occur at a specified frequency, for example, every 3 days or only on Monday, Wednesday and Saturday.
  • Run Days DEPRECATED in this version, if you used this in version 3 simply rename Run Days to Run Freq to retain the same behaviour.

Defining a selection list to use with the run_freq attribute.

input_select:
  irrigation_freq:
    name: Zone1 Frequency
    options:
      - "1"
      - "2"
      - "3"
      - "4"
      - "5"
      - "6"
      - "7"
      - "['Wed','Sat']"
      - "['Sun','Thu']"
      - "['Mon','Fri']"
      - "['Tue','Sat']"
      - "['Sun','Wed']"
      - "['Mon','Thu']"
      - "['Tue','Fri']"
      - "['Mon','Wed','Fri']"
      - "['Mon','Tue','Wed','Thu','Fri','Sat','Sun']"

ECO feature

The ECO feature allows multiple short watering cycles to be configure for a zone in the program to minimise run off and wastage. Setting the optional configuration of the Wait, Repeat attributes of a zone will enable the feature.

  • wait sets the length of time to wait between watering cycles
  • repeat defines the number of watering cycles to run

CONFIGURATION

A self contained working sample configuration is provided in the packages directory of this repository.

Example configuration.yaml entry

  switch:
  - platform: irrigationprogram
    switches: 
      morning:
        name: Morning
        irrigation_on: input_boolean.irrigation_on
        start_time: input_datetime.irrigation_morning_start_time
        run_freq: input_select.irrigation_freq
        icon: mdi:fountain
        zones:
        # Adjust watering time used 
        # Watering time adjusted to water * adjust_watering_time
          - zone: switch.irrigation_solenoid_01
            name: Pot Plants
            water: input_number.irrigation_pot_plants_run
            water_adjustment: input_number.adjust_run_time
            wait: input_number.irrigation_pot_plants_wait
            repeat: input_number.irrigation_pot_plants_repeat
            icon: 'mdi:flower'
        # No rain sensor defined, will always water to the schedule
          - zone: switch.irrigation_solenoid_03
            name: Greenhouse
            water: input_number.irrigation_greenhouse_run
            wait: input_number.irrigation_greenhouse_wait
            repeat: input_number.irrigation_greenhouse_repeat
            icon: 'mdi:flower'
        # Rain sensor used, watering time only
          - zone: switch.irrigation_solenoid_02
            name: Front Lawn
            water: input_number.irrigation_lawn_run
            rain_sensor: binary_sensor.irrigation_rain_sensor
            ignore_rain_sensor: switch.ignore_rain_sensor

    # minimal configuration, will run everyday at the time specified
      afternoon:
        name: Afternoon
        start_time: input_datetime.irrigation_afternoon_start_time
        zones:
          - zone: switch.irrigation_solenoid_01
            name: Pot Plants
            water: input_number.irrigation_pot_plants_run
          - zone: switch.irrigation_solenoid_02
            name: Front Lawn
            water: input_number.irrigation_lawn_run

CONFIGURATION VARIABLES

program

(string)(Required) the switch entity.

name

(string)(Optional) display name for the irrigation program switch.

start_time

(input_datetime)(Required) the local time for the program to start.

run_freq

(input_select)(optional) Indicate how often to run. If not provided will run every day.

controller_monitor

(binary_sensor)(optional) Detect if the irrigation controller is online. Autoated schedule will not execute if offline.

irrigation_on

(input_boolean)(Optional) Attribute to temporarily disable the watering schedule

icon

(icon)(Optional) The icon displayed for the program. (default: mdi:fountain)

allow_multiple

(boolean)(Optional) Allow multiple zones to be active at the same time (default: false)

unique_id

(string)(Optional) An ID that uniquely identifies this switch. Set this to an unique value to allow customisation trough the UI.

Zones

(list)(Required) The list of zones to water.

zone

(entity)(Required) This is the switch that represents the solenoid to be triggered.

name

(string)(Required) This is the name displayed when the zone is active.

rain_sensor

(binary_sensor)(Optional) A binary sensor - True or On will prevent the irrigation starting. e.g. rain sensor, greenhouse moisture sensor or template sensor that checks the weather

ignore_rain_sensor

(input_boolean)(Optional) Attribute to allow the zone to run regardless of the state of the rain sensor. Useful for a greenhouse zone that never gets rain.

water

(input_number)(Required) This it the period that the zone will turn the switch_entity on for.

water_adjustment

(input_number)(Optional) This is a factor to apply to the watering time that can be used as an alternative to using a rain sensor. The watering time will be multiplied by this factor to adjust the run time of the zone.

wait

(input_number)(Optional) This provides for an Eco capability implementing a cycle of water/wait/repeat to allow water to soak into the soil.

repeat

(input_number)(Optional) This is the number of cycles to run water/wait/repeat.

run_freq

(input_select)(optional) Indicate how often to run. If not provided will run every day.

icon

(icon)(Optional) This will replace the default mdi:water icon shown when the zone is running.

SERVICES

irrigationprogram.stop_programs:
    description: Stop any running program.

REVISION HISTORY

4.0.0

  • New repository for Version 4 with improvements and support for custom card support
  • Allow definition for run frequency at the zone level - feature request
  • DEPRECATED the run_days attribute. Simply rename this attribute to run_freq to maintain the functionality
  • Optionally allow multiple programs to run simultaneously use allow_multiple config option
  • Allow monitoring of the irrigation controller hardware if supported, will not run schedule if controller is offline

3.0.3

  • Update to validate the referenced objects after HASS has started.

3.0.2

  • Update to fix bug in last run date attribute. Impacted Programs that run on the Frequency option.

3.0.0

  • BREAKING CHANGE: deprecate the irrigationzone component
  • Move zone details into the irrigationprogram component - feature request
  • Move rain sensor to the zone definition - feature request
  • Move ignore rain sensor into the zone definition - feature request
  • Improve validation of components to warn when HA objects are not found
  • Add run time adjustment - feature request
  • improved async behavior when automatically starting the program

1.1.0

  • add version to manifest.json files
  • tweak how the program turns off zones
  • remove validation for time.sensor

0.2

• Remove requirement for HA time sensor

You might also like...
A small script I made that takes any standard Decklist of magic the gathering cards and pulls all card images from scryfall at once!

A small script I made that takes any standard Decklist of magic the gathering cards and pulls all card images from scryfall at once!

Master Duel Card Translator Project

Master Duel Card Translator Project A tool for translating card effects in Yu-Gi-Oh! Master Duel. Quick Start (for Chinese version only) Download the

Providing a working, flexible, easier and faster installer than the one officially provided by Arch Linux
Providing a working, flexible, easier and faster installer than the one officially provided by Arch Linux

Purpose The purpose is to bring more people to Arch Linux by providing a working, flexible, easier and faster installer than the one officially provid

These are the scripts used for the project of ‘Assembly of a pan-genome for global cattle reveals missing sequence and novel structural variation, providing new insights into their diversity and evolution history’

script-SV-genotyping These are the scripts used for the project of ‘Assembly of a pan-genome for global cattle reveals missing sequence and novel stru

A web-based analysis toolkit for the System Usability Scale providing calculation, plotting, interpretation and contextualization utility
A web-based analysis toolkit for the System Usability Scale providing calculation, plotting, interpretation and contextualization utility

System Usability Scale Analysis Toolkit The System Usability Scale (SUS) Analysis Toolkit is a web-based python application that provides a compilatio

MeepoBenchmark - This project aims at providing the scripts, logs, and analytic results for Meepo Blockchain
MeepoBenchmark - This project aims at providing the scripts, logs, and analytic results for Meepo Blockchain

MeepoBenchmark - This project aims at providing the scripts, logs, and analytic results for Meepo Blockchain

A python script providing an idea of how a MindSphere application, e.g., a dashboard, can be displayed around the clock without the need of manual re-authentication on enforced session expiration

A python script providing an idea of how a MindSphere application, e.g., a dashboard, can be displayed around the clock without the need of manual re-authentication on enforced session expiration

JLC2KICAD_lib is a python script that generate a component library for KiCad from the JLCPCB/easyEDA library.

JLC2KiCad_lib is a python script that generate a component library (schematic, footprint and 3D model) for KiCad from the JLCPCB/easyEDA library. This script requires Python 3.6 or higher.

Comments
  • Flow / liters based approach

    Flow / liters based approach

    Hi, I really love this component!

    Instead of relying on TIME - I generally found FLOW meter based approaches be more reliable. This way you say - measure 10 Liters of water - no matter how long it takes.

    There's flow meters for 10$ on the internet https://www.amazon.com/HiLetgo-1-75MPa-Flowmeter-Control-Arduino/dp/B01N2NJQHD/ref=zg_bs_306928011_5/147-3589379-9778044?pd_rd_i=B01N2NJQHD&psc=1

    That can be integrated into HASS via EasyESP or RPIEasy (https://tutorials-raspberrypi.com/reading-out-the-flow-meter-water-flow-sensor-on-the-raspberry-pi/)

    Now of course I wonder... Would your component allow to switch to FLOW based as an alternative option to the existing TIME BASED?

    Thx!

    opened by knom 3
  • Delay between zones?

    Delay between zones?

    Is there a way of adding a 'wait' between the zones in a program? From what i've seen the wait only works if having the wait repeat cycle. Is there a quick hacky way of adding a slider for a wait time between when zone 1 finishes and zone 2 starts?

    Thanks!

    opened by pdavid345 2
Releases(V4.0.14)
  • V4.0.14(Aug 10, 2022)

  • V4.0.13(Aug 8, 2022)

    New Features

    • Improved Documentation
    • Add inter zone delay to provide a delay between zones starting.
    • Add zone grouping to allow groups of zones to run concurrently, corrected in V4.0.13. Prerequisite
    • Requires Custom Card version 4.0.12 Breaking change:
    • DEPRECATED icon attributes
    • DEPRECATED allow_multiple option as this is replaced by zone groups.
    Source code(tar.gz)
    Source code(zip)
  • 4.0.12(Aug 5, 2022)

    Add inter zone delay to provide a delay between zones starting. Add zone grouping to allow groups of zones to run concurrently. Requires Custom Card version 4.0.12 Breaking change: Remove ICON attributes Remove allow_multiple option as this is replaced by zone groups.

    Source code(tar.gz)
    Source code(zip)
  • v4.0.11(Apr 24, 2022)

  • 4.0.10(Apr 23, 2022)

    • Add volume based watering option. Watering can occur using a flow meter instead of based on time
    • Add capability to turn on a pump or other switch when starting a zone
    • fix error in remaining time presentation
    Source code(tar.gz)
    Source code(zip)
  • 4.0.9(Feb 21, 2022)

  • V4.0.8(Feb 17, 2022)

  • V4.0.7(Jan 6, 2022)

  • v4.0.6(Dec 27, 2021)

This is an independent project to track Nubank expenses

Nubank expense tracker This is an independent project to track Nubank expenses. To fetch Nubank data we are going to use an unofficial Nubank API, tha

Ramon Gazoni Lacerda 0 Aug 28, 2022
CalHacks 8 Repo: Megha Jain, Gaurav Bhatnagar, Howard Meng, Vibha Tantry

CalHacks8 CalHacks 8 Repo: Megha Jain, Gaurav Bhatnagar, Howard Meng, Vibha Tantry Setup FE Install React Native via Expo, run App.js. Backend Create

0 Aug 20, 2022
I³ Tracker for Essential Open Innovation Datasets

I³ Tracker for Essential Open Innovation Datasets This repository is set up to track, version, and contribute updates to the I³ Essential Open Innovat

1 Feb 08, 2022
A simple streamlit webapp with multiple functionality

A simple streamlit webapp with multiple functionality

Omkar Pramod Hankare 2 Nov 24, 2021
Unified Distributed Execution

Unified Distributed Execution The framework supports multiple execution backends: Ray, Dask, MPI and MultiProcessing. To run tests you need to install

17 Dec 25, 2022
This is a database of 180.000+ symbols containing Equities, ETFs, Funds, Indices, Futures, Options, Currencies, Cryptocurrencies and Money Markets.

Finance Database As a private investor, the sheer amount of information that can be found on the internet is rather daunting.

Jeroen Bouma 1.4k Dec 31, 2022
Home Assistant integration for spanish electrical data providers (e.g., datadis)

homeassistant-edata Esta integración para Home Assistant te permite seguir de un vistazo tus consumos y máximas potencias alcanzadas. Para ello, se ap

VMG 163 Jan 05, 2023
Homed - Light-weight, easily configurable, dockerized homepage

homed GitHub Repo Docker Hub homed is a light-weight customizable portal primari

Matt Walters 12 Dec 15, 2022
Streamlit — The fastest way to build data apps in Python

Welcome to Streamlit 👋 The fastest way to build and share data apps. Streamlit lets you turn data scripts into sharable web apps in minutes, not week

Streamlit 22k Jan 06, 2023
This module is for finding the execution time of a whole python program

exetime 3.8 This module is for finding the execution time of a whole program How to install $ pip install exetime Contents: General Information Instru

Saikat Das 4 Oct 18, 2021
This repository contains each day of Advent of Code 2021 that I've done.

Advent of Code - 2021 I will use this repository as my Advent of Code1 (AoC) repo for the 2021 challenge. I'm changing how I am tackling the problems

Brett Chapin 2 Jan 12, 2022
J MBF - Assalamualaikum Mamang...

★ VISITOR ★ ★ INFORMATION ★ Script Ini DiBuat Oleh YayanXD Script Ini Akan DiPerjual Belikan Tanggal 9 Januari 2022 Jika Mau Beli Script Silahkan Hub

Risky [ Zero Tow ] 5 Apr 08, 2022
Very Simple Zoom Spam Pinger!

Very Simple Zoom Spam Pinger!

Syntax. 2 Mar 05, 2022
This Open-Source project is great for sensor capture and storage solutions.

Phase 1 This project helps developers in the creation of extended realities that communicate with Arduino and require the security of blockchain stora

Wolfberry, LLC 10 Dec 28, 2022
Automated Changelog/release note generation

Quickly generate changelogs and release notes by analysing your git history. A tool written in python, but works on any language.

Documatic 95 Jan 03, 2023
Old versions of Deadcord that are problematic or used as reference.

⚠️ Unmaintained and broken. We have decided to release the old version of Deadcord before our v1.0 rewrite. (which will be equiped with much more feat

Galaxzy 1 Feb 10, 2022
Simple script to match riders with drivers.

theBestPooler Simple script to match riders with drivers. It's a greedy, unoptimised search, so no guarantees that it works. It just seems to work (ve

Devansh 1 Nov 22, 2021
An app that mirrors your phone to your compute and maps controller input to the screen

What is 'Dragalia Control'? An app that mirrors your phone to your compute and maps controller input to the screen. Inputs are mapped specifically for

1 May 03, 2022
Python script to preprocess images of all Pokémon to finetune ruDALL-E

ai-generated-pokemon-rudalle Python script to preprocess images of all Pokémon (the "official artwork" of each Pokémon via PokéAPI) into a format such

Max Woolf 132 Dec 11, 2022
Auto check in via GitHub Actions

因为本人毕业离校,本项目交由在校的@hfut-xyc同学接手,请访问hfut-xyc/hfut_auto_check-in获得最新的脚本 本项目遵从GPLv2协定,Copyright (C) 2021, Fw[a]rd 免责声明 根据GPL协定,我、本项目的作者,不会对您使用这个脚本带来的任何后果

Fw[a]rd 3 Jun 27, 2021