loading
Picture of Home Automation MSWindows XP
antennaoesrvr1.png
dtws.gif
Mswindows: beginning home automation on a server.

Now friends are asking me how to do home automation on an older machine with Microsoft windows XP for proof of concept. It is also not a programming tutorial. Lets
see what we can do here:
1. Get or make a cable with the led's from http://www.instructables.com/id/No-solder-parallel-port-break-out/
2. Download wampserver
3. Download freebasic.
4. Download web source code.
5. Download executables and or source to create you own programs.
6. Test it out.
Remember this is just a skeleton set up, so it is up to you to add the bells and whistles. Let me know if you have any issues.

This is just a quickie proof of concept about using a web server to do home automation remotely. all we will be doing is just turning on some leds, but the blueprint will be there for doing larger things. You do need to have some knowledge of MSWindows and using the command line. You could also use the same idea to control x10 modules or even the Insteon units. http://www.youtube.com/watch?v=EjZmrw9JkrM. I will not talk about setting up routers and how to open a port to access the server remotely. That is for another instructable. You need to go to http://www.instructables.com/id/No-solder-parallel-port-break-out/ and build a compatible cable with the led array mentioned in the instructable. This will be attached to your web server. For more info on using insteon
see: http://www.linuxha.com/athome/common/iplcd/
Developer kit : http://www.smarthome.com/insteon/sdk2600S.html
Generating web page tutorials: http://w3schools.com/



 
Remove these adsRemove these ads by Signing Up

Step 1: Web server setup

Picture of Web server setup
wampfs.jpg
I decided to download and install wamp from http://www.wampserver.com/en/download.php.
Please follow their instructions for installing it.
After installing it, start your web browser and go to local host in the url. It should look like the second picture below.

So far so good.

Step 2: Get Freebasic

Picture of Get Freebasic
if you do not have a qbasic compiler you can get free basic compiler here: http://www.freebasic.net/index.php/download

If you download it if you want to make changes to the source code of the basic program.


Step 3: Get code for the web.

Picture of Get code for the web.
Go to the command prompt and change to the c:\wamp\www\
This is your web root directory. We want to make a special directory for testing the home automation.
c:\wamp\www\> md pport then cd into pport
c:\wamp\www\pport\> Your files will go here.

Download the files below and put them in to that directory.
then rename the following files:

rename index.html.txt to index.html
rename allon1.php.txt to allon.php

Note: I altered the php file because the file was for the linux setup and not mwwindows. .Hopefully everything is fixed now.

Step 4: Compile code if you need too

Picture of Compile code if you need too
for this demo I think I used the code:

[code]
dim x as integer
rem turn on all lights
out 888,255
rem light for about a half a second
for x = 1 to 500000
next x
rem turn off all lights
out 888, 0
[/code]

save to out.bas then compile with:
fbc -lang qb  out.bas
Which generates out.exe which needs to go to the c:\wamp\www\pport\ directory.

out.bas56 bytes
out.exe15 KB

Step 5: Let's try it.

Picture of Let's try it.
dt.gif
dtws.gif
Make sure the cable is plugged in the parallel port. For this instructable I decided to do things a bit different. One so that the web page was not directly browse-able and two to show a different way of accessing an mswindows system.

You will need to get the ip-address of the host machine. You can do that with ipconfig from the command line.

Second you will need to have a remote machine that has a terminal server client. Warning if you remote into your xp machine  and someone is logged in, it will log them out. So you will want to get one of the patches or commercial software on the web to get around this. For legal reasons, I choose not to include this information.

Any way, you will want to run the terminal server client (available on most operating systems) for your system and point it to the server machine.

Once you see your desktop, you will want to start the Wampserver by double clicking the Wampserver icon.

Then you want to start your browser and set the url to localhost/pport. you should see the screen with one button. The lights will come on and off real quick.  See the instructable about the cable for more programming information.

http://www.instructables.com/id/No-solder-parallel-port-break-out/

Step 7: Coming soon!

Picture of Coming soon!
PICT0068.JPG
We will be adding a 3 port hp jet direct for some real fun.

http://www.instructables.com/id/Hp-Jetdirect-home-automation-device/