I’ve altered the code slightly (i’ve 3 values) but i think i found 2 issues -
One, when i schedule for anything other than 00 minutes, it doesn’t schedule i.e. if i schedule for 05:30 - it doesnt work, but if i go for 05:00 it does. Manual runs are fine. I’ve not been able to work it out, potentially its just my setup.
Also,
I’ve noticed on a run where it uses adjustments, its using the same duration for each zone in the cycle (zone 1).
I think this is due to garden_irrigation.yaml - lines 458 to 468. Its hard coded to zone1. I’ve not double checked this but it looks like its incorrect.
Having said that, i feel like i have seen it complete durations as per frontend values for scheduled.
(for definite, i’ve seen a scheduled run with adjusted values ran zone1 durations for all zones)
thanks again for sharing an awesome project,
Cheers
Yes, strange as it may seem I think it must have been designed like that. Not because I would have thought it was a good design but I think as I was new to HA I wanted to keep it fairly simple and decided I would never care if my irrigation could only run only on the hour (remember I never even considered at that time that anyone else would be using it). It wi
You are absolutely right!
It’s deepest winter here so I won’t be testing it for a while but I am pretty sure those lines should be:
After updating to 0.103, an error appears in the log and watering does not turn on.
Error:
[homeassistant.components.script] Error executing script script.irrigation_run_a_cycle. Unknown error for call_service at pos 4:
...
...
TypeError: can only concatenate str (not "int") to str
To make it work again, you need to make changes to the garden_irrigation.yaml file: Lines 93 and 97
I am planning on expanding my system to eight zones and I think I would like to go down a similar hardware route to you.
Do you by any chance have a schematic showing the connections in more detail?
And also if anyone else is reading this, I am sure someone put a really good description of their implementation using an 8 relay module somewhere but I can’t find it now…
Additionally, I used a single 24Vac power supply for my system and then used a combination of a bridge rectifier and a DC-DC converter to get the 5Vdc supply rather than using 2 separate supplies. Either way will work.
There is also another option for controlling relays from an ESP and that is to use an I2C interface. You can buy I2C relay boards and ESPhome has config options to control them. This would be handy if you start running out of GPIO on the ESP or want to save some for inputs etc.
No worries, thanks for doing this, I appreciate it.
I’ve got an ESP32 Devkit which I think has enough GPIOs to run eight relays, I’ll just need to read up on which are the best ones to use.
…and now the obligatory followup questions
First and most easily, I keep seeing these nice diagrams. I assume a website is used to create them?
Also I really like the idea of only having one power supply. Would you mind linking to an example bridge rectifier and DC-DC converter?
Similar idea to what I’m slowly working on. Although I got a 12v relay board and a 12v>5v converter for my EPS8266. Was working well, until I discovered that my test solenoid is 24v, though it works with 12v. So now I’m looking to get a 24v>12v converter. LOL.
I have upgraded to Hassio 0.104.3 . And now garden not run, it gives me this error:
Error executing script script.irrigate_a_zone. Unknown error for condition at pos 1:
Traceback (most recent call last):
File “/usr/src/homeassistant/homeassistant/components/script/init.py”, line 204, in async_turn_on
await self.script.async_run(kwargs.get(ATTR_VARIABLES), context)
File “/usr/src/homeassistant/homeassistant/helpers/script.py”, line 189, in async_run
await self._handle_action(action, variables, context)
File “/usr/src/homeassistant/homeassistant/helpers/script.py”, line 272, in _handle_action
await self._actions[_determine_action(action)](action, variables, context)
File “/usr/src/homeassistant/homeassistant/helpers/script.py”, line 410, in _async_check_condition
check = config(self.hass, variables)
File “/usr/src/homeassistant/homeassistant/helpers/condition.py”, line 387, in template_if
return async_template(hass, value_template, variables)
File “/usr/src/homeassistant/homeassistant/helpers/condition.py”, line 367, in async_template
value = value_template.async_render(variables)
File “/usr/src/homeassistant/homeassistant/helpers/template.py”, line 221, in async_render
return compiled.render(kwargs).strip()
File “/usr/local/lib/python3.7/site-packages/jinja2/asyncsupport.py”, line 76, in render
return original_render(self, *args, **kwargs)
File “/usr/local/lib/python3.7/site-packages/jinja2/environment.py”, line 1008, in render
return self.environment.handle_exception(exc_info, True)
File “/usr/local/lib/python3.7/site-packages/jinja2/environment.py”, line 780, in handle_exception
reraise(exc_type, exc_value, tb)
File “/usr/local/lib/python3.7/site-packages/jinja2/_compat.py”, line 37, in reraise
raise value.with_traceback(tb)
File “”, line 1, in top-level template code
TypeError: can only concatenate str (not “int”) to str
I can’t be sure but I think you are running an old version of the code. There is no script called irrigate_a_zone anymore. I think I renamed them all to accommodate the master control and failsafe scripts.
This error is about having an int when it needs a str (or vice versa).
What version of HA did you upgrade from?
I am not using this system at the moment as it is deep winter here but as far as I know the version on GitHub works. Maybe someone else who is using it can confirm or deny that?
I am thinking of writing a whole new version before the summer, partly as I’m changing all the hardware I use and partly to see if I can do it better than I did first time round now that I know more about HA.
I just looked on GitHub and I last uploaded the code in September 2019 which is after the summer here throughout which time I used it constantly with no problems.
I’m not sure I can think of any reason it doesn’t work for you unless ether,
you have made some changes which introduced a problem, or conversely,
you haven’t made any changes that you needed to make in order to make it fit in with your specific setup.
As I said I am planning a complete re-write in the next few weeks so whilst I am more than happy to help with any specific questions I don’t really want to spend time in detailed debugging of your config.