List of cell IDs in trigger from global variable

Post your feature requets for new triggers, conditions, actions and other improvements.

Moderator: Martin

Locked
wolle
Posts: 3
Joined: 26 Feb 2013 20:08

List of cell IDs in trigger from global variable

Post by wolle » 26 Feb 2013 21:20

Hi,
I use the location by GSM cells in my flows as it saves a lot of battery compared with GPS location. For this, you have to set a list of cells that are to be considered to belong to the location in question. This works fine but the list of cells has to be set explicitly unfortunately.
I succeeded in defining a flow that collects a list of currentliy available cell IDs (as a comma separated list in a string or as a list of strings) into a global variable but I could not find a way to hand this list over to the trigger "Funkzelle GSM" (don't know the english name, sorry). The entry field for the cell ID list doesn't seem to evaluate variables.
If I'm not missing something obvious I would suggest this as a new feature. The use case would be to let one flow collect cell IDs for a location for a given time in a global variable. This variable could then be used in the above mentioned trigger in other flows to define the cell IDs belonging to the location in question.
This is the only feature I miss in Automagic compared to Llama, which I used before. Besides of this I really love your software! It' just great! :-)
Bye,
Wolfgang

User avatar
Martin
Posts: 4468
Joined: 09 Nov 2012 14:23

Re: List of cell IDs in trigger from global variable

Post by Martin » 27 Feb 2013 10:36

Hi Wolfgang,

You can also use the the start/stop buttons on the trigger/condition Phone Cell GSM/Funkzelle GSM to collect the connected cells for a few minutes. The cell IDs of the collected cells and the timestamp will be listed in the LAC/CID selection list using the [...]-button.
I add the variable support for the CID/LAC fields to my todo-list.

Thanks & Regards,
Martin

wolle
Posts: 3
Joined: 26 Feb 2013 20:08

Re: List of cell IDs in trigger from global variable

Post by wolle » 27 Feb 2013 11:04

Hi Martin,

I know about the start/stop buttons and that's the way I do it now. But it is inconvenient to manage the ~20 CIDs for my home area and the 20-30 CIDs for my work area in this way. Apart from that I need two triggers for each area (for entering and leaving) with an identical CID list and as a (former) developer I really hate using identical literals in different places in a progam :-)

Thanks for adding it to your list! I already had several days of fun programming my Galaxy S2 with Automagic and I'm sure I will have much more fun with it in the furture. Thanks for that too :-)

Bye,
Wolfgang

wolle
Posts: 3
Joined: 26 Feb 2013 20:08

Re: List of cell IDs in trigger from global variable

Post by wolle » 15 Apr 2013 12:19

Hi Martin,

as I see in the latest update, the feature is already there and works great!

Thanks a lot!
Wolfgang

User avatar
mechrekt
Posts: 51
Joined: 21 Oct 2013 10:11

Re: List of cell IDs in trigger from global variable

Post by mechrekt » 29 Oct 2013 13:46

Hi all, I used global variable to store a list of cells, but I'm not able to use the variable in the Phone Cell GSM trigger (the trigger never comes true)

I have a variable global_GSM-HOME defined as string and contains: 1231323213,34324234324,44565656
Then when I set the Phone Cell GSM trigger I just put the variable name global_GSM-HOME in the "CELL ID (CID) LIST" field, but doesn't work. If I use the same flow putting the cell numbers instead of the variable, everything goes ok.
Maybe I'm wrong with using variables?

User avatar
mechrekt
Posts: 51
Joined: 21 Oct 2013 10:11

Re: List of cell IDs in trigger from global variable

Post by mechrekt » 31 Oct 2013 14:51

UP!

Happy Halloween!

User avatar
Martin
Posts: 4468
Joined: 09 Nov 2012 14:23

Re: List of cell IDs in trigger from global variable

Post by Martin » 31 Oct 2013 18:20

Hi,

Happy Halloween!

The trigger should support global variables. Please use following text in the trigger {global_GSM_HOME}.
Please use a name for the global variable that only contains characters, digits and underscores (variable names are case sensitive). A minus sign is only allowed for historical reasons but it's difficult to access the variable in a script.

Regards,
Martin

User avatar
mechrekt
Posts: 51
Joined: 21 Oct 2013 10:11

Re: List of cell IDs in trigger from global variable

Post by mechrekt » 01 Nov 2013 19:28

With "{" and "}" and with "_" instead of "-" it worked perfectly!
Excuse me but I'm a really noob with variables :-)

Thank you very much!

wolfy
Posts: 20
Joined: 04 Aug 2015 21:31

Re: List of cell IDs in trigger from global variable

Post by wolfy » 04 Aug 2015 21:54

wolle wrote:Apart from that I need two triggers for each area (for entering and leaving) with an identical CID list and as a (former) developer I really hate using identical literals in different places in a progam :-)
No, you don't need two triggers/flows.
This stumped me as well in the beginning (I only started to use Automagic three days ago), but I found there is a much better way:

1. Activate both “Connected“ and “Disconnected“ checkboxes in the cell trigger.

2. Add a condition of type “Expression“ with this expression:
if(connected) true else false;

3. Voila - take it from there :-)

That said, AM could use some additional features with cell lists or the like ;-) (think named lists or similar), even when redundancy is not such a big deal when you need only one trigger.

Cheers, Wolfgang (yes, as well ;-)

wolfy
Posts: 20
Joined: 04 Aug 2015 21:31

Re: List of cell IDs in trigger from global variable

Post by wolfy » 09 Sep 2015 15:04

wolle wrote:Hi,
I use the location by GSM cells in my flows as it saves a lot of battery compared with GPS location. For this, you have to set a list of cells that are to be considered to belong to the location in question. This works fine but the list of cells has to be set explicitly unfortunately.
I succeeded in defining a flow that collects a list of currentliy available cell IDs (as a comma separated list in a string or as a list of strings) into a global variable but I could not find a way to hand this list over to the trigger "Funkzelle GSM" (don't know the english name, sorry). The entry field for the cell ID list doesn't seem to evaluate variables.
If I'm not missing something obvious I would suggest this as a new feature. The use case would be to let one flow collect cell IDs for a location for a given time in a global variable. This variable could then be used in the above mentioned trigger in other flows to define the cell IDs belonging to the location in question.
This is the only feature I miss in Automagic compared to Llama, which I used before. Besides of this I really love your software! It' just great! :-)
Bye,
Wolfgang
Could you share this “cell ID collection“-flow?

Thx

Locked