Computer Shopper - UK (2020-03)

(Antfer) #1

122 MARCH2020|COMPUTER SHOPPER|ISSUE385


HELPFILE&BUSINESSHELP


Last month (Helpfile384), you helped me
use If This Then That (IFTTT)toturn off my
TP-Link Kasa smart lights when our Ta do
smart thermostat detects that the last
person has leftthe house. Encouraged by
this, Idecided to create aWelcome Home
scene where the hall lights go on, and
configure it to activatewhen the first
person returns. It works great, except that
the lights ping on even if it’s middayand we
don’t need them. Is there away to add a
condition to the IFTTT applet, along the
lines of,‘If we return home and it’s between
certain hours, activateWelcome Home’?
Nick Barnes

Youcan introduce conditions to IFTTT actions,
but it quickly gets complicated. Youcan add
JavaScript filters that modify atrigger’s
behaviour,for example preventing it
completing during certain hours, but abetter
solution would be to link the trigger to sunset
and sunrise.You’d think that would be easy,
but the only waywecould get this working
reliably was with the help of an API created
by the Reddit user UsedJeans.
To get it working, you need to configure
an IFTTT trigger that sends aweb request to
the API, and another that acts on the reply.
Start by logging intoIFTTT,searching for
Webhooks, clicking Services, then connecting
the Webhooks service to your account.
Now visit the settingsfor the service,and
copyyourtoken ID,the long collection of
numbers and lettersatthe end of the URL
shown on the page.
Visitifttt.com/createand createatrigger
forwhen the Tado service switches to
Home mode; you can base this on any zone.

Ifthat,thennow what?

Createthe associated action in Webhooks,
writing in the following URL:

https://www.eugene-vps.com/ifttt/nighttime.
php?latitude=51.476900&longitude=-
0.000500&event_on=Welcome_
Home&ifttt_token=YOUR_TOKEN

You’ll need to add in your Webhooks token
at the end, and you maywish to change the

latitude and longitude to
somewhere nearer than the
Greenwich Observatory,although
we’d advise against making these
so accuratethat theyindicate
your exact location. Now change
the Method box to POSTand
click Createaction.
The final step is to createthe
second IFTTT trigger,this time
using the Webhooks service and
‘Receive aweb request’.Use
Welcome_Home forthe Event
name,createthe trigger,and
createthe associated action in
the Kasa service to activateyour
Welcome Home scene.
Youshould now find that when
you return home,Tado triggers a
Webhooks action to query the API.
If the sun has set in your location,
the API returns aweb request that
is picked up by the Webhooks
trigger,which in turn activates
Welcome Home mode in Kasa.
If this doesn’t work properly,
troubleshoot each applet by looking in their
settings page.This will tell you if theyhaverun
at all. If only the first applet with the Tado
trigger has run, check that you typed the URL
correctly and added your own Webhooks
token. Check also that the event name you
used in the URL matches the one you used in
the second applet’s Webhooks trigger.Bear in
mind this solution depends on athird-party
API; ifitdisappears, it will stop working.

Stoppedstarting?

⬆You can switch offthe Start menu’s app list. But why would you?

My Windows 10 PC has developed an odd
problemwherebyeverything has disappeared
off the Start menu. I’ve noticed that, at the
topofthe left-hand section, there are now
icons forPinned tiles and All apps, and
clicking the latter brings up the apps I’d
expect to see normally.Idon’t use the
pinned apps feature,soI’d just like to see
all of the Start menu’s contents when Iopen
it. Is there away to bring it back?
Terry Moffatt

Fortunately,this is an easy problem to fix,
although the option is somewhat hidden.
Open the Start menu and click the gearwheel
to bring up Windows Settings, then search for
App List. Click Show app list in Start menu,
then look in the Start menu options screen
to enable the feature.Now you’ll see the full
Start menu again, and the Pinned tiles and All
apps icons will have disappeared.

⬅Hasthe sun gone down? You may
need toquery athird-party API
Free download pdf