# Automatic irrigation

**URL:** <https://discourse.nodered.org/t/automatic-irrigation/24053>\
**Category:** General\
**Created:** [1 April 2020 20:10 UTC](https://discourse.nodered.org/t/automatic-irrigation/24053 "2020-04-01T20:10:32Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![cmartens](https://avatars.discourse-cdn.com/v4/letter/c/b5e925/32.png) [@cmartens](https://discourse.nodered.org/u/cmartens)\
**Post date:** [1 April 2020 20:10 UTC](https://discourse.nodered.org/t/automatic-irrigation/24053/1 "2020-04-01T20:10:33Z")

</div>

Hi,

I have build the node below in Home Assistant. Goal is that the irrigation system irrigates the garden automatically between 7 and 8 h AM on specific days. Switching on and off the automatic program is arranged via an input\_boolean switch in Home Assistant. I have two questions:

1. Is it possible to optimize this flow?
2. The override button does not work. When I switch off the switch, this does not trigger the reset function.

Who can help me?

 ![Schermafbeelding 2020-04-01 om 21.56.09](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/0/a/0aaa260fd8850c58b630831c6d2fbfee0bddff60.png)

Schedex node (this node is only used as trigger to switch the program on)

- Switch on: 07:00
- Switch off: 07:01
- Days: Mon-Wed-Fri-Sun

Current state node: Automatische beregening aan?

- Entity ID: input\_boolean.beregening\_switch
- If State: is on

Switch:

- is on --\> 1
- is off --\> 2

Delay:

- Action: Delay each message
- Fixed delay
- For 250 milliseconds

Change Node: Reset

- Set msg.reset to true

Trigger: 60 min

- Send: true
- Then wait for
- 60 minutes
- Then send false
- Handling: all messages

Switch

- is true --\> 1
- is false --\> 2

Change Node: Aan

- Set msg.payload
- To: {"option": "Aan"}

Change Node: Uit

- Set msg.payload
- To: {"option": "Uit"}

Call Service: Pomp: Aan

- Server: Home Assistant
- Domain: homeassistant
- Service: turn\_on
- Entity ID: switch.fibaro\_fgs222\_beregeningspomp

Call Service: Pomp: Uit

- Server: Home Assistant
- Domain: homeassistant
- Service: turn\_off
- Entity ID: switch.fibaro\_fgs222\_beregeningspomp

```auto
[{"id":"8a726c0.c036598","type":"switch","z":"97a58f8b.205c98","name":"","property":"payload","propertyType":"msg","rules":[{"t":"true"},{"t":"false"}],"checkall":"true","repair":false,"outputs":2,"x":758,"y":540,"wires":[["dce4fe4b.fd6d28"],["b6112689.7422d"]],"l":false}]

```

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [31 May 2020 20:10 UTC](https://discourse.nodered.org/t/automatic-irrigation/24053/2 "2020-05-31T20:10:36Z")

</div>

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.
