Introduction: Home Automation MSWindows XP
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 https://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 https://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
Developer kit : http://www.smarthome.com/insteon/sdk2600S.html
Generating web page tutorials: http://w3schools.com/
Step 1: Web Server Setup
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
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.
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
for this demo I think I used the code:
dim x as integer
rem turn on all lights
rem light for about a half a second
for x = 1 to 500000
rem turn off all lights
out 888, 0
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.
Step 5: Let's Try It.
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.
Step 6: Try This at Your Own Risk!
Step 7: Coming Soon!
We will be adding a 3 port hp jet direct for some real fun.