Category Archives: Projects

Home automation, improvements and other large scale projects around the house.

Modules associations

There are few different companies that manufacture modules for home automation. Even with products from same company, it can be difficult to find all in one solutions to consumers’ need. Through manipulating the behaviors of the modules through the controller, we can accomplish almost anything.

Let’s look at a situation where solution is not obvious. In my home, I have a separated garage with a conventional door opener and lights. To automate the door, I added a Z-wave inline module. It works great, but it often interferes with the built-in light of the opener. So I removed the light fixture from it. Now every time I come home the garage is dark because the other set of lights requires me to turn on separately. Solution is to combine two modules; the door open/close sensor and the light switch module.

I wrote down what I would like to have and what equipment I have to solve the problem. What I wrote is; Sensor is Armed –> Sensor is Connected/Disconnected –> Turn ON lights –> Wait 10 min –> Turn OFF lights. Then, being a good computer scientist I created a flow chart.

Flowchart: Garage Door Sensor associating with Light Switch
Flowchart: Garage Door Sensor associating with Light Switch
Now, I installed the Z-wave 2-way switch module by replacing the old switches. Then I used the association in Vera controller to make a relationship between the sensor and the light switch.

Here is an example video of an association (not the same one describe above).

You can resolve problems similar to this using associations in many other situations. Here are few example of typical problems that can be fixed using association method.

  • Turn on lights (switch module) when the motion senator (sensor module) is tripped if the time period is night.
  • Turn off the TV (plug-in module) if the motion sensor (sensor module) have not been tripped for over X hours in the entertainment room.
  • Turn on the sprinklers (plug-in module OR sprinkler controller module) if the light sensor (sensor module) detects low lights and it is at night.
  • If the light level (luminance sensor) is below 90 lux then turn on lights.
  • If the humidity level (humidity sensor) is below 40% turn on the humidifier and send an email.
  • If you install a multisensor, Boolean logic possibilities can be significantly increased.
  • …and many many more!

The key to a successful association type automation is proper planing and right equipment.

Improvised home automation

The ideal solutions for home automation devices are usually plug-and-play units or modules. They often require just powering the unit and adding to your main controller. I came across unique situation in which a Z-wave, x10 or Insteon modules does not exists, but a solution can be made by combining automation modules with types of electronic/electric units. It is technically an improvising what you can get on the market. However, it does not necessarily means the final outcome of these projects are lower in quality compared to plug-and-play solutions.

Electric shock alertPlease note that some modifications may result in voiding the manufactures’ warranty. Some project involves working with ~ 110/240 volts alternating current (AC). Even with the power cut offed, there is always a risk of electric shock.

Garage Door

Currently there are no manufactures or distributors in Canada that sells openers with automation as a built-in function. I have used a inline relay module between the traditional opener switch and power. If you are unfamiliar with what is an inline relay, check these items: Fortrezz MIMOLite Zwave Input Output Module and Evolve ZWave Inline Relay Module-LFM-20.

These relays acts as a human input to any device that has a ON/OFF type switch(es). Some of these may not work for devices that require continuous ON such as an electric heater. Make sure you read the manufacture’s datasheets before purchasing.

Door Opener

Yes, you can buy a automated door locks from companies like Kwikset, Schlage and Yale. But it will only allow you to either lock or unlock your door. What if you want to open the door remotely? To do that you need a motorized door opener. You can buy a door opener unit for either swing door or slide door type. They comes with an electric motor, mounting equipment, a switch and a remote. What lacks is any form of automation controlling unit (Z-wave, x10 or Insteon).

When you are purchasing a electric door opener, make sure it also has a push-button connection. You will replace this push-button with your inline module.

Again, we can use an inline module like MIMOLITE between the motorized door openers such as Skylink Otodor Automatic Swing Door Opener and its power supply. Then by adding the the module to network, you can open and close the doors with your computer or phone.

Security Cameras

There are several companies that produce high quality cheap security cameras. For indoor use, almost all of the reputed companies make great products that are simply plug-and-play modules. I also like the fact they are often independent standalone units. In other wards they can operate without a central controllers like Z-wave controllers.

In Canada, we run into one big problem; weather. Most wireless outdoor cameras are built to work between -20 to +40 degrees Celsius. In most parts of Canada (such as Calgary) we get temperatures as low as -40 oC during Winter months. You could buy a extreme weather cameras with a heated casing. But it will not only cost a lot for the unit, but also the subsequent costs for heating will add up over the years. Hence we must improvised with these cheap IP-Cameras if we want to use them outside.

Solution 1: Use indoor units

You can install a high grade indoor camera such as D-Link DCS-5222L close to a wide outside window (inside the house). Now by pointing the camera towards the outside, you can still surveils the outside without having a weather proof unit. The major drawdown is that the Infrared (IR) LEDs will bounce off the window at night causing distorted image. This can be overcome by turning off the IR mode and illuminating the outside area with a flood light.

Solution 2: Install on the other side

If you want to protect areas like your garage, you can install the camera inside instead of outside. In most situations this will provide adequate protection from weather. The darwdown is that if you have an enclosed area, you will not be able to see the outside. However, if someone breaks into the garage, that can be recorded.

Solution 3: Creating your own weather casing

This is really a improvised do-it-yourself project. You can create a metal or wooden box and add a HVAC pipe into the box from your house. So whenever the house is heated, the camera enclosure will also be heated. Please make sure that you are doing this according to the laws of your area. Some cities and countries would not allow you to use such methods due to safety reasons.

Last option is not really an improvise. You can just buy a Canadian outdoor weather reared camera. In December 2013, it will cost you around $300 to $2000 depend on the manufacture and the model.

When installing a wired outdoor camera (or anything else), make sure to use outdoor rated cables.


I would not buy a fully integrated taps or water controllers. This is because electric taps are often well-built. However, the electronics go into the automation can be unreliable. You do not want a leak after few years of use or unwanted turn on/offs. The solution is to buy an electric taps/water controllers with a push-button switch. Hence, the automation part will be added using a inline module that is independent of the water controller itself. Easy to install and easy to do maintenance work.


I would not recommended improvising for anything to do with electrical. It not only pose a hazard to your health, but also could lead to criminal charges. But there are something you can do in your own home. Even the garage door and light switches automation involves electrical modifications.

Missing Common Wire

If you have a situation in which a Common Wire (“white wire) is not available in your house or the area in question, you have two options. One is to run a Common Wire from your main board to the location, and the second is to use a plug-in module. If you are not familiar with electrical work, I recommend the second option. You can connect lamps, electrical appliances, consumer electronics and many more to a plug-in module. Make sure you use the right module with proper rating. The module will plug-into the wall outlet and provide outlet with automation. The Evolve ZWave Plug-In modules are examples of such units.

LED dimmer causes flickering

This is a very common problem with LED dimmers and not the Z-wave module itself. Sometimes when the resistance, R on the circuit is extremely low and the current, I flow is also reduced through the dimmer, it will cause the LED lights to flicker. This happens when the dimmer at its lower illumination setting.

To resolve this we need to increase the resistance in the circuit. The best solution is to install at least five to eight LED light bulbs in a single circuit. You can try by adding one at a time until you no longer have this problem. If that is not viable solution, install a mixture of both LED and regular bulbs on the same circuit. However, I found by mixing manufactures of LED bulbs I was able to stop the flickering with just three LEDs.

Outdoor electrical modules

When working on an outdoor automation project, use outdoor approved electrical products. For example, GE ZWave Outdoor On/Off Module-45604 should be used when you are installing a sprinkler system. Do not try to save money by buying an indoor module to control an outdoor electrical products. There is a reason why outdoor units can be bit more expensive!

Please be aware that you may not be able to automate anything and everything. Use common sense and if you are not sure of something, do your research and/or ask an expert. Most manufactures and distributors also provide free support. Use them as a resource.

Advantages of Improvising

There are several advantages. I decided to list them so you can quickly glance through each one.

  • In-line modules can be from any manufactures and can be on any standard (Z-wave, x10, etc)
  • Most of the time, it is easy to install with improvised solutions (describe in the article)
  • If a unit/module fail, it is easy to replace as opposed to replacing an expensive and complicated unit
  • Parts can be easier to find (for example, an electric tap from Canadian Tire and a controller module from a Z-wave specialty store)
  • May be more reliable than having a single plug-and-play
  • Can be install on almost any house regardless of the age of the house or the electrical wiring/plumbing/door system
  • Provide much more expansion possibilities

Home electrical wiring basics

During home automation projects, you will probably replace the electrical fittings such as outlets for appliances and lighting fixtures. There are few basic things you should research before you begin. But first of all let me give you a warning; if you do not have experience working with electrical wring, please contact a professional for help. In this article, I will explain how to replace a traditional electrical switch to a Z-wave compatible switch.

Advice to all dummies

Electric shock alert

The following project involves working with ~ 110/240 volts alternating current (AC). Even with the power cut offed, there is always a risk of electric shock. Do not work on this project if; you are unfamiliar with electrical work, do not have proper equipments and/or regulations and laws in your area prohibit do-it-yourself (DIY) electrical modifications. I, Sanuja Senanayake or the site will not take any responsibility for any personal injury or property damage.



The following items are essential to this project. In addition, you may require other materials such as drywall patches for cosmetic work.

  • Suitable screw drivers and/or bits; electrically insulated drivers would be better
  • Wire cutters and strippers
  • Electrical tape
  • Electrical wire connector clips in few different sizes
  • Multimeter; a digital unit would be better/tester
  • Z-wave compatible switch

Optional items.

  • Extra electrical wires (short one would be enough)
  • Gang box
  • Wire staples and hammer

Let’s go…

After deciding which switch to replace, find the trip switch for the circuit on you central electrical box. If it is a light, I would turn it on to check if the power is still there. If you are installing a relay for a garage door, make sure the door is at closed position before you cut off the power. Prior to installing the Z-wave or wireless device read the manufacture’s guidelines for installation and usage. It is recommended to have at least 1/2 of the signal power from automation controller and the wireless LAN at the location. You may use a repeater for better signal strength. Please note, all Z-wave wired products (non-battery operated) are repeaters of the Z-wave signal.

After turning off the main power to the circuit, using your multimeter and/or tester, check if the power is out. Once you know that for sure, remove the two screws holding the switch. Gently, with some force, pull out the switch until you can access the left and right sides of the unit. Now, you should be able to remove the wires. But wait! Before you disconnect any wires from the old switch, I recommend taking a pictures of the setup. This can be very useful in places with three of more phases (and many other situations with lots of wires). It is important to have enough room in the gang box in order to accommodate the bulky back side of automated switches. If you find it is too tight to place all the new switches in the particular box, please replace the current gang box with a new unit with one extra slot. The extra slot can be closed up with a dummy plate as opposed to populating with an another switch.

You cannot install a dimmer switch in all locations due to wiring limitations. If you already have a traditional dimmer, you can install a automated dimmer at the same location. However, you may not have the dimming support on all gang boxes. The Z-wave switches often require a common wire. So, what is a common wire?

Electrical wire identification for a Z-wave dimmer.
Electrical wire identification for a Z-wave dimmer.

In the above image, the common wire is the white wire that is labeled C. All the common wires from switches attached to the same point. The wire B is the neutral wire (also white) that goes to the light. The green wire labeled G is the ground. Finally the Z-wave dimmer switch is labeled Z.

In this particular location, I can install two independent dimmers. But not all locations are wired to handle dimmers. If you do not currently have a dimming switch, it is possible that you cannot install one without extensive wiring. Unfortunately this is the case for most older houses. The cost of electrical home automation can be significantly increased with the age of the house.

When adding a new unit, always follow the instructions of the manufactures and the guidelines on electrical work in your area. Make sure the wattage rating of the automated unit does not exceed that of the load. For example, in my experience a unit that is rated for 500 W would be good for about 400 W load. After that between 400 – 500 W you are kind of experimenting. It may even handle 600 W but I recommend keeping units under load.

Make sure the wires are connected to each unit are securely held. Gently try to pull out the wires from all wire connector clips to ensure that all the wires are in place. Do not provide power to the circuit, without checking the integrity of your connections.

Once you have hooked up the wires, clear the area of any debris and keep the unit(s) out of the box. Please provide ample space between the electrical unit and the gang box to prevent electrical arcing. Now go to the main switch board and turn on the power. Check if the light(s) or appliance functions as expected. In case of a smoke or spark, immediately turn off the circuit.

Once you are done testing, turn off the circuit again. Now apply electrical tape to all exposed areas and wire connector clips. Put back the devices in the box and place the cover. Now you are ready to program the unit.

Cleaning things up

On the first image you can see I have applied electrical tape to cover all exposed connectors and wires. It is important to use the tapes to isolate these connectors to prevent shorting.

On the image bellow, the arrow in the above image is pointing to a staple which holds the wires in place. You can also see a Z-wave relay switch and the garage door opener switch. I have replaced the entire gang box with a new one. As you can see the metal box has been secured on both sides.

Garage door opener, Z-wave relay module and light switch.
Garage door opener, Z-wave relay module and light switch.

Programming an Z-wave switch

There are several companies manufacture Z-wave compatible switches. GE and Evolve and Leviton are few popular companies. Regardless of the manufacture, the process is simple. Press the add button on your Z-wave controller near the switch. Then press the switch at ON position several times until your Z-wave controller indicate successful addition. Each Z-wave controllers have their own set of instructions on how this works. Please follow the guidelines accordingly. For your information; I am very satisfied with the options and possibilities of VeraLite3 controller. However, I am cannot recommended anything since each controller comes with different advantages.

Other programing options

Electrical installation process is same for all units. The x10 and INSTEON controllers will have sightly different programming steps. At the end of the day, this article is all about basics of home electrical wiring. Refer to your manufacture’s user guide on how to add items to your specific programming standards.

Brains of Whole House Automation

I recently discussed possible centralized controllers for household fixtures such as lights, door locks and security systems. Once you have selected what type of standard(s) you will use, the next step is to choose a controller. If you are not planing to automate a large portion of your electrical and electronic equipments, you may skip this part all together.

Dependent and Independent

There are two main routes you can take. One is choosing a LAN controller. They are usually independent of any wireless standards like x10 or Z-wave. However, they can be expensive and/or less reliable and hard to setup. The other route is the centralized controllers. I will be explaining the later in detailed because that’s what most tech geeks would use.

Still on the independent units, IP cameras such as D-Link IP Cams and switches like Belkin wemo are great products. They allow average consumer to setup a smart home system without the need for expensive controllers. All IP Cameras from D-Link, TrendNET and other manufactures have very easy and simple setup. Just follow the instructions and you will be ready to go with your WLAN or Wifi based cam. Often these companies also provide DNS (Domain Name Server) services free of charge to their customers. These DNS services will allow you to access your unit(s) from anywhere in the world. I personally found the D-Link products to be the most intuitive to average consumers (plug-n-play). Note these units actually do not have a “brain” aka a main controller.

In addition there are, what I call “independent but dependent” units. They provide simple services such as sending an email if the smoke alarm goes off with almost no other control what so ever. If all you need is that, then check out the products from SkylinkHome.

Centralized Controllers


Some controllers can support all standards; INSTEON, Z-wave, UPB and X10. However, these units are often expensive. I found the Z-wave controller which also can handle INSTEON and X10 via a plug-in called VeraLite to be the best option for consumers. You don’t have to pay a lot since the unit sells for about $200 CAD. It is a stand along box. I would not recommended in-wall units like Evolve LCD Wall Mount for novice users.

Of course there are other options with multiple standards support. Homeseer Hometroller SE Pro supports ZWave, UPB, Insteon and X10. But the cost is about $750 CAD. If you have money to burn, I can safely say it is a very good unit. The software architecture of the unit is based on Windows XP. An added bonus for avid Windows-loving programmers.

MiCasa Vera3

This is the particular unit I use. They have two options; the Regular and the Lite. For home or small business use (even if you are a programmer), I would go with the Lite version. The only major differences I noticed between the two models is the number of devices they can control (200 units vs 50) and the built in stand along wifi system in the regular version. Personally I prefer independent wifi network. This will avoid fallout from a catastrophic network failures.

Planing a house-wide automation system

Once you have the necessary basic infrastructure listed on my first post on automation here, the next step is the planing. This is very important because depend on what equipments you choose and how you physically and electronically integrate them to one another will effect the reliability and future expandability of your system.

The following list of questions will help you decide what actions you should take. These are some of the exact questions I asked myself for my automation project.

  1. Am I (are we) going to live in this particular house for the next 5+ years?
    If yes, spend more time on extensive planing and go to question 3. If not go to question 2.
  2. Will this project add value to the resell of the house? Is this area is known for high end housing market?
  3. What is the budget over a month, a year and few years for maintenance and expansion?
  4. Which controller and components should I pick based on answers to above questions?
    If you are planing to live in this particular house for a long period, please pick the best or at least intermediate level system (or there is a market for automated houses in your area, if you are planing to sell the house). If you are doing this as a “fun” project and/or you are planing to sell the house with no added value due to automation, then go for a cheaper equipments.
  5. How many equipment am I (we are) planing to integrate into the controller and what standards (Z-wave, x10… more) will we be using?
    Some high end (expensive) controllers support multiple standards. However, I support independent controllers for each system. I will explain why soon (at the end of this article).
  6. How much flexibility do I (we) want? Do I need a controller that would accept custom scripts and firmware (geek alert!)?
    Some controllers may not comes with free control over the Internet. Some controllers will allow custom scripts (not recommended for novice non-tech people) for wide range of activities. Usually the controllers that allow custom scripts are expensive. If you are a home owner with limited knowledge in computing, I would recommended something simple like Micasa Vera controllers.
  7. Where should I place the “brains” of the system?
    I recommend using a centralized location in which you have access to both the network equipments and the automation equipments. I will be placing all the controllers for automation with my servers. At the main location, it is utmost important that you have flexibility in electrical outlets, number of LAN connections and other peripheral support infrastructure. Note that most systems are wireless so you can place them anywhere in the house with a mid to strong wifi signal.
  8. What components do I need and where would I place them?
    There are limitless possibilities thanks to standardizations like Z-wave. Multiple manufactures have come up with many different equipments from lighting receptacles to security systems. In order to go truly hose-wide, I would start organization the automation based on your house plan.
    Example of a basic house plan. Note the automated cameras and thermostat locations.
    Example of a basic house plan. Note the automated cameras and thermostat locations.

Addition to the centralized systems with a very powerful controllers, you could also go with general purpose consumer grade products like Belkin wemo devices. In fact, I think it is better to have multiple independent systems because this will increase the reliability. If the controller goes out in a advanced system, everything connected to it will be out of service as opposed to having independent systems.

I will be introducing you to the Belkin wemo products and Vera Smart Home Controller, Vera Lite in my next two post. Stay tuned!