My Garden Irrigation

Now updated. Thank you.

As I have said I will not be updating Version 1.

If the Gardena valve works as I think it does then I am not sure you need to use my system at all. Am I right in thinking that when you turn it on it waters all of your zones one by one and the time for each zone is programmed in the Gardena?

If that is right then I think you would just need a simple automation to turn it on and off.

The Gardena 6 way water distributor changes water way every time the valve closes and reopens. I’m going to use a membrane electric valve in combination with Sonoff/Shelly that will give current to open the valve for x minutes, they’ll cut down and restart… I’ve seen you had this two years ago.
But your new integration has control over rainfall and the weather, so I think it’ll work better…

Hi, can someone help me?

I’ve set all (I think) except smartweather i don’t want to use now.
I’ve set only one mqtt switch valve called: switch.zone1_valve

But If I try to execute ,for example, manual cycle I get error:

  • irrigation_start_timer: Error executing script. Invalid data for call_service at pos 5: not a valid value for dictionary value @ data[‘entity_id’]

  • irrigation_stop_irrigation: Error executing script. Invalid data for call_service at pos 3: not a valid value for dictionary value @ data[‘entity_id’]

  • irrigation_start_zone: Error executing script. Invalid data for call_service at pos 2: not a valid value for dictionary value @ data[‘entity_id’]

  • irrigation_irrigate_a_zone: Error executing script. Invalid data for call_service at pos 3: not a valid value for dictionary value @ data[‘entity_id’]

I don’t know now if it is a problem cause of NON setting up of smartweather or other. Any suggest?

Also can someone explain me how to remove ALL dependency from smartweaher for safe?

Thsnks

I get exactly the same errors…

The valves open, but don’t close.

@itajackass. @mattee6,
Before I try to help can I just ask you to confirm that you have the latest version of all the files from https://github.com/kloggy/HA-Irrigation-Version2 and not from the old ‘archive’ repository.

@matt, The same error as who? I don’t think this is the same as @itajackass

@itajackass, Nothing should be affected by not using SmartWeather apart from maybe some things in the UI.

Hi, yes i confirm I using latest version.
I’ve a fresh HA installation on a new NUC and actually i’ve set all HACS plugin requisite. Also i’ve added sensor time. The problem iscthat valve don’t open. I get error, it seems, my zone5_valve (it is the name used for my mqtt switch) is not passed to the script…

Have you updated the switch name in the UI by tapping on the zone name??

image

Hey Klogg, is this bit correct?

To be honest all I can say is that it seems to work.
I am still finding my way with ESPHome so I am open to suggestions as to why it might be wrong or what it should be. :slight_smile:

I did test it with a shorter failsafe time than the runtime and the switch turned off and the system shut down as expected.

@klogg
Apologies i’m also learning quite a bit.

The code snippet i’m referring to. Is it being added in HA or on the esp device? Trying to establish where this piece fit in. HA doesn’t like this when doing “Check Configuration”

Oh! Ha! Yes that is my ESPHome config for the ESP32 board. It was a reply to the post above where I was answering a request from MShip.

It doesn’t go anywhere in your HA config.

Ops… I omitted switch.

I set only the name zone5_valve! Thanks!

Maybe you can put a little text note with: Example “switch.valve_1”

How about a new file called, for example garden_sensors.yaml and put here the sensor.time and put a comment like:

If you have already sensor.time set in your HA config, please comment this line or delete it to prevent duplicate sensor error.

Another idea for people like me that don’t use smartweather (in my case, cause sensor are very very far to my location in italy and they are not accurate for my loc):

Set a harcode boolean variabile. If it is set to true, then load all lovelace part for smartweather rainfall etc… And load scripts of course. If it is set to false, omit loading of lovelace and scripts parts :wink:

Btw yeasterday i finally get a shelly magnetic window sensor. I’ll hack this to build / modify my actual 2 wires HUNTER rain sensor. For the next step (of course if you like the idea) : a checkbox to enable or disable external rain sensor. With the fantastic same logic you adopted now: on click you can assign the name of switch to use as identity_id and if enabled, check status… If ON then stop/ignore cycles (but not the manual cycle). On every scheduled, then, if external sensor is enabled and ON then ignore cycle, else run irrigation as expected

I did exactly the same. Added switch. and sorted now…

@mattee6, @itajackass,

I’m glad you both got it working.

@itajackass
These are all great ideas. I have already been thinking about a way to optionally completely exclude SmartWeather. I’ll think some more about it and try to add these features…

Thanks.

1 Like

Hi @klogg, today I was struggling with my setup and after having all working again I got the following error in your package:


I am not sure, but I did not manage to solve the issue… It has something to do with the button-card from @romrider who said some things changes with the latest version…
Maybe somebody has the same issue???
Any help much appreciated!

Paste you complete template that starts with var zone = 'zone1'; zone = Number(... and I’ll tell you what it is. It says that Integer is not a variable, so there’s probably something related to this in your template.

I’m guessing I need to add

triggers_update:
  - input_number.irrigation_number_of_zones
  - input_boolean.irrigation_show_last_run_details

but I haven’t upgraded to the latest button-card yet so haven’t looked into it properly.

@RomRider
This is the template:

styles:
  card: 
    - display: >
        [[[
          var zone = '{{ zone }}';
          zone = Number(zone.substring(4, 5));
          var number_of_zones = Number(states['input_number.irrigation_number_of_zones'].state);
          var show_details = states['input_boolean.irrigation_show_last_run_details'].state;
          if (zone > number_of_zones ||
              show_details == 'off')
            return 'none';
          else return null;
        ]]]

As an aside, as we are on the subject, am I right in thinking that the entity passed in by {{ entity }} does not ever need to be included in triggers_update?