Can I use condition as a trigger?

Post your questions and help other users.

Moderator: Martin

Post Reply
Marcos
Posts: 4
Joined: 14 Feb 2017 18:00

Can I use condition as a trigger?

Post by Marcos » 15 Feb 2017 16:52

Hi,
I'm a new user of Automagic and not a programmer, so my question may sound silly. I'd like to make a flow using "screen off" and "time between" as a trigger, but these are options for conditions. The solution I found is to loop the trigger in a periodic timer using seconds. But is it possible to use a condition as a trigger?

I used to use Llama before and had personal feelings to that app, but I'm very excited about Automagic. Thank you for the help.

User avatar
Scotty
Posts: 78
Joined: 26 Aug 2016 20:29
Location: Southern California

Re: Can I use condition as a trigger?

Post by Scotty » 16 Feb 2017 16:21

Marcos wrote:Hi,
I'm a new user of Automagic and not a programmer, so my question may sound silly. I'd like to make a flow using "screen off" and "time between" as a trigger, but these are options for conditions. The solution I found is to loop the trigger in a periodic timer using seconds. But is it possible to use a condition as a trigger?

I used to use Llama before and had personal feelings to that app, but I'm very excited about Automagic. Thank you for the help.
I used Llama for several years, too. And - no disrespect to Llama - I promise you, Automagic is far superior. And you don't have to be a programmer to use it (although some folks on here do seem to know a bit about programming, and have far more expertise than do I).

With regard to your questions:

You can't use a condition as a trigger, but in quite a few cases you'll find a trigger than is (essentially) equivalent to a condition

1. Take a look at this page, which shows all of the available triggers. There are also pages listing all actions and conditions. You should use these pages - they are good resources, and give you an idea of the variety of things that you can do with the app.

2. Re: Screen off or on condition - see trigger Display state

3. Re: time between condition. No real trigger equivalent. I don't know exactly what you want to do in your flow, but consider combining Trigger: time (set it to start at the desired time)
followed by Condition: time range (beginning at the same time as the trigger, ending at the desired time) and then having a loop around that. As I say, if I knew what you wanted to do, I might be able to give more helpful / detailed advice.

Marcos
Posts: 4
Joined: 14 Feb 2017 18:00

Re: Can I use condition as a trigger?

Post by Marcos » 16 Feb 2017 20:23

Scotty,
Thank you very much for the information! It helped me a lot.
I got a flow in this forum the checks location every 5 min and turns wifi on/off acording to position. But I guess it uses more battery than Llama did with cells, so I tried to created a new flow that would disable the first one when I'm driving from/to work and at lunch time (it couldn't be specific time cause I don't do the things at the same time every day. It should be when wifi disconnects in a time range). But I realized that could put the time-between condition inside wifi flow (now it disconnects the flow itself when in the time range and sleeps more than 5 minutes before enabling itself).

User avatar
Scotty
Posts: 78
Joined: 26 Aug 2016 20:29
Location: Southern California

Re: Can I use condition as a trigger?

Post by Scotty » 16 Feb 2017 21:15

I'm glad you found my post useful.

The reason that I asked for more info about what you wanted to do (rather than explicit details about how your flow was constructed) was because - as you have now found out for yourself - Automagic is very flexible, and you can accomplish what you want in various ways. For example, to achieve what you wanted (stop looking for location when driving) you have changed your approach, replacing a time-based trigger with a WiFi-based trigger, and now it does what you want. So you've used loss of WiFi to "tell" your phone that you're in your car. But there are other ways to do this. In cars with Bluetooth, you can use that. My car doesn't have Bluetooth and (with Llama) I used an NFC tag that was stuck to my car's dashboard. I could have continued that with Automagic, but there's a cooler solution that allowed me to remove that unsightly NFC tag. When I get into my car, I always plug my phone in to charge, so I have an Automagic flow that is triggered by that (Trigger, Power Source / connected). But, of course, I often charge my phone when I'm NOT in the car - how can I make Automagic understand that I am in the car? My phone has Qi charging, and in my car, the charger is almost upright (so I can see the screen), whereas everywhere else, the charger is on a flat surface. So, I can distinguish whether I'm charging the phone in my car or elsewhere by following the trigger with a Device Orientation condition. If I place my phone in the car charger, face up is FALSE, telling Automagic that I'm in my car; if I place my phone on a Qi charger at work or at home, then face up is TRUE (which causes Automagic to do other things that I won't bore you with).

As I said, this program is FAR more powerful than Llama.

Marcos
Posts: 4
Joined: 14 Feb 2017 18:00

Re: Can I use condition as a trigger?

Post by Marcos » 17 Feb 2017 12:17

Scotty wrote:I'm glad you found my post useful.

The reason that I asked for more info about what you wanted to do (rather than explicit details about how your flow was constructed) was because - as you have now found out for yourself - Automagic is very flexible, and you can accomplish what you want in various ways. For example, to achieve what you wanted (stop looking for location when driving) you have changed your approach, replacing a time-based trigger with a WiFi-based trigger, and now it does what you want. So you've used loss of WiFi to "tell" your phone that you're in your car. But there are other ways to do this. In cars with Bluetooth, you can use that. My car doesn't have Bluetooth and (with Llama) I used an NFC tag that was stuck to my car's dashboard. I could have continued that with Automagic, but there's a cooler solution that allowed me to remove that unsightly NFC tag. When I get into my car, I always plug my phone in to charge, so I have an Automagic flow that is triggered by that (Trigger, Power Source / connected). But, of course, I often charge my phone when I'm NOT in the car - how can I make Automagic understand that I am in the car? My phone has Qi charging, and in my car, the charger is almost upright (so I can see the screen), whereas everywhere else, the charger is on a flat surface. So, I can distinguish whether I'm charging the phone in my car or elsewhere by following the trigger with a Device Orientation condition. If I place my phone in the car charger, face up is FALSE, telling Automagic that I'm in my car; if I place my phone on a Qi charger at work or at home, then face up is TRUE (which causes Automagic to do other things that I won't bore you with).

As I said, this program is FAR more powerful than Llama.
Wow! Your solution is great! I usually go to work by bike, since the traffic in Rio de Janeiro is slow. Now I'll try to manage a way to prevent the cellphone for being turned off. My last one was stolen and the first thing the thief did was to turn it off, so it was impossible to get location or make it rings. Maybe to put a keyword before turning off. Do you know if it's possible? Once more, thanks a lot!

Post Reply