Giter Site home page Giter Site logo

ha-irrigation-version1's Introduction

A Garden Irrigation System for Home Assistant

Background

This package is a completely self-contained* system for Home Assistant which as presented here will control five different irrigation zones over two cylces per day. However, I have tried to write it in such a way that there is as little code replication as possible which means that if you want a different number of zones then you more or less have to just add more (or remove) some input_boolean / number / datetime / selects ingarden_globals.yaml and the rest of the code largely takes care of itself. There are a couple of automations that will also need to be replicated but I think (hope) that these should be self-explanatory.

The system as I have it implemented is based around Sonoffs flashed with Tasmota controlling the valves but that should be irrelevant.

The weather calculation sections are experimental and I have never actually relied on them.

*Note - A few extra features here such as Amazon Dash button control and notifications depend on other parts of my configuration so you will have to either remove those sections or adapt them to suit you.

Disclaimer - This was the first thing I wrote for HA (apart from the obligatory 'light-on-when-it-is-dark-automation' that everyone does) so I know that there are things I could have done better / more elegantly. I might one day get around to improving the code but it worked flawlessly all through the summer of 2018 and I don't want to break it!

Any feedback including constructive criticism is very welcome and I'm particularly interested if you have any ideas for improving the weather calculations.

Weather sensors: I use SmartWeather and DarkSky weather sensors to provide the data for duration adjustments.

Smart Weather is a custom component - https://github.com/briis/smartweather


Thanks to @krash, @itajackass and @woody4165 for suggestions and help in making it better.

Changes

1 September 2019 - A complete re-upload of my files as it appears that there may have been some errors/inconsistencies which crept in due to me using GitHub only as a way to make my files public rather than as any kind of master repository or version control.

Also my new Lovelace Garden view which I think is an improvement.

16 August 2019 - Many small changes. Mostly tidying up code and renaming to standardise some items especially automations which shouldn't make any difference but do help when debugging. Also some slight reworking of the weather adjustment code which should be an improvement :-)

If you already use this package please take some care before blindly copying this across I think it might have to be all or nothing if it isn't going to break. If you want to find my 'improvements' they should be easily implemented in your version.

10 July 2019 - Small change to immediately update the Adjusted Zone Durations whenever the temperature or rain thresholds are changed.

5 April 2019 - Corrected the logic for updating next run time.

31 March 2019 - I have added a script to garden_irrigation.yaml that sets pulsetime[1, 2, 3, 4] on the Sonoff to act as a failsafe in the event that HA loses any communication with the switch.

Here is how it looks in Lovelace

The Master Control Switch 'OFF' hides all other UI elements

The Morning Cycle showing the Schedule

The Morning Cycle showing the Weather Adjustments

Showing the Irrigation History

Showing the Temperature and Rainfall

ha-irrigation-version1's People

Contributors

kloggy avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.