Archive for the ‘Home Automation’ Category

I’ve been working with the HAI SDK for a couple weeks now, slowly building an application for myself, and that I can share with the public as it gets a bit better. This past weekend, things got ridiculous. I had this bright idea to add Kinect voice detection capabilities to the HAI application. Still a lot of work to be done to make it better, but so far this is pretty freakin cool. Eventually I can also use the Kinect to detect motion, and act based on certain rules (i.e. if security armed and motion detected, take video then send email notification)

The volume of the computer is a bit low, and this should be watched in 720p full screen to really be able to see what’s going on. But here’s my first version of Kinect and HAI together.

Advertisements

I recently joined the HAI (Home Automation Incorporated) developer program and started messing with their SDK. I have managed an OmniPro II system for my boss, for several years, and recently purchased an HAI Omni IIe system for a house I am having built. Being that I’m a C# developer, I decided to tear down their example program, and start rebuilding it to suit my needs. Their example gives you the resources to connect to the system, get the basic configuration, and monitor certain functions within the home.

The only problem with this SDK example application is that they have a method called “HandleIdentifyController”, and it contains a check to see if the system in OmniPro II. If it is not, it simply throws the error “model does not match file”, and disconnects. Wow, a lot of good that does me. After a bit of research, and understanding behind the error, I came to find that within the HAC object (clsHAC instantiation), it is set to OmniPro II by default. I came up with a little snippet of code that will fix this problem.

Within this HandleIdentifyController method, are two sections depending on the protocol used to connect. You need to add this snippet of code to both sections, unless you don’t care about one of the protocols. The upper portion is UDP and the lower portion is TCP (Omni-link II).

There is a line of code

if (HAC.Model == MSG.ModelNumber)

Right before that line of code, add this:

foreach (enuModel enu in Enum.GetValues(typeof(enuModel)))
    {
        if (enu == MSG.ModelNumber)
        {
            HAC.Model = enu;
            break;
        }
    }

so it looks like this:

clsOL2MsgSystemInformation MSG = new clsOL2MsgSystemInformation(HAC.Connection, B);
foreach (enuModel enu in Enum.GetValues(typeof(enuModel)))
    {
        if (enu == MSG.ModelNumber)
        {
            HAC.Model = enu;
            break;
        }
    }
if (HAC.Model == MSG.ModelNumber)
{...}

What this does is loop through available system types within the HAI SDK, and tries to match it to a system type. If it can’t match it, it will continue to throw the same “model does not match file” error. This means the SDK does not support that system.

Just over 10 years ago, I bought my current townhome brand new, and wanted to have all kinds of automation in the house for lights and other stuff. I had a few X10 devices, which worked fine in my apartment at the time, so I stocked up and bought a few more before I moved into the new place. After moving in, I tried setting up X10 stuff, and it worked for awhile. After a bit, I started noticing lights randomly turning on and off. Then plug in switches started to fail, my fireplace started turning on randomly. Then suddenly, pretty much everything stopped. It seemed as if x10 items that are on the same circuit, work great, but if they are on different breakers, even if on the same phase, they didn’t work. For years I have used a simple X10 motion detector with the receiver used as an appliance module, to turn on my garage lights when I walk out to the garage. It works well because there’s no powerline usage. I was always disappointed, and I have a box with a few random X10 items that are brand spankin’ new. ¬†Disappointing. So, I gave up on that adventure.

Several years ago, my boss came to me with a project to pick a home automation system for the new house he was having built. I looked at many systems from Crestron, to Control 4, to HAI, and other smaller names. Eventually, the pick came down to the HAI OmniPro II system, for several reasons. It can do most of what the super expensive systems can do, but at a much lower price point, and has the reliability of UPB. So, we chose the HAI system, and installed it in his new place. We integrated whole house audio, lighting on nearly every switch, security, video, motion detection, and blinds control. He has a button “Go to work” that will turn off all the lights and audio, open the blinds all the way so his plants get lots of light, and arm the security system. He had his basement done, and we wired in 2 outlets for a mirror ball, and a laser show. A button called “Dance” dims the lights very low, and turns on the mirror ball, laser show, and audio to a certain level. Unfortunately, we bought the system right before HAI came out with the OmniTouch 5.7e touchscreens which hook up straight to your ethernet network. He has a total of 6 5.7 touchscreens around the house, several scene switches, and audio in many rooms. I also have it st up so that when he sets the system to away, it automates the process of pushing his normally daily buttons… wake up, go to work, evening, go to bed, etc. Makes the house look very lived in.

Now it’s my turn…

Just recently, my girlfriend and I put a contract on a brand new house, that is being built as I write this. I don’t have the money my boss has. We spent nearly $15k implementing the system, including all the audio, and someone else doing the install in his house! So, I decided to look at other avenues for automation in our new home. After some research, I decided I would purchase an Elk security system, and couple it with an automation box line the Mi Casa Verde Vera/VeraLite, or the isy-99i. I ended up purchasing the VeraLite, and also a few insteon devices and PLM to communicate with the Vera. After over $500, and several days of tinkering, I came to realize that Insteon really sucks as much as X10. It was completely unreliable, half the time signals didn’t make it through. Even with a phase coupler installed, no signal would go across a phase. I had to have them on the same phase, and pretty close together. I even went around the house and unplugged both Plasma TV’s, and my UPS for my computer. No difference. While Insteon has dual-band capabilities, not all of their devices do. Specifically, find me a non-dimming switch for CFL or LED lights, that is dual-band. Sorry, doesn’t exist unless you buy a scene switch with a 15A relay in it. I was so frustrated, and jealous that my boss’ system works so flawlessly, I decided to abandon my project with Insteon, and set off for HAI land. I know the system well, and they are constantly doing updates that add new features. I returned all the Insteon junk, and sold the VeraLite on ebay.

After some more serious research, mostly to find the right vendor to buy from at the right price, I decided to purchase from http://www.discounthomeautomation.com (DHA). I shopped around on their site before I finally settled on what I would purchase for the system. Keep in mind, it’s currently March 2012, and the house will not be done until July 2012. I’m trying to not go overboard, but slowly collect until move-in day comes.

Here’s what I purchased from DHA:

3 HAI UPB Non-Dimming Wall Switch, 600W $175.56
1 HAI UPB Dimmer Wall Switch, 600W $58.52
1 HAI 8 Relay Module $55.86
1 HAI HLC Powerline Phase Coupler $49.88
1 HAI Extended Range Indoor/Outdoor Temp Sensor $42.56
1 HAI Omni IIe Controller with Enclosure $715.54
1 ELK AC Transformer with Ground, 24VAC 40VA $13.95
1 Interstate Batteries 12V 12AH SLA .187 FASTON $26.27
1 HAI UPB PIM to PC Cable $6.65
1 HAI UPB PIM & Cable $61.18
1 HAI Omni Console $111.72
5 Seco-Larm Enforcer Magnetic Contact $7.30
1 USP ST-1 Siren Horn Strobe $37.17

I also ordered a couple of garage door contacts from another place, and had the garage wired with 2 cat5 runs. One to the front, between the two garage doors, and one that goes where the garage door buttons are. That way I can sense if the doors are open, and shut them if they are open too long. I also plan on installing a simple on/off switch on a zone for turning on and off the auto garage function. The USP ST-1 siren/strobe will be on the wall with the buttons, to alert anyone in the garage that the door is about to close, if it’s been open too long. This uses 3 relays on the 8 relay board. A 4th relay will be used to control the fireplace, and the rest I have no use for yet. It was a $10 difference between the 4 relay board, and the 8 relay board. I figure it’s worth it if I need even one more relay.

Just the other day, I received the vast majority of my items from DHA, in an extremely timely fashion, with fabulous communication from them. Two of the items I ordered (one HAI switch, and the ST-1 siren) were backordered but would ship in 3-5 days. It shipped 3 days later, and should arrive today. Every item was brand new, in unopened HAI packages. Even the HAI system itself was factory sealed, and had the 3.10 firmware on it which has only been out for a few months. Bravo DHA! I highly recommend ordering from this place, and I know I’ll order all my stuff from them in the future. I considered ordering for surveillent.net because their prices are just slightly lower, but there are SO MANY negative reviews about them, that I didn’t want to take a chance. Even on ebay.

After hooking up the HAI system in a temporary place inside the house so I can play with it, program it, and more closely understand how I can use it, I decided to install one non-dimming switch in the kitchen to start testing. It was immediate failure, but I hadn’t yet installed the phase coupler. I decided to plug the PIM into an extension cord and plug it in at various places around the house. Failure again. I was becoming sure that the electrical system in my home was a serious problem. So, I did a bit of research, and looked into purchasing noise filters for certain devices, but it’s stupid to start buying filters without knowing what’s making the noise. There are many reports of people having a cell phone charger that destroyed their X10/Insteon communications, so I needed to test first. I found information on using UpStart software with the PIM plugged into the serial port of the computer. This is why I purchased the serial cable for the PIM. I started, then, by killing the power, and installing the phase coupler, and making sure it worked. Once that was done, I attempted to configure the kitchen light switch, from a plug in the kitchen which I had used the night before without success. Immediately it found the switch, and was able to configure it, communicate with it, and do whatever. I was excited! I started running noise tests, then ran around the house turning on computers, plasma TV’s, plugging in AC adapters, whatever. ZERO noise, VERY high signal. So, I moved the PIM back to the original outlet where the HAI system is. Perfect communication again, and even with all the electronics on. ZERO noise. I reset the PIM, plugged it back into the HAI system, and attempted to configure the kitchen light switch. First time it worked, and configured the switch! It seems that my entire problem was related to the phase coupler, and that UPB is definitely far more robust than Insteon and X10. I plan on hooking up a couple more switches in the house for the outside lights, but I don’t want to go overboard, as I have to remove all this stuff in a few months.

The new house will be pre-wired for a security system, which means all the windows and doors will have sensors, and there will be 3 locations for security pads, and a couple additional runs to other places. For now I just have one console, but I plan on buying 2 more, plus a few more switches, before we ever move in. The problem is, I don’t really know enough about what lights in the house I need switches for!

Additional things I plan on doing with the system:
-Doorbell monitoring and silencing (another relay output)
-Hot tub cabinet temperature monitoring for freeze protection
-X10 module for making use of some of the X10 stuff I have left, like motion sensors
-Garage door control through serial based RFID system
-HVAC control with HAI thermostat
-Carbon Monoxide detection

I’ll be collecting a bit more equipment in the coming months, and will be prepared to install this system in the house shortly after we move in.