Page 1 of 1
Send SMS limit resets on reboot?
Posted: 27 Jul 2014 03:29
by CLyDeStRiFe
I have a flow that has a condition time-range of 6:00 - 10:00 am, when display state is on, it must send one SMS during that time range. The problem is when the phone is rebooted, it sends again another SMS, it seems to reset the flow? Is there any way for Automagic to detect if it already had executed the flow? I also tried execution count but it doesn't seem to help. Thanks for the reply!
Re: Send SMS limit resets on reboot?
Posted: 27 Jul 2014 09:40
by angelatwork
Maybe it would help if you use a global variable with an expression. global_sent== 0 when sms is not sent and to 1 when sent. When expression global_sent== 1 is false, send sms(or rather continue your flow that will send the sms), else do nothing(exit flow). And set global_sent==1 when sms sending is executed? When the time range ends, reset/save the global_sent==0. Just a suggestion
Re: Send SMS limit resets on reboot?
Posted: 27 Jul 2014 16:03
by CLyDeStRiFe
How do you set a global variable? I seem to figure out the expression which is a condition but I don't see any action that changes the expression which would be executed when the sms is sent, can you help me on that? really big thanks btw, you seem to get my idea

Re: Send SMS limit resets on reboot?
Posted: 27 Jul 2014 17:27
by angelatwork
I don't know what your flow looks like, but here is my suggestion;
What you want to achieve is;
If flow is triggered/executing
1.if time range is true, and then if global_sent==0 is true, then send sms, and then set global_sent =1 OR
2. If time range is true, but global_sent is 1, do nothing
3. If time range is false, then set global_sent to 0.
Before the send sms action in the flow add the condition expression with the text global_sent == 0. When connecting it to the rest of the flow choose connection true. After the action where the flow sends your sms, add the action script with the text global_sent = 1 in it. From the condition time range make a connection choosing false and and insert an action script with the text global_sent= 0. Before executing your flow with the changes for the first time,You can either add a global variable in the menu -> manage -> global variables-> +. Or you can make a new empty flow with no trigger and add the action script with the text global_sent = 0 , if the time is after your time frame ( within time range and sms has already been sent the value should of course be 1) and execute that flow once, you can delete it afterwords.
Hope it is any help for you and not too confusing, but I am no wiz

Re: Send SMS limit resets on reboot?
Posted: 27 Jul 2014 17:35
by angelatwork
Or is it the sent sms that triggers the flow?
Re: Send SMS limit resets on reboot?
Posted: 28 Jul 2014 13:52
by angelatwork
Have edited my earlier answer, since it got to many double == in it, without me seeing it when I wrote. In condition Expression you are testing if the condition is true or not, global_sent should have == (double), in action Script you are setting the value of the global_sent, and it should only have one = (example global_sent=0).
Re: Send SMS limit resets on reboot?
Posted: 29 Jul 2014 13:10
by CLyDeStRiFe
Thanks for the reply! yeah, got it all figured out but I kinda hate the idea of resetting global variableg so I tried a new idea, I just set the flow on disable everytime it sends the SMS, it works by having 2 flows that enable and disable each other.
The first one is:
Good Morning!
Trigger - Display State On
Condition - Time Range 6 AM - 12 noon = true
Action - Send SMS
Action - Set Flow State: Enable Good Morning Enabler
Action - Set Flow State: Disable Good Morning!
second one is:
Good Morning Enabler
Trigger - Display State On
Condition - Time Range 6 AM - 12 noon = false
Action - Set Flow State: Enable Good Morning!
Action - Set Flow State: Disable Good Morning Enabler
that answers my problem, thank you for helping me my dear friend!
till next time
