Tuesday 20 May 2014

5 things I wish IFTTT.com would support

Having been less than complimentary about blog posts starting with "X things...." I now produce a blog post with exactly that title.

If you haven't heard or used IFTTT yet, you need to learn about it.  It's not an understatement to say that this service, or others like it, could become the backbone of machine-machine (software to software) automation.  For a home automation geek like myself, it opens lots of opportunities.  I'm already starting to use it for processing emails and alerting from my IP garage door project.

However, there are a few things I would love to see IFTTT include on their roadmap....


  1. AND functionality.  For example, I want to combine 2 triggers, so that if both of them are true at the same time, then the action is taken. Example: If you receive an SMS from The Boss AND it's after 6pm THEN reply with "I'll deal with this in the morning"
  2. Add an HTTP POST channel.  This would allow IFTTT to send an HTTP POST request to a web site/script of your choice based on a trigger.  The script (written in PHP for example) could perform, well, anything!  There is a work-around however.  For me, a great use of this would be to auto-generate a credit voucher for CheekySMS when I receive a specific SMS that tells me someone paid for credit.
  3. Introduce a Nest channel :) - I know Nest (Thermostats and Smoke Alarms) are already building an API, so wouldn't it be great if we could get things to happen based on temperature or potential dangerous events in our homes.  WeMo and Philips Hue are already supported so full home automation with IFTTT doesn't look too far away.  X10 aside, a standard home automation protocol has long alluded us, but with a service like this, it becomes less of a problem.  Device manufactures such as Nest, and Philips can focus on delivering great hardware (and APIs) and let services like IFTTT provide the middleware to translate between them all.
  4. Introduce a SIP voice channel - Alerting by SMS or email on your smartphone is all very well, but call me old fashioned, what really gets my attention is when the phone rings!  Just an automated, text to speech service would do!
  5. Introduce a text search capability - By this I mean, provide a specific web page URL to IFTTT and trigger on a content change or a specific item of text within that web page.  Great for alerting based on a price change on your favourite online store, or maybe getting an alert when tickets to a popular concert get released.


If you're using IFTTT already, share your stories, or let me know how you could make use of these ideas.


Monday 19 May 2014

My DIY Garage Door IP Control

It wasn't until I was 100 miles from home that I remembered I'd left the door to my new garage wide open!  There was nothing I could do about it until I got home again 8 hours later, so it got me thinking about a way of controlling it remotely.  I already have a wireless key-fob, but I wanted something with a bit more range and so my search for an IP enabled garage door began.  There are some ready-made solutions by the big manufacturers but they are expensive and somewhat restrictive.

The first step was to see what I could do with the Garador Garamatic 7 electric "motor" I already used (in combination with the key-fob).  Luckily, like all Garador electrically operated doors, it's possible to add an external impulse button to start/stop the door travel cycles.  Effectively this is just an electrical short across 2 connections inside the control unit and is usually used for a push button start/stop or a manual key switch.  See figures 10/11 in the Garador manual.

Next I found an Ethernet connected relay that included an SNMP and HTTP interface, a really nice piece of kit with a thousand uses!  There are a number of these on the market, but this one came from a UK based distributor and most importantly had the HTTP interface/API that I planned to use to pass commands from my smart phone.  Additionally it also had digital inputs on board.  Although this wasn't essential, I figured that being able to sense when the garage door was closed was also quite important - I could have used a webcam I suppose - I might still do!



Lastly, the Ethernet connection to the garage was accomplished (in the short term at least) using a pair of TP-Link powerline adapters.  To my surprise, these worked across multiple RCD units.

The connection to the door motor control unit was made using 2-core cable, into the "Normally Open" and "Common" connections on the Ethernet relay.  In order to start the travel cycle of the door, the relay only needed to close for a second, so the pulse feature of this relay was ideal for this.  For each pulse of the relay, the door will open, stop, close, stop etc but it will also stop automatically when the door reaches the end of it's travel as normal.  During testing, I was using the web interface built into the relay.


Next was the sensor to detect the state of the door.  With the relay having the ability to take digital inputs, I decided to buy a cheap reed switch usually used with household burglar alarms.  The switch was placed in a static location at the top of the door frame, while the magnet - stuck to the door - would travel as the door opened and closed.  It took some trial and error to make sure they were positioned correctly, especially as the working space was very limited when the door was closed.  The wires from the switch could be hidden nicely along the door track with the help of some cable ties.



The reed switch wires came back to the digital input 1 and ground connections on the relay so that when the door was closed, the digital input was high.

That all worked nicely, but I was still controlling and monitoring it all from the web interface on my laptop.  What I really wanted was a quick Android App!  There is a generic app to control the relay available on the Play Store but I wanted something a bit more customised...

I've been using App Inventor since it's early days, and it is more than powerful enough
to code a quick UI with HTTP GET calls to the URL which controls the pulse command on the relay and the URL to get an XML status of the relay.  The XML status contains the status of all elements of the relay, many of which I wasn't using, so I had to parse the output to capture the Digital Input element I was interested in.   I also added a quick "pin pad" login in case my phone ever gets "borrowed".  It's very simple, ugly, but perfectly functional!

There are a number of improvements I will make over time, including tidying up the Ethernet and power connections to the relay.  I could also perhaps add a second reed switch to tell me that the door is fully open.  Therefore if neither digital input is reading closed, I know the garage door must be stuck half open.  However, generally I'm really pleased with the result, never again will I be caught out, miles from home wondering if I shut the garage door behind me!

UPDATE: I've now added a 1-Wire DS18B20 Temperature Sensor which I purchased on ebay, to the relay via it's dedicated 1-wire input pins.  It really was plug and play, and now I can also read the temperature in the garage.  You will need this DS18B20 pinout....





Tuesday 13 May 2014

A call out of the blue

A few weeks ago, I had a call on my mobile which showed a local number.  I didn't know the number but answered anyway to hear the voice of an elderly sounding gentleman asking for me by name.  My suspicions are always aroused because this is how most sales calls start, but not this one.  He had my number because I had given it to him on a scrappy piece of paper at the roadside a couple of months previously after I witnessed him and his wife in a car accident.  Having been involved in an accident myself where I was not to blame, I wish someone had stopped for me and offered their independent view point.  Had there been witnesses to my accident,  I would not have had the hassle and the expense of fixing someone elses mistake.

So after we'd established who he was, I discovered he was simply calling me to say "thank you".  His insurance claim had since been finalised and he told me he'd given up driving.  He said it wasn't because of the accident, but I suspect it was certainly a factor.  It got me thinking about how the actions of random people can have such an impact on our lives.  Sometimes we notice it, but I am sure there are many times when small random actions by strangers go on to change the course of our lives without us even noticing it happening, or having a chance to "thank" them.

Monday 12 May 2014

10 things most annoying about lists of 10 things


1. Lists of 10 things that contain more adverts than content.

2. Lists of 10 things that take you to websites that you probably shouldn't be visiting on a work computer.

3. Lists on websites that contain more lists that look like they could be interesting - see point 1.

4. Lists of 10 things that suck you with enticing offers of things you want to read and then utterly disappoint you with irrelevant content.

5. People who think you can achieve inner peace/work with a difficult boss/save your marriage by reading a list of 10 things.

6. Getting to the end of lists of 10 things without finding one you like.

7. People who post lists of 10 things on Facebook.

8. The fact that lists of 10 things seems to be the new way to blog about anything.

9. Lists of 9 things, when you were promised 10.