AutoLocation Unable to get variables

Discussion in 'AutoApps' started by Jokerigno, Apr 18, 2018.

  1. Jokerigno

    Jokerigno New Member

    Joined:
    Apr 18, 2018
    Messages:
    2
    Likes Received:
    0
    Hi all,

    I want to use autolocation instead of default tasker get position service to use it as device tracker with my MQTT broker connected to Home Assistant (an awesome open source project to home automation).

    So I set up an action with the following task:

    Start Autolocation Location
    update type = no power
    Report Name = Location
    Expiration Time 61 sec

    Create Variable named %payload
    with %alaccuracy %allatitude and %allongitue (and also with %batt value)

    Pubblish this variable to my mqtt server.

    The %payload variable report the %batt value, but no one of the autolocation variables.

    Where is the error?


    Thank you in advace
     
  2. joaomgcd

    joaomgcd Administrator Staff Member

    Joined:
    Feb 3, 2015
    Messages:
    9,479
    Likes Received:
    806
    Can you please export your profile's description (not xml) so I can take a look? Long-click the profile in Tasker->export description Thanks in advance
     
  3. Jokerigno

    Jokerigno New Member

    Joined:
    Apr 18, 2018
    Messages:
    2
    Likes Received:
    0
    Here it is!

    Owntracks2 (12)
    A1: AutoLocation Location [ Configurazione:Starting Location Monitor
    Interval: 60 seconds
    Update Type: No Power Timeout (Secondi):61 ]
    A2: Imposta Variabile [ Nome:%Payload A:{"_type":"location","tid":"Xiaomimi6","acc":%alaccuracy,"batt":%BATT,"lat":%allatitude,"lon":%allongitude,"tst":%TIMES,"_cp":true} Recurse Variables:Off Calcola:Off Aggiungi:Off ]
    A3: MQTT Publisher [ Configurazione:192.168.2.100:1883 => owntracks/Marco/Xiaomimi6 QoS:0 Timeout (Secondi):0 ]

    Thank you!
     
  4. joaomgcd

    joaomgcd Administrator Staff Member

    Joined:
    Feb 3, 2015
    Messages:
    9,479
    Likes Received:
    806
    Thanks. To react to location updates you have to enable the option to "Get First Location" so that the action waits for the location. Since you're using the "No Power" option though, that might take a while :) Maybe consider using an option that uses more battery?
     

Share This Page