Blog Navigation
Partners
Latest Activity
Phil explains how to use the old telephone tones to wane off telemarketers!
Posted on: May 26th, 2011 by Famous Phil
On August 30, 2009, I made a blog post about my x10 home automation system, but I didn’t really cover it in depth enough to satisfy myself. Therefore, I decided to revisit the topic from that blog (which is here). This blog contains a video detailing the system that I ended up with during my University experience. I expect that my future home will be much more automated than this video shows. In order to appreciate the video, I decided to write some content to supplement what I talk about in the video, which is below.
In 2009, I came up with the first version of my light control system. This consisted of a clapper, a set of cheap computer speakers, and an audio recording of my clapping. My original system used a web interface to have the speakers (connected to the web server / site) clap when I wanted the lights to come on. This quickly became unmanageable since I couldn’t monitor the states of the lights without a webcam monitoring my room (and I wasn’t thrilled about securing a webcam in my room that could be hacked into). This lead into X10 which has done wonders for me over the course of the past two years.
Its funny remembering back to when I first got an x10 system, because the x10 website doesn’t look like your average store, it looks more like an adult site with lots of flashy banners (ha ha). I do have to admit, with x10, the initial impression was very deceiving for me, since their products are really good! Anyways, moving on, My x10 system consists of a USB transceiver module (CM15A located here) which connects to my windows server that runs a WAMP (Windows, Apache, MySQL, PHP). In addition, I have several lamp modules, appliance modules, and remote control wall switches (which wirelessly communicate to the CM15A).
As for the software, I installed the ActiveHome software onto my server (that came with the CM15A). This software installs a few application libraries (dlls) which enabled programmatic access to the CM15A to send and receive x10 commands over the power lines ran in my apartment. Using this api, I wrote a quick program that makes a command line based program that can run certain commands. I have to note that ActiveHome includes a default command line executable, but this didn’t have all the functionality that I wanted, most notably output in HTML for my web interface. With the executable I wrote, I simply have the apache web server run the command as a local user which sends the x10 signals over the power lines ran in my apartment. I should note that I considered using ASP.net which could interface with the API directly, but at the time I wasn’t very familiar with ASP.net and I wanted to use PHP. I didn’t use IIS because I didn’t have the time to go permissions hunting to figure out why PHP wasn’t allowed to run programs as a local user on the web server through IIS. Luckily a standard WAMP install that included Apache and PHP worked out of the box with little configuration. The WAMP that I used was Vertrigo.
For the IR receiver that controls my projector, I use a USB-UIRT that I found on Ebay (I didn’t feel like waiting the estimated 6 weeks at the time for a new one). Fortunately, the executable program that was included could send and receive signals from the USB-UIRT that I required, so I wrote some PHP that invokes it for the commands I used.
In 2009, I mentioned that voice control would make its way into my system. I have to admit that it did! Unfortunately, it didn’t last long because of all the bugs that I ran into. I used the Microsoft speech libraries with a program called SmartButler, which could listen for speech commands and run commands on my server. I initially used a cheap computer microphone, but quickly found that the interference in the audio made commands very inaccurate, and furthermore, if I held a conversation in the room, my lights would act up! I figured that a USB professional Condenser Microphone would fix the problem, so I quickly ordered one and integrated it into my system. This did significantly improve the quality of my system, but normal conversations would still occasionally trigger some of my web control panel controls inaccurately. The final straw that broke the camel’s back (and caused this system to get removed) was when my RA (resident advisor), Stephanie came into the room, said hello to me and my lights went out of control (since I didn’t train it for a higher pitched, female voice, I’d assume). I’d like to approach this problem in the future when I get the time to do it properly, but until then, I’ve been satisfied with web control panels that both my smartphone and computer can access.
Finally, at the very end of my video, I took a moment to show my Linksys PAP Adapter (VoIP, Voice over IP). This works through a service from voip.ms. Voip.ms is a prepaid service for VoIP adapters that allows you to buy a phone number for a very reasonable price (even 800 numbers). They also have really reasonable rates and really good control for those phone numbers. I thought I’d provide a plug for them since they are really good.
I would like to add that the Linksys adapter required an unfirewalled IP address to work properly (for incoming calls) in my experience. It does have a NAT mode for this situation, but the university firewall constantly crushed this mode. To get around this problem (and allow my web server for x10 to work properly), I implemented OpenVPN on my network and pulled in several public IP addresses and left them unfirewalled. This solution worked well for me at UB, and I documented it fairly well in my OpenVPN post.
With nothing more to mention on the topic, here is the video that details my light control system and some other stuff.
Of course, I made many bloopers in this video (I improvised a lot!), so I thought the bloopers video would be appropriate. Warning, there is a little language in it and the audio isn’t exactly balanced.
Disclaimer: I was not paid to endorse any of the products above (and I’m never paid to do that!). I like to think that when I make a recommendation, it carries a lot of weight with it, which it should!
Tags: apache, home automation, light control, linksys, php, smartbutler, usb-uirt, Voice Control, voip, wamp, x10, youtube
Posted in Hosting / Server Administration, Mobile Technology, My Site, Personal, Programming, Student Life, Technology
|| 1 Comment »
Posted on: May 19th, 2011 by Famous Phil
This is the first post of a two part blog detailing Hadoop, the Hadoop Distributed File System (HDFS) and Hadoop MapReduce configuration and programming. I decided that I’d make this because when I was required to learn Hadoop for a class about a month ago, there really wasn’t a lot out on the web about Hadoop and how to get it working properly. Furthermore, all of the MapReduce programming examples I found out there had a lot of deprecated code in them making it difficult to work with. I don’t claim to be a Hadoop expert, but I know enough to get around and write this blog. Read the rest of this entry »
Tags: apache, eclipse, hadoop, mapreduce, plugin, ubuntu
Posted in Programming
|| 8 Comments »
Posted on: April 5th, 2011 by Famous Phil
This is a video blog continuation of week 3 (see 2 posts ago). Its the final video in my 4 lecture series. The site this corresponds to is http://famousphil.com/websp11/
This video covers a lot of demos including how to make a crude content management system work on your site, as well as an introduction to wordpress as a content management system.
Background: I was asked by the IEEE student club at UB (http://wings.buffalo.edu/sa/ieee) to redo my lecture series on developing websites. I know that my website isn’t the best visually designed website in the world (and I’m actively looking for talent that can help me fix this in exchange for my programming skills), but I do know a lot about how to code websites well. Anyways, here are the videos from Lecture 4. There will be a fourth and final lecture next week. As always, thanks for reading!
Posted in Hosting / Server Administration, My Site, Programming, Student Life, Technology
|| No Comments »
Posted on: March 30th, 2011 by Famous Phil
This is a video blog continuation of week 2 (see the previous post).
Background: I was asked by the IEEE student club at UB (http://wings.buffalo.edu/sa/ieee) to redo my lecture series on developing websites. I know that my website isn’t the best visually designed website in the world (and I’m actively looking for talent that can help me fix this in exchange for my programming skills), but I do know a lot about how to code websites well. Anyways, here are the videos from Lecture 3. There will be a fourth and final lecture next week. As always, thanks for reading!
Part 1:
Part 2:
Part 3:
Part 4:
Tags: .htaccess, adobe, club, cms, content management system, educational, educational web developmhtml, Google, hosting, html, ieee, ieee student club, mysql, php, phpdesigner, putty, rewrite, security, student, university at buffalo, vim, web development, website, wordpress
Posted in Hosting / Server Administration, My Site, Programming, Student Life, Technology
|| No Comments »
Posted on: March 23rd, 2011 by Famous Phil
This is a video blog continuation of week 1 (see the previous post).
Background: I was asked by the IEEE student club at UB (http://wings.buffalo.edu/sa/ieee) to redo my lecture series on developing websites. I know that my website isn’t the best visually designed website in the world (and I’m actively looking for talent that can help me fix this in exchange for my programming skills), but I do know a lot about how to code websites well. Anyways, here are the videos from Lecture 2. As always, thanks for reading!
Part 1:
Part 2:
Part 3:
Part 4:
Part 5:
Tags: adobe, educational, Google, hosting, html, ieee student club, mysql, photoshop, php, putty, university at buffalo, vim, web development, website
Posted in Hosting / Server Administration, My Site, Programming, Student Life, Technology
|| No Comments »
Posted on: March 10th, 2011 by Famous Phil
It seems like its been a while since I last posted to my blog. As usual, the mid semester grind is hitting my time hard, so I don’t have the resources to write here as often. Thankfully this is my last semester as a Masters student, *yay*. So coming up soon, I will be writing a blog on regular expressions, I’m still in the process of making it, so it might take a while. I’ve also got a great blog for April fools day, so stay tuned for that!
Now onto the topic of this blog. This is a video blog (go figure, right?). Actually, I was asked by the IEEE student club at UB (http://wings.buffalo.edu/sa/ieee) to redo my lecture series on developing websites. I know that my website isn’t the best visually designed website in the world (and I’m actively looking for talent that can help me fix this in exchange for my programming skills), but I do know a lot about how to code websites well.
Being the kind of person who likes to share knowledge, I agreed to give the lecture series with updated information. John suggested that I video tape the lectures and post them to my blog, which I thought was a great suggestion. So in the next 5 to 6 weeks, I will be posting youtube 720p HD recordings of the lecture series to here. Feel free to watch it and make comments about my presentation skills. I know that I’m not perfect, so I’m always open to suggestions!
As always, thanks for reading!
Part 1:
Part 2:
Part 3:
Tags: adobe, development, education, Google, hosting, html, ieee, mysql, php, putty, student club, university at buffalo, vim, Web, website
Posted in Hosting / Server Administration, My Site, Programming, Student Life, Technology
|| No Comments »
Posted on: February 26th, 2011 by Famous Phil
It has been a while since I’ve done any sort of real coding for my website and I’ve been meaning to go back and post some of my old projects that work really well and show what is really good code. Today I’ve decided to bring attention to my RMI chat client and server that I wrote for a class about 2 years ago now. I recently had to refer to myself when implementing RMI code in another project and was hard pressed to find my old project. Since my site is an archive of my work for the future, I thought that it might be appropriate to post this code now.
First, to compile Java code, you need to get the Java development kit (JDK) from Oracle’s Java Download Page. Then you need to run the command “javac” on all the .java files to get the .class files. Finally to invoke the code, you need to make use of the Java command. I’ve tested this project on both Windows and Linux and both work fine, both locally and over a remote network link. Although I’m not going to guarantee support for this code, you may feel free to email me (contact page) if you’d like some help beyond what the readme file says.
You may get the code from here: http://famousphil.com/wp-content/uploads/2011/02/RMIChatServer.zip
Tags: chat, client, java, Programming, rmi, server
Posted in Programming
|| 1 Comment »
Posted on: January 27th, 2011 by Famous Phil
I was bored today with John and we thought we’d make a ball move on the screen. After 10 minutes we decided to do a Monte Carlo simulation with the ball to get a cool drawing. Forty minutes later, here is what we came up with, it kind of looks like a dog or a cow’s head
Here is the code that produced this:
package us.matthouse.circle;
import java.awt.*;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.util.Random;
import javax.swing.JFrame;
import javax.swing.Timer;
public class Circle extends JFrame implements ActionListener{
Timer t;
int x = 300;
int y = 300;
int z[][] = new int[600][600];
public Circle(){
setDefaultCloseOperation(EXIT_ON_CLOSE);
setSize(600, 600);
this.setLocation(50, 50);
setVisible(true);
for(int i=0; i<600; i++){
for(int j=0; j<600; j++){
z[i][j] = 0;
}
}
t = new Timer(10, this);
t.start();
}
public void paint(Graphics g){
g.setColor(Color.white);
g.fillRect(0, 0, 600, 600);
g.setColor(Color.black);
for(int i=0; i<600; i++){
for(int j=0; j<600; j++){
if(z[i][j] == 1){
g.fillRect(i, j, 1, 1);
}
}
}
g.setColor(Color.green);
g.fillOval(x, y, 5, 5);
}
public static void main(String[] args){
new Circle();
}
public void actionPerformed(ActionEvent e){
Random r = new Random();
int k = r.nextInt(3) - 1;
x = x + k;
k = r.nextInt(3) - 1;
y = y + k;
z[x][y] = 1;
if (y < 50){
y++;
}else if(x < 50){
x++;
}else if(x > 550){
x--;
}else if(y > 550){
y--;
}
repaint();
}
}
Tags: Circle, java, John Ciacia, Monte Carlo, Programming
Posted in Programming
|| No Comments »
Posted on: August 18th, 2010 by Famous Phil
Reminders: As with anything I post, I ask that you provide a backlink to my code if you use it (if you don’t, its considered plagiarism). Also, the code below is the outcome of 2 days in ASP.net as an excursion, I’m sure that my code could be improved vastly. I’m also not going to baby step through this, so you’re going to have to be a somewhat experienced programmer to follow along with the rest of my blog. One last thing: If you feel the urge to donate to me for my time (provided this solution helped you), please use the NEW donate button in the footer, I appreciate it. Read the rest of this entry »
Tags: ASP.net, c#, convert, exchange 2010, extract, ical, icalendar, ics, VCAL, vcalendar, visual studio
Posted in My Site, Programming
|| 29 Comments »
Posted on: August 17th, 2010 by Famous Phil
For a long time now (2 years and counting), I’ve been wanting to dabble with ASP and Microsoft web technologies. It seems that for every project that I want to dabble with, I have to gather a lot of ambition and have an end goal in mind well before I begin. I guess that being a seasoned programmer; I have gotten very lazy at what projects I feel like attacking (this is partially why this blog doesn’t get a post every day).
Tags: ASP.net, exchange 2010, ical, ics, owa, VCAL
Posted in Programming
|| 9 Comments »