Weather Ace Intents

326 views
Skip to first unread message

Ryan Decker

unread,
May 9, 2019, 6:01:10 PM5/9/19
to Tasker
I'm trying to use Weather Ace intents in tasker. The official Web site for the API is here:

http://mycodefab.com

Maybe somebody can tell me what I'm doing wrong.

I have a task named Send Weather Request:

Tasker Action 1: Send Intent
Intent Action = mycodefab.aleph.weather.ACTION_GET_WEATHER
Data = geo:AUTO?ver=1&time=now
Target = Broadcast Receiver

Tasker Action 2: Send Intent
Intent Action = mycodefab.aleph.weather.WEATHER_DATA
Target = Broadcast Receiver

I have a profile named Weather Request Listener:

Context: Intent Received
Tasker Action: mycodefab.aleph.weather.WEATHER_DATA

Enter Task: Weather Request Handler

Here's the task called Weather Request Handler:

Tasker Action:
Flash: %weather_desc

What happens is that the text flash works but shows the variable name "%weather_desc" instead of the value of the variable.

Can anybody please point out why the variables aren't being set and/or help me figure out how to make it work?


João Dias

unread,
May 10, 2019, 5:34:26 AM5/10/19
to tas...@googlegroups.com
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

Thank you for your contact.

   Join: connect multiple devices (send pushes, remote SMS, notifications) on Android, Windows, Mac, Linux
   Tasker: customize/automate anything on your phone!
   AutoApps: add advanced functionality to Tasker via plugins

     

João Dias


--
You received this message because you are subscribed to the Google Groups "Tasker" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tasker+un...@googlegroups.com.
Visit this group at https://groups.google.com/group/tasker.
To view this discussion on the web visit https://groups.google.com/d/msgid/tasker/72742660-8b4b-46aa-917e-73d47f25befe%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

João Dias

unread,
May 10, 2019, 5:35:51 AM5/10/19
to tas...@googlegroups.com
Also, check here.


Thank you for your contact.

   Join: connect multiple devices (send pushes, remote SMS, notifications) on Android, Windows, Mac, Linux
   Tasker: customize/automate anything on your phone!
   AutoApps: add advanced functionality to Tasker via plugins

     

João Dias

Ryan Decker

unread,
May 10, 2019, 9:07:47 AM5/10/19
to Tasker
Profile: Weather Request Listener (9)
Event: Intent Received [ Action:mycodefab.aleph.weather.WEATHER_DATA Cat:None Cat:None Scheme:* Mime Type:* ]
Enter: Weather Response Handler (27)
A1: Flash [ Text:%weather_desc Long:Off ]
A2: [X] JavaScriptlet [ Code:var nl = "\n";

var output = local("%intent_data") + nl;

evtprm.forEach(
function(item){
output += item + nl;
}
)

flashLong(output); Libraries: Auto Exit:On Timeout (Seconds):45 ]

Ryan Decker

unread,
May 10, 2019, 9:13:06 AM5/10/19
to Tasker
Thank you. I already read that a few times over but still couldn't quite understand what I'm doing wrong.

Marta Hintz

unread,
May 10, 2019, 11:04:00 AM5/10/19
to Tasker
doesn't weather ace have a free plugin?  I have used it in the past and it is super simple to set up that way....

Ryan Decker

unread,
May 10, 2019, 2:36:08 PM5/10/19
to Tasker
Weather Ace has a simple plugin that works ok but I'm tying to access that data with Intents instead.

Ryan Decker

unread,
May 10, 2019, 2:43:19 PM5/10/19
to Tasker
Here's my most recent attempt:

A task to send an intent, a profile to listen for a response and another task to handle the response data:

INTENT TRANSMITTER
------------------
Send Weather Request (10)
A1: Send Intent [ Action:mycodefab.aleph.weather.ACTION_GET_WEATHER Cat:None Mime Type: Data:geo:AUTO?ver=1&time=now Extra:request_tag Extra: Extra: Package: Class: Target:Broadcast Receiver ]
A2: Send Intent [ Action:mycodefab.aleph.weather.WEATHER_DATA Cat:None Mime Type: Data: Extra: Extra: Extra: Package: Class: Target:Broadcast Receiver ]

INTENT RESPONSE LISTENER
------------------------


Profile: Weather Request Listener (9)
Event: Intent Received [ Action:mycodefab.aleph.weather.WEATHER_DATA Cat:None Cat:None Scheme:* Mime Type:* ]
Enter: Weather Response Handler (27)

A1: [X] Flash [ Text:%weather_desc Long:Off ]
A2: JavaScriptlet [ Code:var nl = "\n";

var output =
`Request tag: ${
local("%request_tag") + nl
} Intent Data: ${


local("%intent_data") + nl
}`
;

evtprm.forEach(
function(item){

output += `${item + nl}`;


}
);

flashLong(output); Libraries: Auto Exit:On Timeout (Seconds):45 ]

INTENT RESPONSE HANDLER
Weather Response Handler (27)
A1: JavaScriptlet [ Code:var nl = "\n";

var output =
`Request tag: ${
local("%request_tag") + nl
} Intent Data: ${


local("%intent_data") + nl
}`
;

evtprm.forEach(
function(item){

output += `${item + nl}`;


}
);

flashLong(output); Libraries: Auto Exit:On Timeout (Seconds):45 ]

:( Still doesn't work ):

ktmom

unread,
May 11, 2019, 8:32:39 AM5/11/19
to Tasker
You do have the weather ace app installed on the device, right?

Ryan Decker

unread,
May 11, 2019, 12:29:18 PM5/11/19
to Tasker
Yes, I have both Weather Ace apps.

Ryan Decker

unread,
May 11, 2019, 3:45:46 PM5/11/19
to Tasker
This doesn't work either. I'm successfully firing off and receiving the WEATHER_DATA intent but just can't get the "Extra" fields to flash to the screen.

Weather: Send Request (10)
A1: [X] Send Intent [ Action:mycodefab.aleph.weather.ACTION_GET_WEATHER Cat:None Mime Type: Data:geo:AUTO?ver=1&time=now Extra: Extra: Extra: Package: Class: Target:Broadcast Receiver ]

A2: Send Intent [ Action:mycodefab.aleph.weather.WEATHER_DATA Cat:None Mime Type: Data: Extra: Extra: Extra: Package: Class: Target:Broadcast Receiver ]

Profile: Weather Request Listener 1 (9)


Event: Intent Received [ Action:mycodefab.aleph.weather.WEATHER_DATA Cat:None Cat:None Scheme:* Mime Type:* ]
Enter: Weather: Response Handler (27)

A1: JavaScriptlet [ Code:var nl = "\n";

var output = "";

output = `intent_data: ${


local("%intent_data") + nl
}`;

var forEachCount = 0;

evtprm.forEach(
function(item){

forEachCount++

output += `Event Param ${

forEachCount

}: ${

item + nl

}`;

}
);

output += `request_tag: ${


local("%request_tag") + nl

}`;

output += `error_desc: ${
local("%error_desc") + nl
}`;

output += `api_version: ${
local("%api_version") + nl
}`;

output += `place_name: ${
local("%place_name") + nl
}`;

output += `place_lon: ${
local("%place_lon") + nl
}`;

output += `place_lat: ${
local("%place_lat") + nl
}`;

output += `place_autofollow: ${
local("%place_autofollow") + nl
}`;

output += `is_day: ${
local("%is_day") + nl
}`;

output += `updated: ${
local("%updated") + nl
}`;

output += `weather_desc: ${
local("%weather_desc") + nl
}`;

output += `type: ${
local("%type") + nl
}`;

output += `current: ${
local("%current") + nl
}`;

output += `datetime: ${
local("%datetime") + nl
}`;

output += `temp_max: ${
local("%temp_max") + nl
}`;

output += `temp_min: ${
local("%temp_min") + nl
}`;

output += `pressure: ${
local("%pressure") + nl
}`;

output += `humidity: ${
local("%humidity") + nl
}`;

output += `windspeed: ${
local("%windspeed") + nl
}`;

output += `windspeed: ${
local("%windspeed") + nl
}`;

output += `windspeed_gusts: ${
local("%windspeed_gusts") + nl
}`;

output += `weather_id: ${
local("%weather_id") + nl
}`;

output += `dewpoint_max: ${
local("%dewpoint_max") + nl
}`;

output += `dewpoint_min: ${
local("%dewpoint_min") + nl
}`;

output += `sunrise: ${
local("%sunrise") + nl
}`;

output += `sunset: ${
local("%sunset") + nl
}`;

output += `wind_degree: ${
local("%wind_degree") + nl
}`;

output += `precipitation: ${
local("%precipitation") + nl
}`;

output += `pop: ${
local("%pop") + nl
}`;

output += `cloudiness: ${
local("%cloudiness") + nl
}`;

output += `uvi: ${
local("%uvi") + nl
}`;

output += `visibility: ${
local("%visibility") + nl
}`;

output += `feelslike_max: ${
local("%feelslike_max") + nl
}`;

output += `feelslike_min: ${
local("%feelslike_min") + nl
}`;

Ryan Decker

unread,
May 14, 2019, 10:01:21 AM5/14/19
to Tasker
Are my replies coming through? 

--
You received this message because you are subscribed to a topic in the Google Groups "Tasker" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/tasker/qEPL-XiK5So/unsubscribe.
To unsubscribe from this group and all its topics, send an email to tasker+un...@googlegroups.com.

João Dias

unread,
May 15, 2019, 10:27:43 AM5/15/19
to tas...@googlegroups.com
Hi. What happens if you flash %evtprm()?


Thank you for your contact.

   Join: connect multiple devices (send pushes, remote SMS, notifications) on Android, Windows, Mac, Linux
   Tasker: customize/automate anything on your phone!
   AutoApps: add advanced functionality to Tasker via plugins

     

João Dias

--
You received this message because you are subscribed to the Google Groups "Tasker" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tasker+un...@googlegroups.com.
Visit this group at https://groups.google.com/group/tasker.

Ryan Decker

unread,
May 15, 2019, 11:50:59 AM5/15/19
to tas...@googlegroups.com
My newest attempt:

    Weather Ace: Weather Data (79)
    A1: Send Intent [ Action:mycodefab.aleph.weather.WEATHER_DATA Cat:None Mime Type: Data: Extra: Extra: Extra: Package: Class: Target:Broadcast Receiver ] 
    
    Profile: Weather Ace: Weather Data (9)
    Event: Intent Received [ Action:mycodefab.aleph.weather.WEATHER_DATA Cat:None Cat:None Scheme:* Mime Type:* ]
    Enter: Weather Ace: Response Handler (27)
    A1: Test Tasker [ Type:Local Variables Data: Store Result In:%localvars ] 
    A2: JavaScriptlet [ Code:var nl = "\n";
    
    var output = "";
    
    var forEachCount = 0;
    
    localvars.forEach(
        function(item){
    
            forEachCount++;
    
            output += 
                `${
                    forEachCount
                }) ${
                    item
                }: ${
                    local(item) + nl
                }`
            ;
        }
    );
    
    flashLong(output); Libraries: Auto Exit:On Timeout (Seconds):45 ] 
    
The flashed result:

1) %evtprm1: mycodefab.aleph.weather.WEATHER_DATA
2) %evtprm2: None
3) %evtprm3: None
4) %evtprm4: 
5) %evtprm5: 
6) %caller1: profile=enter:Weather Ace: Weather Data
7) %priority: 6
7) %QTIME: undefined
8) %qtime: 0




You received this message because you are subscribed to a topic in the Google Groups "Tasker" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/tasker/qEPL-XiK5So/unsubscribe.
To unsubscribe from this group and all its topics, send an email to tasker+un...@googlegroups.com.

Ryan Decker

unread,
May 15, 2019, 12:08:03 PM5/15/19
to tas...@googlegroups.com
Oops typo

1) %evtprm1: mycodefab.aleph.weather.WEATHER_DATA
2) %evtprm2: None
3) %evtprm3: None
4) %evtprm4: 
5) %evtprm5: 
6) %caller1: profile=enter:Weather Ace: Weather Data
7) %priority: 6
8) %QTIME: undefined
9) %qtime: 0



On Wed, May 15, 2019, 8:27 AM João Dias <joao...@gmail.com> wrote:
You received this message because you are subscribed to a topic in the Google Groups "Tasker" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/tasker/qEPL-XiK5So/unsubscribe.
To unsubscribe from this group and all its topics, send an email to tasker+un...@googlegroups.com.

João Dias

unread,
May 15, 2019, 1:07:56 PM5/15/19
to tas...@googlegroups.com
Hmm, seems like no extras are being sent from the app?... Can that be?


Thank you for your contact.

   Join: connect multiple devices (send pushes, remote SMS, notifications) on Android, Windows, Mac, Linux
   Tasker: customize/automate anything on your phone!
   AutoApps: add advanced functionality to Tasker via plugins

     

João Dias

Ryan Decker

unread,
May 15, 2019, 5:59:36 PM5/15/19
to Tasker
I guess it's possible. 

I have no idea whether I made a mistake or if the Weather Ace app just isn't working correctly. 

I've never tried this before so I've never seen it work. Have you? 

I read the Weather Ace api instructions (http://mycodefab.com/) over and over again but it just doesn't seem to work. Maybe I'm doing things at the wrong time,  maybe I'm not using the right parameters...

I thought that if you executed Send Intent ACTION_GET_WEATHER then setup a listener for Receive Intent WEATHER_DATA, then you would get the extras into tasker variables. But I can't get the Intent Received WEATHER_DATA listener to work until I fire off Send Intent WEATHER_DATA.

Are the Send Intent Action and Receive Intent Profile supposed to both reference WEATHER_DATA or should the Send Intent Action be different from the Receive Intent Profile, using ACTION_GET_WEATHER and WEATHER_DATA respectively. Or am I just not understanding how this is supposed to work and this is all wrong?

Are you able to make it work on your phone?

If anybody in the world could show me a working example of how to get the extras from this Weather Ace broadcast intent into tasker variables, I'd be very happy. 

João Dias

unread,
May 16, 2019, 4:50:34 AM5/16/19
to tas...@googlegroups.com
I have not tried it yet, sorry. Do you configure Tasker somewhere in that app as the intent receiver? Also, what Android version are you using?


Thank you for your contact.

   Join: connect multiple devices (send pushes, remote SMS, notifications) on Android, Windows, Mac, Linux
   Tasker: customize/automate anything on your phone!
   AutoApps: add advanced functionality to Tasker via plugins

     

João Dias

João Dias

unread,
May 16, 2019, 5:00:27 AM5/16/19
to tas...@googlegroups.com
I just tried sending an intent to Tasker with extras and it worked.

For example, this works:

Setup a profile like this:

    Profile: Receive Intent Test (2)
    Event: Intent Received [ Action:Test Cat:None Cat:None Scheme:* Mime Type:* ]
    Enter: Anon (3)
    A1: Flash [ Text:%test Long:Off ] 
    

Send a broadcast like this from ADB:

adb shell am broadcast -a Test  --es test 'adb'

The %test extra is picked up correctly, so it must be that app that isn't sending the extras in the broadcast.
Thank you for your contact.

   Join: connect multiple devices (send pushes, remote SMS, notifications) on Android, Windows, Mac, Linux
   Tasker: customize/automate anything on your phone!
   AutoApps: add advanced functionality to Tasker via plugins

     

João Dias

João Dias

unread,
May 16, 2019, 5:00:48 AM5/16/19
to tas...@googlegroups.com
By the way, if you want weather data I recommend using the Darksky API in AutoWeb :)


Thank you for your contact.

   Join: connect multiple devices (send pushes, remote SMS, notifications) on Android, Windows, Mac, Linux
   Tasker: customize/automate anything on your phone!
   AutoApps: add advanced functionality to Tasker via plugins

     

João Dias

Ryan Decker

unread,
May 16, 2019, 11:54:32 AM5/16/19
to Tasker

Thanks so much for looking into this and helping me out. 

I'll try Darksky with AutoWeb.

PS  João Dias, I love all your apps. You're a total genius!


João Dias

unread,
May 16, 2019, 12:51:29 PM5/16/19
to tas...@googlegroups.com
Thank you very much :D Hope it works!


Thank you for your contact.

   Join: connect multiple devices (send pushes, remote SMS, notifications) on Android, Windows, Mac, Linux
   Tasker: customize/automate anything on your phone!
   AutoApps: add advanced functionality to Tasker via plugins

     

João Dias

Ryan Decker

unread,
May 18, 2019, 9:09:55 PM5/18/19
to Tasker
Ok here's my result of attempting the DarkSky.org weather API. This works WAY better than Weather Ace. Thanks for pointing me in the right direction:

    Profile: Intrvl: Weather Update (60 min) (74)
    Time: From  6:00AM every 1h Till 12:00AM
    Enter: Weather: Update Periodic (65)
    A1: Vibrate [ Time:10 ] 
    A2: Perform Task [ Name:_UpdateWeather Priority:%priority Parameter 1 (%par1): Parameter 2 (%par2): Return Value Variable:%message Stop:Off ] 
    
    _UpdateWeather (64)
    A1: Perform Task [ Name:_UpdateLocation Priority:%priority Parameter 1 (%par1): Parameter 2 (%par2): Return Value Variable: Stop:Off ] 
    A2: AutoWeb Web Service [ Configuration:API: DarkSky
    API Action: Current
    Units: us
    Language: en Timeout (Seconds):120 ] 
    A3: JavaScriptlet [ Code:// Update Globals
    
    setGlobal(
        "%WeatherAppearantTemperature",
        apparenttemperature
    );
    
    setGlobal(
        "%WeatherCloudCover",
        cloudcover
    );
    
    setGlobal(
        "%WeatherDewPoint",
        dewpoint
    );
    
    setGlobal(
        "%WeatherHumidity",
        humidity
    );
    
    setGlobal(
        "%WeatherIcon",
        icon
    );
    
    setGlobal(
        "%WeatherNearestStormBearing",
        neareststormbearing
    );
    
    setGlobal(
        "%WeatherNearestStormDistance",
        neareststormdistance
    );
    
    setGlobal(
        "%WeatherOzone",
        ozone
    );
    
    setGlobal(
        "%WeatherPrecipIntensity",
        precipintensity
    );
    
    setGlobal(
        "%WeatherPrecipProbably",
        precipprobability
    );
    
    setGlobal(
        "%WeatherAirPressure",
        pressure
    );
    
    setGlobal(
        "%WeatherSummary",
        summary
    );
    
    setGlobal(
        "%WeatherTemperature",
        temperature
    );
    
    setGlobal(
        "%WeatherDateTime",
        new Date(
            Date(time)
        ).toLocaleString()
    );
    
    setGlobal(
        "%WeatherTime",
        new Date(
            Date(time)
        ).toLocaleTimeString()
    );
    
    setGlobal(
        "%WeatherDate",
        new Date(
            Date(time)
        ).toLocaleDateString()
    );
    
    setGlobal(
        "%WeatherUvi",
        uvindex
    );
    
    setGlobal(
        "%WeatherVisibility",
        visibility
    );
    
    setGlobal(
        "%WeatherWindBearing",
        windbearing
    );
    
    setGlobal(
        "%WeatherWindGust",
        windgust
    );
    
    setGlobal(
        "%WeatherWindSpeed",
        windspeed
    );
    
    setGlobal(
        "%WeatherErrorCode",
        err
    );
    
    setGlobal(
        "%WeatherErrorMessage",
        errmsg
    ); Libraries: Auto Exit:On Timeout (Seconds):45 ] 
    A4: JavaScriptlet [ Code:// Build Message
    
    function degreesToCardinal(deg) {
    
        var unit = 11.25;
    
        var cardinal = "";
    
       if (
            deg < (1*unit) || 
            deg > ( 360 - (1*unit) )
        ) {
    
            cardinal = "N";
    
        } else if (
            deg >= (1*unit) && 
            deg <   (3*unit)
        ) {
    
            cardinal = "NNE";
    
        } else if (
            deg >= (3*unit) && 
            deg <   (5*unit)
        ) {
    
            cardinal = "NE";
    
        } else if (
            deg >= (5*unit) && 
            deg <   (7*unit)
        ) {
    
            cardinal = "ENE";
    
        } else if (
            deg >= (7*unit) && 
            deg <   (9*unit)
        ) {
    
            cardinal = "E";
    
        } else if (
            deg >= (9*unit) && 
            deg <   (11*unit)
        ) {
    
            cardinal = "ESE";
    
        } else if (
            deg >= (11*unit) && 
            deg <   (13*unit)
        ) {
    
            cardinal = "SE";
    
        } else if (
            deg >= (13*unit) && 
            deg <   (15*unit)
        ) {
    
            cardinal = "SSE";
    
        } else if (
            deg >= (15*unit) && 
            deg <   (17*unit)
        ) {
    
            cardinal = "S";
    
        } else if (
            deg >= (17*unit) && 
            deg <   (19*unit)
        ) {
    
            cardinal = "SSW";
    
        } else if (
            deg >= (19*unit) && 
            deg <   (21*unit)
        ) {
    
            cardinal = "SW";
    
        } else if (
            deg >= (21*unit) && 
            deg <   (23*unit)
        ) {
    
            cardinal = "WSW";
    
        } else if (
            deg >= (23*unit) && 
            deg <   (25*unit)
        ) {
    
            cardinal = "W";
    
        }else if (
            deg >= (25*unit) && 
            deg <   (27*unit)
        ) {
    
            cardinal = "WNW";
    
        } else if (
            deg >= (27*unit) && 
            deg <   (29*unit)
        ) {
    
            cardinal = "NW";
    
        } else if (
            deg >= (29*unit) && 
            deg <   (31*unit)
        ) {
    
            cardinal = "NNW";
    
        }
        
        return cardinal;
    }
    
    var nl = "\n";
    
    var message = "";
    
    message += 
        `Temperature: ${
            temperature
        }°F | `
    ;
    
    if (
        apparenttemperature != 
        temperature
    ) {
        message += 
            `Feel: ${
                apparenttemperature
            }°F | `
        ;
    }
    
    message += 
        `UV: ${
            uvindex
        }${nl}`
    ;
    
    message += 
        `Cloud Cover: ${
            cloudcover * 100
        }% | `
    ;
    
    message += 
        `Ozone: ${
            ozone
        } | `
    ;
    
    message += 
        `Visibility: ${
            visibility
        } mi${nl}`
    ;
    
    message += 
        `Barometer: ${
            pressure
        } hPa | `
    ;
    
    message += 
        `Humidity: ${
            Math.round(humidity * 100)
        }%${nl}`
    ;
    
    /*message += 
        `Icon: ${
            icon
        }${nl}`
    ;*/
    
    /*message += 
        `Storm: ${
            neareststormbearing
        } ° ${
            neareststormdistance
        } mi${nl}`
    ;*/
    
    message += 
        `Precipitation: ${
            precipintensity
        } in.`
    ;
    
    if (precipprobability != 0) {
        message += 
            ` (${
                precipprobability * 100
            }%) | `
        ;
    }
    
    message += 
        ` | Dew Point: ${
            dewpoint
        }°F${nl}`
    ;
    
    /*message += 
        `Time: ${
            new Date(
                Date(time)
            ).toLocaleString()
        }${nl}`
    ;*/
    
    message += 
        `Wind: ${
            Math.round(windspeed)
        } mph `
    ;
    
    message += 
        `${
            windbearing
        }° `
    ;
    
    message += 
        `${
            degreesToCardinal(windbearing)
        }`
    ;
    
    if (windgust > 0) {
        message += 
            ` with ${
                Math.round(windgust)
            } mph gusts${nl}`
        ;
    }
    
    //flashLong(message); Libraries: Auto Exit:On Timeout (Seconds):45 ] 
    A5: AutoNotification [ Configuration:Title: Weather: %summary
    Text: %message
    Status Bar Text Size: 16
    Separator: , Timeout (Seconds):20 ] 
    A6: Flash [ Text:%message Long:On ] 
    




    

João Dias

unread,
May 22, 2019, 11:18:00 AM5/22/19
to tas...@googlegroups.com
Nice! :) Very glad that works for you!


Thank you for your contact.

   Join: connect multiple devices (send pushes, remote SMS, notifications) on Android, Windows, Mac, Linux
   Tasker: customize/automate anything on your phone!
   AutoApps: add advanced functionality to Tasker via plugins

     

João Dias

Oleksiy Chekin

unread,
Oct 1, 2020, 12:02:14 PM10/1/20
to Tasker
Hey!


I am author of the app. Just found the conversation in time of searching mentions about my apps in the internet, so sorry for the very late answer.

The way you used for to get extras will not work. Third post in the conversation has link to Tasker doc and there you could find:
---
Accessing Intent DataWhen an intent triggers an Intent Received event, the resulting task(s) which are executed have access to many details of the intent via local variables (where relevant and present):
  • %intent_data: the data
  • %evtprm1: the action
  • %evtprm2: the first category
  • %evtprm3: the second category
  • %evtprm4: the URI scheme
  • %evtprm5: the MIME type

In addition, any extras attached to the intent can be accessed under their name, with the following modifications to make them valid variable names:

-----

So, printing intent_data and evtprmX - will not contain the info from extras. For to get variables from extras, you should use their names.

Just as an example (its someones else work, I dont use Tasker) that I quickly translated from Russian:

1) The part receive the data (all data, for any period - he made it simple as example). It just wait till Weather ACE API will send something as response for tasks that ask for weather data. 

Profile: Weather (2)


Event: Intent Received [ Action:mycodefab.aleph.weather.WEATHER_DATA Cat:None Cat:None Scheme:* Mime Type:* ]

Enter: OperateWeather (3)
A1: Variable Set [ Name:%Weather_Text To:%place_name Do Maths:Off Append:Off ]
A2: Variable Split [ Name:%Weather_Text Splitter:, Delete Base:Off ]
A3: Variable Set [ Name:%Weather_Text To:%Weather_Ask at %Weather_Text1 %weather_desc, temperature Do Maths:Off Append:Off ]
A4: Variable Set [ Name:%Weather_Text To:%Weather_Text from %temp_min to Do Maths:Off Append:Off ] If [ %temp_max != %temp_min ]
A5: Variable Set [ Name:%Weather_Text To:%Weather_Text %temp_max degrees Do Maths:Off Append:Off ]
A6: Variable Set [ Name:%Weather_Temp To:%windspeed Do Maths:Off Append:Off ]
A7: Variable Split [ Name:%Weather_Temp Splitter:- Delete Base:Off ]
A8: Variable Set [ Name:%Weather_Text To:%Weather_Text, wind %Weather_Temp1 meters per second Do Maths:Off Append:Off ] If [ %Weather_Temp(#) = 1 ]
A9: Variable Set [ Name:%Weather_Text To:%Weather_Text, wind from %Weather_Temp1 to %Weather_Temp2 meters per second Do Maths:Off Append:Off ] If [ %Weather_Temp(#) = 2 ]
A10: Variable Set [ Name:%Weather_DateTime To:%datetime Do Maths:Off Append:Off ]
A11: Flash [ Text:%Weather_Text Long:Off ]
A12: Say [ Text:%Weather_Text Engine:Voice:default:default Stream:3 Pitch:5 Speed:5 Respect Audio Focus:Off Network:Off Continue Task Immediately:Off Continue Task After Error:On ]
A13: Variable Clear [ Name:%Weather_Ask Pattern Matching:Off ]
A14: Variable Clear [ Name:%Weather_Text Pattern Matching:Off ]  


2) The part contains tasks, that ask Weather ACE for some exact data:

AskWeatherNow (4)
A1: Variable Set [ Name:%Weather_Ask To:сейчас Do Maths:Off Append:Off ]
A2: Send Intent [ Action:mycodefab.aleph.weather.ACTION_GET_WEATHER Cat:None Mime Type: Data:geo:DEFAULT?ver=1&time=now Extra: Extra: Package: Class: Target:Broadcast Receiver ]  

AskWeatherToday (12)
A1: Variable Set [ Name:%Weather_Ask To:сегодня Do Maths:Off Append:Off ]
A2: Send Intent [ Action:mycodefab.aleph.weather.ACTION_GET_WEATHER Cat:None Mime Type: Data:geo:DEFAULT?ver=1&date=today Extra: Extra: Package: Class: Target:Broadcast Receiver ] 

AskWeather3days (18)
<1 day>
A1: Variable Set [ Name:%Weather_Ask To:сегодня Do Maths:Off Append:Off ]
A2: Send Intent [ Action:mycodefab.aleph.weather.ACTION_GET_WEATHER Cat:None Mime Type: Data:geo:DEFAULT?ver=1&date=today Extra: Extra: Package: Class: Target:Broadcast Receiver ]
A3: Wait [ MS:0 Seconds:5 Minutes:0 Hours:0 Days:0 ]
<2 day>
A4: Variable Set [ Name:%Weather_Ask To:завтра Do Maths:Off Append:Off ]
A5: Send Intent [ Action:mycodefab.aleph.weather.ACTION_GET_WEATHER Cat:None Mime Type: Data:geo:DEFAULT?ver=1&date=tomorrow Extra: Extra: Package: Class: Target:Broadcast Receiver ]
A6: Wait [ MS:0 Seconds:5 Minutes:0 Hours:0 Days:0 ]
<3 day>
A7: Variable Set [ Name:%Weather_DateTime To:%TIMES Do Maths:Off Append:Off ]
A8: Variable Set [ Name:%Weather_DateTime To:%Weather_DateTime+172800 Do Maths:On Append:Off ]
A9: Variable Set [ Name:%Weather_Ask To:послезавтра Do Maths:Off Append:Off ]

A10: Send Intent [ Action:mycodefab.aleph.weather.ACTION_GET_WEATHER Cat:None Mime Type: Data:geo:DEFAULT?ver=1&date=%Weather_DateTime Extra: Extra: Package: Class: Target:Broadcast Receiver ] 

Used variables:
%Weather_Ask - description of interval : "now", "today", "tomorrow" и т.д.
%Weather_DateTime - date and time  in Unix format
%Weather_Temp - variable for to split min and max wind speed to different variables
%Weather_Text - text to speak, also used for to get location name


The Weather ACE API http://mycodefab.com/ allows to get weather data on any day or hour that present in the app internal database with lot of weather variables. I stopped to support Weather ACE Tasker pluging (because I dont use Tasker and it hard for me to help people than they have problems with the plugin), but I will definitely continue to support the way with Broadcast Intents.


Hope it will help to someone.


Best regards,

Alex

Reply all
Reply to author
Forward
0 new messages