Page 1 of 1

List of cell IDs in trigger from global variable

Posted: 26 Feb 2013 21:20
by wolle
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

Re: List of cell IDs in trigger from global variable

Posted: 27 Feb 2013 10:36
by Martin
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

Re: List of cell IDs in trigger from global variable

Posted: 27 Feb 2013 11:04
by wolle
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

Re: List of cell IDs in trigger from global variable

Posted: 15 Apr 2013 12:19
by wolle
Hi Martin,

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

Thanks a lot!
Wolfgang

Re: List of cell IDs in trigger from global variable

Posted: 29 Oct 2013 13:46
by mechrekt
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?

Re: List of cell IDs in trigger from global variable

Posted: 31 Oct 2013 14:51
by mechrekt
UP!

Happy Halloween!

Re: List of cell IDs in trigger from global variable

Posted: 31 Oct 2013 18:20
by Martin
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

Re: List of cell IDs in trigger from global variable

Posted: 01 Nov 2013 19:28
by mechrekt
With "{" and "}" and with "_" instead of "-" it worked perfectly!
Excuse me but I'm a really noob with variables :-)

Thank you very much!

Re: List of cell IDs in trigger from global variable

Posted: 04 Aug 2015 21:54
by wolfy
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 ;-)

Re: List of cell IDs in trigger from global variable

Posted: 09 Sep 2015 15:04
by wolfy
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