My Garden Irrigation

That’s not needed, it will be discovered automatically in your case.

Not needed either.

It doesn’t seem to be the exact same template as in the error. For example, this line var number_of_zones = Number(states['input_number.irrigation_number_of_zones'].state); doesn’t have Number(... in the error reported.

1 Like

You’re right. I think @Schimmelreiter might have changed the template that I originally wrote.

Hi Klogg

after several months and due to this strange period very hard here in Italy, as well as in other countries, I’m going to try your new version 2.
I noticed in the latest posts that you’re using (evaluating) also ESPHome.
Very useful the interlock and the failsafe.

On ESPHome, I took a look also to this project that have most of the logic inside the ESP.

I’m going to try your project in a fresh new HA install on a RPi.

Really well done the V2 Wiki, easy to follow and to adapt if necessary (i.e. Smart Weather that have no station near me, sigh!).

Thanks!

Thanks, I think there are still some improvements to be made but it is close.
I also plan to make it some kind of option to use Smart Weather and have everything adapt if you choose not to. But that is a little way off at the moment.

Also, that other project you link to looks really good. The more I learn about ESPHome the more I like it and having all the timer logic inside the ESP makes a lot of sense.

Great!

The main reason, at least for me, to have most of the logic in the ESP is due to Wifi signal loss or HA not working, restarting or any other similar reason that may affect the irrigation and that can cause damage…

Let me know if you need any help, also regarding a translation in italian

1 Like

Hi @klogg

I start with some errors on an HA clean test machine

Here on Pastebin I’ve copied the HA log with errors.

This is my very simple configuration.yaml

# Configure a default setup of Home Assistant (frontend, api, etc)
default_config:

# Uncomment this if you are using SSL/TLS, running in Docker container, etc.
# http:
#   base_url: example.duckdns.org:8123

# Text to speech
tts:
  - platform: google_translate

lovelace:
  resources: !include ui_resources.yaml

  dashboards:
    lovelace-mia: # Needs to contain a hyphen (-)
      mode: yaml
      filename: lovelace-mia.yaml
      title: Mia Dashboard
      icon: mdi:tools
      show_in_sidebar: true
      require_admin: false

homeassistant:
  packages: !include_dir_named packages/
  customize: !include customize.yaml


group: !include groups.yaml
automation: !include automations.yaml
script: !include scripts.yaml
scene: !include scenes.yaml
input_number: !include includes/input_number.yaml
input_text: !include includes/input_text.yaml

frontend:
  themes: !include_dir_merge_named themes/


weather:
  - platform: darksky
    api_key: !secret darksky_api_key

and this is my very simple lovelace-mia.yaml (YAML dashboard) file

title: Casa
views:
  # - id: 0  # Automatically created id
  #   title: default_view
  #   background: var(--background-image)
  #   icon: mdi:home
  #   cards:
  #     - type: weather-forecast
  #       entity: weather.casa


  - id: 1  # Automatically created id

    title: Garden
    path: garden
    # icon: mdi:flower
    icon: mdi:sprinkler-variant
    # theme: irrigation_theme

    cards:

      #==================
      #=== SYSTEM STATUS
      #==================
      - type: vertical-stack
        cards:

          #=== SYSTEM STATUS HEADER
          - !include includes_garden/status/section_status_header.yaml

          #=== CURRENT STATUS
          - type: conditional
            conditions:
              - entity: input_boolean.irrigation_master_control_switch
                state: "on"
            card:
              !include includes_garden/status/section_status_current_status.yaml

          #=== LAST RUN
          - type: conditional
            conditions:
              - entity: input_boolean.irrigation_master_control_switch
                state: "on"
            card:
              !include includes_garden/status/section_status_last_run.yaml

          #=== HISTORY
          - type: conditional
            conditions:
              - entity: input_boolean.irrigation_master_control_switch
                state: "on"
            card:
              !include includes_garden/status/section_status_history.yaml


      #==============
      #=== SCHEDULES
      #==============
      - type: vertical-stack
        cards:
          - type: conditional
            conditions:
              - entity: input_boolean.irrigation_master_control_switch
                state: "on"
            card:
              !include includes_garden/schedules/page_schedules.yaml


      #=============
      #=== SETTINGS
      #=============
      - type: vertical-stack
        cards:
          - type: conditional
            conditions:
              - entity: input_boolean.irrigation_master_control_switch
                state: "on"
            card:
              !include includes_garden/settings/page_settings.yaml

I’ve copied the project to their respective folders and I’ve followed all the prerequisites as in here including input_text.notifications_user1_name and input_text.notifications_user2_name

I don’t know if the issue is related to smartweather that I’ve not set.
I’ve NOT used the definitions in here

I’ve seen some posts related to smartweather.
How can I help to choose during installation to use or not the smartweather stuff?

Thanks

I’ve looked at your log and I have a few observations (none of which necessarily point to the problem!)

Do you have browser_mod and lovelace_gen installed because I get this in my log:

2020-04-28 10:11:33 WARNING (MainThread) [homeassistant.loader] You are using a custom integration for lovelace_gen which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant.
2020-04-28 10:11:33 WARNING (MainThread) [homeassistant.loader] You are using a custom integration for browser_mod which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant.

All the errors arising from the config seem to be

ERROR (MainThread) [homeassistant.components.websocket_api.http.connection.1797713552] Error handling message: Unknown error

with the root cause being

TypeError: join() argument must be str or bytes, not 'list'

Which I don’t understand because I do not use ‘join’ in this package.
It must be struggling with something else becasue all the messages seem to point to a Lovelace error somewhere.

Do you get anything displayed at all on startup?

Perhaps you could narrow it down by removing parts of the main view.
There are three parts, ‘SYSTEM STATUS’, ‘SCHEDULES’ and ‘SETTINGS’

SYSTEM STATUS is itself made up of separate sections which can be removed independently.

1 Like

Thanks @klogg

I’ve never used the browser_mod and lovelace_gen plugins/integrations, so I haven’t added the two lines in configurations.yaml.

Now it shows something, but I get some errors.

These are the plugins/integrations installed

and this is the resources.yaml

  - url: /community_plugin/browser_mod/browser_mod.js
    type: js
  - url: /community_plugin/weather-card/weather-card.js
    type: module
  - url: /community_plugin/button-card/button-card.js
    type: module
  - url: /community_plugin/lovelace-card-mod/card-mod.js
    type: module
  - url: /community_plugin/config-template-card/config-template-card.js
    type: module
  - url: /community_plugin/mini-graph-card-bundle/mini-graph-card-bundle.js
    type: module
  - url: /community_plugin/lovelace-multiple-entity-row/multiple-entity-row.js
    type: module
  - url: /community_plugin/stack-in-card/stack-in-card.js
    type: module
  - url: https://fonts.googleapis.com/css?family=Oswald
    type: css

Resources must be set inside configuration.yaml under lovelace setting like

lovelace:
   mode: yaml
   resources:
       HERE THE LIST

Mine is like this

lovelace:
  resources: !include ui_resources.yaml

and it works fine in my “production” HA

I’ve also tried now to indent more like this, no error during check, but same result in the dashboard

Do you have sensor.time?

You also need

browser_mod:

In your configuration.yaml (you don’t need it in your resources).

See here

1 Like

@klogg

Ops my second fault today :frowning_face:

I have created the resources.yaml file, but I’ve not included in configuration.yaml

Schermata 2020-04-29 alle 19.09.09

browser_mod: is already in config and I’ve removed from resources

Almost there…

I found that this error is caused by input_text.irrigation_previous_total_watering_time that was unknown.
I’ve manually set (from States) to any value (10 in my case) and the error message disappeared.

So now I’m here

What can I check to understand why I have all that unknown and how can I fix it?

Three things you can do to start with:

  1. Set up Oswald font. Everything will display better with it.
  2. It looks like you don’t have the Dark Sky weather sensor set up correctly
  3. Click on the zone ‘unknown’ and you should be able to change the details for it

See the prerequisites for more details about these things.

Hi @klogg

Thanks for the suggestions! Sorry to bother you…

  1. it is already set the font in the resources section
resources:
  - url: https://fonts.googleapis.com/css?family=Oswald
    type: css
  1. darksky was already in place, this was my config
  - platform: darksky
    api_key: !secret darksky_api_key
    language: it
    forecast:
      - 0
      - 1
      - 2
      - 3
      - 4
      - 5
    scan_interval:
      minutes: 5
    monitored_conditions:
      - summary
      - icon
      - nearest_storm_distance
      - nearest_storm_bearing
      - apparent_temperature
      - pressure
      - precip_type
      - precip_intensity
      - precip_probability
      - precip_accumulation
      - precip_intensity_max
      - humidity
      - wind_speed
      - visibility
      - wind_bearing
      - temperature
      - cloud_cover
      - daily_summary
      - hourly_summary
      - minutely_summary 
      - uv_index
      - temperature_high
      - temperature_low
      - apparent_temperature_high
      - apparent_temperature_low

but now I’ve changed to minimal as in the prerequisites, without any different result

  - platform: darksky
    api_key: !secret darksky_api_key
    forecast:
      - 0
    monitored_conditions:
      - temperature_high
      - minutely_summary
  1. I’ve clicked on some part of the screen and I was able to change some values, but not on all the unknown (especially on the left side of the screen).

One strange thing is this, I have two HA tabs in the browser, one with the dashboard and one with the terminal (inside HA).
When I click on an item that is supposed to show a popup, the popup opens on the other tab.

I made a short video to show this

Is it possible to choose how many zones the project can manage? Should I change something in the code or is it possible to choose it in the panels?

I’m not sure you have read all of the prerequisites fully… :wink:

  1. There is no need to reduce the darksky sensor, I have just showed what the minimum is, but you will need to change a couple of lines of code or your sensor name.
  2. Choose the GENERAL options and then click on ‘Number of zones defined’.
  3. Popups will always appear on the most recent browser tab. There is nothing anyone can do about this. It is also documented in the Github for browser_mod.
  4. On the GENERAL settings page check that the ‘User Interface font’ is set to ‘Oswald’. If you don’t have that option then I suspect that you don’t have the latest version. I have recently made improvements to set some default values and am currently planning on expanding that section to make it easier for first use setup.

Ok for 1. and 3. ! I’ve read carefully the prerequisites page, but not so good the main installation page! :wink:

In the General tab I don’t see Number of Zones as well as the User Interfaace Font

From the prerequisites…


Secondly,

You need to edit one line in section_settings_temperature.yaml in order to show the temperature graph.

In the custom:mini-graph-card find the line:

- entity: sensor.dark_sky_forecast_daytime_high_temperature_0d

and change it to:

- entity: sensor.dark_sky_daytime_high_temperature_0d

The file section_settings_general.yaml needs sensor.esphome_irrigation_controller_wifi_signal .

The settings page will not display correctly without it. (I have just seen the changes for the latest button-card v3.3.1 and I am not sure if this statement is still correct).

If you do not have this sensor simply delete (or comment) this section of that file.

#=== Irigation controller WiFi signal strength
- !include
  - item_settings_line.yaml
  - entity: sensor.esphome_irrigation_controller_wifi_signal
    name: Irrigation Controller WiFi Signal Strength
    tap_action: none

Thanks again.

The darksky stuff was already done.

I’ve found that my darksky sensors do not have the _forecast_ and _current_ words inside of them, so I have removed from my installation, in each of the 3 files I’ve found.

For the sensor.esphome_irrigation_controller_wifi_signal I’ve created, compiled and flashed the yaml file similar to yours with exactly the sensor name written in it, but I don’t know why the sensors and switches defined are not being created in HA.

I don’t know if MY issue is that I have active two HA each with an installation of ESPHome.
I’ve compiled it from the same HA where I am testing Garden Irrigation.
In any case, strangely, does not appear in the production HA either. :open_mouth:

Now I have commented that !include block

I stil don’t see the font field…

What about the two unknown on the left, what should be shown on the red and yellow ones?

Thanks!!!

You’ve done really a GREAT job!!!

Do you have the latest button-card?

I just found an issue that I think may be related to the new way it checks entity states because after I upgraded my button-card I also had an issue. Can you add the last line of this snippet to section_status_header.yaml

#==================
#=== STATUS HEADER
#==================
type: vertical-stack
cards:

  - type: entities
    entities:
      - type: divider
    style: >
      ha-card {
        background: none;
        margin-top: -1em;
        margin-bottom: -1.25em;
      }

  - type: custom:stack-in-card
    mode: horizontal
    keep:
      margin: true
      border_radius: true
    cards:
      - type: horizontal-stack
        cards:

          #=== NEXT RUN DETAILS
          - type: custom:button-card
            entity: input_text.irrigation_current_status
            name: >
              [[[
                if (states['input_boolean.irrigation_master_control_switch'].state == 'off')
                  return 'SYSTEM IS OFF';
                else
                  var time_now = states['sensor.time'].state;
                  var cycle1_sched = states['input_boolean.irrigation_cycle1_schedule_enabled'].state;
                  var cycle2_sched = states['input_boolean.irrigation_cycle2_schedule_enabled'].state;
                  var cycle1_time = states['input_datetime.irrigation_cycle1_start_time'].state.substr(0, 5);
                  var cycle2_time = states['input_datetime.irrigation_cycle2_start_time'].state.substr(0, 5);
                  var cycle1_name = states['input_text.irrigation_cycle1_name'].state;
                  var cycle2_name = states['input_text.irrigation_cycle2_name'].state;
                  var cycle3_name = states['input_text.irrigation_cycle3_name'].state;

I have updated the GitHub too.

button-card is the last version, 3.3.2

I’m on HA 0.108.9

I’ve added last line, but it seems there is no change