Page 1 of 1

Weather on statusbar

Posted: 17 Apr 2013 20:54
by syndromtr
EDIT: version2 using 2 xml files, added some delay (2 seconds)

1) get a free account from http://www.wunderground.com/weather/api/ (signup for api key)
2) load (import) this flow to your automagic,
3) by default, this flow will update notification on statusbar every ~1 hour, everyday, from 08:00 to 23:00 (you can change them) if active network is Mobile or Wifi
4) "wunderground api conditions xml" & "wunderground api forecast xml" these are names of HTTP request actions, enter your api key there, and change the link according to your city & country.. you can also change lang:XX there.. extension must be same, xml
examples:
api.wunderground.com/api/<yourapikey>/conditions/lang:TR/q/tu/Antalya.xml
api.wunderground.com/api/<yourapikey>/conditions/lang:EN/q/uk/London.xml

5) Action: notification status bar: i wrote "Cityname" there as an example, write your city there,

result: on statusbar: below data will be displayed:
<cityname> <forecast weather> <temp now> (<tempfeeling now>) deg C
<today min. temp>(<today max. temp>) deg C xx km/h <winddirection> Rain probability % <time xml retrieved>

you may examine other wunderground api xml's(you need to add another http request), add them and, for ex. you can add sunrise-sunset, you can add other alerts, for ex. snow..

api.wunderground.com/api/<yourapikey>/astronomy/q/Australia/Sydney.xml

wunderground api help is here http://www.wunderground.com/weather/api/d/docs
note that if you want to use data features there (alerts, astronomy, forecast ... ) make sure that you'll use xml extension at the end of http:// (instead of json)
so you can get variables with evaluateXPathAsString (var, "//xpath") in the script

Re: Weather on statusbar

Posted: 18 Apr 2013 16:04
by andosgandos81
Hi,

can't download/open the attached file "weatherflow.xml", by clicking it happens nothing?!

Re: Weather on statusbar

Posted: 18 Apr 2013 17:48
by syndromtr
ok thanks for feedback, now i edited flow in automagic in smartphone, instead of editing in PC, so it should work.. also edited my first post.
regards,

Re: Weather on statusbar

Posted: 27 Sep 2013 13:21
by pat2net
Thanks for your flow and your explanation. I made a flow to get sunrise and sunset time.

Get your free code as said above and put it in the action 'wunderground astronomy'.

*edit* I remove the link because there was an error in the script to get the sunset minute. The folowimg post has the good script.

Re: Weather on statusbar

Posted: 01 Oct 2013 15:07
by pat2net
There was an error in the script to get the sunset minute here is the correct flow.

http://automagic4android.com/flow.php?i ... 306f3f67cf

Re: Weather on statusbar

Posted: 02 Oct 2013 10:17
by pat2net
I add a widget to show sunrise and sunset values.

http://automagic4android.com/flow.php?i ... 9961465a44

Re: Weather on statusbar

Posted: 23 May 2018 13:57
by Trent Bates
Wunderground is not a good option any longer. I've read that the cheapest membership is $850...

https://www.wunderground.com/weather/api/

Re: Weather on statusbar

Posted: 23 May 2018 16:25
by Desmanto
Try OpenWeatherMap : https://www.openweathermap.org/api

Or if you need it hourly, you can actually just visit the usual web page and parse the data from there using regex, as has been done by other (look at my index, parsing data or HTTP)

Re: Weather on statusbar

Posted: 02 Nov 2018 14:53
by davinik
Any update for having weather on status bar at least external temperature Based on location?

Re: Weather on statusbar

Posted: 02 Nov 2018 18:58
by syndromtr
yes, instead of wunderground (no free api for now)

this one also recommended, also predictions are accurate (at least for me)

dark sky api : https://darksky.net/dev

example, a lot customizable with language and units, some parts can be excluded for simple json.

https://api.darksky.net/forecast/<your api key>/37.7735,29.0874?exclude=currently,minutely,hourly&lang=tr&units=ca