Skip to content
  • MySensors
  • OpenHardware.io
  • Categories
  • Recent
  • Tags
  • Popular
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo
  1. Home
  2. General Discussion
  3. Hypothetical Project question

Hypothetical Project question

Scheduled Pinned Locked Moved General Discussion
15 Posts 4 Posters 1.5k Views 3 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    mrhutchinsonmn
    wrote on last edited by
    #5

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

    mfalkviddM 1 Reply Last reply
    0
    • M mrhutchinsonmn

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

      mfalkviddM Offline
      mfalkviddM Offline
      mfalkvidd
      Mod
      wrote on last edited by
      #6

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

      1 Reply Last reply
      0
      • M mrhutchinsonmn

        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?

        G Offline
        G Offline
        Grubstake
        wrote on last edited by
        #7

        @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.

        1 Reply Last reply
        0
        • M Offline
          M Offline
          mrhutchinsonmn
          wrote on last edited by
          #8

          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.

          1 Reply Last reply
          0
          • skywatchS Offline
            skywatchS Offline
            skywatch
            wrote on last edited by
            #9

            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! ;)

            1 Reply Last reply
            1
            • M Offline
              M Offline
              mrhutchinsonmn
              wrote on last edited by
              #10

              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!!

              skywatchS mfalkviddM 2 Replies Last reply
              0
              • M mrhutchinsonmn

                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!!

                skywatchS Offline
                skywatchS Offline
                skywatch
                wrote on last edited by
                #11

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

                M 1 Reply Last reply
                0
                • M mrhutchinsonmn

                  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!!

                  mfalkviddM Offline
                  mfalkviddM Offline
                  mfalkvidd
                  Mod
                  wrote on last edited by
                  #12

                  @mrhutchinsonmn it might be a good deterrent ;-)

                  1 Reply Last reply
                  1
                  • skywatchS skywatch

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

                    M Offline
                    M Offline
                    mrhutchinsonmn
                    wrote on last edited by
                    #13

                    @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```
                    skywatchS 1 Reply Last reply
                    0
                    • M mrhutchinsonmn

                      @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```
                      skywatchS Offline
                      skywatchS Offline
                      skywatch
                      wrote on last edited by
                      #14

                      @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 ;)

                      1 Reply Last reply
                      0
                      • M Offline
                        M Offline
                        mrhutchinsonmn
                        wrote on last edited by
                        #15

                        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
                        
                        1 Reply Last reply
                        0
                        Reply
                        • Reply as topic
                        Log in to reply
                        • Oldest to Newest
                        • Newest to Oldest
                        • Most Votes


                        24

                        Online

                        11.7k

                        Users

                        11.2k

                        Topics

                        113.1k

                        Posts


                        Copyright 2025 TBD   |   Forum Guidelines   |   Privacy Policy   |   Terms of Service
                        • Login

                        • Don't have an account? Register

                        • Login or register to search.
                        • First post
                          Last post
                        0
                        • MySensors
                        • OpenHardware.io
                        • Categories
                        • Recent
                        • Tags
                        • Popular