Change a bulb color when I have missed calls and I'm at home

34 views
Skip to first unread message

helio....@outsystems.com

unread,
Jul 17, 2019, 10:29:29 AM7/17/19
to Apilio
Hi all!

So I've just started playing around with Apilio and I have successfully deployed and tested some scenarios but now I'm struggling with one of them.

I want to change a bulb color when I have missed calls and I'm at home but I don't know how can I achieve it.

I was thinking in performing the following steps:
1. If Android Phone Call missed set a boolean variable in Apilio - missed_call
2. If Android Phone Call missed, check location and set a boolean variable in Apilio - location  <-- This is what I can't do!
3. Evaluate missed_call and location to true, trigger an IFTTT applet with the evaluate url
4. Create IFTTT applet to trigger the bulb

Can you help me on step 2?

DrivingForce

unread,
Jul 17, 2019, 10:43:01 AM7/17/19
to Apilio
Do you have anything like life 360 or Samsung smart things. You need to use iffft web hook to Boolean tell your logic Block you are home.

I'll explain better when home

helio....@outsystems.com

unread,
Jul 17, 2019, 10:47:23 AM7/17/19
to Apilio
I have Life360 but not SmartThings.

"You need to use iffft web hook to Boolean  tell your logic Block you are home"
True but when? The trigger (Android Phone Call) is always the same for all 3 actions (set missed call, set home and evaluate) and it will not happen necessarily in the right order

DrivingForce

unread,
Jul 17, 2019, 11:11:19 AM7/17/19
to Apilio
This is what i have done.

1 Created a Boolean variable called home
2. Created a New Condition for Boolean called home with rule must be true
this will now show up in your logiblock

On IFTTT create a applet for life360 if first family member arrives send webhook and use the true value in the Boolean value web. If specific to you then i would use arrive at specific place.
Then creat another applet for when you leave to set it the home Boolean to false

Hope this makes sense and helps


helio....@outsystems.com

unread,
Jul 18, 2019, 8:50:54 AM7/18/19
to Apilio
This makes total sense, thank you for your answer!

The only thing missing is the last trigger....Assuming I already have my location stored, if I use Android Phone Call to set the boolean "missed_call" I still need another trigger to evaluate the logicblock, if I use Android Phone Call again I will never know which one is executed first.

Am I seeing something wrong?

Philipp

unread,
Jul 18, 2019, 11:35:22 AM7/18/19
to Apilio
Hi there,
I'm not sure yet how to help you, because I think I haven't fully understood your use case.
Can you elaborate a bit more on that?
- How many phones are involved
- Do you only want to check for the presence of one person?
- When exactly should the color change? (e.g. when you are at home already? or half an hour after you arrive home?

Cheers
Philipp

DrivingForce

unread,
Jul 18, 2019, 5:04:47 PM7/18/19
to Apilio
in the logiblock tick the box next to  Evaluate this logicblock when any connected variable changes. So if you get a missed call the web hook from IFTTT will change you boolean from False to True. If you are home. This will make your logic block send a webhooks event to IFTTT to change your light colour.
You can also set a webhook event for turning the light back ot its normal colour after 30 minutes, or what ever you prefer

helio....@outsystems.com

unread,
Jul 19, 2019, 10:25:40 AM7/19/19
to Apilio
I solved it. I was over complicating....I don't need the missed_call variable....

Applet in IFTTT that when I arrive home sets boolean to true and another that sets it to false when I leave

Logicblock that evaluates if that boolean is true and if positive set bulb color

Third Applet that when Android Phone Call missed calls logicblock

Thanks for your help! The location tip really helped!
Reply all
Reply to author
Forward
0 new messages