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

No, I'm not smart enough to write code like that. The database to store all the values is RRD, so it will never grow in size.

http://people.ee.ethz.ch/~oetiker/webtools/rrdtool/

I've been trying to compile it for the router's processor, but wasn't successful. Christian Magnusson has been the cross compiling master. He wrote the poller to grab the temperature sensors off the 1 wire network to put in the rrd database.

http://owfs.sourceforge.net/WRT54G.html

I'll expand the poller as soon as his code makes it to the cvs server to grab the A/D's too.
 
Shamless bump.

I really can use help with the following:

HTTP Upload method via cgi. Shell script, proccgi or harsel would be ideal. But since I know nothing about HTTP upload just general theory would help.

Graphics. Fish/Reef Themed Stuff.
On / Off States
Temperature
ph
Time
Orp
Whatever else might be cool to show on a status page.

I've moved to OpenWRT as a base firmware now. This gives me the ability to use "packages" for updates. I will release a new firmware with the base system as soon as I can figure out the HTTP upload to have a web interface for firmware upgrade. Any program upgrades can be handled by the package manager.

Eye Candy: (btw the poller has been updated to do more than just temperature now, and supports templates)

screenshot.jpg
 
It's pretty easy to get the file to the cgi script itself. Using procCgi, we can get it into a $FORM_firmware variable, but what linux command will write a environmental var's contents to a file? (cat ? )

Can you use cat with non ascii file types? Also will that write it correctly and not add any funky file headers or bits to the firmware you are uploading?

Here's a very simple HTML page to upload the file on the browser side. Then from within the receiving CGI shell script you would have to write it from the $FORM_firmware .

PHP:
<form action="/cgi-bin/firmwareUpload.cgi" method="post">
<dl>
  <dt> Choose Firmware File: <dd> <input type="file" name="firmware"  size="50">
</dl>
<input type="submit" value="Submit">
</form>
 
That's close. The $FORM_filename stored the filename I was trying to upload rather than the actual binary itself.

I wonder if we need to mess with mime encoding the file and then write it back out.
 
OpenWRT Based firmware release 0.0000001 the Eric Cartman Vs. Kenny don't let it die release.

In moving to OpenWRT, there is now a Journaled File System on Flash. I can take advantage of ipkg (a package manager) to release software updates. This means that if there are no major OS level bugs, all software can be just updated to the flash file system.

I built the base firmware with what I think is needed for a base system. Hopefully we do not have to do firmware upgrades any more. Includes a sendmail MTA for notifications.

I also hacked up 2 different Web Administration interfaces to provide package management via web interface and firmware upgrade. Most other functionalites in the interfaces should work as well, but I haven't tested them.

Very good reasons why I shouldn't work on Web Interfaces:

screenshot-firmwareup-small.jpg


screenshot-package-small.jpg


I'm waiting on the new poller logger which is very powerful. Once I get that, a WRRC package with web interface to configure the poller will be released.

I wonder if I will have it in time to call it "My bloody Valentine"? :D

*note.. joke.. it's the name of a band.
 
New logger package available.

Just install with the package manager web interface.

It will log any sensor on the 1 Wire network and graph them.
Web pages are "templateable" so you can make it purtier. I stuck with the defaults cause I don't know that less than great than stuff.

screenshot-logger-small.gif
 
Bumpity Bumpity Doo.

X10 control is working now :) I'm using WISH

http://wish.sf.net
with a Powerlinc II serial on the router on serial port 0

Example of the powerful scripting language

Code:
temp=`cat /var/1wire/10.200244555/temp`
if [ $temp < 85 ]
 echo 1 > /dev/x10/m1
fi
 
sWampy said:

They are $35 and I've seen usb->parallel cables for $5 or so. Would be cheaper than the $69 controller, and has 8 10A relays.


I'm not sure what're asking here. What $69 controller? If you're saying cheaper than the Linksys Router, sure, but you still need a computer to dedicate to it. I'm using the Linksys Router as the dedicated computer.

For relays I'm using these at $12.90 with Opto Isolation Per 4 relays:
http://futurlec.com/TrainingBoardAccessories.shtml

ET-OPTO-RELAY4.jpg


I added the X10 package because it was a Feature Request, and as a migration path. I don't like X10 myself.
 
In the first post you mentioned a $69 1 wire 4 relay controller board that was $69. The above looked cheaper than $69, and would control 8 relay. I'm pretty sure the linux drivers for the usb-lpt cables could be compiled for the linux based routers.
 
Ah, okay. I've abandoned that board now. Going to try out this one instead. Yeah if I were to use the Asus Router, I probably could use the parallel port and the usb port for that board above. I choose the Linksys for now because it was readily available and cheaper than the Asus.

BTW if you were doing computer based automation with a Parallel port with that kit you listed above, here is an input circuit for it.

http://halloween.sitenation.com/site/view/article/1025541305/ca
 
Well I was using that board on an arcade cabinet/jukebox I have to disable the coin slots when it wasn't ready to accept coins, turn on/off speakers and lights depending on time of day, etc. I just saw this little project and thought it would be a pretty nice solution if you were using a router with usb.

It would be really nice if someone had made an easily hackable one with a lpt port built in. I'm surprised more don't have lpt and usb for printer sharing.
 
The Asus one is one with a USB port and Parallel

http://www.newegg.com/app/ViewProductDesc.asp?description=33-320-302&depa=0

It is easily hackable. Here is the people that have firmware for it:
http://www.chupa.nl/forum/


Stop making me regret I choose the linksys :)

Actually, they are pretty much the same software wise. They are all based on a Broadcom Reference board and run the say Linux reference design. Just need to tweak them for the difference in the boards.

So I could easily port the packages over to the Asus.
 
Crap, I learned I was getting a bonus today, now I'm going to endup spending part of it on a new router, and another relay board. This would sure be a nicer setup for controlling my tank other than the 5 timmers I have running now, and 3 more I'd like to add. Makes me wish I hadn't wasted $100 yesterday on 2 theromostat controlled switches to cut on/off my heater and fans.
 
Templates based Web Interface Completed. This is the Status Screen with showing all the X10 Modules Current status. The admin screen will have links for each module to toggle On/Off of each module.

wrrc-interface.jpg
 
Back
Top