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.

Tuesday, 11 March 2014

Discussing broadband over the garden fence

A recent article in the online Telegraph about seeking better broadband speed, had me shaking my head. The news often does this, not because the subject makes me sad but because of the inane, dumbed down way it is presented.  In this case, it's the advice given that gets me typing.

Read the article if you like but I have paraphrased it here for you:
Question: Does broadband speed on the same exchange, vary between ISPs?
Answer: Yes, ask your neighbours for their recommendations.

All other things (internal wiring) being equal, I agree that the maximum (sync) speed you will achieve is going to be roughly similar to that of your neighbours, but ask your average neighbour for their opinion of their own Internet Service Provider and you will probably get such a biased, subjective view, it's almost not worth boiling the kettle.  It certainly is not advice I would be offering in a national newspaper column.

So if speed is not the end game, what else should you be looking for in an ISP?  For me, the biggest factor is consistency and quality, things that are much harder to measure and therefore advertise.  So if you do find an ISP that manages to measure and publish these things, surely they are worth a look.

I don't work for Andrews & Arnold (although they seem like a company I would like to work for) but I have recently become a customer of theirs, based purely on the fact that they provide measurable quality of my connection.  They have nothing to hide behind, and no basis for excuses when something isn't quite right.  Rarely have I found any service provider (Internet or otherwise) where I am confident that they are aware of something not being "quite right", before I am.  I hesitate to say "problem" because a problem occurs after something has gone wrong.  Measuring quality is about trying to prevent problems occurring in the first place, or catching them early and having the data to evidence it.

I too measure some aspects of my connection.  It may be basic, but the graph below proves to me that the consistency of throughput has improved considerably since my swap.

See if you can spot where I changed ISP!
More subtly shown here, but of arguably higher importance, is the reduction in packet loss too.
Even when averaged over 1 day, a packet loss reduction is clearly visible.  So clear that I circled it in blue!

So why isn't everyone using A&A?  It seems the vast majority do not have sufficient technical interest to care about how their ISP works or that it works well.  It's also because we have been conditioned (often by BT themselves) to expect something for nothing - £5 per month for 6 months is their current offer - but broadband is not a commodity like gas and electricity, it is just as important to many people, but the product you get out of the pipe is not the same quality and therefore not the same price - If you want broadband advice, and you don't live next door to me, read the educated, industry press!

Tuesday, 13 November 2012

Google Nexus 4 available, Play Store - not so much

08:12 or thereabouts, Google pressed play on the sale of the Nexus 4 in the UK.  From the online noise in the preceding days it was quite obvious there was going to be a rush.  Anyone waiting for the polite "Notify Me" email to tell them the shop was open, has probably missed all the boats leaving today.

The Play Store didn't handle the rush too well to start with, it took me multiple attempts to get the device in my basket and check-out, and even now I have an order number, I'm not totally convinced the order has gone through!

I saw this a lot


Being the self-confessed geek that I am, I was also monitoring the Play Store to get a heads-up on when it opened for business (using PRTG HTTP Advanced Sensor if you're interested).  This graph shows how the server response times were steady all night, right up until the device went on sale!


The scale is in milliseconds response time to download the Nexus 4 16GB product page.

Wish me luck in trying to find out if I have a new phone in the pipeline, or if I have to join the back of the queue...

UPDATE: You'll be pleased to hear, I've received an email confirming my order :)

Sunday, 28 October 2012

EE Fails to Launch 4G services in the UK

On Tuesday, the company formally known as Everything Everywhere launches the first wide-scale, commercially available 4G service in the UK.  You might have heard about it.

After announcing monopoly-scale pricing and tiny monthly data limits, Pippa Dunn, Chief Marketing Officer at EE reveals that the logic behind their calculation is flawed in the first place.  She explains they are based on habits of their existing 3G customers!  If that logic were valid, I'd still be typing this on my Spectrum 128 +3 (look it up).

I think someone may have let the accountants at EE over-rule the common sense department because the user backlash has started before anyone has flicked the On switch.   It's not the way to market and run a high-speed carrier service.  Except it's not high-speed is it?

The only thing that is launching this week, is the fact that EE have turned on a higher speed air interface to the user.  That's because the back-haul and core network that connects the 4th Generation masts to the Internet is the same one that users have been moaning about since the 3rd Generation of technology was hitting the headlines.  It's also the same one that the carriers themselves have been moaning about because they know it's already over stretched.  That's why they all offer free WiFi packages - It's called WiFi Offload - EE are already encouraging it before they've even launched!

It's not just me, the launch of 4G in the UK was seen by many other users as a potential saviour for their poor fixed line broadband speeds.  Yet the complete lack of vision from EE seems to have put that idea to bed already.  As far as I can see, it's very much a deliberate move by the company.  They simply don't want to offer a fixed line replacement broadband service because apart from the bit between the user and the mast, the rest of the EE network really isn't 4G ready.

The remaining operators who must wait to buy their slice of spectrum, should watch and learn and do it right first time, if they want to.






Monday, 28 November 2011

Ebuyer goes titsup for Next-style bargain hunters

Downforeveryoneorjustme.com showed Ebuyer as down this morning
Virtual queues were forming around the block from as early as Saturday, when Ebuyer decided it was a good idea to offer many of their products for just £1, and the virtual stampede has caused it's first victim - The whole Ebuyer.com website!  Not the best marketing ploy ever devised for the start of the Christmas shopping season.  Because not only is it stopping the angry crowd from getting their God given bargains, but most normal punters are heading off to Dabs and Maplin as we speak!  Ebuyer have successfully created their own DDOS attack!

Just 20 minutes after the page went live, Ebuyer have posted this message on their Facebook page:
"Hi all, thanks for your patience. We've been overwhelmed by the huge response and are working on getting the page back up and running as soon as possible."

We asked Ebuyer for a comment but they were too busy turning it off and on again to get back to us.

EDIT: At 12 noon today, 1.5 hours after the first punters were shown the bargain goods, the site is still down! Oops!  Their Facebook page is full of friendly comments.

Friday, 25 November 2011

The Best Web Hosting

Update June 2020:  I am no longer a customer of Hostgator and neither do I recommend them.  I prefer the smaller hosting companies, and I'll be updating my blog with my new recommendations soon.

I currently run several websites for various ventures and had been looking around for a reliable web hosting service for some time; and if I've learnt something, it's that the best web hosting companies are not always the small players or the very big players.  In fact you can disregard what platform they use to host on, where they are based (it doesn't matter any more if they are European or US based) and how much free space you get.  If you want to find the best web hosting package, the most important single factor to consider in my opinion is the quality of support, and I'll explain why.

Many hosting companies offer the world for $1 a month, or £1.99 for the first 2 months, but if the staff don't have their heart in the company, then the service will ultimately be poor.  Many comments online tell you that if you pay next to nothing, then you should expect the same.  They also say that Unlimited offers of bandwidth and space are a bad idea because it means the platform hardware is likely to be oversubscribed.  However, all this means is that the support staff will get more complaints of slow service and the staff are likely to care more about what they are having for dinner than about your hosting experience.

 It may be that you never intend to use the hosting company support desks, and most of us hope that we won't have to, but if the hosting company has motivated and capable support staff, it says a lot about the quality of the service itself.  No one likes to be moaned at day in, day out, so a high turn over of staff = more service.  Take the top 3 "best web hosting" companies that pop up all the time.  Hostgator, GoDaddy and in the UK, Fasthosts.  Now look at what they offer.  The all offer the same sort of packages, and all of them could be considered "cheap" hosting.  But look at the comments on support services, and you'll see that Hostgator are consistently praised for their support.  In my book, that's good enough to recommend them.  Aligned with the fact that they have some good offers on Black Friday deals, I don't think you can go far wrong.  I am affiliated with them, but only because I love the product and want others to benefit from my research and experience.

Tuesday, 25 October 2011

International Characters with PHP and MySQL

I'm currently writing an android application that pulls data from a MySQL database via a PHP script "API" and have come up against a problem whereby text that contains international characters with accents are replaced in my app with a question mark.  Fraçais comes out as Fran?ais.

After a fair bit of Google abuse and knowing that the solution lay somewhere in a UTF-8 character set, it came down to 2 things, and I thought I would share the solution for those who might also be struggling.

Firstly, I defined the utf-8 character set in the header response of my PHP API script:



header('Content-type: text/html; charset=utf-8');


That didn't work on its own, but it did solve the issue for characters that I manually echo'd from php, so I knew the problem had to be with the database.


I also had to define the character set for the database connection:



mysql_set_charset('utf8');


I defined this right after the connection to the database is made so that it applies to the last made connection.  You can also define a specific connection.









Saturday, 22 October 2011

Zen Internet Offers 832Mbps ADSL Upload Option for £45 a month

It seems Zen Internet are really pushing the boundaries of ADSL broadband by offering an amazing 832Mbps upload speed on the business broadband service!  We contacted Zen for a comment and were told that "this is just the headline speed, we don't expect many people to actually achieve this", especially as it is faster than most  everyone elses download speed.  I'm sure the ASA would have a field day, or maybe it's just a typo ;-)

Tuesday, 2 August 2011

Virtualbox high CPU usage - a solution

I've been playing around with Virtualbox recently to host an Asterisk PBX on my Windows 2003 server.  Asterisk (or more accurately, Trixbox) comes as an ISO and uses CentOS flavour of Linux.  However, I've noticed - as have lots of other people - that the Virtualbox process uses quite a lot of CPU even when nothing is actually happening.  After some searching and a few failed solutions, I've come across one that works very well. I've set up another virtual machine in Virtualbox, set the base memory very low (4MB) and set it running.  It doesn't boot up with any OS, it just complains and fails about not having a boot disc, but strangely it drops my CPU on the server from 17% down to a more normal 2%.  Trixbox runs just as smoothly as it did before!

Friday, 1 July 2011

How to reset Motorola WiNG 5 Controller to Factory Defaults

I searched and searched so you don't have to!  If you want to reset the password on a Motorola controller running WiNG 5, you need to connect to the console and login as "reset / FactoryDefault".  No need to thank me!  Really, they should make this information more readily accessible...!

Sunday, 29 May 2011

An alternative to iTunes Software

Like millions of other people I own an iPod. I bought it a few years ago, not because I feel the need to own everything with an Apple logo on it,  but because it's small, very portable and because I like the ubiquitous support for car connections and the myriad of accessories.   In short it's the ecosystem around the product that makes it so attractive, not what Apple created in the hardware. And it's certainly not what Apple have created in the software either.

I dislike the perceived requirement to buy into the whole Apple experience just to use my 8GB music player, and iTunes is the pinnacle of my dislike.  I'm not going to get on my box about how inflated and overpowering the software is, because I don't need it.  I don't buy music from Apple and I have a product that doesn't support video or Apps, i just want to put music onto my music player and have it do the job it was made for.

So I wanted to share an alternative called SharePod. Now I don't have any affiliation with SharePod or its author but if you too own an iPod for the purpose of playing music, then I recommend you download it and try it out.  It's free, lightweight, and you don't even have to install it, it works straight off as an executable.  I like the no nonsense way it instantly displays the music already on the device,  and allows me to drag and drop my DRM-free mp3s onto it.   You do still need your proprietary white cable though!

Sunday, 22 May 2011

Here we go again?

It seems another Icelandic volcano called Grimsvotn has started erupting last night. The airespace in Iceland is closed (justice!) but the ash cloud is heading in a north westerly direction at a height of 12KM so it shouldn't impact European flights if it stays like that.
The Met Office shows the ash cloud from volcano Grimsvotn

Here we go again? I doubt it.