Sunday, January 27, 2008

A very Busy week!

This was a rather odd busy week. Classes started at Pace and I only have one this semester, "AIT381: Emerging Broadband Technologies", basically IPTV and VoIP. I am familiar with VoIP as I wrote a chapter on the subject in my book (but that doesn't mean I know a lot about it). I also have another slight advantage as I build Cisco networks to properly handle these protocols and my office-mate does VoIP (not just the routers but the call management servers and a lot more). It's very complicated stuff! I think this will be an interesting course.

I also picked up a smart phone (a Pantech Duo+) with my AT&T wireless service. My wife got the Palm 750 (boy did that get bad reviews but she loves the phone). While my phone is great (it eliminates my older Palm III and Nokia phone) IE is terrible! I've replaced it with Opera. Having the Internet access can be useful though I doubt that it will work in the NJ Pine Barrens where I like to ride my bicycle. ;-) I'll have to learn HTML/CSS for mobile devices. This will be interesting.

Still working on my HA presentations. I've picked up the doll house and it's smaller than I thought (not a bad thing). I'll need to build some kind of a travel case for it as that is it's purpose. I'll probably reinforce the base and the wall joints. This has to be sturdy enough for showing.

Lastly my new weather station is active but just at home. I've mounted the wind vane and anomometer on a ten foot pole and I'm currently testing it at ground level. Everything is working though getting information from the wireless is slow (it takes about a full minute to poll the unit). I discovered that I prefer the cups based anomometer as any wind in any direction gets it spinning. The fan based unit only starts recording the speed when it switches to the correct direction where the wind is blowing. The last few days have been calm w! ith ligh t gusts so the fan stops a great deal of the time. I've been visiting WX Forum adn I've found a whole bunch of useful scripts and information such as Fire Danger scripts. I'm hoping to have full information about things that affect my bike rides such as air quality conditions, Fire, tide, phase of the moon (yes I need that) along with the weather. I can then post the information to the web and when I lead rides I'll have the information available on my phone to fill in on the ride sheets.

Friday, January 18, 2008

Insteon coming to Europe?

Automated and Smart Home Blog has a short Blog entry on Insteon coming to the UK and Europe. I think this is a big deal as this really opens up the market to a working alternative to X10 and X10 like products. I just hope Insteon get serious about fixing it problems with the developers. Insteon is driving us nuts by giving us a moving target with the availability of PC controllers and the stability of it's code.

Thursday, January 17, 2008

Home Automation Presentation

Recently, (Jan. 14, 2008) I presented to the PPCUG my HA presentation (found here). I think I did a pretty good job though there were a few slides I need to merge and I've decided listing the software is boring. I'll have to present working software in the next presentation (see here for a schedule). On the PPCUG presentation I only made it up to slide 54 out of 74. The rest of the slides were extra information that I kept in case I needed more. I spoke for 1 hour and 45 minutes (105 minutes). I don't think I needed the extra slides.

My next presentation is at Mercer County Library on Feb. 13, 2008. I'll be presenting to Linux Users Group in Princeton (LUGIP). The previous presentation was general HA on a PC. This time the presentation is more geared towards Linux so I'll demonstrate Heyu and Misterhouse. I'll need to use my spare CM11A. I hope it works. I haven't figure out what slides need to go but I'll work on that this month.

Meanwhile I've ordered this doll house from Hobby Masters in Red Bank, NJ. I love going in there and looking around. Usually I'm buying train stuff. When I explained to the staff the reason for the doll house I got funny looks but once they got used to the idea they were very helpful (how many people do you know have an automated doll house?). My friends intend to help with the building and automating but I'm a little unhappy about the controlled implosion plans (yes, they're serious). I may have to hide the house once it's complete. The doll house is for the Trenton Computer Festival (TCF) on Apr. 26, 2008. Not only will I be controlling and monitoring the house I'll be demonstrating with Misterhouse. I'll probably have to have a few external X10/Insteon devices to show also. My friend 'D' gave me a 7" color LCD TV and a tiny wireless camera. I'll have to see if I can integrate them into the presentation. That might be a bit much but we'll see.

Sunday, January 13, 2008

Home Automation Resource management

A couple of interesting articles both from the N.Y Times. The first is California Seeks Thermostat Control - the gist of the story is that the California Energy Commission wants to be able to control the temperature of your HVAC to 'manage electricity shortages'. The second article is similar but from a different point of view: Digital Tools Help Users Save Energy, Study Finds - the gist of this story is that if the end users are given tools to monitor their electrical usage they will regulate themselves. Or to put it another way they'll spend their money more wisely.

The first story is a scary story because I fear what I don't know. What I don't know are the rules for when they can change my thermostat. The idea that things inside my home can be controlled without my knowledge or approval scares me. My biggest concern is "Will the protocol to control my thermostat be properly secure"? Security as an after thought is a common occurrence in electronics and computers. The second story is more and less scary at the same time. This time the information is out on the Internet which means that someone can be watching you. For what reason I don't know. It's just that I don't trust utility companies with information security. Ease of use may be their first concern and security plays second string to ease of use. Also it seems that anytime someone gathers information about you or your usage patterns it is no longer your information and they can sell it as they see fit. That I object to. What I like about the "digital tools" idea is that it gives the consumer the option to spend their money wisely. What I'd like to see is every outlet have a power monitor and not just the total incoming power being monitored. Something that will give me information about the usage of devices on that outlet. I can then plot usage patterns, looks for trends, monitor past performance and predict end of life for a device. What I mean by end of life is when I can replace the current device because it appears to be wearing out or when it appears I can save money by replacing it with a more efficient device. All of this is goes into the information processing/resource management portion of my HA definition (which you can find here).

Overall I think this will come to everyone. At seven billion+ people we need to find ways to manage our resources. If we don't do it ourselves then someone will do it for us. I prefer to remain in control of my choices as I am the only one who knows what's best for me.

For those who may be wondering: 'how can something like this be done?', let me explain. First gather the data, Dr. Edward Cheung created a Power Monitor which is perfect for this. Where as some power monitoring devices monitor just the current usage and then multiple by the fixed AC voltage, Dr. Cheung's device measures the instantaneous AC voltage and current at a given time. Once we have the power data we store it in a database. Next we can plot the usage and use the values to calculate various thing such as daily, weekly, monthly, and yearly. Throw in some derivatives (yes calculus has a lot of uses :-) and some canned formulas and you can calculate all sort of interesting and useful information. Under Linux I can automate this by using mysql (database), Perl and Expect (as my parsing language) and a non-GUI spread sheet (SC) to do my calculations. Finally I use GNU Plot to plot the data to a web page that I can post to the internet or my private in-house web site. One of these days I'll learn enough AJAX and be able to do some 'what-if' calculations from the web site. If I need a faster interface I can still use OO Spread Sheet or Gnumeric (my preferred GUI base Spread Sheet). Windows users can do the same things, none of this is tied to an operating system.

Tuesday, January 08, 2008

Learning to program

Okay so I'm a little off topic (home automation) but today Slashdot had one of it's typical rant/misrepresented articles titled: Professors Slam Java As "Damaging" To Students. Despite the fact that the title of the article misrepresented the article a number of absurd comments were made (like saying that HTML was programming, yipes! Where's my concrete clue bat!) and that this language was better than that language. Of course there were a few people who made valid points such as a language is a teaching tool and that the concepts were the point of the class. The teaching of a language was secondary to the concepts but still important. This I agree with 100%. Take a look at the 'Numerical Recipes' books on Amazon. There's Fortran, C, C++ and others. The first language I learned as an engineering student was BASIC on a PDP-11 (I was not being taught to be a programmer as much as using the computer as a tool). Later I used BASIC to learn assembly language on my Atari 800xl. Later I learned C and from there I've had no problems learning various other computer languages. What I carry over from one language to another are things like linked lists, sorting algorithms, the useful theory. I can create queues in assemble language, Perl or Java and that OOP stuff actually makes it a little easier to use (once you understand the concepts)! That's what is supposed to be taught at the universities. Someone made a good point that many universities are turning into training schools (they are not teach us to think). Other posters showed their lack of knowledge by stating the majority of the programming done today is GUI or database or that Mainframes are not relevant anymore that they're just legacy systems. It is my understanding that the largest market (in term ! of numbe rs) is the micro-controller market, embedded programming. Not much room for a GUI or command line in 128 bytes of ram though larger embedded systems are front ended by thing like an embedded Linux, Windows or web based GUI. Many auto manufacturers use Windows as the user interface to the controls. The control of the auto is still done by another embedded real time OS (for lack of a better name). The reality is that the truth lies somewhere in between. People still need to learn the basics but then need to learn the concepts and the ability to think. Maybe that's why a Master's degree is so valuable. To earn a Master's degree means that you've done more than trained to be a programmer or engineer. It means that you've learned to think. Hmm, I've got to get me one of those (Master's degrees).

Friday, January 04, 2008

I'm a happy camper!

Sometimes it's the little things that make life better. Today I managed to properly setup my ISP and C development environment for my AT Mega 128 development board (under Linux of course). I ran a very simple blink the LED program. I properly set the fuses so the Mega128 was running off it's internal 1MHz RC (later I'll test the 16MHz XTAL), set the port for output and I toggled the bits on and off in a never ending loop. This wasn't some major success such as writing a difficult algorithm or stomping on a stack bug but rather a confidence builder that my development environment and my basic understanding of the processor are correct. I'll have to go through this for my MSP430 and AVR32 setup also. In the mean time I'll test out my JTAG interface (I did the initial test with the ISP) and then proceed to do some debugging and manual toggling of the IO bits.

This isn't the first micro-controller development environment I've worked with. I setup an 80251 development enviroment using SDCC. That worked out very well. I also have a ton of other controllers (ARM and MIPS) but they used Linux as the underlying OS. The smaller controllers, like the PIC 14 bit family (using CCS's mid-range compiler), MSP430 and AVR (using GCC), have no OS and need a bit more care and feeding. I enjoy working within these tight environments (like only 256 bytes, note the lack of a K or M!). You're in charge and you're responsible for the havoc wreaked by your mistakes. ;-)

Today I also received my AVR32 board running AVR32 Linux. This looks like it will be perfect for another project I'm working on. All home automation related of course. :-).