Sorry for the late reply. Will check it out. Thanks for both improvements! Should help tremendously. Will test it out over the weekend
I have been asked about my hardware configuration and thought I would share it with the community. It has been over a year and working quite well. Here are the details on my setup and the components used along with the suppliers.
Overview
For the record I am not affiliated in anyway with the suppliers listed below - I don’t earn a brass razoo from any of them. They simply had stuff I liked and bought at list price. They wouldn’t know me from a bar of soap. I have included the product description and photo as web links often get broken. As always shop around as things change.
The goal was to run a 24V supply line around the garden and drive irrigation and lighting from this feed. DC is used for most garden LED lighting however irrigation valves generally use AC. The solution was to source 24VDC valves which was not as difficult as first thought, see below.
There a just three components.
- Zigbee relay
- Count down timer (dead man switch)
- 3 position switch (auto, off, manual).
The dead man switch is because I am paranoid but my fears are well founded as there have been two occasions in about 6 months where the off signal has been lost. Communications, be it WiFi, Zigbee, ZWave etc. is not perfect and gives some thought for consideration.
Some level of soldering is required but it is fairly basic. Zigbee relay is on the right and dead man switch to the left. Blue tack holds the boards in place.
Been in place a year or so now and working fine, there are eight like this. Yep, that’s spider poo, they get into everything including my weather station rain gauge perched some 6 meters up on a pole. They seem to do no harm but consider silicon around the hole.
Wiring diagram
I hope my back of coaster diagrams make sense.
Understanding the documentation can be challenging. You want mode P-2, T1=zero and T2 the max time.
The case
ABS SEAL BOX 115X65X55 WITH FLANGE G308MF
These are an IP65 enclosure. The mounting flanges are great as you don’t have to penetrate the case or tie it on somehow. I use a couple of 12g 30mm hex head screws to secure it to timber. The boxes are mounted vertically with the wires (power in and valve out) egress through the bottom.
The switch and boot
SPDT Centre-Off Miniature Toggle Switch - Solder Tag
Rubber Boot with Seal to suit Mini Toggle Switch
The Valve
I obtained the valves from Valves Direct. There is a build your own valve but if you call them there are a few more options such as my 3/4” BSP Male in and 19mm straight barb out and 24VDC. I found them really helpful.
Good luck
Thanks mate. Could you give any details as to the power supply and how you run the power around the garden. I’m truely a begginer with circuits. And maybe the wires also if the type matters?
I use garden lighting cable - this is a kind of cross over project with irrigation and lighting running off the same feed. The power supply is 24V 100W LED IP67 constant voltage driver from my local electrical store. The wire is cable tied to the poly pipe that supplies the water.
The cable comes in a variety of gauges and depends on the load and distance from the power supply. There is a lot of information available on selecting the correct size.
Hi, I’ve been enjoying following this thread. I have a home brew irrigation controller using a set of 16 relays controlled by a RPi. I have written a python program (i’ve had a look at your python it is much better than mine) to manage the time and master solenoids including a watchdog. the interface is via MQTT and simple switches in Red-Node.
I have no scheduling and would like a simpler way to assist my partner who does most of the watering around our place.
I have been able to make a simple connection between your system and mine with MQTT switches
sample switch below:
mqtt:
switch:
- unique_id: zone_1
name: "zone 1"
state_topic: "homeassistant/b8:27:eb:c9:d0:2c/state/zone/1"
command_topic: "homeassistant/b8:27:eb:c9:d0:2c/cmnd/zone/1"
#availability:
#topic: "homeassistant/b8:27:eb:c9:d0:2c/available/zone/1"
value_template: "{{ value_json.status }}"
payload_on: '{"command":"startzone","state":"on","zone": 1, "cycletime": 2}'
payload_off: '{"command":"stopzone","state":"off","zone": 1}'
state_on: 'on'
state_off: 'off'
optimistic: false
qos: 0
retain: false
and your system
irrigation_unlimited:
controllers:
- name: "Back Yard"
zones:
- name: "Right Side"
entity_id: "switch.zone_1"
schedules:
- time: "06:00"
duration: "00:20"
QUESTION:
Is there a way to pass the ‘duration’ (i’ve called it cycletime on my side) to the ‘payload_on’ that is sent to my system.
keep up the great work
Sure, you need to grab the current_duration
attribute from the zone entity using a template like {{ state_attr('binary_sensor.irrigation_unlimited_c1_z1', 'current_duration') }}
. It is in H:MM:SS format so you may need to massage it into some other type like seconds for example {{ as_timedelta(state_attr('binary_sensor.irrigation_unlimited_c1_z1', 'next_duration')).total_seconds() }}
.
Problem is payload_on
does not appear to support templating. Fortunately it seems someone else has walked this path before you here.
Thanks for the help, I’m hoping to have lots of fun with your system.
cheers
Hello. Looks like a great integration. I’m just getting started on setting up my irrigation system. I was leaning towards something like mentioned in the below thread. As mentioned by others, WiFi can be flaky so I’m trying to avoid the need for an ‘Off signal’ from home assistant.
Is there a method with this integration to pass the ‘runtime’ to the EspHome device so that the valve is turned off without input from HA?
Can I setup a sequence that uses more than one controller (EspHome device)?
Create an automation that triggers on the zone entity changing from off to on. The trigger section should be fine but the action part will need some working out but this is the basics.
automation:
- alias: Start ESPHome device
trigger:
- platform: state
entity_id: binary_sensor.irrigation_unlimited_c1_z1
from: "off"
to: "on"
action:
- service: esphome.?????
data:
run_duration: {{ state_attr('binary_sensor.irrigation_unlimited_c1_z1', 'current_duration') }}
On the subject of flakey devices or even just reassurance I would like to mention a new feature in the latest release with “check back”. It happens for me once in a blue moon on my Zigbee network without rhyme or reason. Maybe the on or off signal gets lost but now I know about it.
After the switch is turned on or off it is reexamined after a delay. If it is not in the expected state a message is logged and an attempt is made to resync.
This feature is enabled by default with a delay of 30 seconds and 3 retry attempts. If you want to alter the parameters then add a check_back
section to the zone. Full details can be found here.
irrigation_unlimited:
controllers:
zones:
- name: "Zone 1"
entity_id: switch.my_switch
check_back:
delay: 20
retries: 4
Can also be put in the all_zones_config
. Best thing is it fires an event which can be used to send a notification like an email. There is an example in the readme
Is it possible to roll back to integer for the entities? First I enabled rename_entities, but I thought this is not working for the manual card. So I changed rename_entities to false, and removed all ids. However home assistant is still taking full names for the binary_sensors.
How can I rename the binary_sensors or refresh these? After changing zones or deleting, they still appear. Maybe it’s a general home assistant question?
Kind regards
Ron
I’ve started having an issue with the integration whereas I cannot see any of the controllers or sprinklers now in the GUI. Its been running find for ages, but now the dropdowns for enable/disable or manual run do are not populated.
I’ve done various version upgrades across HA, and also made some changes to what entities are being logged however I can’t work out why this isn’t working any longer. The watering system still appears to run however on restart the controller does re enable if it has been disabled, and now with all the rain we’re having I’m wasting water
Hello i am a probleme with manual fonction
Ok for this
> - name: Go
> tap_action:
> action: call-service
> service: irrigation_unlimited.manual_run
> service_data:
> entity_id: binary_sensor.irrigation_unlimited_c1_m
> time: '0:10:00'
But non ok for this
> - name: Go
> tap_action:
> action: call-service
> service: irrigation_unlimited.manual_run
> service_data:
> entity_id: binary_sensor.irrigation_unlimited_c1_m
> time: input_datetime.irrigation_unlimited_run_time
error :
Échec d’appel du service irrigation_unlimited/manual_run. offset input_datetime.irrigation_unlimited_run_time should be format ‘HH:MM’, ‘HH:MM:SS’ or ‘HH:MM:SS.F’ for dictionary value @ data[‘time’]
I don’t understand
input_datetime.irrigation_unlimited_run_time
Thank you for help
I think that quotes are missing, try that:
service_data:
entity_id: binary_sensor.irrigation_unlimited_c1_m
time: 'input_datetime.irrigation_unlimited_run_time'
Thank you
It’s not ok
Steph
Sorry, I did not pay attention that apparently the service syntax is not the one you used. Correct one (checked under Developer tools/Services is):
service: irrigation_unlimited.manual_run
data:
entity_id: binary_sensor.irrigation_unlimited_c1_z1
time: "00:10"
So in your case could you check this one:
service: irrigation_unlimited.manual_run
data:
entity_id: binary_sensor.irrigation_unlimited_c1_z1
time: "input_datetime.irrigation_unlimited_run_time"
hello, no it didn’t work. I started the installation from scratch, I had forgotten a few steps and it works. thanks for the help
Thank you
Hello,
working with Irrigation Unlimited a few weeks now, great project.
Can use service “adjust_time” and 'manual_run" via pyscript without problems.
But how can I adjust the starting_time of a zone schedule? ( updating config.yaml and restarting homeassistant is a bit brute force )
Can not work with predefined sequences, as the zones are triggered by evaporation buckets, and many zones can run in parallel, depending on flow rate of the zone and pump capacity. ( rectangular package solver handles the optimization problem )
Thanks for you hints
Xal
Can you give a little more background on what you are trying to achieve. Dynamic schedules could be done but I need a bit more information.
Having 12 zones, with a flow between 4-14 l/min.
Having a pump with 24 l/min.
Running time per zone is calculated from (evaporation-rain) and watering buckets, so I get a list of zones with durations for next day. Can contain 0-12 zones.
For this zones I run “rectangle package solver” ( time x flowrate ), to minimze pump running time.
Outcome is a list “Time” and “Duration”, one line per zone.
Now I want to feed this list into “Irrigation_unlimited”. Only way I found is to rewrite config.yaml and restart homeassistant. ( reload “irrigation.unlimited” does not change values )