My Garden Irrigation

Hi, first of all thanks for your amazing work. I used your first version for a long time until it stops working. now I’m trying to set up this v2 but without success.

I have Hass.io running on a RPi 3+ and i followed your instructions about your folder structure… but when I reboot the system it starts in safe mode and I get this errors:

error from callback <bound method Listener.on_message of <Listener(Thread-3, initial daemon)>>: on_message() missing 1 required positional argument: ‘message’

12:56:43 – components/pushbullet/sensor.py (ERROR) - message first occurred at 12:48:43 and shows up 17 times

Can’t update remote details from Home Assistant cloud

12:48:51 – main.py (ERROR)

Don’t use ‘server_host’ options with Hass.io

12:48:20 – Hass.io (WARNING)

Any advise please?

In the homeassistant log file I have this error:

 2020-04-07 12:47:15 ERROR (MainThread) [homeassistant.setup] Error during setup of component lovelace
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/setup.py", line 170, in _async_setup_component
    hass, processed_config
  File "/usr/src/homeassistant/homeassistant/components/lovelace/__init__.py", line 97, in async_setup
    resource_collection = await create_yaml_resource_col(hass, yaml_resources)
  File "/usr/src/homeassistant/homeassistant/components/lovelace/__init__.py", line 222, in create_yaml_resource_col
    ll_conf = await default_config.async_load(False)
  File "/usr/src/homeassistant/homeassistant/components/lovelace/dashboard.py", line 186, in async_load
    self._load_config, force
  File "/usr/local/lib/python3.7/concurrent/futures/thread.py", line 57, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/src/homeassistant/homeassistant/components/lovelace/dashboard.py", line 204, in _load_config
    config = load_yaml(self.path)
  File "/usr/src/homeassistant/homeassistant/util/yaml/loader.py", line 61, in load_yaml
    return yaml.load(conf_file, Loader=SafeLineLoader) or OrderedDict()
  File "/usr/local/lib/python3.7/site-packages/yaml/__init__.py", line 114, in load
    return loader.get_single_data()
  File "/usr/local/lib/python3.7/site-packages/yaml/constructor.py", line 43, in get_single_data
    return self.construct_document(node)
  File "/usr/local/lib/python3.7/site-packages/yaml/constructor.py", line 47, in construct_document
    data = self.construct_object(node)
  File "/usr/local/lib/python3.7/site-packages/yaml/constructor.py", line 92, in construct_object
    data = constructor(self, node)
  File "/usr/src/homeassistant/homeassistant/util/yaml/loader.py", line 195, in _ordered_dict
    nodes = loader.construct_pairs(node)
  File "/usr/local/lib/python3.7/site-packages/yaml/constructor.py", line 147, in construct_pairs
    value = self.construct_object(value_node, deep=deep)
  File "/usr/local/lib/python3.7/site-packages/yaml/constructor.py", line 92, in construct_object
    data = constructor(self, node)
  File "/usr/src/homeassistant/homeassistant/util/yaml/loader.py", line 226, in _construct_seq
    (obj,) = loader.construct_yaml_seq(node)
  File "/usr/local/lib/python3.7/site-packages/yaml/constructor.py", line 400, in construct_yaml_seq
    data.extend(self.construct_sequence(node))
  File "/usr/local/lib/python3.7/site-packages/yaml/constructor.py", line 122, in construct_sequence
    for child in node.value]
  File "/usr/local/lib/python3.7/site-packages/yaml/constructor.py", line 122, in <listcomp>
    for child in node.value]
  File "/usr/local/lib/python3.7/site-packages/yaml/constructor.py", line 92, in construct_object
    data = constructor(self, node)
  File "/usr/src/homeassistant/homeassistant/util/yaml/loader.py", line 116, in _include_yaml
    return _add_reference(load_yaml(fname), loader, node)
  File "/usr/src/homeassistant/homeassistant/util/yaml/loader.py", line 61, in load_yaml
    return yaml.load(conf_file, Loader=SafeLineLoader) or OrderedDict()
  File "/usr/local/lib/python3.7/site-packages/yaml/__init__.py", line 114, in load
    return loader.get_single_data()
  File "/usr/local/lib/python3.7/site-packages/yaml/constructor.py", line 43, in get_single_data
    return self.construct_document(node)
  File "/usr/local/lib/python3.7/site-packages/yaml/constructor.py", line 47, in construct_document
    data = self.construct_object(node)
  File "/usr/local/lib/python3.7/site-packages/yaml/constructor.py", line 92, in construct_object
    data = constructor(self, node)
  File "/usr/src/homeassistant/homeassistant/util/yaml/loader.py", line 195, in _ordered_dict
    nodes = loader.construct_pairs(node)
  File "/usr/local/lib/python3.7/site-packages/yaml/constructor.py", line 147, in construct_pairs
    value = self.construct_object(value_node, deep=deep)
  File "/usr/local/lib/python3.7/site-packages/yaml/constructor.py", line 92, in construct_object
    data = constructor(self, node)
  File "/usr/src/homeassistant/homeassistant/util/yaml/loader.py", line 226, in _construct_seq
    (obj,) = loader.construct_yaml_seq(node)
  File "/usr/local/lib/python3.7/site-packages/yaml/constructor.py", line 400, in construct_yaml_seq
    data.extend(self.construct_sequence(node))
  File "/usr/local/lib/python3.7/site-packages/yaml/constructor.py", line 122, in construct_sequence
    for child in node.value]
  File "/usr/local/lib/python3.7/site-packages/yaml/constructor.py", line 122, in <listcomp>
    for child in node.value]
  File "/usr/local/lib/python3.7/site-packages/yaml/constructor.py", line 92, in construct_object
    data = constructor(self, node)
  File "/usr/src/homeassistant/homeassistant/util/yaml/loader.py", line 195, in _ordered_dict
    nodes = loader.construct_pairs(node)
  File "/usr/local/lib/python3.7/site-packages/yaml/constructor.py", line 147, in construct_pairs
    value = self.construct_object(value_node, deep=deep)
  File "/usr/local/lib/python3.7/site-packages/yaml/constructor.py", line 92, in construct_object
    data = constructor(self, node)
  File "/usr/src/homeassistant/homeassistant/util/yaml/loader.py", line 226, in _construct_seq
    (obj,) = loader.construct_yaml_seq(node)
  File "/usr/local/lib/python3.7/site-packages/yaml/constructor.py", line 400, in construct_yaml_seq
    data.extend(self.construct_sequence(node))
  File "/usr/local/lib/python3.7/site-packages/yaml/constructor.py", line 122, in construct_sequence
    for child in node.value]
  File "/usr/local/lib/python3.7/site-packages/yaml/constructor.py", line 122, in <listcomp>
    for child in node.value]
  File "/usr/local/lib/python3.7/site-packages/yaml/constructor.py", line 92, in construct_object
    data = constructor(self, node)
  File "/usr/src/homeassistant/homeassistant/util/yaml/loader.py", line 195, in _ordered_dict
    nodes = loader.construct_pairs(node)
  File "/usr/local/lib/python3.7/site-packages/yaml/constructor.py", line 147, in construct_pairs
    value = self.construct_object(value_node, deep=deep)
  File "/usr/local/lib/python3.7/site-packages/yaml/constructor.py", line 92, in construct_object
    data = constructor(self, node)
  File "/usr/src/homeassistant/homeassistant/util/yaml/loader.py", line 116, in _include_yaml
    return _add_reference(load_yaml(fname), loader, node)
  File "/usr/src/homeassistant/homeassistant/util/yaml/loader.py", line 61, in load_yaml
    return yaml.load(conf_file, Loader=SafeLineLoader) or OrderedDict()
  File "/usr/local/lib/python3.7/site-packages/yaml/__init__.py", line 114, in load
    return loader.get_single_data()
  File "/usr/local/lib/python3.7/site-packages/yaml/constructor.py", line 43, in get_single_data
    return self.construct_document(node)
  File "/usr/local/lib/python3.7/site-packages/yaml/constructor.py", line 47, in construct_document
    data = self.construct_object(node)
  File "/usr/local/lib/python3.7/site-packages/yaml/constructor.py", line 92, in construct_object
    data = constructor(self, node)
  File "/usr/src/homeassistant/homeassistant/util/yaml/loader.py", line 195, in _ordered_dict
    nodes = loader.construct_pairs(node)
  File "/usr/local/lib/python3.7/site-packages/yaml/constructor.py", line 147, in construct_pairs
    value = self.construct_object(value_node, deep=deep)
  File "/usr/local/lib/python3.7/site-packages/yaml/constructor.py", line 92, in construct_object
    data = constructor(self, node)
  File "/usr/src/homeassistant/homeassistant/util/yaml/loader.py", line 226, in _construct_seq
    (obj,) = loader.construct_yaml_seq(node)
  File "/usr/local/lib/python3.7/site-packages/yaml/constructor.py", line 400, in construct_yaml_seq
    data.extend(self.construct_sequence(node))
  File "/usr/local/lib/python3.7/site-packages/yaml/constructor.py", line 122, in construct_sequence
    for child in node.value]
  File "/usr/local/lib/python3.7/site-packages/yaml/constructor.py", line 122, in <listcomp>
    for child in node.value]
  File "/usr/local/lib/python3.7/site-packages/yaml/constructor.py", line 92, in construct_object
    data = constructor(self, node)
  File "/usr/src/homeassistant/homeassistant/util/yaml/loader.py", line 195, in _ordered_dict
    nodes = loader.construct_pairs(node)
  File "/usr/local/lib/python3.7/site-packages/yaml/constructor.py", line 147, in construct_pairs
    value = self.construct_object(value_node, deep=deep)
  File "/usr/local/lib/python3.7/site-packages/yaml/constructor.py", line 92, in construct_object
    data = constructor(self, node)
  File "/usr/src/homeassistant/homeassistant/util/yaml/loader.py", line 195, in _ordered_dict
    nodes = loader.construct_pairs(node)
  File "/usr/local/lib/python3.7/site-packages/yaml/constructor.py", line 147, in construct_pairs
    value = self.construct_object(value_node, deep=deep)
  File "/usr/local/lib/python3.7/site-packages/yaml/constructor.py", line 92, in construct_object
    data = constructor(self, node)
  File "/usr/src/homeassistant/homeassistant/util/yaml/loader.py", line 226, in _construct_seq
    (obj,) = loader.construct_yaml_seq(node)
  File "/usr/local/lib/python3.7/site-packages/yaml/constructor.py", line 400, in construct_yaml_seq
    data.extend(self.construct_sequence(node))
  File "/usr/local/lib/python3.7/site-packages/yaml/constructor.py", line 122, in construct_sequence
    for child in node.value]
  File "/usr/local/lib/python3.7/site-packages/yaml/constructor.py", line 122, in <listcomp>
    for child in node.value]
  File "/usr/local/lib/python3.7/site-packages/yaml/constructor.py", line 92, in construct_object
    data = constructor(self, node)
  File "/usr/src/homeassistant/homeassistant/util/yaml/loader.py", line 114, in _include_yaml
    fname = os.path.join(os.path.dirname(loader.name), node.value)
  File "/usr/local/lib/python3.7/posixpath.py", line 94, in join
    genericpath._check_arg_types('join', a, *p)
  File "/usr/local/lib/python3.7/genericpath.py", line 153, in _check_arg_types
    (funcname, s.__class__.__name__)) from None
TypeError: join() argument must be str or bytes, not 'list'

Thanks!

Well…

Firstly I am surprised you don’t use version 1 ‘because it stops working’. As far as I know it still works well, and I have just begun using it again here while I finish up the details on Version 2 and get the electronics part sorted out.

However,

Firstly this seems to refer to ‘Pushbullet’ which I don’t use and is not in this package. Could there be a problem there and it is coincidence?

Could it be that I have something named in this package the same as something you use with Pushbullet which is causing HA a problem?

I am not really sure what else to suggest at the moment with these errors.

There is some reference to Lovelace though so one thing you could try is to see if the package loads without any Lovelace at all. If it does then you can add sections one at a time.

In the view there are three vertical stacks:

#=== SYSTEM STATUS

#=== SCHEDULES

#=== SETTINGS

and each is completely independent so you could comment them out one at a time and see what happens.

Hi Klogg.
Version 1 didn’t stop working for me, but it started giving many “lovelace” problems.
On my side I just removed some code from lovelace, made it simplier but without errors.
But the code below was still working.

1 Like

Hi Klogg
I got working the garden_v2 and… it simply ROCKS!

Do you have perhaps some custom CSS? I am looking at fonts and spacings.

Another question: my dark sky sensors do not have forecast and current suffix, so I have renamed all sensors in the package.
Do you have both smartweather and darksky integration?

Thanks again for your time.

1 Like

Il mio GiardAno? :rofl:

Yes, sorry… I have this in my resources.yaml

#=== FONTS
- url: https://fonts.googleapis.com/css?family=Oswald
  type: css

and yes I use both darksky for temp and SmartWeather for rainfall.
I have two darksky sensors, one which I use for forecast information and one for current hence the different names (they both have a different scan_interval but apart from that I can’t remember now why I did that!!). I will try and get an update done tomorrow to the readme to cover all of this.

Hi @klogg,
I managed to load the configuration, I still have to fix a little bit for the theme.
But I have a problem that doesn’t show me the other settings

It is hard to diagnose based on just a picture of the screen but…

Regarding the Schedules (the centre section) it looks like none are selected. Try pressing one of those buttons ‘UNKNOWN’.

Does that help?

I am not sure about the missing settings… It is possible that you have the file

item_settings_line.yaml

in the wrong folder. I have it in

lovelace/includes_garden/

I have an irrigation pump (well) with (220v with start relay) and did not see any posts related to this or see anything in the code in order to accommodate? I assume everyone else is running off city water i.e. water is already supplied when the master valve opens. In my case I would need to energize the irrigation pump which would then supply the water flow. Would anyone be willing to advise how to accommodate this in the code/project?

@klogg The file item_settings_line.yaml is in the same folder of section_settings_general.yaml. I have hass.io and I put the directory includes and includes_garden in directory config.

But it is as if the item_settings_line file is not loading. Are you sure the include in line 176, 182, 189 is correct?

It is correct in that it works as it is there for me but your line number doesn’t match with what is on GitHub or my local copy.
Have you added something or are you sure you have copied it correctly?

Because I have added this divider, before service notification

This is with dark_teal theme: the same!

I can’t think of a reason why those lines don’t show.

Do the Rainfall and Temperature sections display properly?

(The theme shouldn’t affect this particular issue but if you add the Oswald font to your resources it will look a lot nicer :slight_smile: )

Now I have added the font.
Forecast:

In rainfall I have a problem with !secret input_text.smartweather_location_code1 (line 202,211), they don’t exists so I replace with “states[‘input_text.smartweather_location_code1’].state”

hi, @klogg yesterday I fixed many things and I understood why he didn’t show me the settings.
This is a screen of what it looks like now:

But I wanted to ask you why the cycle during only 4 minutes, 1 minute per zone for whatever value I put?

Hi, I’m glad you got it working.

If I understand your question correctly your zones will only run for a maximum of 1 minute?
It looks like you have mad a few changes and you seem to havet he maximum duration set to one minute. This is only supposed to take effect if you use weather adjustments so either I have coded it incorrectly or you have made some changes to have caused it to not work properly.

As an aside it looks like in one of my recent changes, I inadvertently removed the ‘secondary information’ from the maximum and minimum times.

        #=== Minimum duration when using weather adjustments
        - !include
            - item_settings_line.yaml
            - entity: input_number.irrigation_weather_adjusted_minimum_duration_in_seconds
              name: Minimum number of seconds to run a zone
              secondary_info: When using weather adjustments
              margin_top: -0.5em

        #=== Maximum duration when using weather adjustments
        - !include
            - item_settings_line.yaml
            - entity: input_number.irrigation_weather_adjusted_maximum_duration_in_minutes
              name: Maximum number of minutes to run a zone
              secondary_info: When using weather adjustments
              margin_top: -0.5em

image

I will update it on Github

@http_edo13 I just tested it and yes, the code is wrong. It always only runs for the maximum minutes set.

I will correct it soon…

Thank you very much for the immense work.
I wanted to hint you add some things to the readme:

  • the file section_settings_general.yaml needs “sensor.garden_irrigation_controller_wifi_signal” for the correct settings display

  • the file item_cycle_schedule_title needs “sensor.dark_sky_current_minutely_summary” for show label, I used sensor.dark_sky_hourly_summary. But I don’t understand what is it “sensor.weather_just_icon” and where I find it.

  • in the “switch zone name” you have to insert the name with “switch”, for example “switch.valve1”

Thank you.

Github is updated and it should now respect max and min times only if using weather adjustments. Let me know if it doesn’t :wink:

Ah, yes. Sorry, that is another part of my general config that I use in other places…

If you want the icon then you need to include this in your config somewhere.

  - 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 %}

Okay :grin:, now works. this should also be added to the readme.

Another questions, the username of notify service that i have to put on is like “notify.telegram_edoardo” or “telegram_edoardo”? I tried both but I don’t receive notifications on my telegram. I have already configured the service for other automations.