What is the best function to use on a relay

Hello everyone,

I am new to node red and have a simple question.This probably sounds like a broken record for most of y’all. I’m attempting to build an aeroponics veggie garden and need some of y’alls expert help. I’m using a raspberry pi 3b with a NCD relay controller and need to to control some solenoid valves. I have already gone through some of the basic tutorials and have used the inject and delay nodes off the pallet (pretty dang cool thanks node red). Now to my first of many questions... what would best way to have this valve open for 30 sec then close for 5 min and repeat indefinitely. Thanks In advance for your replies and advice.

Something like this?

[{"id":"997419c6.232068","type":"trigger","z":"d103f472.19f3c8","op1":"open","op2":"close","op1type":"str","op2type":"str","duration":"30","extend":false,"units":"s","reset":"","bytopic":"all","name":"","x":340,"y":3140,"wires":[["efde99d1.90524"]]},{"id":"cb3ee4fc.bdaeb","type":"inject","z":"d103f472.19f3c8","name":"Trigger","topic":"","payload":"foo","payloadType":"str","repeat":"300","crontab":"","once":false,"onceDelay":0.1,"x":180,"y":3140,"wires":[["997419c6.232068"]]},{"id":"efde99d1.90524","type":"debug","z":"d103f472.19f3c8","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":530,"y":3140,"wires":[]}]

Get the output of the trigger node (open and close for simplicity) and handle that to control the valve.

I don't get the NCD relay controller, but.....

Use those words (or change them) to control the relay and ...... voila!

1 Like

Thanks I’ll give that a try after dinner. NCD.io is just a brand (not a bad looking board says made in the USA if that means anything).

1 Like

Using the trigger and delay got it work to in about 3 mins and done....pretty neat . Thanks for the help. I’ll be back to ask more questions.

No problems.

I guess you need to have a good idea of what Node-Red is and what it can do, and can't.

Good luck.

And: Don't be afraid to ask. The worst question is the one you don't ask.
:wink:

Looks like they have an impressive set of IoT-enabled products with scalability build-in and that they know what they are doing. Thanks for sharing.

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