2010
07.28

I got tired of the utilitarian look of the temperature graph, and I hope to add more graphs, so it was finally time to do something.

Click to embiggen / get the latest

Read More >>

Share on Facebook
2010
07.24

When I originally constructed the Temperature Graph, it was based on work by the OpenEnergyMonitor, and came with a Perl script on the web server end.  I never much liked this for a couple reasons, its a dying language and I am not at all familiar with it.  I also had to mess around with a cgi-bin directory, and things did not work out of the box with my webserver.

Read More >>

Share on Facebook
2010
07.08

After much drama in my life, not suitable for inclusion in this forum, I am back to doing development work. First up, converting the temperature webpage to Fahrenheit. I got tired of wondering just how warm 25.67C was. I know, lazy American!

So, dusting off the original temp_sender.pde code, I added the necessary Celsius to Fahrenheit calculation. The sender still spits C as well as F out of the serial port, but only reports degrees F to the mySQL database. I have not found a reason to use the archived data yet, and this is technically beta, so I won’t worry about the abrupt jump of ~50 degrees.

This code has been running flawlessly since early March, surviving various ISP hiccups, network rewiring, etc.  There is something to be said for simplicity, it just puts the temperature to a perl script and that’s it.  No error checking to speak of except gross failure (i.e. the ethernet cable is unplugged).

The code is shown below and available for download here, data and library for the TMP421 temp sensor is available here, and this was the original article .

#include “Wire.h”
#include
#include

//Sets the unique mac address for the ethernet board
//set this according to your network!!!
byte mac[] = {0xDE,0xAD,0xBE,0xEF,0xFE,0xED};
byte ip[] = {192,168,2,51};
byte gateway[] = {192,168,2,1};
byte server[] = {173,203,204,206};

//Setup a client
Client client(server, 80);

LibTemperature temp = LibTemperature(0);

void setup()
{
Serial.begin(9600);
Ethernet.begin(mac, ip, gateway);
delay(1000);
}

void loop()
{
float tempC = temp.GetTemperature();
Serial.print(“Temp: “);
Serial.print(tempC);
Serial.print(” degC “);
float tempF = (tempC * 9 / 5) + 32;
Serial.print(tempF);
Serial.println(” degF”);
delay(100);

//Send the data
if (client.connect())
{
client.print(“GET http://ka1kjz.com/cgi-bin/post.pl?T=”);
client.print(tempF);
client.println();
client.stop();
}
else
{
Serial.println(“Failed to connect to client”);
}
delay(300000);
}

Share on Facebook
2010
05.20

New Blog

Oh god… not another one!  Yep, another blog.  I’ve been bitten by the photography bug, and its simply not going away.  Inspired by another photographer’s blog, I grabbed her theme (it’s publicly available), tied my Flickr account into it, learned a few layout bugs in the Wordpress editor, and now we have more bloggy goodness!

Share on Facebook
2010
05.20

I’d put the attic fan controller on the back burner for awhile, but now that the long, wet, cold Connecticut spring is finally winding up, its time to get working on this again.  As I write this, its approximately 85 degrees F in the living areas, and an attic fan will definitely help alleviate some of the heat seeping into the house.

I’ve been advocating using the Jeenodes to control this thing, and Jean Claude at Jeelabs has done some similar work, a thermostat for his reflow heater.  Essentially implementing the P and D part of a Proportional Integral Derivative (PID) Controller, what he had to say is after the jump…

Read More >>

Share on Facebook
2010
03.31


mwcrTrestleSouthNotchRoad032710

Originally uploaded by ka1kjz

For roughly 40 years, I had been aware of, and even played on, an abandoned rail line in Central CT. Of the parts that still had tracks, I merely assumed it was a siding off of the New Haven / Hartford & Springfield line, or simply Amtrak. Of the parts that had the tracks ripped up, I simply assumed it to be a power or gas right of way. Turns out, this was the long abandoned Meriden, Waterbury and Connecticut River Railroad.

The MW&CR was one of the last to be built in Connecticut, 1888, and one of the first to be abandoned, 1924 officially, but had been in disuse since 1898. It has left very little trace of its existance, except one 5 mile stretch near a quarry which was abandoned in 1969 or so. The Quarry kept the stretch to connect with the Amtrak line should they ever need it, they never used it.

One night, on the way home from work, I took a different route and discovered this bridge. I knew then that I had to document this railroad and find archeological remains of it before it was lost to history forever. There are only 2 or 3 reference works on this line and very little information where it ACTUALLY ran.

My work in progress can be found at http://www.ka1kjz.com/cms and on Flickr, http://www.flickr.com/ka1kjz

Share on Facebook
2010
03.22

I’m getting too good at this, to help my boss out of a jam, I tossed up 4 new websites on my cloud server.

It was pretty simple and straight forward, and a major case for doing your own hosting. I shudder to think how tough it would be to point these new domains at a shared hosting site, without buying four hosting accounts. It took me about 2 hours to do, but only because I had forgotten much of what I did to get this site, hamopensouce.com and ronaldcbarnes.com working on my host. Also I don’t have any tidy scripts or templates, everything was edited by hand.

I only need to serve up about 5 static pages per site, very low traffic, I probably wont even notice the hits. A homepage, privacy statement, contact us page, and little else.  This is what it took:

DOMAIN REGISTRATION:
The domains www.wsah-tv.com, www.wmfp-tv.com, www.khiz-tv.com and www.kcns-tv.com,were all available for about $11 / year.  I snatched them up through my registrar, GoDaddy.com

NAME SERVER:
I pointed my new domains at my name server with the tools provided by GoDaddy.

DNS:
I created the necessary A, CNAME and MX records on my DNS server at my host provider.  I made CNAME entries for www.domain.tld, and mail.domain.tld.  I don’t believe we’ll be hosting a SMTP or POP server, but it’s there just in case and may be needed by the sendmail daemon.

DIRECTORY STRUCTURE:
Off my home directory is a directory where I keep all my websites.  From there, a standard web directory structure of “public”, “private”, “log”, “cgi-bin” and “backup” were created.

PERMISSIONS:
The directory and file permissions were set to 755 and owner was set to also include www-data.  (See your Linux documentation on how to do this, your mileage will vary from version to version).

VHOSTS:
A VHOSTS file was created in the /etc/apache2/sites-available directory which looks something like this (sensitive parts redacted).  The alias was used on this site for its wiki, and the FollowSymLinks reference was used as part of the Wordpress permalinks and has since been remarked out.  They are there in case they are needed in the future.

# Place any notes or comments you have here
# It will make any customisation easier to understand in the weeks to come

# domain: wsah-tv.com
# public: /home/*****/*****/wsah-tv.com/public/

<VirtualHost *:80>

# Admin email, Server Name (domain name) and any aliases
ServerAdmin ka1kjz@ka1kjz.com
ServerName  wsah-tv.com
ServerAlias www.wsah-tv.com

# Index file and Document Root (where the public files are located)
DirectoryIndex index.php index.html
DocumentRoot /home/*****/*****/wsah-tv.com/public

#  <Directory /home/*****/*****/wsah-tv.com/public>
#    Options Indexes FollowSymLinks
#  </Directory>

<Directory /home/*****/*****/wsah-tv.com/public/cgi-bin/>
Options ExecCGI
AddHandler cgi-script cgi pl
</Directory>

# Custom log file locations
LogLevel warn
ErrorLog  /home/*****/*****/wsah-tv.com/log/error.log
CustomLog /home/*****/*****/wsah-tv.com/log/access.log combined

#Alias /wiki /home/*****/*****/wsah-tv.com/public/w/index.php

</VirtualHost>

A2ENSITE:
The script, a2ensite was run on each domain. It pretty much just sets up a symbolic link between /etc/apache2/sites-available and /etc/apache2/sites-enabled.

CONTENT UPLOADED:
I found a suitable template on the Open Source Web Directory, a repository of HTML templates released to the open source community.  The index.html, css and images folders were uploaded via Filezilla FTP (actually FSTP, SSH file transfer, I never bothered to set up FTP).

Thats it, after the DNS records had enough time to propagate through the internet, I had 4 new sites ready to go.  Content will be completed tomorrow, but the sites are up and the templates are in place.

FOR THE FUTURE:
I’d like to split these four domains out of my personal GoDaddy account and place them into something I can provide access to.  The corporate IT guy, my boss, my replacement should something happen to me, etc.

Also KHIZ has a nice shared hosting account already paid for by the company.  I am going to investigate pointing these domains at that.  If this proves problematic (I really cannot justify buying 4 separate hosting accounts for what we will be serving) I will sell the concept of the cloud server to the bosses.

Share on Facebook
2010
03.22

AtlanticAvenueTunnelEntrance04
Originally uploaded by ka1kjz

As part of Atlas Obscura Day 2010 I had the opportunity to tour the abandoned Long Island Railroad, Atlantic Avenue Tunnel, in Brooklyn NY.

This is not the LIRR you are familiar with, but rather, its predecessor, a railroad that tried to bring connectivity between NY Harbor and Boston. In the 1840s it was too difficult to do a land route through Connecticut, so they ran the railroad out over Long Island, went via steamboat to New London, then picked up the railroad again there to Boston.

When the LIRR went out of business in the 1850s, they filled in some of the tunnel, sealed it off, and forgot about it until 1916. They rediscovered the tunnel then, and promptly forgot about it again.

In 1982, it was rediscovered through careful research of newspaper articles of the time, old city plans, and pestering city officials and utility companies.

More details can be found at the Brooklyn Historic Railway Association site.

Share on Facebook
2010
03.19

I’ve made up a simple thermostat for the Jeenode, using the TMP421 temperature sensor, and just using my standard LED status indicator to see it in action.  This will be the basis of the Attic Fan Control.

Thermostats are not simple on/off devices, if they were, your furnace or airconditioner would sit there and “chatter” at the setpoint.  Thermostats have a deadband, called “differential”, where it is unresponsive between the setpoint and the difference caused by the differential setting.  Check out this article by The Lowell Center for Sustainable Production, UMass Lowell, and The Maine Department of Environmental Protection regarding how heating and cooling thermostats work.

A heating thermostat will turn off immediately at the setpoint, but not come back on until it falls differential degrees below the setpoint.  Same is true of cooling thermostats, they will turn off once the setpoint is reached, but will not turn back on until the temperature rises differential degrees.

Differentials vary widely from manufacturer to manufacturer but fall within the range of 2 to 4 degrees.  I have made the differential a #define in the sourcecode so that a it can be recompiled at any time with a new one, should my choice of 3 degrees prove inadequate somehow.

Beware, this sourcecode makes heavy use of the #define directive, to conditionally compile.  The TMP421 sensor is connected to port 1, and my standard status light is connected to port 3.  As always, source code is available here

Read More >>

Share on Facebook
2010
03.18

In some of my work with the Arduino, I connect a bicolor LED to a couple of I/O pins and use it as a standard status indicator.  Green, red and yellow, flashing or steady, etc… shows me various conditions in the program execution.  Here is a standard LED status indicator for my work with the JeeNodes. More of tool really, I plug this into a port, and have my LED back!

Code to light the LEDs is pretty simple… simply define the two ports as outputs, and bring them high depending on what you would like..  Green, Red or both to make Yellow.

Share on Facebook