Howto: Use a Linksys Router as Wireless Reef Controller - WRRC

I would agree, this is not something you want to have built for you. Chances are you will need to get under the hood. It is not a bad project for beginers though!
 
<a href=showthread.php?s=&postid=11112562#post11112562 target=_blank>Originally posted</a> by stugray
I threw together an ubuntu box.

After getting: php, fuse, perl,owfs and various other packages installed ( and playing nicely together ) I finally can 'see' temps & 'feel' some PIO and toggle some switch states.

I plan on setting up the system with perlTk .... anyone got any experience? I have done plenty of perl, just never any GUI or widget experience.

Stu

Perl is pretty easy to pick up. I've never really done anything with it before this. I haven't ventured into the TK world, I've used it only as a scripting language and have left the GUI stuff to php.

I picked it because it's very powerful, fairy easy to learn/use, and is quite extensible with packages. Sometime later today, I'll try to post my perl scripts on the wrrc website for others to look at. They may not be expertly coded, but they get the job done, and are a good place to start if you want some direction.
 
<a href=showthread.php?s=&postid=11062999#post11062999 target=_blank>Originally posted</a> by aka_BigRed
I didn't take anything from the original firmware, I just installed the components from native ubuntu packages, or compiled from source.

Since this was my first setup of a linux machine, I tried to document most of the tricky stuff I had to lookup in case I needed to start over fresh. Some of this most of this stuff is applicable, but there's some stuff in there that I just wanted to keep/remember for my own install.

Basically the key components for a Custom Reef Controller are:

*Something to gather analog input from outside world for monitoring (OWFS)
*Some database for storing gathered data (MySQL)
*A scripting language for collecting data from OWFS and acting upon it (Perl)
*Some scheduling app to kick off tasks at specific times (chron)
*A web server frontend (PHP on Apache server)
*Optionally a graphing component (JPGrahp)
*Some way to act upon outside world to take action on gathered data (X10)

By using Ubuntu and the pre-configured LAMP server (Linux, Apache ,MySQL, PHP)

Here's my steps to go about setting up ubuntu for use as my WRRC:
http://www.bytality.com/offsite/wrrc/owf_install_steps.html

I haven't posted my perl scripts yet, I can provide them if requested. BTW, I'm by no means an ubuntu/perl/php expert, just determined to getting ubuntu working and I have a great friend named google :)

Thanks for posting this. I have to admit, I had no clue what was going on when I looked at people's refrences to the network storage appliances, but being familiar with building LAMP servers, now I understand exactly what this whole project is about.

I think I'll join you in going the Ubuntu route.

thanks!
 
<a href=showthread.php?s=&postid=11319761#post11319761 target=_blank>Originally posted</a> by pescadero
Thanks for posting this. I have to admit, I had no clue what was going on when I looked at people's refrences to the network storage appliances, but being familiar with building LAMP servers, now I understand exactly what this whole project is about.

I think I'll join you in going the Ubuntu route.

thanks!

Good to hear!

Last week I got my UPS (Uninterpretable Power Supply) talking to the controller. I monitor it with the free UPS tool NUT. I can log power outages and even page/SMS my phone when the outage lasts over a preset duration (5 mins in my case).

During Thanksgiving dinner, we sat eating in the dark b/c the power went out for almost 2 hrs. I had things on UPS's but didn't have any monitoring capability. The dark thanksgiving feast finally convinced me to set it up. It was a bit of a challenge but worth it. If you are using Ubuntu, I ended up getting a newer version than on in the apt repositories - I just installed the debian package. That went OK, but tweaking the notification configurations was what took the time. Part was due to my learning curve, part to scant availability of tutorials, and my inability to follow directions (oops! :rolleyes: )
 
thanks for the tips. i'm still in the setup stage on my aquarium system, so i've still got a lot to do before i start on a monitoring/control system. i'm sure that i'll end up following your lead, but it may take a while for me to get rolling. i've subscribed to this thread, though i don't think i'll be getting any work done for a while. thanks again!

OT - I'm setting up a 65g reef with a basement sump/fuge that will be located almost directly below it, maybe 10 feet to the side at most. what kind of return pump did you select, and what kind of plumbing/return flows did you get? not to hijack, maybe we should move this to PMs. thanks.
 
does anyone have a 'kit list' handy for people who are interested in creating one of these controllers?

I'm an IT guy who'd love to build on for my new marine tank but I don't have any electronics experience.. it sounds ideal though.

So.. any successes? what did you use? spoon feed me while I learn :)
 
Updates, yeah

Updates, yeah

Did some JavaScript-work on the values in the graph: LCD-lookalikes. And more graphic-work on the buttons on all the pages. They are action-buttons which can be pressed and the text changes according to the state. Added LED's. The status of 1wire hardware can be read and the LED will be on or off accordingly.

156802ScreenDump-Temp2-_reef_.jpg


There are three small pumps for dosing nutrients. They can be programmed per day or per week. The logging can be viewed on the page with a click on a button. The LED's show the real measured status of the relays for the pumps. They can be manually activated and stopped.

156802ScreenDump-Pompjes2-_reef_.jpg


The 'Main'-page (not shown here) has gotten an extra function for DST so that the time-difference will be divided over a week. The status for DST along with the remaining time difference will be visible on every page that depends on time.
I also added a page for 'moonlight' with LED-lighting. The LED's can be programmed for a time period in the morning and in the evening.
It is very nice to watch the behavior of the fish in the moonlight.

If you look closely you can find subtle differences between the pictures because one is in IE and the other in FF. What a hassle for a noob like me...
 
Last edited:
Depends on your needs but I think it is:
- too big
- too expensive
- too noisy
- too incomplete (no housing, no power-supply)

That is because my ASUS-router costed less, is smaller, doesn't make any sound and is complete with WiFi. As a disk I use a USB-memstick (no problems yet and in use for over a year, cheap, no noise, no heat). The router is running OpenWRT which comes complete with a webserver, USB and WiFi support.
 
<a href=showthread.php?s=&postid=11944625#post11944625 target=_blank>Originally posted</a> by fade2grey
does anyone have a 'kit list' handy for people who are interested in creating one of these controllers?

I'm an IT guy who'd love to build on for my new marine tank but I don't have any electronics experience.. it sounds ideal though.

So.. any successes? what did you use? spoon feed me while I learn :)

I am also interested in getting a list of parts that worked best for you guys along with the pros and cons of going with the WRT54g, NSLU2, or other device.
 
Hey all, figured I'd announce my presence here. (I've been lurking for a couple months)

I'm in the process of building a controller too, albeit not based on a router.

I've got a framework functioning on an Arduino microcontroller, interfaced with a PC that acts as my web and fileserver. (I figured I might as well have it do datalogging and the web interface for my reef controller along with it's other duties-- that said, the microcontroller is self sufficient- the PC is there for extended abilities and the web front-end)

The one-wire stuff seemed like a good bet, so I've gone that route and have temperature sensing and water level reading and logging, and outputs controllable by program on the microcontroller or by override from the computer (via usb/serial connection)
Salinity is the next major project after I refine what I have.

I haven't read through the whole thread in a while but I remember some conversation about reading electrical current flow-- Check out the Phidgets stuff. Very cool. They have a 20A and 30A gizmo that will read both AC and DC waveforms separately. (easy to integrate wtih a 1-wire ADC or an Arduino chip, in my case)

I'm envious of some of the front-ends I see here... I'll have to see what I can do in my new favorite toy... Flex. =)

Also, I would definitely recommend the Arduino controllers to anyone interested in building a controller. If you can write code in C they're a dream to work with.

keep up the good work everybody
 
<a href=showthread.php?s=&postid=12912148#post12912148 target=_blank>Originally posted</a> by C4Vette
Depends on your needs but I think it is:
- too big
- too expensive
- too noisy
- too incomplete (no housing, no power-supply)

That is because my ASUS-router costed less, is smaller, doesn't make any sound and is complete with WiFi. As a disk I use a USB-memstick (no problems yet and in use for over a year, cheap, no noise, no heat). The router is running OpenWRT which comes complete with a webserver, USB and WiFi support.

There are a dozen models of NANO ITX and MINI ITX motherboards that are fanless and SILENT and will run and boot from a memorystick or flash drive. They can be loaded with the any flavor of linux you wish and are capable of much more than the router.

Like it or not, the SOHO routers tend to need frequent reboots and die eary deaths due to poor internal heat management.

SUre the ITX style boards cost a lot more, but the DO a lot more and are magnitudes more reliable.
 
<a href=showthread.php?s=&postid=13885318#post13885318 target=_blank>Originally posted</a> by enigma32
Hey all, figured I'd announce my presence here. (I've been lurking for a couple months)

I'm in the process of building a controller too, albeit not based on a router.

I've got a framework functioning on an Arduino microcontroller, interfaced with a PC that acts as my web and fileserver. (I figured I might as well have it do datalogging and the web interface for my reef controller along with it's other duties-- that said, the microcontroller is self sufficient- the PC is there for extended abilities and the web front-end)

The one-wire stuff seemed like a good bet, so I've gone that route and have temperature sensing and water level reading and logging, and outputs controllable by program on the microcontroller or by override from the computer (via usb/serial connection)
Salinity is the next major project after I refine what I have.

I haven't read through the whole thread in a while but I remember some conversation about reading electrical current flow-- Check out the Phidgets stuff. Very cool. They have a 20A and 30A gizmo that will read both AC and DC waveforms separately. (easy to integrate wtih a 1-wire ADC or an Arduino chip, in my case)

I'm envious of some of the front-ends I see here... I'll have to see what I can do in my new favorite toy... Flex. =)

Also, I would definitely recommend the Arduino controllers to anyone interested in building a controller. If you can write code in C they're a dream to work with.

keep up the good work everybody

The phidgets current sensors work, but for AC you will need to write code to do the RMS calculations. Remember the current to voltage output of that device will swing with the AC current sineave that tracks the AC voltage sinewave. You can't just look at the AC sinwave (zero crossing for example) because the load may not (will not) be at unity power factor :) I.E. the current waveform will lead or lag the voltage waveform.

What have you implemented for water level? Are you looking at absolutes or calculating actual tank levels?
 
<a href=showthread.php?s=&postid=13886033#post13886033 target=_blank>Originally posted</a> by BeanAnimal
The phidgets current sensors work, but for AC you will need to write code to do the RMS calculations. Remember the current to voltage output of that device will swing with the AC current sineave that tracks the AC voltage sinewave. You can't just look at the AC sinwave (zero crossing for example) because the load may not (will not) be at unity power factor :) I.E. the current waveform will lead or lag the voltage waveform.

What have you implemented for water level? Are you looking at absolutes or calculating actual tank levels?

Interesting. I haven't picked up one of the phidgets sensors yet but it'll be fun to play with. I've never actually looked at what happens to the demands of a pump (motor) under different conditions, so even just doing that should be a learning experience.

For the water level right now I have a couple float switches (one on either side of a baffle in my sump that contains a sponge so I can send up a red flag if my filter is getting too dirty before my pump starts sucking air). My next project with water level is to play with a ping-pong ball water level sensor--- I had the idea independently before running across it in this thread so now I'm reading about it a bit before trying to build one. I'm thinking of trying an infrared sensor as I already can read them as an input in another project, but I'm not sure they'll have high enough accuracy to be useful in my sump. We'll see :-)
 
Look into qprox sensors...
Also air pressure transducers. I picked up a few on ebay that are suffciently accurate to read .1" changes in the fluid level in the tank.
 
Back
Top