I own a Dual CPU Pentium III computer. This machine is 10 years old. I used to take it to companies back in the beginning of the millennium to teach about multi CPU programming. I have also developed and tested device drivers on it. around 2004 I began to use it as a gateway to my home automation system. It runs Windows XP with all my home automation related applications and code that I have developed. The machine became very noisy, I have replaced all the fans and put some oil but still the decibel level is too high. Lately the computer starts to generate blue screens every 3-4 hours. Usually when one of my computer goes to the BSOD haven, I am analyzing (-v) it and solve the software or hardware problem. This time I have decided to move on and replace it. As any other project I have started with the requirements.
The computer serves as a server for other applications that are connected to the home automation system. It exposes a web service that when it is called, it convert the SOAP based request to the lower level homeautomation bus command. I am using an NT service based application called Falcon to communicate with the (KNX) Instabus, the bus of the electrical automation system. Falcon exposes COM interfaces and I am using .NET Interop to use them. The computer also has a Media Center application that is hosted in IIS and let controlling the system from the various Media Center computers that I have at home as well as from any browser. Controlling the home automation from mobile devices is based on specific mobile WinForm client that consumes the web service. Since the computer is connected to the Instabus bus, I am using it to manage the home automation devices as well as using the Windows scheduler to operate the home. For example every morning the shutters are raised. Every midnight all the shutters in the house are closed. The system turn on and off the garden lights, and the system uses the Windows scheduler to turn the boiler on and off.
These were my requirements from the new computer:
- It must have an RS232 connector. This is the way I am connecting the computer to the instabus. I didn’t want to invest and buy a USB or IP connector since the current connector is good enough and does the job.
- It has to be quiet. I had enough noise!
- It has to be a solid hardware that will last at least for 10 years.
- It should run Windows 7 32 bit. I wanted to start with the most up-to-date operating system. I didn’t know if I will be able to run the Instabus software and drivers on Windows 7, but I had a clue that it will installed and run on Vista 32 bit.
- It should be energy efficient. The computer works 24/7/365 and most of the day does nothing.
Looking at the requirements I have decided to search for an Atom based industrial machine. There are so many kinds of such machine as you can see in this web site: http://www.ipc2u.com/catalog/E/
After looking at the catalog I have come to conclusion that the NISE-100 machine is my best choice: http://www.nexcom.com/ProductModel.aspx?id=54e1e6c1-7aa4-4c9b-808a-5e56dc338b4c
The main feature of the machine
Seen that there are driver for Windows Vista I realized that I will be able to install Windows 7. If you look at other embedded serves, most of them does not support officially Windows Vista.
Apparently EIM is the representative of Nexcom in Israel and I bought the machine from them. I upgraded the memory to 2GB RAM.
Installing Windows 7
Since the computer has no DVD drive I have created an installation USB of the x86 version of Windows 7. Installing this machine was no different than any other computer. All the device drivers but sound (Which has no connector anyway) have been installed during the regular installation process.
The NISE 100 is very impressive computer. It even support Windows Aero.
Installing the KNX software:
Installing the ETS software was just like installing it on Windows XP. So far everything was good. I have tried to get to the instabus devices and succeeded. The new computer turn the room light on! Installing Falcon and the development tool was a different story. The installer didn’t want me to install the tool on Windows 7, no matter what compatibility feature of Windows 7 I tried.
I had to use a bigger gun, so I ask the MSIEXEC to force install the package using: MSIEXEC /qb /i FalconDeveloper.msi and it worked!
Moving the Applications from Windows XP to Windows 7
Now I was ready to move the applications from the old Dual Pentium III machine to the new Atom based machine. This step also included moving from IIS 5 to IIS 7.5 and from the Windows XP task scheduler to the Windows 7 Task scheduler.
To move the IIS applications I had to first install IIS on the new machine. This is very easy steps using the “Programs nd Features” control panel applet and choosing the “Turn Windows feature on or of”
I had to play a little bit with the configuration of IIS, to crate the virtual directories, open the firewall port, etc. After a while I was able to surf to the home automation application and manage the home automation system from other computers at my home. The next step was top change the setting of the URL on the media-center computer at my home.
The last step was to move the tasks from the Windows XP scheduler to the Windows 7 scheduler. I had about 30 tasks, not all of them were active. Some of the tasks are for the winter (Turn on the under-floor heater in the bathroom for example). Some of the tasks are for vacations, I turn lights on and off and raise shutter so thefts will think that there are people at home. Anyway I didn’t want to enter all those tasks manually. Looking for a solution I have found that the SCHTASKS command can be used to query the old task from the XP machine into XML file:
schtasks /query /S homealonxp /XML
The XML is not a well formed XML since it has many roots, one for each task. I wrote short C# code that split the XML to many valid XML and also create a batch file to import these task to the new Windows 7 task scheduler. Each command in the batch looks something like this:
schtasks /create /RU alon /RP Password /tn HomeAutomation\Open_East_Shutter_Yarden_Room /xml Open_East_Shutter_Yarden_Room.xml
The C# code:
static void Main(string args)
StreamWriter batch = new StreamWriter(@"c:\users\alon\desktop\ImportedTasks\Batch.bat");
StringBuilder sb = new StringBuilder();
using (StreamReader fs = File.OpenText(@"C:\Users\alon\Desktop\xptasks.xml"))
string line = fs.ReadLine();
string processorLine = "";
processorLine = line;
string text = sb.ToString();
string fileName = text.Substring(6, text.IndexOf(" –>") – 6).Replace(‘ ‘, ‘_’);
text = "<?xml version=\"1.0\"?>" + Environment.NewLine + text;
using (StreamWriter sw = new StreamWriter(@"c:\users\alon\desktop\ImportedTasks\" + fileName+".xml"))
batch.WriteLine(@"schtasks /create /RU alon /RP Password /tn HomeAutomation\" + fileName + @" /xml " + fileName + ".xml");
sb.Length = 0;
line = fs.ReadLine();
string data = fs.ReadToEnd();
That it, The new computer works, the room is quiet. The old Dual Pentium III can now RIP and joined my old computers museum.