Llama - Who's Using It and Any Good Examples?

buggy_droid

New member
Dec 9, 2012
0
0
0
Visit site
I'd guess that you hit a mast that you didn't register as "home" when Llama says you "Left home". You can easily confirm that by tapping the "recent" tab and finding which area you were in at 02:20:04 PM ("unknown", most likely).
Also, your "WIFi on at home" event is working. See the second one from the top in your event history. I think your wifi is turned on ok when you come home, but gets turned off every time you hit an unknown mast while at home, therefore Llama thinks you left home.
I see you use 4G (LTE?). You should know that in LTE system cell ID's are recycled through the network, so the cell ID's you get in any place is not unique to that particular location. This can be (one of ) the reason Llama thinks you are not home when you actually are. If possible, turn 4G off when Llama learns area, and keep it off whenever you want Llama to correctly identify your location.

As you can see at the bottom (its been a while), the wifi didn't turn on, even though I was out of the car and in the house. Also, I've been home this entire time, so I'm not sure why Llama keeps thinking I've left. Guessing I'm not getting the same masts throughout my house. But I add all of them -- maybe thats the problem?

View attachment 140339
 

buggy_droid

New member
Dec 9, 2012
0
0
0
Visit site
So what would the rule look like to launch Google Maps when I get in the car?

So, what you want is Maps showing on the screen, right?
Just make sure the event (or the action) that open Maps is the last one to fire by giving it a 5 - 10 seconds delay.

EDIT
In your "when in car" event, remove the action running Maps. Add an action "queue another event". In the queued event, set 5 to 10 second wait time before opening Maps.
 
Last edited:

kurokirasama

New member
Oct 16, 2012
4
0
0
Visit site
I'd guess that you hit a mast that you didn't register as "home" when Llama says you "Left home". You can easily confirm that by tapping the "recent" tab and finding which area you were in at 02:20:04 PM ("unknown", most likely).
Also, your "WIFi on at home" event is working. See the second one from the top in your event history. I think your wifi is turned on ok when you come home, but gets turned off every time you hit an unknown mast while at home, therefore Llama thinks you left home.
I see you use 4G (LTE?). You should know that in LTE system cell ID's are recycled through the network, so the cell ID's you get in any place is not unique to that particular location. This can be (one of ) the reason Llama thinks you are not home when you actually are. If possible, turn 4G off when Llama learns area, and keep it off whenever you want Llama to correctly identify your location.
After seen your last recent events screenshot, I agree with buggy_droid.

Enviado desde mi C1904 mediante Tapatalk
 

kurokirasama

New member
Oct 16, 2012
4
0
0
Visit site
(rooted devices only!) Training my Llama to learn shell, python, and intents....

Requirements: llama, SL4A app, and Python language for SL4A

I thought i'd share some other interesting things (geeky) I do with llama that involve llama and sl4a. This will be over many people's heads but some may find it door opening. The ability to send variables to llama directly opens the door to extending llama far beyond its current state.

In talking to the developer he gave me a llama intent that can be executed to set a llama variable outside of the llama program (from the root command line for example). This is entirely unsupported and undocumented btw. This means that I can now execute use OS commands to check phone conditions and report that condition back to llama for action. One example that I use is this:

When I connect to my work wifi, I want to ensure that my openVPN is always ON when im connected. So I wrote a llama event to do just that:
Code:
When ( phone is connected to "work wifi" AND llama variable LOC = work AND screen turns on )  
    Run a shortcut OPENVPN.

This worked great but I found that it was annoyingly reconnecting everytime my screen turns on. If removed the screen on, then it would only connect when I initially connected to my work wifi and if it became disconnected throughout the day (happens a lot) then that sucked.

So I changed my action to:
Code:
Condition When ( phone is connected to "work wifi" AND llama variable LOC = work AND screen turns on )  
    Run a locale plugin: [B]SL4A: chk-vpn.py[/B]
    QUEUE and event named "VPN Fire"         
         VPNFire:  (delay 7 seconds) Conditions When llama variable 'VPNConnected" has a value of 'False' 
                   Run a shortcut OPENVPN.
                   Set llama variable VPNConnected to 'True'

In the SL4A app, I have the script chk-vpn.py (a python script) check my home network is visable and set a llama variable depending on its status:

script: chk-vpn.py
Code:
import socket
import subprocess
#function to do a port check on a particular address.  very lightweight.
def chk_server(address,port):
    s = socket.socket()
    s.settimeout(4)
    try:
        s.connect((address,port))
        return True
    except socket.error, e:
        return False
#modify to any open port on your router and your routers internal address
check = chk_server("192.168.1.1", 80)
script = "/sdcard/sl4a/scripts/llamavar.sh"
var = "VPNConnected"
val = str(check)
subprocess.call(["/system/bin/sh" , script, var , val ])

shell script: "/sdcard/sl4a/scripts/llamavar.sh" (referenced by above program)
Code:
#!/system/bin/sh
/system/xbin/su -c "am broadcast -a com.kebab.Llama.SetLlamaVariable --es VariableName $1 --es VariableValue $2 com.kebab.Llama/com.kebab.Llama.ExportedReceiver"

Now my 2 scripts will check if VPN is in fact connected and let llama know. :)

Hi,

did you get how to send llama variables values to the scripts?
 

tarantulapg

New member
Jun 17, 2013
0
0
0
Visit site
I have one question for you guys.
How to set LLama profile that when Im home my phone conects to WiFi network but if i go out of range wifi to mobile data turn on?
 

buggy_droid

New member
Dec 9, 2012
0
0
0
Visit site
I have one question for you guys.
How to set LLama profile that when Im home my phone conects to WiFi network but if i go out of range wifi to mobile data turn on?

For starters :)

Condition: entering home area.
Action: Turn WiFi on.

Condition: WiFi disconnected.
Actions: Turn WiFi off, Mobile data on.
 

buggy_droid

New member
Dec 9, 2012
0
0
0
Visit site
Sorry, little clarification -

"Profiles" are just collections of sound settings (ringtones, notifications, etc.), and are not used to turn on WiFi, mobile data, etc.

Sets of conditions and actions such as
Condition: entering home area.
Action: Turn WiFi on.

Condition: WiFi disconnected.
Actions: Turn WiFi off, Mobile data on.
are called "events". You can create a new event by tapping the event tab and tapping "+" sign at the bottom of the screen.


Thank you for your response.

I know that that is for beginners...but I am beginner with Llama.
 

tarantulapg

New member
Jun 17, 2013
0
0
0
Visit site
Sorry, little clarification -

"Profiles" are just collections of sound settings (ringtones, notifications, etc.), and are not used to turn on WiFi, mobile data, etc.

Sets of conditions and actions such as

are called "events". You can create a new event by tapping the event tab and tapping "+" sign at the bottom of the screen.

I did everything like you sad by I still have problem.when I leave one area and enter in another in which I have set turn WiFi on, even if I am not in range of that WiFi connection my mobile data still don't get on.I don't know do you understand what I'm asking you? Sorry for my bad English
 

Corey Kronengold

New member
Oct 9, 2014
3
0
0
Visit site
Can Llama auto reply to an SMS?

I saw there's a 3rd party plug in, but it requires that you designate which numbers to reply to. I want to set a rule that automatically replies to all incoming SMS messages while I'm connected to bluetooth (in my car). Tasker has this, but I'm trying to stick with Llama.

What am I missing?
 

kurokirasama

New member
Oct 16, 2012
4
0
0
Visit site
Can Llama auto reply to an SMS?

I saw there's a 3rd party plug in, but it requires that you designate which numbers to reply to. I want to set a rule that automatically replies to all incoming SMS messages while I'm connected to bluetooth (in my car). Tasker has this, but I'm trying to stick with Llama.

What am I missing?
I think you can achieve that with sl4a, but I don't know how.

Enviado desde mi C1904 mediante Tapatalk
 

buggy_droid

New member
Dec 9, 2012
0
0
0
Visit site
I did everything like you sad by I still have problem.when I leave one area and enter in another in which I have set turn WiFi on, even if I am not in range of that WiFi connection my mobile data still don't get on.I don't know do you understand what I'm asking you? Sorry for my bad English

So, if I am reading you post correctly, you want to turn mobile data on whenever you are not connected to WiFi regardless of entering or leaving any area, right? If so
Condition: WiFi disconnected.
Actions: Turn WiFi off, Mobile data on.
should work.

If it doesn't, your phone's hardware and/or software probably doesn't allow apps to turn on/off mobile data without user consent.
If that's the case there is nothing you can do. Sorry. :(
 

tarantulapg

New member
Jun 17, 2013
0
0
0
Visit site
So, if I am reading you post correctly, you want to turn mobile data on whenever you are not connected to WiFi regardless of entering or leaving any area, right? If so

should work.

If it doesn't, your phone's hardware and/or software probably doesn't allow apps to turn on/off mobile data without user consent.
If that's the case there is nothing you can do. Sorry. :(
yes you read it right :)
my Mobil data connection will go on only if I'm manually turn screen on.

Sent from my SM-N9005 using Tapatalk
 

buggy_droid

New member
Dec 9, 2012
0
0
0
Visit site
yes you read it right :)
my Mobil data connection will go on only if I'm manually turn screen on.

Sent from my SM-N9005 using Tapatalk

So, there's hope then.

Condition: WiFi disconnected.
Actions: Screen on, Queue another event.
In the queued event: wait 2 seconds, Mobile data on.

Test to make sure screen turns on before mobile data connects.
 

tarantulapg

New member
Jun 17, 2013
0
0
0
Visit site
So, there's hope then.

Condition: WiFi disconnected.
Actions: Screen on, Queue another event.
In the queued event: wait 2 seconds, Mobile data on.

Test to make sure screen turns on before mobile data connects.
I did everything like you sad. I will test it and give you information about results :)
thanks you a lot mate

Sent from my SM-N9005 using Tapatalk
 

Corey Kronengold

New member
Oct 9, 2014
3
0
0
Visit site
Thats something I'd like to avoid. I'll admit its a little over my head. Especially since Tasker can do this as a standard function.

I'm currently running both, but want to use just one. My main focus is basic tasks for when I'm in the car and when I come/leave home. If I have to pay the $5 for tasker to get the auto-SMS reply working, thats worth it to me.

I think you can achieve that with sl4a, but I don't know how.

Can Llama auto reply to an SMS?

I saw there's a 3rd party plug in, but it requires that you designate which numbers to reply to. I want to set a rule that automatically replies to all incoming SMS messages while I'm connected to bluetooth (in my car). Tasker has this, but I'm trying to stick with Llama.

Enviado desde mi C1904 mediante Tapatalk
 

romandesign

New member
Oct 16, 2014
0
0
0
Visit site
I can't find a way to make Llama read out loud all (or some) notifications. Maybe via intent? What I want is when I'm in the car (car mode) that it would read me notifications via text to speech. Also, announce caller names. Anyone knows how to do that? I got to "app icon in notification" - Gmail - then maybe intent, but what to specify so it can be read via TTS?
 

acedik

New member
Oct 17, 2014
0
0
0
Visit site
Hello everyone!

I've been doing a bunch of looking around and I haven't found a solution yet.. What I'm trying to accomplish:

Make a google calendar entry based on entry and exit time (basically time tracking) for a specific location

Any help?

Thanks!!
 

Trending Posts

Forum statistics

Threads
942,404
Messages
6,913,927
Members
3,158,397
Latest member
Lawiss