DIY Automatic hydro Grow

rolln1up

Well-Known Member
Systems I'm automating?? Well this is an evolving concept so the exact setup is sure to change but here is what I'm shooting for as of now. It will have to monitor and adjust PH, Water levels, Temp, light cycles, the system will also be in charge of doing weekly res changes. I think those are the required variables to grow a nice crop. If I am missing anything please let me know!

email486- Thanks for the word of caution. I've never set up SSL I'll have to do some research. What would you suggest I use for a more secure login if not the .htpasswd?

Just so everyone knows the reason I have the controlling computer connected to the internet even though it's a security risk is to allow me to monitor and manually adjust the grow if need without have to be on site. I have VNC setup to all me remote access but I don't want to have to VNC into it every time I want to check in on the room, So I am setting up a website that will display current conditions and pictures of the system.
 

email468

Well-Known Member
Systems I'm automating?? Well this is an evolving concept so the exact setup is sure to change but here is what I'm shooting for as of now. It will have to monitor and adjust PH, Water levels, Temp, light cycles, the system will also be in charge of doing weekly res changes. I think those are the required variables to grow a nice crop. If I am missing anything please let me know!

email486- Thanks for the word of caution. I've never set up SSL I'll have to do some research. What would you suggest I use for a more secure login if not the .htpasswd?

Just so everyone knows the reason I have the controlling computer connected to the internet even though it's a security risk is to allow me to monitor and manually adjust the grow if need without have to be on site. I have VNC setup to all me remote access but I don't want to have to VNC into it every time I want to check in on the room, So I am setting up a website that will display current conditions and pictures of the system.
Easiest, fastest solution would be to stay with .htpasswd and install SSL. You'll have to reconfigure Apache to use SSL though. You said you were using Ubuntu, right? here is the step-by-step for apache2 on ubuntu:
Apache2 SSL in Ubuntu - LinodeWiki

much, much easier on ubuntu looks like to me!
 

Maccabee

Well-Known Member
Easiest, fastest solution would be to stay with .htpasswd and install SSL. You'll have to reconfigure Apache to use SSL though. You said you were using Ubuntu, right? here is the step-by-step for apache2 on ubuntu:
Apache2 SSL in Ubuntu - LinodeWiki

much, much easier on ubuntu looks like to me!
Bah, why expose a web server on a public IP at all?

How to Install Openvpn | The Bakers Homepage

I'm not sure if things have changed in Heron, that tutorial was for Dapper.

I use OpenVPN and have never had any trouble with it, once it's up and running. It's great stuff.
 

rolln1up

Well-Known Member
Okay I've been looking into to building a relay board but it actually looks cheaper to buy one than to design one so thats what I've decided to do.

It's only $34.95 if you get it in an unassembled kit and just add $5 if you want it already assembled.
I'm going to be ordering this tonight so if anyone has any suggestion please let me know. I 'm going to use it to control 8 light sockets that I'm going to have to figure out how I want to setup. Heres a link to the board Parallel Port Relay Board
 

email468

Well-Known Member
Okay I've been looking into to building a relay board but it actually looks cheaper to buy one than to design one so thats what I've decided to do.

It's only $34.95 if you get it in an unassembled kit and just add $5 if you want it already assembled.
I'm going to be ordering this tonight so if anyone has any suggestion please let me know. I 'm going to use it to control 8 light sockets that I'm going to have to figure out how I want to setup. Heres a link to the board Parallel Port Relay Board
sorry - this is out of my area.
 

Maccabee

Well-Known Member
It's a relay, man. Not a power supply.

Product Web Site said:
Relay has Normally Open and Normally Closed Contacts rated for voltages 12VDC @ 10A, 125VAC @ 10A, or 250VAC @ 5Amps.
So, 10A for applications in the typical US household. .
 

rolln1up

Well-Known Member
each relay can handle 1,250 watts so I'm good there. Only thing I haven't done is check the specs of all the pumps and fans against the breakers and wiring for my room but as they are all running now I don't think it's going to be a problem but it's a concern.
 

Maccabee

Well-Known Member
no 15% rule here?
capacity of relay != capacity of circuit

now, I could be wrong--but I don't think you need to allow headroom on a relay in the same way you would the amp load on the whole circuit vs. the rating of the breaker.
 

rolln1up

Well-Known Member
I would still allow some tolerance on a relay as they are manufacted to operate within a tolerance of thier max rating, current through the condiction wire, but with 1250 watts per relay and the largest load being my 400 watt lighy nothing is even close to the relay's max rating.
 

rolln1up

Well-Known Member
Okay Hopefully someone here can help me out with this or at least tell me were to look it up at. I am not going to use a UPS on the computer for this reason. If the power is to go off or flicker the arc in the light (400watt hps/mh) will extinguish and my ballast isn't capable of rearcing an already hot bulb. I have the bios set to autostart once power is restored but if it was only a flicker then the bulb will still be hot when the program tries to engage the light and it will power up the ballast but if the bulb is hot, no arc, not light. So what I need is a way to have a 15 minute delay in the starting of the automation program allowing the bulb to cool before the automation program is activated. Thanks to everyone who has helped out on this project.

email468 > Would if be hard to setup a script to do this I looked into a delay script before on a similar project but I was unsuccessful.
 

email468

Well-Known Member
there is a built-in shell command called "sleep" that should do the trick (time is in seconds by default)...

so something like this...
( sleep 900; sh command_to_turn_on_lights >& errors) &

or like this...
if bulb_is_hot then
sleep 900
else
(cont'd)
 

Maccabee

Well-Known Member
put whatever command you need to start the program in

/etc/jauto/ja_start

and chmod it +x

then, in /etc/init.d/jauto_init
Code:
#!/bin/bash

at -f /etc/jauto/ja_start now + 15 minutes 
[FONT=Courier New]atq[/FONT]
then do:
# update-rc.d jauto_init defaults

That should run whatever is in /etc/jauto/ja_start 15 minutes after init completes its run.
 

email468

Well-Known Member
you can also do a kludgy wait -- you create a subroutine that counts off the amount of time and use the "wait" command to wait for the subroutine exit status before continuing...
as maccabee points out - there is more than one way to do it ("at" is a no-no for us so wouldn't have thought of that).
 

rolln1up

Well-Known Member
OKay well today I was able to purchase the parts needed to construct the outlet box. All parts were purchased at homedepot and the p\list looks like this

25ft of 14.3 indoor wire $19.78
Pack of wire nuts $1.99
two outlet boxes $9.30
4 Electrical outlets $2.36
two face plate(gotta look nice) $1.64
Three Prong Plug $2.99
two packs of 5 hub connectors $3.38
Tax $3.83
Total $45.27

The wiring of the box was pretty straight forward. The three wires that are coiled up are the Hot wires that will connect to the relay board plus one Hot wire to carry power to the relay board. You could use 14/2 wire but it would require more runs to the relay board. Okay here is the wiring diagram and the finished product. I do have to say that I am starting to get excited as my board should be here next week and I can start actually plugging my computer into the grow room.
 

rolln1up

Well-Known Member
The relay board arrived Saturday I assembled it sunday (forgot to take pics sorry) I have to build a power bus bar to distribute the hot out 8 times to the relay board. I hope to get it all up and running this evening!:hump: Heres a pic of the relay board.
 
Top