Introduction: Control Lights in Your House With Your Computer

Picture of Control Lights in Your House With Your Computer

Have you ever wanted to control the lights in your house from your computer? It's actually fairly affordable to do so. You can even control sprinkler systems, automatic window blinds, motorized projection screens, etc. You need two pieces of hardware to get started. A controller, which connects to your computer; and a dimmer switch. I'm using SmartHome Insteon products in this example.

Step 1: Install the Switch

Picture of Install the Switch

Follow the instructions provided on how to install the switch. The switch I'm using is Insteon brand, but there are other types of remote controllable switches such as X10. These switches require the neutral line to send signals (commands) over. If your switch box doesn't have a neutral, you're in trouble. Try contacting an electrician to see what you can do.

Step 2: Install/setup Controller

Picture of Install/setup Controller

You need a controller which will send commands over the power lines to your switch. I'm using the Insteon PowerLinc Controller with a Serial connection. This works with Windows and Mac. Windows has freeware easily found on Google.

Setup was easy. I plugged it into the wall outlet, plugged the serial connector to my PC, and that's it.

You need to download and install SDM SmartHome Device Manager. Now, once you've installed this, you can start sending commands to the PLC (PowerLinc Controller).

Since I had a MacBook in another room, I installed SDM Socket Server, which is freeware for Windows. This let me connect over TCP/IP from upstairs and send messages downstairs. Note: you need to edit a registry setting to make this software work with the Serial (COM1) port. HKEY_USERS\.DEFAULT\Software\Smarthome\SmarthomeDeviceManager
The port needed to be changed from USB4 to COM1.

Here are some various programs you might also find useful.

Step 3: Play Around With a Script

I made a Python script that basically just connects to the SDM socket server and sends messages to the PLC Controller downstairs. You can do fun stuff like flashing the lights on and off. A more practical thing to do is setting it on a timer to wake you up in the morning. Actually, you can program timers into the PowerLinc Controller directly if you use InHomeFre or other software.

You have a little more control when you code the script yourself.


2015Mike (author)2015-10-24

There is a USB controller available as well as parallel and serial software when using different relay boards from here.

I am just trying the download and will let you know the results.

sweir (author)2011-12-03

can i get it free

iamsocialqueen (author)sweir2014-11-23

I am not sure but you can try the lighting control solution here

HardCoreHacker (author)2008-07-12

That light is so cool!! lol

hey bro m soo little experience for this program level can you pls help how to heack facebook account pls its urgent

jas55 (author)2013-11-29

Thanks for your outstanding memorial encounter and I also had such an experience.
Remote control switch for light and fan

Computothought (author)2011-07-23

Linux users may want to check this out:

MajesticNarwhal (author)2011-01-02

Is the PLC you are using programmable with Rockwell Software Logic 2000?

jaxxster1 (author)2009-08-07

can i get those for free?

halsir (author)jaxxster12009-08-07

Get what for free?

jaxxster1 (author)halsir2009-09-13

the parts?

HAHAHA! get a PLC for free? Braski if it was possible to get one of those mothers for free my entire house would be marquee lighting lol.

Bladtman242 (author)2010-07-25

out of curiosity, how did you install the socket server on mac? in a VM or? oh and, is there any chance you wil release the code for your python script?:) Great project btw.

zombiefire (author)2010-04-04

so am i

zeaps (author)2010-04-03

 So let's say my dad and I decide to do this, could we both control the same system from both of our computers? Possibly at the same time?

halsir (author)zeaps2010-04-04

 You can control from multiple locations/controllers. As long as the commands are sent approximately one second apart it should work as far as I know. The switch devices are just sitting on the line waiting for commands. They don't care where the commands come from. I haven't messed with this in a while so I am not sure if they have made any improvements recently.

kcanek (author)2009-12-10

how much money do i need to complite it?

halsir (author)kcanek2009-12-12

 I think it will run around $90 to $200 depending on how many switches you want.

crampedyogapositions (author)2009-04-27

if you go with the infared controll idea its possible to redo your house to work of a Wii remmote....hmm...sounds like a good idea. im guessiig that the main problem would be to make the remote stilll compatable with the Wii. it be weird if your playing and suddendly the power cuts off

A better idea might be to use the bluetooth connection of a Wiimote with a pc, that way you avoid issues with line of sight the comes with using infrared.  The only problem I see with this is that if you wanted to switch back and forth between using the Wiimote with your pc and the Wii you would have to manually sync it each time with either system.

andrew101 (author)2009-07-04

im off to wire my house XDXD

neardood (author)2009-06-30

I made an electronics kit that runs of 12V and plugs into the printer port on a computer. It has 8 heavy duty relay switches on it. Using some slightly dodgy but none the less sound software I can control the relays to turn on and off. I am still thinking up practical applications for it. My main/gaming PC's motherboard does not have a printer port so I can't ue it with that but i do have a dodgy laptop that i can use. Anyone got any ideas?

zer0_ (author)2009-04-21

would be cooler with a arduino and a Ethernet Shield

redstarsrbija (author)zer0_2009-06-25

THAT'S WHAT I WAS THINKING!!! lol but since i don't even have an arduino yet it'll probably take me a couple months to get it going haha

dagenius (author)2009-04-22

nice--I always wanted to 'transistorize' my house, and now, thanks to this instructable, I may be able to.

BlackHatCracker (author)2009-04-13

I have to laugh when someone points out their dust balls... So far so good... I am liking what I am seeing...

aeromancy (author)2009-02-25

Nice Instructable! So if I were to do this, all that I need is the switch and controller?

halsir (author)aeromancy2009-02-25

Yes, pretty much. That's all you need for the basic setup. I wish I had the USB controller now because I don't have a PC with a serial port.

micromuffin (author)2008-12-30


inkwash (author)2008-12-30

maybe you should try a more DIY approach...i have this for you guys...

maxpower49 (author)2008-05-20

celling fan of dooooooooooommmmm this is a great project if only it was a little cheaper

inkwash (author)maxpower492008-12-30

hey checkout the new $10 smart home

itisnot_me (author)2008-01-27

this is cool and you know something like
would be cool to add it as well. i would love to control everything via voice

PureBreed (author)itisnot_me2008-07-15

lol, u could do that if u had this and Vista's Speech Recognition software, xD

PureBreed (author)2008-07-15

So, can i have a list of parts and wat there average prices are?

halsir (author)PureBreed2008-07-15

SmartHome light control products

Here is a link to their products. You could try a starter kit, or just try out the PLC controller + dimmer by itself to see if you like it.

PureBreed (author)halsir2008-07-15

heres wat im looking for, the cheapest thing i can find that lets me control a power outlet with my PC. Do they have that sort of thing? im looking at there inventory, and i see things that look like they could be it, but i dont know wat all this stuff means, like X10, or ASCII or w/e, so i dont know if they are wat im looking for or not. if u need to know wat kind of computer i have or w/e, just ask.

PureBreed (author)PureBreed2008-07-15

me and my dad are thinking about trying this, but i want to get a good estimate on how much we're going to spend.

nf_x20 (author)2008-02-16

halsir, i really like the idea, but i was wondering if you could explain it a bit better, maybe a few more pictures please thank you... im really looking forward to having this thing in my house one more question, so the computer controls the light switches by running "messages" through the electrical wiring already in your house?

halsir (author)nf_x202008-02-16

I can try to explain it better. If you have any specific questions feel free to message me. Basically, you need a PC with the free software installed to program the PLC (PLC = programmable unit that plugs in your wall to control the switches in the house). Then you can schedule events on the PLC from the software program. Or, you can do what I did in the video and host a "socket server" on the computer and then connect wirelessly from your laptop if you wanted to do that.

Namingishard (author)2007-12-14

Can you add more then one and control each one from the same computer.
And can you upload the Python script? =)

halsir (author)Namingishard2007-12-14

yeah, you can have as many as you want around your house and you could control all of them from the same computer. i can upload the python script...

statiktv (author)2007-10-09

thats definitely awesome. a little on the pricey side for just one switch, if it was more affordable, i'd be all over it. im a cheapass, heh.

theRIAA (author)2007-10-05

i went the $50 IR way, i can control it with my universal remote

i would love to know more and how to do this cheaper than you did, i hate wasting energy to get out of bed to turn out the light.


and maybe a bit of coding will help with cheap infrared control

andrew.mac (author)2007-10-07


saites2001 (author)2007-10-06

Very cool instructable. I've been looking for a way to do this, and I think it's very neat. Can you control more than one switch though? You said that it had a hex address, so I would guess so. Some info on the script you wrote would be cool, and I think your video got a little off topic a few times; other than that, very good.

halsir (author)saites20012007-10-06

Yeah, you can have as many of these switches as you want. So, if your whole house had these switches you could turn every light on and off from your computer. Sorry about the video being a little off topic. It wasn't originally for putting on instructables. I might redo the video and explain the script and how to send commands a little more.

About This Instructable




More by halsir:Control lights in your house with your computer
Add instructable to: