Tuesday, September 30, 2008

X10 Web Interface Added Slug

Last night, I installed the lighttpd web server and BlueLava CGI interface on the Slug. Now, we can web control the lighting at our other place. It's a bit sluggish as the CPU seems to get bogged down a bit after issuing a command, but it does the job.

Thursday, September 25, 2008

Camera Server Update

I had time yesterday to connect up 2 more cameras to the system. Oddly enough, the CPU utilization went down! It went from 26% with 1 camera to an astonishingly low 10% with 3 cameras and motion detection on each. I thought since it was dark out by the time I got the cameras connected, there wasn't much CPU used for motion detection on mostly black cameras. But it's bright outside now and the CPU is still low. Maybe with 1 camera, it does motion detection at 30 FPS, but dials it way down with more cameras? Who knows. I was thinking that I would have to reduce the resolution from 640x480 when I added more cameras, but it looks like I'll be able to leave it like that. I also put the server case on its side so the CPU heatsink would have better airflow (it's right under the power supply, which has no fan). That combined with the lower CPU utilization has the CPU temp down to 55°C from 66°C.

Wednesday, September 24, 2008

D201GLY2 Camera Server Testing

I received the Avermedia NV3000 Monday and I've had some cycles to play around with it. I've only hooked up one camera so far, but I've got it set up for motion detection and remote access. It works well so far, but I can't stand that it requires IE to view its web interface. Stupid ActiveX components. With the 1 camera running, I'm using about 26% of the CPU and it's getting quite hot - about 66°C, but from what I've read, that's typically how hot they run under load. I was hoping to get away with minimal cooling but it appears I'll have to add another fan to the case. There's already a 120mm Antec Tricool in the rear of the case. I'm looking at adding an 80mm on the side panel to exhaust directly over the CPU. Hopefully, by this weekend I'll have 2 more cameras online.

The NSLU2 and CM11A have been deployed at our other house. The Airlink IP cam is also there. I've been monitoring the system and everything is working fine. I'll need to do some tweaking to the lighting schedule in the future and add a few more lights to the system at some point.

Saturday, September 20, 2008

Slug Doesn't Mix with Edgeport

The 2nd NSLU2 arrived and I started hacking it. I installed SlugOS, moved it to a 2GB flash drive and then installed gcc. Next, I installed HeyU, compiled the source right on the Slug. Then I installed the Edgeport driver ( kernel-module-io-edgeport ) and put the Edgeport/2 on one USB port. It was recognized according to the syslog messages in /var/log/messages, but I couldn't get HeyU to recognize CM11A connected to the Edgeport. I tried a whole bunch of things - reflashing SlugOS, recompiling Heyu, reinstalling the drivers, installing Misterhouse, trying a W800 on it, etc. In the end, it appears the Edgeport driver doesn't work on the NSLU2.

I headed over to Fry's and picked up an Airlink USB to Serial adapter. It has the PL2303 chipset that is known to work on the Slug. I installed the kernel-module-pl2303 driver and presto, everything worked. I'll need to add a USB hub later since this, unlike the Edpgeport/2, only supports 1 serial port. Now, I need to work on a HeyU lighting schedule.

Wednesday, September 17, 2008

Planning & Waiting

I have a couple projects waiting in the wings - upgrading our security camera system and doing basic automation at our other place. I've been spending the last couple weeks figuring out what and how to go about things and I've finally got my plan together.

For cameras, I'm looking at upgrading to some day/night bullets. I still need to find specific cameras, but in the meantime, I can use what I have. I have re-purposed the D201GLY2 based kitchen PC to be a lower power camera server. I moved it from its slimline desktop case to a tower so I can fit more hard drives and an Avermedia NV3000 capture card. It has 4 video inputs and can capture at 30 FPS total, which shouldn't be a problem. I only have a couple cameras I want to monitor so this should be sufficient. I also moved the Sparkle Power SPI180LE high efficiency power supply into the tower, but since it's a low profile supply, I had to create a mount to use it. I ended up hollowing out an old AT power supply, snipping some parts off and drilling some holes so I could mount the SPI180LE inside it. Then I was able to install the unit into the tower. It looks pretty good. Now, I'm just waiting for the NV3000 and some BNC to Cat-5 baluns to arrive.

The remote home automation project will be starting shortly as well. I picked up another NSLU2 to use as the automation server. I will be installing OpenSlug on it and implementing very basic control with HeyU and a CM11A. The CM11A will be connected to the Slug via an Edgeport USB to Serial adapter. I may also pick up a W800 X10 RF receiver so I can put some sensors (like moisture/leak detectors) on DS10As. HeyU conveniently supports the W800. Finally, I got an Airlink wired IP camera to test out. It works nicely (and has a Java interface in addition to an ActiveX interface) so I will probably put it over there as well. I'm waiting for the Slug to come and then I can start working on this.

Monday, September 8, 2008

Comcast 250GB Cap Goes Live October 1

For all you Comcast users out there, Comcast has decided to cap your previously unlimited Internet service at 250GB per month. That number is the total of your download AND upload usage. Comcast won't provide their customers with any tool to measure their usage and could care less how you figure it out.

So how can you measure the usage of all your devices??? It's easy if you have a Linksys WRT54GL router (or some versions of the WRT54G and WRT54GS) and the Tomato replacement firmware. It has a great built-in bandwidth monitor and graphs for various time periods (daily, weekly, monthly) so you know exactly how much bandwidth all the devices behind your router are using.



Sunday, September 7, 2008

Sprint Airave Coming

I just got off the phone with Sprint, our cell provider for almost 2 years. They're going to send us their Airave femtocell, which has been widely released last month. We live in an area which has marginal Sprint coverage, which has been the only negative about our service. This device is like a cell phone repeater, except it will route your voice over your internet connection - so it's like a cell phone VOIP adapter. The Airave costs $99 and $4.99/month but Sprint hooked us up for free with free FedEx shipping. Now, we'll get 4 bars at home to go along with our SERO plan (unlimited EVDO, unlimited SMS, 500 minutes/month and nights & weekends 7-7) for just $30/month.

Thursday, August 28, 2008

Slug and Syslog Server

One thing I miss about having the web server on the Slug, is having logfiles. Since it's running on a USB flash drive, I've turned off logging for everything so I don't kill the flash. I finally got around to setting it up to use a syslog server and pointed it at my HA box.

To do this, I edited /etc/syslog.conf on the Slug, setting DESTINATION to "remote" and REMOTE pointing to the HA server.

DESTINATION="remote" # log destinations (buffer file remote)
MARKINT=60 # interval between --mark-- entries [min]
REDUCE=no # reduced-size logging
BUFFERSIZE=64 # buffer: size of circular buffer [kByte]
LOGFILE= # file: where to log
REMOTE=aaa.bbb.ccc.ddd:514 # remote: where to log
FOREGROUND=no # run in foreground (don't use!)

In /etc/lighttpd.conf, I set up some conditionals for access logging:

$HTTP["url"] !~ "(\.css|\.js$)" {
$HTTP["remoteip"] != "aaa.bbb.ccc.0/24" {
accesslog.use-syslog = "enable"
}
}

Anything other than .css and .js files viewed from anywhere but my LAN will get logged. Cool.

Finally, I played around with few free syslog servers. None of them did what I wanted so I wrote my own in Perl. It's very simple so far and not very efficient with the logfile handling, but it works for now:

use warnings;

use IO::Socket;
use IO::Select;
use Sys::Hostname;

$port = 514;

$socket = IO::Socket::INET->new(
Proto => 'udp',
LocalPort => $port,
);
die "Could not create socket: $!\n" unless $socket;

print "syslog server\n";

while (defined($socket)) {
recv($socket,$msg,1500,0);
@msg=split(' ',$msg);

if ($msg[11] ne "") {
print "$msg[1] $msg[2] $msg[3] $msg[4] $msg[7] $msg[11]\n";
}
open(SYSLOG,">>./syslog.txt");
print SYSLOG "$msg\n";
close(SYSLOG);
}

close($socket);

Thursday, August 21, 2008

Slug Online

I ended up ditching Unslung for OpenSlug, mainly because OpenSlug has drivers for the EdgePort USB to serial adapter. (I'm planning on getting another Slug to use as a minimal HA controller for monitoring our other house.) I also dropped Apache for the lighttpd which has a smaller memory footprint. I dropped the idea of Squid as I ended up using my home router as a SOCKS proxy over SSH. I've got my Slug running off a 1GB flash drive and it uses a meager 4-5 watts! I had tested it running an 40GB USB hard drive and together, it used about 13 watts. The 466 MHz Celeron that has run the webserver for years uses about 35-40 watts, but that will get shutdown when I iron out a few remote access issues. The Celeron box currently is instrumental in accessing the home network and I hope to move that functionality to the firewall. It is no longer a webserver, as the Slug is doing that as of today.

Tuesday, August 19, 2008

Playing With The Slug

I received the NSLU2 yesterday and had a few cycles to play around with it. I flashed it with the latest Unslung firmware. That was pretty easy. I checked out a what packages are available to see what I could put on it. I installed OpenSSH, my public key. I also installed Apache as I'm pondering replacing my public webserver (running on a 466 MHz Celeron) with this. Finally, I did the overclocking mod to boost the Slug's CPU frequency from 133MHz to 266Mhz. Apparently, the unit I got was an older rev. I'm also looking into installing Squid as a proxy, not a cache, since I use my current webserver to proxy web traffic from work inside an SSH tunnel. I'm not sure if this will have the power to proxy better than the Celeron box.

Friday, August 15, 2008

Slug On The Way

I bought a Linksys NSLU2 (aka Slug) off eBay the other day. I took advantage of the Microsoft Live 25% Cashback promotion and saved a little extra. I'm not sure what I'm going to do with it, but I'm going to play around with Unslung and build a cheap, low power server out of it.

Monday, August 11, 2008

HA Burnout

I haven't been up to much with HA the last few weeks. I did a year's worth of projects in 1.5 months, and I've run out of ideas for projects I want to do. I did finish up xPL Gameport, but I haven't bundled it up for download yet. Not sure if I'll be doing much in the next couple months as we're contemplating some other much more costly home projects...