My Garden Irrigation

The link “rules” that I had in my post will take you to the ESP8266 stuff but that same site has a similar page for the ESP32. Its a great resource

1 Like

I just did that diagram in MS Word using images from Google and some lines drawn on.

I’ll post some links to what I purchased when I’m back on a PC

1 Like

The bridge rectifier I used was chosen purely because I already had it in my shed, otherwise I would have used a smaller one.

Bridge rectifier:

DC-DC converter:

1 Like

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 have install new version of your garden but now the problem is the script “irrigation_irrigate_a_zone”…

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.

i think that My Garden Irrigation is that what do you need

Hi klogg
You did not update github version after HA update 0.103.

Thank for answering this, I knew it rang a bell somewhere!

oops. :blush:

thanks :partying_face: :partying_face: :partying_face:

Hi Klogg , i am using HA 0.105.5 and i have some issues
Error executing script script.irrigation_irrigate_a_zone
Error executing script script.irrigation_run_a_cycle.
Error while executing automation automation.irrigation_run_a_cycle_manually
TypeError: can only concatenate str (not “int”) to str

would you be able to update your code please ? thank you in advance

@ramibouaoun

See this post and the answer from @Barmalej

PLEASE READ

I am currently re-writing my system so I will not be updating the existing code again. As far as I know it works (apart from the above necessary change), at least it did for me through last summer.

Anyone wishing it use it on v0.103 of HA or later (up to at least v0.105, which is at the time of writing this is the latest version of HA), will need to make some small updates as detailed here.

I expect the new version to to be leaner and hopefully easier to maintain and configure for more or less zones, hence simpler for anyone to adapt it to their own use.

I do plan to post the new code when it is finished but I have no indication yet when it will be ready. Hopefully before the summer!

Thank you klogg.

thank you Klogg

Hi klogg, are you only rewrite your code from scratch or also done edit on your hardware? I’m using your first project (with sonoff 4ch) and it is very good! I hope you mantain the hardware :wink:

It is a complete code re-write and I am also planning on moving to an 8 relay board and ESP Home (My wife who is the chief gardener likes it so much that she wants more zones!). But I see no reason why you won’t be able to continue using a 4ch Sonoff.

And I think it will be much simpler than before to define more or fewer zones.

Still Tasmota based? If yes i think it is not difficult to eventually do modification :slight_smile: thanks