I’ve covered Smart Things for retrofits in my last article so you should know by now how much of a fan I am of using it with custom device types. However one thing I didn’t cover is how well it integrates into the Logitech Harmony Hub. The Harmony Hub is an internet connected infrared blaster/repeater.

You can us the logitech smart phone app to control your IR based home theater equipment, but you can also use it to control WIFI or Bluetooth enabled smart home equipment. It can talk to SmartThings, Nest, or any number of popular home automation gear. It’s actually a very cool thing to own in your smart home because it ties your home automation and AV equipment together. For example the physical harmony remote control shows your thermostat info right on its LCD. It show temperature and operating mode, it lets you make changes to your thermostat right from the remote.

gallery-1To those of you who will not be using SmartThings, I think you could get similar functionality using whichever hub you currently use to control your smart home. The Harmony Hub is the key to this project.

It occurred to me that I could now use this IR blaster to control all of my legacy appliances in my house that are IR based. I have two portable air conditioners which have IR remote control. I also have an older roomba which takes IR commands. As a side note, I also plan to purchase an LED light strip, and I’m considering buying a cheap one that is controlled by IR remote, rather than spending the extra money for an internet connected one such as the strip that Philips provides for their Hue line of products.

Nowebsite_product_powermidxlw the problem I faced was that all of my IR devices are in different rooms. So show can I reach all of them from the Harmony Hub without running blaster wires everywhere? The answer was with an IR to RF repeater. In my case an X10 Powermid set.

The power mid takes IR input into one module and then repeats it over RF(radio) to the receiving end, which then turns the signal back into IR and repeats it to near by devices.

There’s probably other good IR to RF repeaters to be found on the internet, I just happened to already have these in a big box of old X10 gear I got at a significant discount. On their own they are still a bit pricey on Amazon, but if you look around I’m sure you can find them cheap.

The set up is easy. Put the transmitter powermid near your Harmony Hub. Then place the receiver powermid near the device you want to control, in my case, a portable air conditioner. The next step is to add a custom device to the harmony hub using the smart phone app. This is a familiar process to some of you. You take your air conditioner’s remote control and use it to train the hub so that it knows all of the remote’s command signals.

20160905_12053720160905_120540

 

When it is all set up you will have a device on your smartphone app that looks like this below. You will also have the device show up on the harmony TV remote. All of these commands had to be learned from the AC’s remote control.

Screenshot_20160905-211313 Screenshot_20160905-211315

So what’s the end goal here? Well since we are now able to control the portable air conditioner from the harmony hub and wifi app, you can also control it from SmartThings or Nest. SmartThings already controls my main furnace/thermostat system. I have zigbee temperature sensors all over my house. I use these sensors to inform SmartThings. And in turn SmartThings controls my thermostat and toggles power to my ceiling fan. It’s a simple matter of adding a Harmony Activity to that behavior. When it gets hot in my house, turn on thermostat AC, ceiling fan, and send power on command to the IR based air conditioner. It’s that simple.

The only gotcha is the Harmony Hub only allows smart home devices (nest, smartthings) to toggle activities, it does not let you toggle devices directly. This causes a bit of trouble because it interferes with normal home theater activities. For example lets say you were watching a Bluray, your hub and remote would be in the Bluray activity and show you all of the relevant buttons and options for watching movies. If you had your smartthings or nest toggle the ‘Turn on AC activity’, your remote control would switch from Bluray mode to AC mode. All of the buttons would change. This would be very annoying. Because of this I recommend owning two Harmony Hubs, one for smart home devices, meant purely as a bridge between Wifi and IR, and a second hub for home theater equipment. This seems like something Logitech could fix in software however.

get-started-kits.2e8ba015

I recently purchased a Samsung Smartthings Hub and it was one of the better decisions I have made for my home automation system. The Hub has it pros and cons but one thing it does really well is that as a developer I can write my own custom switches and have them behave like professional consumer products.

In particular I’ve gotten rid of all of my custom software to control my X10 equipment and now use Smartthings to handle this for me. This offers a huge benefit because it now future proofs my legacy equipment and allows them to interact with other modern automation systems. Essentially Smartthings adds an abstraction layer so I no longer need to hand-roll x10 support on a case by case basis for my gear at home.

What does this really mean? For starters I have slowly been replacing my x10 light switches with Philips Hue lights. Philips Hue lights are compatible with Smartthings. I have a Logitech Harmony Ultimate Home kit. The harmony remote has support for Smartthings and hue lights out of the box. Which means I can control my Hue lights from my TV remote.

Now because the Harmony remote can communicate with Smartthings, and because I can control my x10 gear from Smartthings, by that extension I can now control my X10 lights from my Harmony remote. There was no custom hackery required, it simply just worked. I can control my Hue lights and my X10 lights from the harmony remote as if their was no difference between them.

Likewise when I control my lights from my Android phone, the Hue and x10 lights behave as though they were the same.

Why do I still have x10 lights? A) I’m cheap and lazy and B) I found that if you are powering at least 4 bulbs off one x10 switch, you can actually switch to LED bulbs. Any less than that and LED bulbs will not work properly. The current that flows through the circuit to power the X10 switch causes one of the LEDs to stay on permanently if you don’t have at least 4 bulbs.

This is also a good solution for appliance modules. Current generation zigbee or z-wave appliance modules are pricey. X10 appliance modules can be found used for cheap and offer the same functionality. However they obviously suffer from classic X10 signal issues, which means if you plug them into a wall socket that gets a poor signal, you might as well use a modern module instead.

But if you plug them into a wall socket that seems to behave well, chances are it will be rock solid. In one room using X10 appliance modules work great and have no signal issues. In another room, the signal was so bad that I replaced them with the Samsung Smartthings Appliance Module. It’s just a matter of being realistic with your results. I already owned a bunch of x10 gear, so for the circuits/rooms it works well on, I’ll keep them.

X10Bridge-01

So, what I’ve done is replaced all of my x10 switches with fewer than 4 bulbs with Hue bulbs. For any switches powering 4 bulbs, I just swapped out my old incandescent ones with cheap LED bulbs.

I’m not going to walk you through how to do it just yet but you’ll find that after doing some reading and after setting up a smartthings developer account, it’s actually quite simple. All you need to do is add a custom x10 device and an x10 smart app to your developer dashboard. Someone else already wrote the code to do this but they’ve since abandoned the project. (I’ve forked the repo and will maintain it, see links below)

Here’s a video of him demonstrating how it works.

You can read about the x10 Smartthings app here: https://community.smartthings.com/t/x10-bridge-is-released-obsolete/4783

Since the project has been abandoned, I’ve forked his code and been maintaining it here: https://github.com/ssshake/SmartThingsPublic

What you need is the x10 bridge: 

https://github.com/ssshake/SmartThingsPublic/blob/master/smartapps/statusbits/x10-bridge.src/x10-bridge.groovy

And the x10 switch: 

https://github.com/ssshake/SmartThingsPublic/blob/master/devicetypes/statusbits/x10-switch.src/x10-switch.groovy

This x10 bridge communicates with the mochad service running on a Linux machine (a raspberry pi in my case). I was already using this to control my gear so this was ready to go and super easy for me. https://sourceforge.net/projects/mochad/files/?source=navbar

ha_hub_diagram3

In closing it’s great that I can now treat my old equipment as if they were modern. But Smartthings has also allowed me to take advantage of its presence feature. Automatically shutting my lights off when I leave. Automatically turning my porch lights on at sunset, etc etc.

If your car has homelink (built in garage door opener) you might want to check out using an X10 transceiver as a way to control your home automation from your car (within distance, driveway)

Common misconception, your home automation gear doesn’t have to be X10 to take advantage of this. You just leverage X10 as a bridge/transport between your car’s transmitter and your home automation server.

Simply buy a cheap X10 transceiver and USB interface (check ebay, kijiji, craigslist). You can use this to receive signals from cars with a “homelink” universal unit. Typically meant for garage door openers.

I currently have my homelink unit in my car configured to 1) open/close my garage, 2) Welcome Home Mode: Turn off house alarm, turn on exterior lights, turn on main level house lights. 3) Away Mode: Turn on house alarm, turn off all house lights, turn off exterior lights, indicate to devices like thermostat.

I use an inexpensive X10 transceiver module and an X10 USB dongle. I connect this to my Linux server (or use a raspberry pi), have a script intercept it, and perform actions like controlling my lights, security system, even thermostat.

For me this is great. I have a driveway that goes to the back yard of my house and to a detached garage. It’s really cool being able to come home and with one button press, I can light up my entire path back to my house’s side entrance. Or being able to pull away and turn off any lights I forgot about, without having to dig for my phone to do so.

Range is limited in my experience. 30 feet perhaps more. Depending on your layout you might want to set up a couple transceivers. In my case, I have one transceiver in my garage and one at the front corner of my house. I have a L shaped driveway that wraps around my house and this seems to cover it.

X10 Transceivers like this, http://www.x10.com/tm751.html are really inexpensive if found from the right source. I paid pennies on the dollar for boxes full of X10 stuff on ebay and kijiji. You’ll also need a cm19a or cm15a interface. Do your homework before deciding which and buying.

I’ve been gone for a while and now I’m back. I’ve noticed there’s a severe lack in good (and good looking) software for modern DIY home automation. In this post I’m throwing up some screen shots of a software suite that I’m currently working on. I’m focusing on my thermostat, motion sensors and lights. And getting them to eventually work together.

Considering I see a lot of impressive thermostats and various home automation products being built from scratch using Arduinos and the like, it’s a shame that none of them have a particularly good software user interface. I was in the same boatand thought, “why shouldn’t we all have a pleasant home automation interface?” I plan to put the code I’m working on up on Github as open source so that others can use this in their projects if they like, or even contribute improvements.

If you’ve created your own Arduino thermostat, this app is for you.

This software platform has been designed so that none of the protocol specifics matter to the user interface. It’s completely abstract, so if I want to use X10 or Zwave or Arduino or Philips or whicheverproducts in my home, I don’t have touch the UI code. What I have to do is configure the devices in the database, and write a “protocol translator” for the device. In other words, if I bought a new thermostat (or made one) and it had a completely different protocol/API, all I would have to do is write a basic shell script to sit between my core software and the thermostat, translating commands to API calls. Probably sounds more complicated than it is.

This slideshow requires JavaScript.

I was previously managing the thermostat and motion sensors through some ugly shell scripts. I’ve moved both over to a mysql database for configuration and state, with an HTML5 front end and some basic shell scripts to interface with the hardware. I think by decoupling these three tasks it will make it easy to shim in other protocols and hardware down the road.

In the motion sensors app, I can now get a very good idea of what each sensor is doing, making the set up and troubleshooting of sensors easy. This app shows me which zones see motion in green, dormant zones in grey. I can click a zone button to disable motion detection in that particular zone. It tells me how long it’s been since it has last seen motion . It also shows me the number of “hits” behind the main text.

When a sensor is triggered, it will run a related macro for it, to say turn on lights on that room, or whatever. The macros are just a series of basic shell scripts.

The back end service for motion detection compares the last time a zone saw motion to a timeout which can be a hard set number or perhaps a dynamic number based on “hits” of activity seen in that zone recently. An exponential push-back on the timeout. When the timeout is exceeded a macro is run to turn things like lights off or maybe adjust my thermostat. Maybe auto-arm the alarm when all zones are dormant and it’s during work hours.

Speaking of alarm, it also acts like an alarm system now. When enabled, triggered zoIMG_00001485nes show up in red on the UI. The back end servertakes photos from my cameras, emails me the photos, and plays a siren and flashes all of my lights on and off in my house. It’s pretty cool considering it was a $0 feature add.

All of the data is maintained in the same database as the thermostat app. I plan to write something to use this motion data to dictate thermostat functions, so that it will operate similar to a nest thermostat.

This slideshow requires JavaScript.

The thermostat app provides your typical thermostat functions. This interfaces to an x10 thermostat which I don’t recommend. But it would easily work with any WIFI thermostat with an open API or a home made thermostat with an Arduino or Raspberry Pi.

This app also pulls data from yahoo’s weather API and logs it to the database. So now I can correlate external weather to internal thermostat usage over the years. Possibly use that data and compare it to my Utility bills.

The image in the background updates dynamically and is animated.

With both apps, it updates status changes from the back end service quickly. So changes made on one client(phone) reflects to other clients almost immediately. This is great for multi-user homes.

Also these apps automatically scale for mobile or desktop view. Meaning I only have to maintain one code line. The cool part about this is it will act as an end to end solution. It will work and look good on desktops, tablets (maybe on a wall), and phones.

I’ll post my software publicly when I have modified it for easier distribution. If you’re interested in working with it or possibly adding to it, send me your github information.

In this project we explore how to add automatic window control for a relatively cheap price to your car. I have a 2003 civic and due to its age it doesn’t have any of these features built in. It has one touch auto down for the driver window, like many cars. But I wanted auto down and auto up like luxury cars of its period. I also wanted to roll my windows up, or down, from my car’s remote/key fob. Many cars these days in the mid to high price range come with both of these features stock. Not only are these upgrade cool, but they’re useful. For one, just being able to hop out of my car, and hit lock and know that my windows will be up on their own is nice. Also on hot sunny days it’s nice to be able to crack the window an inch or two, or drop them down all the way as I approach to let the car air out.

A pleasant side effect of doing this project is it turns all of your driver side window switches into one touch auto up and auto down switches. The passenger switch will still work but won’t be automatic. IF you wanted the passenger side to be automatic, you would have to run a pair of wire from it, back to this DIE530t control unit.

4680394203_35f77a618c_zLink to the full manual: http://www.directed.com/guides/manuals/ig/accessories/N530T_1-00.pdf

The install is pretty simple so don’t let the instruction manual fool you. Follow the tutorial posted below. One issue with this guy’s tutorial is he decided to pop the door panel and wire this unit closer to the wires at the switch panel and motor. Although this is easier as far as figuring out which wire is which, ultimately it is completely unnecessary. When you open your door and look near the hinges you will see a black rubber tube going from the door to your car. This tube or hose contains all the electrical wiring going to your door panel. If you see my point here you will realize you can wire everything up under your drivers kicker panel behind the steering wheel. All you have to do is find where those wires coming in from that tube goes, and which wire does what. These wires are in a harness that just clips into a connector. That is where you should wire everything from. However popping the door panel to initially trace the wiring is probably the easiest thing.

zzzzzPanelIf you try this project and want to get your door panel off, do yourself a favor and invest in a panel popper. You can get these at your local automotive store, they’re cheap, and because they’re purpose built for doing just this very thing, they work like magic. It’ll look something like one of these on the right.

If you’re too cheap or impatient to get one of these, you can use a butter knife, but you’ll probably break a few tabs. But at the end of the day the door panel will probably go back on fine. They put more tabs than required for a solid fit.

My last bit of advice is instead of tying into an existing 12v source found under your dash, run a wire from the battery. You might already have a wire if you have a subwoofer/speaker amp or a carpc. I found that when I tied into an existing power source, it wasn’t delivering enough amperage, and in cold weather the window motor was under powered.

How-To install DEI530t: http://home.comcast.net/~c_wrzesniewski/windowsmod.htm
How-To then install PAC TR-7: http://www.rx8club.com/series-i-do-yourself-forum-73/diy-auto-up-down-windows-factory-key-fob-168029/
Additional installation instructions and photos: http://forums.clubrsx.com/showthread.php?t=177722

Parts:

Videos of others who have done this project

I’ve had a few people ask me to clarify where the servo actually goes. And as I stated before I planned to do a full, start to finish video tutorial. I still will, but I lied on the timeline. It’s summer, I’m a home owner with many things to do, and I’m a beer drinker with many women to slur at. This blog will be more lively in the winter.

Anyway this blog post with be a live document where I will continue to add more how-to details on the blinds project. I’ve decided to start a new post because my original one was getting very long.

Tutorial #1 – Where does the servo go?

Taken from a photo that a viewer sent me, I’ve updated it with the latest in computer graphics to demonstrate that in my case I had to remove the manual crank, shorten the rod (mine was plastic) and hot glue the servo into one of the spools.

My question/advice was to see if you can turn the rod, by hand, with the manual crank still in place. Is there resistance? If so that means the crank needs to be removed. It’s pretty easy; in my case it’s just held in by clips. Looks the same in this guy’s case too.

20130611_115856One issue with this guy’s set up is where the green arrow is pointing, you can see that the rod is what rests on the brackets/holders. But in my set up, the spool (metal drum.. plastic in my case) has a lip on each end and this is what rests on the holders. So, this guy will have to be innovative to get this to work and I look forward to seeing photos of how it’s accomplished.

 

p.s. I’ve been super negligent in my task of offering a tutorial of this. I just haven’t built anymore yet.

arduino-logo1

I just wanted to do a post giving a big thanks to all those in the arduino.cc community. Every since I’ve posted my project on their user’s WIKI I’ve been getting steadily 10 times the traffic I used to, every day.

http://playground.arduino.cc/projects/arduinoUsers

And I can see that many of them are also looking at my other non-Arduino projects. I would love to hear from the community and know what kind of stuff interests them.

I’ve only been using Arduino’s for a couple of months now but I’ve quickly become addicted. I have some more projects on the way…