It's dark, I'm arriving home, turn lights on....Please

It's dark, I'm arriving home, turn lights on....Please
0

#1

Logicblock to turn lights on when arriving at home at night only

Message

Hi! I am trying to configure a logicblock that turns my lights on when arriving home only at night.

For that, I use IFTTT with WeatherUnderground which makes a webrequest to apilio when it’s Sunset. I linked it to the Boolean variable call “Night_Time” with the link related to “Set True”. I’ve also done the same thing with sunrise related to “Set False”

I also use Life360 for the location. So IFTTT makes a webrequest to Apilio when arriving Home. I linked it to the Boolean variable call “At_Home” with the link related to “Set True”

Then, I add my two Boolean variables to the conditions section in Apilio with the required state “True”

I’ve created a logicblocks called “lights_on_dark” linked to conditions: it_at-home, it_night-time.

In IFTTT, I created a Webhooks applet : If Maker Event “lights_on_dark”, then activate a scene in Smartlife app (my lights).

When I click on the evaluation trigger link in Apilio, it works. But in practice, it doesn’t work. Also, the WeatherUnderground states that the Sunrise is at 10:35PM, which is not correct, too late.

Is there a way to make it work? What did I do incorrectly? Can I ask for a specific lapse of time instead of sunrise and sunset ?

Thank you for your help

Response

Sounds all quite good, but you can make it a bit simpler:

  • The “Night_Time” Boolean variable is perfect - Instead of the Life360 Applet setting a variable, you can re-configure the applet to call the Logicblock evaluation link (you find it at the bottom of the Logicblock page) - As a consequence, you can delete the “At_Home” variable / remove it from the Logicblock

This should then work as expected.

IFTTT has a “Date / Time” Applet that you can use instead of the WeatherUnderground sunrise/sunset.


#2

Hi I m tring to use this logicblock

But I don’t understand this last step:

In IFTTT, I created a Webhooks applet : If Maker Event “lights_on_dark”, then activate a scene in Smartlife app (my lights).

Can You please make me a step-by-step guide


#3

Hey Edoardo,

  1. After a Logicblock is evaluated it may, or may not, run an action - depending upon the result of the Logicblock evaluation
  2. The action described above is to trigger a Webhooks call to IFTTT - this Webhooks call runs a specific IFTTT Maker Event called “lights_on_dark” in IFTTT
  3. The Maker Event is the “IF This” side of the IFTTT Applet and will receive the Webhooks call from Apilio. You’ll see you need a name for the Maker Event in IFTTT as you setup the Webhooks call side of the Applet and that name must be identical in both IFTTT and Apilio for the correct Applet to be triggered. The field in Apilio is called “IFTTT Webhooks Service Event Name”.
  4. The “Then That” side of the IFTTT Applet is activating a scene in Smartlife.

Hope that makes sense.


#4

My problem is that the Webhooks call from Apilio don’t work. there could be a problem on the trigger of Webhooks call? also If I try to test the action from the “show” page of Logicblock it don’t work.


#5

Solved My problem was in the configuration of IFTTT Key.

sorry for disturb


#6

No worries, we’re glad you got it fixed!