My Garden Irrigation

Oh ok. Great. Thanks again Klogg :slightly_smiling_face:. I got confused caused i see it at the root of your Git.
Btw i do have the same problem like the others with the switch that won’t turn off (not at the UI, the actual switch) after the cycle is over, either in Morning Cycle or manual mode.
Also after about 5min at the screen, i get the same error for the ButtonCard


I did verify that i have the latest item_settings_controller_wifi_signal.yaml file with the correction that you have made.

If i refresh the browser the error disappears for a while then it appears again. The same if i empty/clear cache

Have you told the package what your switch names are.
Click on each zone…

image

And how many zones you have?


It looks like there might be a bug with the display of the irrigation controller wifi signal.
I’ll look into it

EDIT: Fixed. Hopefully :wink:

ahah no problem. auto translation can be dangerous :slight_smile:

Actually…
Does he have a point?

image

my code in irrigazione.yaml (inside root folder) is:

title: Irrigazione
views:
  - !include lovelace/view_garden_version2.yaml

and it works on my HA.

probably autotranslation on chrome cause some problem…

1 Like

With the latest change the display problem is OK now !!!
Thank you so much @klogg
Looking great actually with no errors and 3 columns of stacked info :smiling_face_with_three_hearts:
The problem with switches still remains i’m afraid. Just check it after a restart of HA.


I do have setup 7 zones with my switch entity in every one of them. The switch turns on as it should both from UI and also as entity. Its just when it turns off, it only turns off from UI. Actually i think it just proceed to the next one without switching off the previews one. Just my 2 cent :thinking:
This is with manual run test cycle. It’s been at zone 3

And this is at the same time my actual switches

If it helps, when i stop the manual program, all switches closes by you.

P.S. @klogg My 1st switch is a master valve switch, which i would really love to know (if you have any idea) how to implement it inside your code. Master valve should be open before each zone and should be closing after the whole program or zone ends :grinning:

OK, somehow there is a bug that I am surprised has not been found before. I am ok with my setup because my switches are all the name that I chose but if you choose different names it won’t work!!!

I think it is an easy fix.

Can you test this for me please…

In garden_irrigation_start.yaml

Find the section #=== Stop Watering after delay at line 95 and change it to this:

      #=== Stop Watering after delay
      - service: switch.turn_off
        data_template:
          # entity_id: >
          #   {% if is_state('switch.garden_irrigation_relay_' ~ zone, 'unavailable') %}
          #     none
          #   {% else %}
          #     switch.garden_irrigation_relay_{{ zone }}
          #   {% endif %}
          entity_id: >
            {{ states('input_text.irrigation_' ~ zone ~ '_switch_entity_id') }}

Simply comment out or delete the existing entity_id and add the new one.

Let me know if this works.

EDIT: It works for me but I’d like confirmation that it works with less than 8 zones.

1 Like

It works like a charm !
Need to verify this with normal operation but i expect nothing different.
Thank you so much @klogg
EDIT: Also tested and works with schedule and without testing mode.

1 Like

For anyone not following the above few posts, there was a bug preventing switches turning off which is now fixed and the new file (garden_irrigation_start.yaml) uploaded to GitHub.

Thanks to @Athan for comprehensive reporting which made tracking it down very easy.


@superinj This is probably the solution for you too.

3 Likes

@klogg do you have any suggestions how to integrate a Master Valve to your system ?

Hi @klogg loving the “newer” installation, the use of the text fields makes updating to the latest version really easy…

A question (and forgive me if it is already answered) it is possible to have some sort of check that the system is running and online…

In the picture below I have pressed the cycle 3 (Manual) run button, and as you can see it is running, however, my system with the valves and the ESP has been disconnected for the last week (as you can see from wifi unavailble), maybe a check for wifi being available, or linked to the master switch???

Thanks as always for a fantastic development.

Yes, I am pretty sure that wouldn’t be hard to implement but it is not something I am likely to add. Certainly not in the short term. However I am more than happy to give you some guidance on how and where to add this yourself.

Do you mean, if the controller WiFi is not available then it should not run? This seems like a reasonable idea. It would probably have to be optional though because I am not sure everyone has a sensor for their controller signal strength.

Let me know if I understood you correctly and I will think about it.

EDIT: or maybe you meant some kind of warning/notification when a cycle is scheduled to start but the controller is offline (unavailable)?


I’m afraid things have become a little hectic here though so neither of these are likely to get my attention for at least a couple of days.

Totally understand @klogg.
Whenever you find the time, i would be grateful if you could assist me with that.

BTW i did find another issue. I have put my own sensor (sensor.8ch_wemo_d1_mini_pro_status
) for the WiFi and it shows up correctly. But when i restart HA then the value returns back to your sensor (sensor.esphome_irrigation_controller_wifi_signal).

That’s a bit of a mystery…

If you get a chance can you try removing (or commenting out) the first automation

alias: Irrigation Set Default Controller WiFi Signal Sensor

in the file garden_controller.yaml

I don’t think it is needed any more and may be the reason. I was using it to prevent errors in the UI but I think I have them all trapped in the UI itself now.

This is an educated guess so let me know if it works :wink:

1 Like

Yes, ideally if no wifi then it won’t run. I already have an automation to send a notification if the system loses wifi / power. I use ESPhome for my controller following (more or less) your configuration, I also have a binary sensor for the status of the irrigation device, maybe that could be used…

If not maybe the warning, but in my opinion that would need to be a notification type…

Thanks as always…

Yes, it worked.
Thank you.

Hi, @klogg
I think you’ve done an enormous job building this package.
I’m on my way of implementing your solution to my system.

For now, with some dances, I’ve made a frontend work and respond with no errors.
Next, I will try to figure out how to set up everything.

I’m very confused where should this file go? :warning:
https://github.com/kloggy/HA-Irrigation-Version2/blob/d04481b7a6844802ab5f61691da27755fed8a2e4/section_settings_general.yaml

I’ve been searching it in the topic, and as I get it - you had this file in vers 1.
Or am I wrong?

You are the second person to ask me this and I should have looked harder at my GitHub!

It is a misplaced duplicate file. So the answer to your question ‘where should this file go’ is, ‘in the bin’!
Which is where it is now.

Ignore that file (in that location) it doesn’t exist anymore. You already have it in

lovelace/templates/garden/settings/general

Sorry about the confusion…

1 Like

Hell, it’s working. I have not configured rain and weather adj. yet or the notification :point_up:
It will take some time to get all the logic and replace it with my own, as I do not have nor Darksy nor smartweather

Let me reproduce my steps for others, as it was not obvious for me and I made a lot of dummy stops :cowboy_hat_face: :exploding_head::

  1. Read slowly and carefully https://github.com/kloggy/HA-Irrigation-Version2/blob/master/README.md
  2. Than start working with this https://github.com/kloggy/HA-Irrigation-Version2/blob/d04481b7a6844802ab5f61691da27755fed8a2e4/prerequisites.yaml
  • I have added time sensor, weather_just_icon, also a “input_text” but not sure what is its purpose.
  1. Check all here https://github.com/kloggy/HA-Irrigation-Version2/blob/d04481b7a6844802ab5f61691da27755fed8a2e4/Pre-Requisites.md
  • sun2
  • all lovelace interface mods and check!! double check that its loaded in HACS. Totally recomended to have it here!
  • notifs were skipped, time configured in step 2, recorder is in default config, fonts and theme skipped.
    Here is my part in the main config file
# its neede for the irrigation
binary_sensor:
  - platform: sun2
    monitored_conditions:
      - elevation

input_text:
  notifications_user1_name:
    min: 0
    max: 20

  notifications_user2_name:
    min: 0
    max: 20

browser_mod:

lovelace_gen:

homeassistant:
  packages: !include_dir_named package

# End of irrigation staff    

and here are some more sensors (from other include in my case)

# https://github.com/kloggy/HA-Irrigation-Version2/blob/d04481b7a6844802ab5f61691da27755fed8a2e4/prerequisites.yaml
# Those are sensors needed to run smart irrigation code
  #==================
  #=== Time and Date 
  #==================
- platform: time_date
  display_options:
    - 'time'
    - 'date'

  #=================================================================
  #=== Create the icons for Weather Outlook on the Cycle Start time
  #=================================================================    
- platform: template
  sensors:
      weather_just_icon:
        friendly_name: "mdi Real Weather Icon"
        icon_template: >-
            {% if is_state("sensor.dark_sky_current_icon","clear-day") %} mdi:weather-sunny 
            {% elif is_state("sensor.dark_sky_current_icon","clear-night") %} mdi:weather-night 
            {% elif is_state("sensor.dark_sky_current_icon","rain") %} mdi:weather-rainy
            {% elif is_state("sensor.dark_sky_current_icon","snow") %} mdi:weather-snowy
            {% elif is_state("sensor.dark_sky_current_icon","fog") %} mdi:weather-fog
            {% elif is_state("sensor.dark_sky_current_icon","sleet") %} mdi:weather-partly-snowy-rainy
            {% elif is_state("sensor.dark_sky_current_icon","wind") %} mdi:weather-windy
            {% elif is_state("sensor.dark_sky_current_icon","cloudy") %} mdi:weather-cloudy
            {% elif is_state("sensor.dark_sky_current_icon","partly-cloudy-day") %} mdi:weather-partly-cloudy
            {% elif is_state("sensor.dark_sky_current_icon","partly-cloudy-night") %} mdi:weather-night-partly-cloudy
            {% elif is_state("sensor.dark_sky_current_icon","hail") %} mdi:weather-hail
            {% elif is_state("sensor.dark_sky_current_icon","lightning") %} mdi:weather-lightning
            {% elif is_state("sensor.dark_sky_current_icon","thunderstorm") %} mdi:weather-lightning-rainy
            {% endif %}
        value_template: >-
            {% if is_state("sensor.dark_sky_current_icon","clear-day") %} weather-sunny 
            {% elif is_state("sensor.dark_sky_current_icon","clear-night") %} weather-night 
            {% elif is_state("sensor.dark_sky_current_icon","rain") %} weather-rainy
            {% elif is_state("sensor.dark_sky_current_icon","snow") %} weather-snowy
            {% elif is_state("sensor.dark_sky_current_icon","fog") %} weather-fog
            {% elif is_state("sensor.dark_sky_current_icon","sleet") %} weather-partly-snowy-rainy
            {% elif is_state("sensor.dark_sky_current_icon","wind") %} weather-windy
            {% elif is_state("sensor.dark_sky_current_icon","cloudy") %} weather-cloudy
            {% elif is_state("sensor.dark_sky_current_icon","partly-cloudy-day") %} weather-partly-cloudy
            {% elif is_state("sensor.dark_sky_current_icon","partly-cloudy-night") %} weather-night-partly-cloudy
            {% elif is_state("sensor.dark_sky_current_icon","hail") %} weather-hail
            {% elif is_state("sensor.dark_sky_current_icon","lightning") %} weather-lightning
            {% elif is_state("sensor.dark_sky_current_icon","thunderstorm") %} weather-lightning-rainy
            {% endif %}

  1. Create a folder for package files and move there all from the repo https://github.com/kloggy/HA-Irrigation-Version2/tree/master/package
  2. Include all of step 4 by some line in config like:
homeassistant:
  packages: !include_dir_named package
  1. Move all files from https://github.com/kloggy/HA-Irrigation-Version2/tree/master/lovelace
    to the root of the Config folder. Or be ready to do a lot of editing.
  2. In my case, I have manual include for each tab for Lovelace UI. So I included this view to my dashboard view_garden_version2.yaml

I skipped all needed reloads and config tests and tests for sensors. I think it’s clear.
Hope it will help someone.
Sounds simple, but took me 3 hours )

I have 2 zones. In the last update the History Totals remains at zero.

I have those errors in the log, maybe can help to find the problem.

2020-06-22 01:03:00 ERROR (MainThread) [homeassistant.components.automation] Irrigation Synchronise Sensor Zone Switches: Error executing script. Invalid data for call_service at pos 1: Entity ID none is an invalid entity id for dictionary value @ data['entity_id']
2020-06-22 01:03:00 ERROR (MainThread) [homeassistant.components.automation] Irrigation Synchronise Sensor Zone Switches: Error executing script. Invalid data for call_service at pos 1: Entity ID none is an invalid entity id for dictionary value @ data['entity_id']

Thank you