Call a logicblock from a logicblock

I found that I sometimes want to call a logicblock from a logicblock. To do that now, I have to do a webhooks to IFTTT that calls the logic block. There’s an example of what I’m talking about buried in here: iused2besmart DOT wordpress DOT com/2019/09/04/using-ifttt-and-apilio-v2/

I could be using apilio wrong and there might be a better way to do what I did (suggestions welcome).

1 Like

We should be able to ad links here :frowning:

1 Like

Thanks Jim, completely unintentional as we’re still learning the Discourse ropes! Have adjusted settings now so you should be OK from now on. And thanks again for posting!

Should I be able to edit a post I make? I can’t figure out how.

There is a little pencil icon below your message that should allow you to edit. Can you see it below your messages? Thanks!

1 Like

I don’t see it

Actually there seems to be a minimum “trust” level before one can edit ones own posts. I will take a look. Thanks for raising @jrmckins!

Probably a wise idea to not trust me.

1 Like

I second the request, call a logicblock without the need of go to IFTTT would be great, and in adition also the possibility of update the value of a variable directly from apilio logicblock

6 Likes

I would also find this useful. Having to send a variable to IFTTT in order to update a second variable seems redundant, but I’ll happily keep doing it if that’s the only way.

2 Likes

Hello! I’m new here, but this is what I came to ask about!
If it was possible to call an Apilio logicblock as an action instead of an ifttt action.
I’m doing sort of a complicated chain of blocks in the free trial (6 conditions, 10 logicblocks, and 18 ifttt actions) to cycle through different lighting scenes with the push of a smart button. I got a little carried away with the testing spamming my smart button and I was suspended for 5 minutes… lol!
So now that’s got me thinking of how I can make my creation much more optimized and faster going back and forth between ifttt and apilio as little as possible. I think half my ifttt applets are initiating an apilio logicblock from an apilio action. strictly Apilio ifttt applets.
Any advice? Thanks in advance!

3 Likes

Hi @Caustik,
you probably managed to create an endless loop :smiley: That was the initial reason why there is no direct chaining in Apilio.
We are aware that many users do chaining via IFTTT (which is fine), but we have not implemented an internal trigger yet.
We have sped up development of new features in the last couple of weeks and this request is among the top of the development backlog. But I can’t give an ETA at the time.

2 Likes

Thanks for the quick reply!
I think Im just going to have to get creative! :slight_smile:
I’ve already minimized my blocks and ifttt actions, but now I think I just need to sleep on it.
Exciting news about internal triggers being in the plans!
I’m sure I will be subscribing once my trial is up, Im having a blast!

2 Likes

Thinking about these Apilio actions, I wanted to ask if you could share more examples where you need to update a variable from a logicblock, or launch a logicblock from another logicblock.

It would be great to check if you all have scenarios that are always similar in some way, where you would need to use one of these Apilio actions. For…ehm… science! :woman_scientist:

Thanks @jrmckins for the super detailed example! https://iused2besmart.wordpress.com/2019/10/29/the-new-apilio/

Maybe @Caustik, @jp1, @tavo682, (maybe you, visitor of this thread! :eyes: ): can you share a scenario where you would use these actions if possible?

Thanks so much! :grin:

2 Likes

My example is as follows. I have logi block that i use to define when people are home. So positive result it will send a request to IFTTT which hands it back as set boolean value home to true. And if no one home to false.
Same for the heating. if someone arrives home or moving around the house i send a request to IFTTT to evaluate the temperature logiblock. if the evaluation is true
Evaluate the brightness if its daytime etc
Of course the one you have already mentioned

3 Likes

Quick bump , so i can reduce my IFTTT reliance further.

1 Like

Could you give examples where you are concatenating different pieces of logic? It’s really helpful to have detailed ideas when working on the more “abstract” part of the design :nerd_face:

If you were able to update a variable as an action in a Logicblock (imagine having an action that toggles a variable, or switches it to true or false), would that cover all your cases?

Given that a variable is checked by a condition and these can function as a trigger for your logicblocks, updating a variable as an action would evaluate a different Logicblock as a result. I’m wondering if an action to update a variable from a logicblock would then accomplish the goal of evaluating a different piece of logic instead of selecting a specific Logicblock :thinking:

How does that sound?

1 Like

ooh it feels like this might be getting closer, yay!

1 Like

@Anna

Example.

Depending on how bright it is in the passage way I have lights come on when a motion sensor is triggered. It also assumes that if some one is going up stairs it will turn on bedroom lights if the passage way is dark. And turns off after a certain time.
One of the rooms is the kids room so that has its own separate logicblock to turn the bedroom light on to colour red if dark and after a certain time then turns off at sunrise or certain time.
What I have at the moment is when the logiblock that looks after the hall and bedroom lights goes negative the hall light and bedroom lights turn off apart from the kids room. this sends a request to IFTTT that then loops it back to Apilio that initiates a evaluation of the the children’s room logiblock. This will make sure its not turning off the light in the children’s room if its meant to stay on. It of course switches off of the result is negative

1 Like

Yeah, great use case - I would love this too!

1 Like