Hypothetical Project question



  • I am using Home Assistant as a controller, with a serial gateway. My garden irrigation project required I place my garden water pump directly off of my rain barrel, a full 100' away from the garden and water manifold that is controlled by my arduino nano and 12v solenoids. Is it possible to connect the pump to a nano, relay & NRF24L01 and trigger it (via wireless) to power up when a solenoid is activated on the mainifold and power off again when the solenoid turns off?



  • @mrhutchinsonmn YES! - this is really what automation is all about and mysensors will be a perfect fit for this.

    Have a look at the build page here for relay and irrigation ideas.....

    One node and sensor monitor the solenoid position or power.
    The other node connects to the pump power relay.
    Simple! πŸ˜‰

    But.....you should also have a sensor to make sure you have enough water in the rain barrel otherwise you risk burning out the pump!



  • Very cool! I will dig into things and see if I can figure it out.


  • Mod

    @mrhutchinsonmn do you mean that you want to trigger the pump or the Arduino? (”It” is a bit ambigous in your post)



  • I need to trigger the relay on/off (via wireless) that is connected to the power of the pump via an arduino nano.


  • Mod

    @mrhutchinsonmn thanks for explaining. This project definitely sounds doable.



  • @mrhutchinsonmn
    I agree with the previous responses.

    I know you said wireless, but if feasible I would strongly favor 100 feet of direct-burial irrigation cable and a relay for pump, and a hardware float switch, for simplicity and reliability.



  • I am ready to start dinging around with one sensor state controlling a 2nd sensor, using Home Assistant as the controller but I am not finding what I am looking for. I need the state (on/off) of sensor 1 to signal sensor 2 to turn on/off (turn relays on/off) . I am assuming that will require a script setup on Home Assistant to do this.

    Just need some examples (sketches) and supporting docs. It was mentioned this could be accomplished with the irrigation project build (which I plan on implementing) but for now, I just want a pinout high on relay-1 to trigger a 2nd relay to also go high (via wireless) .

    Maybe this question is for Home Assistant? Not sure.



  • A simple test would be to build.....
    https://www.mysensors.org/build/binary - For the sending node.

    and...
    https://www.mysensors.org/build/relay - for the receive end (at the pump).

    I can't help with HA as I have never used it, but this setup is as good a start as you will get and you'll learn lots tinkering with it! πŸ˜‰



  • I decided to look at things from the Home Assistant side and found what I was looking for under "automations". This simple script triggers my relay when motion is detected. Obviously, that would be a bad idea for watering a garden but now I understand how to trigger an action based on the state of a sensor.

    - id: '1561653332262'
      alias: New Automation
      trigger:
      - entity_id: binary_sensor.relay_motion_105_0
        platform: state
      condition:
      - condition: state
        entity_id: binary_sensor.relay_motion_105_0
        state: 'on'
      action:
      - service: script.1561137758707
    

    Thank you for your assistance!!



  • @mrhutchinsonmn Good work! - let us know how it works in the end if you can.


  • Mod

    @mrhutchinsonmn it might be a good deterrent πŸ˜‰



  • @skywatch What fun!! I figured out how to turn the pump relay on and off, based on the state of the water solenoid relay. This automation.yaml script works :

    - id: '1562092064918'
      alias: Relay UP
      trigger:
      - entity_id: switch.relay_4_2
        from: 'off'
        platform: state
        to: 'on'
      condition:
      - condition: state
        entity_id: switch.relay_4_2
        state: 'on'
      - condition: state
        entity_id: switch.relay_2_1
        state: 'off'
      action:
      - alias: ''
        data: {}
        service: switch.turn_on
    - id: '1562093186484'
      alias: Relay Down
      trigger:
      - entity_id: switch.relay_4_2
        from: 'on'
        platform: state
        to: 'off'
      condition:
      - condition: state
        entity_id: switch.relay_2_1
        state: 'on'
      action:
      - service: switch.turn_off```


  • @mrhutchinsonmn YAY! - What fun indeed! - I am happy that you have made such good progress - now I am sure you'll be thinking of more things you can do πŸ˜‰



  • This script will be more helpful for beginners. The previous script turns on/off all relays. This one controls only the specified relay.

    - id: '1562092064918'
      alias: Power Up Relay_2.1
      trigger:
      - entity_id: switch.relay_4_2
        from: 'off'
        platform: state
        to: 'on'
      condition: []
      action:
      - alias: ''
        data:
          entity_id: switch.relay_2_1
        service: switch.turn_on
    - id: '1562093186484'
      alias: Power Down Relay_2.1
      trigger:
      - entity_id: switch.relay_4_2
        from: 'on'
        platform: state
        to: 'off'
      condition: []
      action:
      - data:
          entity_id: switch.relay_2_1
        service: switch.turn_off
    

Log in to reply
 

Suggested Topics

  • 4
  • 2
  • 2
  • 9
  • 8
  • 3

0
Online

11.4k
Users

11.1k
Topics

112.7k
Posts