My Garden Irrigation

For anyone interested version 2 is now on GitHub

PLEASE REMEMBER: Whilst it works on my desk, it can only be considered a preview at this stage.

Great idea, grazie Giuseppe.
I’ve tried to integrate this project but without success!
Ciaooo,

Alessandro

2 Likes

Hi thanks for sharing it. A question: i don’t undestand how to lovelace_gen works. where I need to put your lovelace dir? and how to modify ui-lovelace.yaml main file?

I tried to put content of view_garden_v2.yaml directly on my ui-lovelace.yaml. then i removed some entry about smartweather i haven’t yet… after reboot of HA I get a very bad not working layout. I’ve included all plugin required by HACS. Anyone has integrated it without problem?

Hi, thanks for the wonderful work. If I don’t have the master solenoid valve, what pieces of code should I remove?

Lovelace_gen is a very powerful custom component by Thomas Loven. To find out what it does and how it does it I suggest you read his Github.

Some of my lovelace yaml files have the first line as:
# lovelace_gen
Do not remove this as it is need by this custom component.

Yes, I have probably not made it clear how my folder structure is…
In my config I have a lovelace folder.
Inside that I have two sub-folders:

  • includes which contains some lovelace yaml files that I use throughout my config and,
  • garden_includes which contains some lovelace yaml files that I wrote just for this package

You can move all the files into one folder but you will have to edit all references to them to point to the right place.

My ui-lovlace.yaml
has the following:

views:
  - !include lovelace/view_garden_v2.yaml

I hope that helps with those questions. I will try to remember to update the readme on Github to be clearer.


What exactly does this mean?

If you mean the extra Sonoff I am planning to use as fail-safe switch with the PulseTime feature then you need to search for pulsetime and remove the relevant bits. However at this stage there is no real need to remove anything as it should still work with it still there. All it does is sends an MQTT message.

yes, because my system is made up of two 4ch pro sonoffs that turn on each valve(6 zones), I don’t have a master that turns on and closes the entire system. however, the pulsetime function will also be there for all sonoff 4ch?

I have installed HACS to get the custom lovelace cards but let me add some glue. We need also

  • helper input_text.notifications_user1_name
  • sensor.time

Is this correct? Any other suggestion?

Yes, sensor.time is needed somewhere in your config.

And yes I have written it to allow two users to receive notifications. You are right two helpers are needed (mine are elsewhere in my config as I use them not just in this package):

input_text.notifications_user1_name and
input_text.notifications_user2_name

The actual notifications are handled outside the package so it will need some adapting to make use of whatever notification methods you choose to use.

I included it so that when I am away on holiday it can use Telegram to tell me when irrigation starts and ends.

Again, I will update the readme on GitHub.

Thanks for pointing this out.

1 Like

Good. Maybe you can include notification in the package to get an all-in-one packages without external dependencies

As it stands the package will send the notifications by calling script.notify which is outside this package. You can change this to anything you like and it wouldn’t make sense for me to include the script.notify in this package as my notification system is a whole package all on it’s own and very tailored to my needs.

The irrigation notifications are all handled in the file garden_notifications.yaml.

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/