PC Pro

PAU L OCKENDEN

Paul Ockenden investigat­es online glue, some kit that’s blue and a linguistic snafu

- Paul owns an agency that helps businesses exploit the web, from sales to marketing and everything in between @PaulOckend­en

This month, Paul investigat­es online glue and recommends some kit that’s blue, before getting into a linguistic snafu.

Regular readers will know of my fondness for IFTTT (IF This Then That), an online glue that you can use to link numerous devices and services together. People often believe it’s just for switching on the lights and other home automation tasks, but IFTTT goes beyond that.

For example, I use it to log to a Google spreadshee­t every time my phone goes on and off charge, recording the time, the charge level, and the charge type (AC or USB). So, if someone asks me about battery life, I can back up my answer with real-world evidence. More usefully, perhaps, I also use IFTTT to send me an alert if the share prices of the stocks in my ISA start to tank.

IFTTT is an incredibly simple system, but that simplicity is both its strength and its weakness. For example, I might have a rule that says “IF my burglar alarm is set THEN lower all of my room temperatur­es by five degrees”. After all, who wants to pay to heat an empty house? But then what if there’s washing drying in the laundry room? Stuff dries better in a warm room, so ideally I want a secondary input to my rule that checks the humidity using a sensor, or perhaps monitors the electricit­y consumptio­n of the dehumidifi­er, and then cancels the heating override in certain rooms. So what I really need is IF this AND that OR something THEN do this AND also do that EXCEPT when whatever. With bog-standard IFTTT this just isn’t possible. It handles a single input and a single output.

The powers that be at IFTTT Inc are aware of this weakness, and have long had plans to expand the flexibilit­y of the tool. In fact, this has already rolled out for manufactur­ers and service providers that have integratio­ns using the system – and it has recently been opened to public sign-ups too; just visit platform.ifttt.com/maker. But when you do, you’ll find that flexibilit­y still isn’t great. You can have multiple actions, but things will only kick off from a single trigger. It’s clunky too, requiring you to write screeds of JavaScript if you need to do any filtering.

However, there are some neat hacks you can use to work around IFTTT’s limitation­s. Suppose you want to fire off multiple events after a certain trigger. Rather than using one of the new Maker Tier applets, you can instead call on the integratio­n that IFTTT has with Gmail, which can look for certain words in an email. So you’d set up an initial rule for the primary trigger that sends an email to yourself, containing an obscure trigger word (something that you won’t ever find in a genuine incoming email), and then have a number of other rules that look for that key word and fire off various actions. It works well,

and with hardly any lag. Plus, the emails – which you can easily filter into a folder so they don’t bother you – provide a record of what’s actually happened.

If you want to go further, the next step is to use IFTTT’s Maker Channel. There are two different things in IFTTT called Maker, which can cause some confusion. First, there’s a facility that’s been around for a couple of years now, which uses webhooks to extend IFTTT – you’ll find it at ifttt.com/maker_webhooks, and that’s what I’m talking about here. Second are the new extensions to IFTTT mentioned above, where you can have multiple actions, and they too are called “Maker” – in this instance, it’s Maker Tier. Both are aimed at different ends of the market: the Maker Channel is aimed at enthusiast­s and hobbyists; the Maker Tier has big companies in its sights.

The Maker Channel was designed for connecting web-enabled gadgets to IFTTT using simple web requests. For example, the coat-bot I wrote about last month could use the Maker Channel to turn on a porch light if the weather is likely to be poor. It would simply call a special URL of the form maker.ifttt.com/trigger/event_name/ with/key/secret_key, where “event_ name” is whatever you called your IFTTT applet (the new name for recipes, the routines in IFTTT) and “secret_key” is something you’re given when you initially connect the Maker Channel to your IFTTT account.

Interactio­ns can also work the other way round, where IFTTT can make GET or POST requests to a specific URL, including a payload, when a trigger happens. It’s all about using HTTP requests as both triggers and actions.

Now that’s all well and good, but how does that give us access to multiple triggers and multiple outputs? Well, the obvious way is to write a script using PHP or whatever flavour of web programmin­g language you prefer. You can then create complex multiple trigger code using ANDs and ORs, and fire off multiple actions. It’s easy if you’re used to web scripting. But what if you aren’t?

Thankfully, there are a few online services that can help. I’m not going to list them all (Google is your friend here), but some that you might come across are Glitch ( glitch.com), Apilio ( apilio.io) and Conjure ( beta.

conjureapp.com). The latter is the slickest option by far, but as you’ll see from the URL, it’s currently in beta so you need to sign up and then wait to be accepted onto the test programme.

Many of these systems offer multiple outputs, but it’s the multiple triggers that can be tricky. The system that the Marker Channel talks to (or your own script, if you code something yourself) needs to maintain the current value of each input. In the laundry room example that I proposed earlier, for example, if the humidity goes above a certain level then we need IFTTT to cancel the heating override, but only if the house alarm is set. And that might have happened hours ago. You need some kind of state database behind the scenes.

String theory

If that all sounds a bit “hacky” then there’s a more recent competitor to IFTTT that offers far more flexibilit­y. It’s called Stringify, and you’ll find it as an app for Android or iOS devices. There is a website, but it’s just for informatio­n; unlike IFTTT, you can’t use the system from a web browser – you have to use the apps.

As is the case with IFTTT, it integrates with various third-party systems. Unfortunat­ely the list of “things” isn’t quite as big as with IFTTT, but that’s partially solved by the fact that one of the things it will talk to is IFTTT itself. This doesn’t mean you get instant access to all of the devices connected to your IFTTT account; the only communicat­ion between the two system is triggers and actions.

Some third-party integratio­ns are better thought out in Stringify than they are in IFTTT. A great example is the way both systems talk to Google Calendar. With IFTTT, you’re able to trigger an action when an event starts (for instance, I use this for detecting when I have a day off and making sure my house is comfortabl­e). But Stringify allows you to set a trigger in advance of an event. So, for example, you could create a routine that looks for meetings in the boardroom, and switches on the heating an hour beforehand. Or, conversely, turns on the aircon instead.

There’s a lot that you can do with Stringify compared to IFTTT, and that’s probably best exemplifie­d by one of the example flows (for that’s what they’re called) listed on the Stringify website. It’s called Smart Alert, and it looks for either a motion sensor being activated or a door contact opening, but only if you’re not at home (it uses geolocatio­n) – and if it triggers, it will call a phone number and turn on a light, before turning it off again after five minutes.

You couldn’t do this with IFTTT, but with Stringify it’s dead easy. The visual interface consists of a grid of circles. Each one can contain a “thing”, and these are linked together to form a “flow”. You then link them together using drag and drop.

“You can write a script using PHP, and then create complex multiple trigger code to fire off multiple actions”

Each of the circles can either be a trigger or an action, and you can join them in either an AND or an OR manner (in Stringify parlance, they’re ONLY IF triggers and WHEN triggers). I find that this is the only part of the system that isn’t intuitive. For ONLY IF triggers, you have to drag secondary conditions over the link, rather than over the action. It’s fine once you get used to it, but it isn’t immediatel­y obvious.

Another annoying quirk is that there’s no way to delete an existing link between a trigger and an action – you must delete one of them. It’s odd to find such silly limitation­s because, in all other respects, the interface and user experience are excellent. Hopefully the product will continue to mature, and also to add integratio­ns with many more third-party systems. Oh, and a web interface would be nice, too!

Always buy the blue one

PC Pro subscriber Liam Scott contacted me recently because he wanted a cheap network switch to put under his TV to connect up his various media boxes, and plug them into a single 1,200Mbps AV2 HomePlug adapter. He said he’d looked online for an eight-port switch and found the range of kit available quite confusing.

I know exactly what Liam means. I wandered into my local branch of PC World and counted six different eight-port switches on the shelf. And there was very little on the boxes or shelf tickets to distinguis­h the £50 one from the £8 unit.

I’ve always been a fan of Netgear switches, but even with this brand the options are numerous. On the Netgear website right now, I can see 11 eight-port switches. Some are metal, others plastic. Some have a year’s warranty, others a lifetime. Some are managed, some web-managed, others unmanaged. Some are Fast Ethernet, others Gigabit.

Which brings me neatly to Paul’s simple rule for selecting small and simple network switches: “always buy the blue one”.

Actually, it isn’t quite that simple since there remain a couple of options even then, but the “blue ones” I’m referring to are the switches from Netgear’s ProSafe range. They’re built like tanks, use much higher-quality internal components than the non-ProSafe switches, and have a lifetime warranty (except for the external wall-wart PSU that comes with just two-year’s cover). I’ve owned cheap switches from other brands that overheat, or that lock up after a week or so and need rebooting. But I’ve never found (or even heard of) such problems with switches from Netgear’s ProSafe range.

In the under-the-TV situation Liam describes, he won’t require features such as management, but it’s essential that he buys a switch without a cooling fan to reduce the possibilit­y of noise. So his choice is basically the FS108, an older model that can handle Fast Ethernet; or the GS108, a newer version whose ports can also handle copper Gigabit connection­s. It’s the same across the whole range: FSxxx handles 10 and 100Mbits/sec, whereas the GSxxx models add 1,000Mbits/sec to the mix.

Obviously, to cope with Gigabit speeds you need suitable equipment at both ends – as well as good-quality network cables – or else the connection will automatica­lly drop back down to a lower speed. But a copper Gigabit switch will quite happily talk at Fast Ethernet speeds, so the GS model will do everything the FS can.

At the time of writing, Amazon lists the FS108 at £28, while the GS108 costs £30. That makes it a bit of a no-brainer as far as I’m concerned – just pay the extra couple of quid and get the faster one. Even if you can’t use the extra speed now, it’s useful insurance for the future.

Incidental­ly, Netgear’s rival TP-Link sells an eight-port switch that looks remarkably similar (even down the blue paint-job), but rather than my recommende­d GS108, the TP-Link one is called SG108.

Peak Chinglish?

Finally this month, like most people I enjoy a good laugh at badly translated instructio­ns, but I think I may have discovered peak Chinglish recently.

I bought a tiny camera – about the size of a sugar cube – called an SQ11, from one of the usual Far East export websites. The supplied instructio­ns are a fantastic example of this genre, and unfortunat­ely this makes the camera pretty much unusable – it’s impossible to work out what’s going on!

Unless, of course, someone can explain to me what this means: “in the red and blue lights normally on 1080 p video mode, long press the mode button for 3 seconds flash 3 red, blue lights flash 3 after a long bright red into the open mobile video mode, both have to detect moving object, red and blue lights flash for 1080 p mobile video at the same time. a period of five minutes automatic packing to save, don’t cover, cycle cover, without moving object standby until electricit­y or T card record so far.”

What on earth can you make of that? My sister observed, “It’s all about the difference between pressing the mode button for three seconds and long pressing the mode button for three seconds, but don’t throw away the box if it’s automatic, and you do need a bike cover. At least, I think that’s what it says.”

In many ways, I feel bad laughing – after all, at least they tried. And I’m sure my attempts at using automated translatio­n for stuff in their language would be even worse. But this still doesn’t change the fact that I’d like to be able to actually use my new camera. Now, if you’ll forgive me, I’m just off to long press a blue light.

“I’ve owned cheap switches from some brands that overheat, or lock up after a week or so and need rebooting”

 ??  ?? ABOVE The Stringify user interface allows you to create flows using drag and drop
ABOVE The Stringify user interface allows you to create flows using drag and drop
 ??  ??
 ??  ?? BELOW IFTTT has a huge range of triggers and actions available
BELOW IFTTT has a huge range of triggers and actions available
 ??  ?? ABOVE Paul’s simple rule for selecting network switches: “always buy the blue one”
ABOVE Paul’s simple rule for selecting network switches: “always buy the blue one”
 ??  ?? BELOW Can anyone tell me how to use my new camera?
BELOW Can anyone tell me how to use my new camera?

Newspapers in English

Newspapers from United Kingdom