My Garden Irrigation

Hi,
today is saturday and this morning I saw that the irrigation didn’t start. So I checked. I have seen that the “will end about” was wrong.

Immagine 2021-03-20 102328

I checked with some debugging and found that the “today” (in garden_globals_cycles_1.yaml) variable did not update. It is Fri instead of Sat.

I have checked and sensor date works well.

Immagine 2021-03-20 100141

If I restart hassio will work again.
Someone knows how to solve this problem?
Thanks

more screens:


Hello @xefil,
I solved ButtonCardJSTemplateError how jgosnell did here:

may it could help.

Hi,
with a friend of mine I think we have solved the problem explained above.
We have replaced :

{% set today = states.sensor.date.last_updated.strftime('%a') | lower %}

with:

{% set today = ['mon','tue','wed','thu','fri','sat','sun'][now().weekday()] %}

in files: garden_globals_cycle1.yaml, garden_globals_cycle2.yaml, garden_globals_cycle3.yaml

and seems the irrigation starts in the right scheduled days. I will it try for a while and I’ll let you know.

@klogg, thanks for your great job.

1 Like

## Home Assistant 2021.3.4 Like kajmaj I also have the same mistakes. Checking the /config/lovelace/view_garden_v2.yaml file with the Home assistant editor gives me this error "bad indentation of a mapping entry at line 46 and 50, column 28: - cycle: 1 -cycle 2^ "Error that also appears in other files. Furthermore, even if I enter the name of my valves, it does not operate them manually or programmed.
Does anyone have the same error?

      #===========
      #=== CYCLES 
      #===========
      - type: vertical-stack
        cards:
          - type: conditional
            conditions:
              - entity: input_boolean.irrigation_master_control_switch
                state: "on"
            card: 
              !include templates/garden/cycles/page_cycles.yaml

          - type: conditional
            conditions:
              - entity: input_boolean.irrigation_master_control_switch
                state: "on"
            card: 
              type: custom:hui-element
              card_type: custom:state-switch
              entity: sensor.irrigation_ui_selected_cycle
              default: cycle1
              states:
                cycle1:
                  !include
                    - templates/garden/cycles/section_cycle1_2_schedule.yaml
                    - cycle: 1
                cycle2:
                  !include
                    - templates/garden/cycles/section_cycle1_2_schedule.yaml
                    - cycle: 2
                cycle3:
                  !include templates/garden/cycles/section_cycle3_schedule.yaml
´´´

I have indentation errors throughout the code too. I did spend some time trying to correct it, but ended up breaking it, so I deleted it all and copied it back again.

Currently I have errors where it does not water on the correct day, always a day before the scheduled day.
So if I want to water on a Monday, I have to set it to water on a Sunday etc.
Also, the estimated finish time is not correct, it’s just the same as the starting time.

Hello @SimonPth

I think you can fix water on the right day with the correction I did above. Could you try?

Hello @cecet23 !

Thanks for the hints referred to the WiFi signal sensor, now this issue is resolved.
I was ready to post anyway the major problem, related to the fact that the irirgation works only manually. If I try to schedule it, the start and end of the schedule is the same, like shown by you!
So I’ve applied the mods on these files:

./packages/garden_globals_cycle1.yaml
./packages/garden_globals_cycle2.yaml

No entries into:

./packages/garden_globals_cycle3.yaml

and I’ve replaced every line

{% set today = states.sensor.date.last_updated.strftime('%a') | lower %}

to

{% set today = ['mon','tue','wed','thu','fri','sat','sun'][now().weekday()] %}

Those are eight entries per file.

BTW nothing changes, the start and end date is always the same. HA restarted.

Other files to edit?

Thanks, Simon

I have made the changes, and watering is due tomorrow, so I will let you know.

Hello @xefill,
you can see the end date updated only the same day of the schedule. So to see it updated you have to try to schedule something today or check the end date the same day of the schedule.

For example. I have a schedule on tuesday I can see the end date updated only tomorrow.

It waters the right day now.

1 Like

Thanks for your feedback!

Hi Klogg.
Can I please ask you if you can quickly try your V1 version and check if it’s still working for you?
I’m still using it, until autumn it was perfect, now I sitched it back on and schedules don’t start.
I tried looking into it but my skills are not enough to fully understand all the parameters etc.
I think that the problem is in irrigation time calculation in garden_irrigation.yaml, but I’m not sure, and maybe you are already aware of what has been impacted by recent changes in HA.
Thank you in advance

Edit: little more details… both schedules and manual cycle don’t start anymore, that’s why I think that the problem is in irrigation time calculation. Obviously manual activation of the zone switch works.

Just installed. Wrong layout, popup doesn’t work.
Maybe there is some problem with last HA and addon version.



Hello @klogg , I know you’re really busy, btw thumbs up for the great job.
Thanks to @cecet23 and @jgosnell I was able to solve some issues on my HA 2021.3.1 which I reassume as follow:

  • problem with layout and WiFi signal strength. If not populated with a correct device which gives the signal, afaik the default value breakes the module and the page is not loaded correctly
  • problem with popups not opened anymore. Due browser_mod update, the deviceID: - this needs to be commented / removed.
  • problems with scheduler. The scheduler is not shown due the date is taken wrong. @cecet23 explained well how to solve it on post #1244.

You could implement those mods in your repo, as soon you have time of course!

I’m still on the way to test my personal rain sensor which would be great if a semaphore would show if the next irrigation cycle would start if the sensor is in wet status. I’ll test it soon.
Same for weather forecat, actually not really tests.

for the rest, for now it works mostly very well!

Thanks a lot!

Simon

1 Like

Update: rain sensor works as expected. If the “ignore schedules if it’s raining” is enabled, the raining sensor is set to my device and the sensor is wet, the scheduler is not executed.
On aside, nice would, as previous written, not only a semaphore that shows if the raining sensor would stop the schedule or not, but even in the logs, a line that actually tells you that the programmed schedule was skipped due the raining sensor.
I paste here my sensor and it’s state as wet, and so that prevents the irrigation schedule:

entity: binary_sensor.sensorepioggia_contact
state: on
battery: 91
contact: false
linkquality: 152
voltage: 2985
friendly_name: SensorePioggia contact
device_class: moisture

Hope that helps somebody!

Bye, Simon

1 Like

Hi,
I installed it on Home Assistant 2021.3.4, but this is the result:
Ipoup-up doesn’t work…

Hi
Let me introduce myself, I’m from Cape Town and have been tinkering with electronics for many years.
I’ve been trying to implement HA-Irrigation V2 for the past 4 days, restarted from scratch 3 times but am always coming up with and error that blocks HA from loading.
Latest version of HA OS ( 2021.3.4 ).

I’m more thank likely missing something stupid, can anyone assist?

Many thanks
Charles

config ha core check
Processing… Done.

Error: Testing configuration at /config
Failed config
homeassistant:
- expected a dictionary for dictionary value @ data[‘packages’][‘automation’]
- packages: [source /config/configuration.yaml:3]
automation: [source /config/packages/garden/garden_weather_temperature.yaml:10]
- action: [source /config/packages/garden/garden_weather_temperature.yaml:31]
- data_template: [source /config/packages/garden/garden_weather_temperature.yaml:33]
entity_id: input_text.irrigation_external_sensor_forecast_high_temp
value: sensor.dark_sky_daytime_high_temperature_0d
service: input_text.set_value
alias: Irrigation Set Default Forecast High Temperature Sensor
condition: [source /config/packages/garden/garden_weather_temperature.yaml:20]

default_config:

homeassistant:
packages: !include_dir_merge_named packages/

frontend:
themes: !include_dir_merge_named themes

browser_mod:

lovelace_gen:

lovelace:
mode: storage
dashboards:
lovelace-irrigation:
mode: yaml
filename: irrigation.yaml
title: Irrigation
icon: hass:flower
show_in_sidebar: true

sensor:

  • platform: time_date
    display_options:

    • “time”
    • “date”
    • “date_time”
    • “date_time_utc”
    • “date_time_iso”
    • “time_date”
    • “time_utc”
    • “beat”
  • platform: emoncms
    api_key: 8ad5f5882eb30cac77091bc71f65a4ce
    url: http://192.168.0.10/emoncms
    unit_of_measurement: “C”
    id: 101

  • platform: mqtt
    name: geyser1_temperature
    state_topic: /geyser1/temperature
    unit_of_measurement: °C

  • platform: sun2
    monitored_conditions:

    • sunrise
    • sunset

binary_sensor:

  • platform: sun2
    monitored_conditions:
    • elevation

switch:

  • platform: mqtt
    name: geyser1
    state_topic: /geyser1/relay/0
    command_topic: /geyser1/relay/0/set
    payload_on: 1
    payload_off: 0
    availability_topic: /geyser1/status
    payload_available: 1
    payload_not_available: 0
http:
  # Uncomment this to add a password (recommended!)
  # api_password: PASSWORD
  # Uncomment this if you are using SSL or running in Docker etc
  # base_url: example.duckdns.org:8123

# Checks for available updates
updater:

# Discover some devices automatically
discovery:

# Allows you to issue voice commands from the frontend in enabled browsers
conversation:

# Enables support for tracking state changes over time.
history:

# View all events in a logbook
logbook:

# Track the sun
sun:

Try to lose the forward slash in your package include.

I use the following.

‘packages: !include_dir_named packages’

Hi Hantrax, I have fixed the issue. It’s related to new version of browser_mod.
Follow this steps:

  1. search in the repository github project of @Koggly (https://github.com/kloggy/HA-Irrigation-Version2) all occurrences of deviceID:

The result is 17 files.

  1. for each file, delete the entry
 deviceID:
   - this
  1. in each file, search:
tap_action:
   action: call-service
   service: browser_mod.popup
   service_data:

and replace with:

tap_action:
   action: fire-dom-event
   browser_mod:
     command: popup
1 Like

Hi Mertz
Many thanks, I mentioned it would be something stupid, The documentaion does mention one can put the packages anywhere in subfolders under the packages directory if one uses the merge include, I’ve put them in the root packages dir and used the normal named include and no more errors (Well ha core check doesnt pck anything up!)
Irrigation panel still blank and errors in my log file which I’m going to check now.