Weather on statusbar
Moderator: Martin
Weather on statusbar
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
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
- Attachments
-
- weather2.xml
- (5.96 KiB) Downloaded 1989 times
Last edited by syndromtr on 18 Apr 2013 17:47, edited 1 time in total.
-
- Posts: 11
- Joined: 29 Mar 2013 08:26
Re: Weather on statusbar
Hi,
can't download/open the attached file "weatherflow.xml", by clicking it happens nothing?!
can't download/open the attached file "weatherflow.xml", by clicking it happens nothing?!
Re: Weather on statusbar
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,
regards,
Re: Weather on statusbar
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.
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.
Last edited by pat2net on 01 Oct 2013 15:10, edited 1 time in total.
Re: Weather on statusbar
There was an error in the script to get the sunset minute here is the correct flow.
http://automagic4android.com/flow.php?i ... 306f3f67cf
http://automagic4android.com/flow.php?i ... 306f3f67cf
Last edited by pat2net on 04 Oct 2013 00:30, edited 1 time in total.
Re: Weather on statusbar
I add a widget to show sunrise and sunset values.
http://automagic4android.com/flow.php?i ... 9961465a44
http://automagic4android.com/flow.php?i ... 9961465a44
-
- Posts: 8
- Joined: 07 Oct 2017 19:41
Re: Weather on statusbar
Wunderground is not a good option any longer. I've read that the cheapest membership is $850...
https://www.wunderground.com/weather/api/
https://www.wunderground.com/weather/api/
Re: Weather on statusbar
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)
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)
Index of Automagic useful thread List of my other useful posts (and others')
Xiaomi Redmi Note 5 (whyred), AOSP Extended v6.7 build 20200310 Official, Android Pie 9.0, Rooted.
Xiaomi Redmi Note 5 (whyred), AOSP Extended v6.7 build 20200310 Official, Android Pie 9.0, Rooted.
Re: Weather on statusbar
Any update for having weather on status bar at least external temperature Based on location?
Re: Weather on statusbar
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
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