About twelve months ago, I added Z-Wave lighting control to my home theatre. It was a geeky experiment and I had low expectations, but it turned out to be the most enjoyable and satisfying tech project I’d undertaken in ages. I started out small with just a couple of in-wall dimmer modules and a basic controller. I’ve since become obsessed with all things Z-Wave and have started adding more and more automation throughout house, with InControl at the heart of it all (of course!).
For the home theatre, I researched a number of different options to control both Z-Wave and IR devices from a single universal remote. What I found was that the majority of solutions available are either very expensive or somewhat limited in functionality. Since I was satisfied with my current Logitech Harmony remote for controlling all my AV gear, including the HTPC, I really wanted to find a way to use this to also control my Z-Wave light modules. Doesn’t make sense? Keep reading…
Most HTPC enthusiasts will be familiar with the concept of using software to map IR remote control key presses to custom tasks or actions. So, what if there was a way of triggering Z-Wave scenes from the command line or a script? This would mean you could use your remote software to map IR requests to Z-Wave scene changes! As it turns out, InControl provides a simple way for you to achieve this very thing and I’ll explain how to get it all working in the following steps.
Step 1: First, consider the scenes you want to control and create these via the InControl console. For example, when watching movies in my home theatre, I wanted two very specific actions to trigger when I hit PLAY or STOP on my remote control:-
- PLAY: start movie playback and dim the lights to 10% (Scene 1)
- STOP: end movie playback and raise light levels to 60% (Scene2)
I will be using these two actions as the basis of this tutorial. Here’s how I’ve configured the relevant scenes inside InControl:-
Scene 1

Scene 2

Step 2: Next, follow Ryan’s excellent guide: “Activate a scene from the command line”. This will provide you with the cURL commands needed to activate your selected scenes.
Step 3: You’ll want to save these cURL commands to separate command files. This will make it easier to call the scenes from your IR software. I’ve chosen to use simple .bat files named HTLightsUP.bat and HTLightsDOWN.bat. For example:-
Contents of HTLightsUP.bat (Scene1)
@ECHO OFF
curl -X PUT -H "Content-Type:application/json;charset=utf-8" - d "{""password"":""1234"",""sceneId"":""7839c489-5f77-47cf-a05d- e55840778b77"",""activate"":""1""}" http://192.168.1.100:1178/zwave/activateSceneByGuid
Contents of HTLightsDOWN.bat (Scene2)
@ECHO OFF
curl -X PUT -H "Content-Type:application/json;charset=utf-8" - d "{""password"":""1234"",""sceneId"":""8351ef73-d25c-468f-b260- 7833f1b92593"",""activate"":""1""}" http://192.168.1.100:1178/zwave/activateSceneByGuid
Step 4: Now it’s time to map the two .bat files to the PLAY and STOP buttons on your remote control. There are many different remote controls and IR software solutions available which makes this step a little complicated to describe. Regardless of this though, the process of mapping key presses to actions is going to be more-or-less the same. So, I’ve demonstrated the way to set this up using a standard MCE remote with JRiver Media Center. JRiver’s Theater View is the best Media Centre front-end available and provides built-in support for most IR remotes:-
a) Open JRiver and navigate to Options > Remote Control:-

Note: I have disabled “Microsoft MCE” and chosen “Remote, keyboard, gamepad or other HID” as the Selected input device under Drives & Options. This allows me to use the standard Arrow, Enter and Play controls (which work natively under Windows 7) but also allows me to trigger custom commands as required.
b) Click the Commands link and select Play/Pause:-

c) Click “Start Learning” and press the PLAY button on your remote:-

Note: Ignore any prompts recommending not to learn the IR key press. As I mentioned above, PLAY will work out-of-the-box without needing to learn the command when using the MCE controller. However, we want to retain this behaviour and trigger an action (next step below). This is the way you achieve both! Again, this process will be the same regardless of the IR software you use when you use a MCE remote under Windows.
d) With Play/Pause still selected, click the Edit button and delete the default command action “MCC: Play/Pause”. Next, click the Add Run button.
e) Browse and select the HTLightsDOWN.bat file you created in step 3 and enable the Run Invisible check box (to prevent the DOS window from showing when the scene is triggered):-

f) Click OK and repeat from step 4 for the STOP/HTLightsUP.bat association.
You’re done! Sit back and enjoy a fully automated home theatre experience
Editor's Notes:
If you are new to z-wave, be sure to check out the quick-start guide to learn the basics. InControl Home Automation software can be purchased in package deals for great savings and includes most things needed to get started (USB stick & software) with your home theatre experience.
If you've ever wanted to integrate another program with InControl, one way to do it would be to use CURL to consume the hosted service. This page will outline the steps needed to perform such a task.
This tutorial will assume you are doing this from a Windows computer. It should still work in a similar fashion on other OSes though.
Step 1: You need to get a copy of CURL. Some OSes such as Linux might already have this. If not, visit the CURL web page to download the appropriate version for your operating system.
Once you have that downloaded, extract the curl.exe to your hard drive. To make this easier, put your CURL.EXE file in your C:\WINDOWS\SYSTEM32 folder. This isn't required, but makes it easier for the sake of this tutorial and helps prevent the "COMMAND IS NOT RECOGNIZED" errors that are common.
Step 2: Find out what your computer's IP address is. This is the computer where you have InControl installed. The quickest way to find this is to open up a CMD window (by clicking Start/Run and typing CMD). Once the window is open, type in ipconfig and hit enter. You should get output similar to this:

The important information is found on the line that says IPv4 address. In my case, it's 10.4.3.178 - make a note of this number because you'll need it later on. Note: if you see many of these listed like I do, the most likely bet is that it's the only one with a value for Default Gateway.
Step 3: Figure out your the scene's Guid ID that you want to activate. A Guid is just a simple way to identify an object. Each scene in your system is assigned something unique.
Go back to your CMD window now and be prepared to type in this command:
curl -X PUT -H "Content-Type:application/json;charset=utf-8" -d "{\"password\":\"yourPassword\"}" http://10.4.3.178:1178/zwave/getScenes
I've highlighted certain portions of the command that you'll need to change specifically for your own setup. If you use a password, replace yourPassword to match the password you setup. Just delete the text if you don't have one a password.
Replace 10.4.3.178 with the IP Address you noted from step 2.
Execute the command by hitting ENTER. Here's how it should look -- and I want to point out that this may not be for the faint of heart! Indeed, it could appear to be as cryptic as the vertical lines from the Matrix. Don't worry though, I'll help you sort it out:

Look for your scene in that list. I've highlighted mine for example purposes. The one I'm interested in is named "Portable Sonos." What you want is the sceneID associated to that scene, in this case, it's the series of numbers/characters that starts with 90f18. Grab the entire set of characters, including dashes up until the final quote and make a note of it.
This ID will never change, so once you have it you can store it away somewhere and always use it to activate that scene.
Step 4: Activate the scene.
It's now time to use another curl command to activate the scene we picked. I'll once again highlight the portions that you'll need to change to match your own setup.
curl -X PUT -H "Content-Type:application/json;charset=utf-8" -d "{\"password\":\"yourpassword\",\"sceneId\":\"90f18fea-bd80-4c53-96a3-5b04429ca790\",\"activate\":\"1\"}" http://10.4.3.178:1178/zwave/activateSceneByGuid
That's it! If everything went well your scene should now be active. You can repeat this command anytime to turn that scene on again.
My kids are notorious for opening the garage door and leaving it open. When a neighbor called me at 2 in the morning to let me know the garage was open, I decided that I was going to figure out a way to monitor the garage door from my computer.
This job took me about 4 hours. My friends and neighbors will be shocked to find out I did it, because my wife is the handy-man around the house. She asks for the power tools for Christmas while I ask for the NewEgg & Best Buy gift cards. If you are truly handy, this should be a quick and simple project.
The first step was to get me some z-wave hardware. I ordered an Evolve LFM-20 relay and an Aeon Labs Door / Window Sensor. The LFM-20 would be used to actually open and close the door, while the sensor is used to tell me if the door is currently opened or closed.
Door sensors are sensitive to metal, otherwise I could have mounted them directly to my garage door railing. Instead, I needed to figure out how to raise them "above" the rails and still have the paired sensor halves match up.
I went to my local hardware store and purchased a "Garage Door Top Bracket." After removing part of it and forcefully bending it into a desired shape, I was able to mount it to my garage door along with a sturdy piece of 2x4. This piece would go up and down with the garage door.


On the other side I mounted a 2x4 to the fixed side of the door. This part wouldn't be moving anywhere. Here is the finished sensor mount:

I purchased a $5 plug kit and wired it onto the black/white/green wires of my LFM-20 relay. My garage door opener is conveniently located right next to an outlet, so this worked out great.

The next step was to wire the Evolve switch into a parallel circuit with my existing garage door opener button. The "diagram" of how I did it looks like this (please don't mock my artistic ability!)

One problem I ran into with this setup is that while the Evolve LFM-20 is active, the normal button used to open the garage door won't work. The fix is to find a way to shut the relay off just after it activates. For this, I used InControl's "auto-toggle off" feature to turn the relay off after a few seconds.
Using InControl, I'm able to monitor my garage door. When it's open past 9 PM, I get a text message at which point I can use my Android phone to close the door.
Here's a complete shopping list of z-wave items to make this work:
Most of these items can be
purchased in a package to save you some money.
No, this article isn't about how to automatically get your Christmas shopping done. It's about those pesky Christmas lights. If you are like me, you remember that your Christmas lights need turned off right about the same time you pull the blanket up around your head and hit the pillow.
This article will step you through how to use z-wave to automatically turn your Christmas lights on at sunset and off at a pre-programmed time. Because you are using z-wave, you'll also have the added bonus of being able to control them and your other household lights using your smart phone.
This article assumes you've never used z-wave before and steps you through the basics of getting things setup.
Overview
Z-Wave is a technology that lets light switches, outlets and other devices communicate wirelessly with each other. To set this up, you'll need a master controller, a z-wave appliance module for each set of Christmas lights you want to control and a computer running the free version of InControl.
Hardware
The master controller is required to be able to setup and manage your z-wave devices. For this, I recommend the Aeon Labs USB Stick. Not only does this USB stick work as a master controller, but it also doubles as a controller that you can use on your PC, allowing your PC to send commands like "turn off" to your lights.

In order to control a set of Christmas lights, you'll also want to purchase an appliance module -- which basically plugs into an outlet and provides a new outlet for your string of Christmas lights. Anything plugged into this module will be controllable using your PC and smart phone.
Shop around a bit, you'll often times find sales on the appliance modules putting them at the $10-$20 range. The Aeon Labs USB stick is usually around $59. Here are some links to a website where I generally purchase my z-wave equipment from:
Lamp Module (dimmable, only supports plugs with 2 prongs)
Appliance Module (not dimmable, but supports 3-pronged plugs)
Setup Z-Wave Network
Now that you've got your hardware, it's time to get your z-wave network setup. First, plug in the Appliance module to a wall outlet and get your Christmas lights plugged into it.
We need to tell the master controller (your Aeon Labs USB stick) about your appliance module. Push the button on your USB stick and the blue ring should light up and start to blink. Now put the USB stick next to your appliance module and push the "include" button (if you purchased the modules I linked here, it's the black button on top). The light on your USB stick should quickly flash a few times indicating that everything went well.
Repeat this process for each appliance module that you purchased.
Setup InControl
InControl is a free app which will allow you to use your PC and smart phone to control your lights. Follow these instructions to download and install InControl.
Before you continue, make sure you've downloaded and installed InControl and that you are able to use it to turn your Christmas lights on/off manually from your PC. I'll now show you how to setup InControl to create a schedule so that your Christmas lights automatically turn on at dusk and off at bedtime.
In order for InControl to know what time sunset occurs, you need to set your latitude and longitude. Use this site to pick your location, then inside InControl, open up the Tools/Options menu to enter the information you found on the site.

Scenes
Scenes are a way for your computer to memorize which lights are on and which are off. We'll create two scenes, one with all your Christmas lights on, and another with all the lights off.
From within InControl, click on the Scenes tab. Click the Create New Scene button. Add all the appropriate modules to your scene using the Add Device and make sure the slider is at full power. Name your scene "Christmas Lights On."
Now create a 2nd scene and add the same set of modules to it. This time make sure that the slider indicates they are all powered off. Name this scene "Christmas Lights Off."
Rules
Rules are used to tell your PC when to turn the lights on or off. First, we'll create the scene that will turn your lights on at Sunset.
Go into the Rules tab and create a new rule by clicking Add Rule. Name it "Christmas Lights On" and put in a description if you'd like. Make sure the rule is enabled. Choose "At Sunset" for the Event Trigger. Click the Browse button next to script and choose "ActivateScene.cs."

Now choose the Rule Data tab and double click the Scene row. Choose Christmas Lights On as the scene name. Click OK.
Now we are ready to create the rule that will turn lights off at bedtime. Click Add Rule again, naming it "Christmas Lights Off" - be sure to Enable the rule as well. For the Event Trigger choose "On a Specific Date (repeatable)." For the script name, choose browse and find "ActivateScene.cs."
Change over to the Rule Data tab and double click each of the following rows, entering the respective value:
- Target Date & Time: Choose today's date and enter the time you want the lights to turn off
- Scene: Choose "Christmas Lights Off"
- Interval: "Days"
- Interval Number: 1
These values will create a rule that will repeat every day at the specified time.

Finished
That's it, you are done! Your Christmas lights should turn on automatically at sunset and turn off around bedtime.


When I was growing up, I rigged up a string and "pulley" system in my room so that I could turn off my light at night without getting out of bed. The string was anchored to a nail in the cieling above my light switch, then strung across the room to my bed. When I gave the string a tug, it would pull the switch into the "up" position and the light would turn off. I never could figure out how to rig the system to be able to pull the switch to the "down" position, so it was always a one way trip: once it was off, I had to crawl out of bed to turn it back on again.
Perhaps my early days of lazyness inspired me seek out a way to do the same in my modern home. Although I admit that some of it may be lazyness, most of it is for convenience (Editor's Note: Isn't convenience the same as being lazy?) Not only can I turn my lights on and off using the smart phone sitting next to me on my night stand, but I can automate many tasks to save energy and add a little bit of security to my home.
With z-wave, I've got the ability to easily convert my existing light system into something I can automate without much hassle. I'll explain how z-wave works and how easy it is for you to get started on it as well.
The Basics
You don't need to run new wires to get started with z-wave since it uses radio signals to communicate. When you tell a light to turn on using your smart phone, radio waves are really being sent to the switch with the command. Z-wave requires a master controller and a z-wave device. The most useful type of master controller is a USB stick, as it will allow you to control your devices using your smart phone or computer.
A z-wave device can be a light switch, a light dimmer, an outlet -- for controlling things like TV's, DVD's and plugin-lamps -- a motion sensor, a thermostat, or even a deadbolt lock. There's no end to what you can find that is z-wave enabled.



The master controller is what helps your z-wave devices know to communicate with each other. It not only "builds" your z-wave network, but it can also be used to send commands (like "dim" & "turn off") to your z-wave devices.
I mentioned network - don't let that term scare you off. It's quite simple to build your network once everything is installed. Simply use the master controller to recognize your device. This typically involves pushing the "include" button and then standing near your z-wave device and turning it on.
The Hardware
I've used two USB Sticks. One from ControlThink, and the other from Aeon Labs. USB sticks can double as Master Controllers so you can eliminate the purchase of an item when you get a USB stick. The Aeon Labs USB stick has a button on it that let's you "include" your devices simply with the USB stick. ControlThink requires you to walk around with a laptop to include devices.
The Aeon Labs stick is more convenient (read: for the lazy), but costs ~$60 as compared to $30 for ControlThink.
Dimmer switches range from cheap $20 to the expensive $100+ range. I've found that both work equally well and that it often comes down to your personal preference for how fancy you want the switch to look.
The Shopping List
If you are ready to get started, here's what I'd recommend you purchase. This is enough to get you setup and controlling at least one light with your smart phone:
You can also purchase the Z-Wave Starter Kit, which includes home automation software, the master controller and 2 dimmable light switches.
It's easy to add-on products as your budget allows, so there's no need to blow the budget on your first go-around.
Have fun!