Weather on statusbar

Share and discuss your flows and ideas with other users.

Moderator: Martin

Post Reply
syndromtr
Posts: 31
Joined: 01 Feb 2013 13:28

Weather on statusbar

Post by syndromtr » 17 Apr 2013 20:54

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
Attachments
weather2.xml
(5.96 KiB) Downloaded 1962 times
Last edited by syndromtr on 18 Apr 2013 17:47, edited 1 time in total.

andosgandos81
Posts: 11
Joined: 29 Mar 2013 08:26

Re: Weather on statusbar

Post by andosgandos81 » 18 Apr 2013 16:04

Hi,

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

syndromtr
Posts: 31
Joined: 01 Feb 2013 13:28

Re: Weather on statusbar

Post by syndromtr » 18 Apr 2013 17:48

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,

pat2net
Posts: 85
Joined: 01 May 2013 09:18

Re: Weather on statusbar

Post by pat2net » 27 Sep 2013 13:21

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.
Last edited by pat2net on 01 Oct 2013 15:10, edited 1 time in total.

pat2net
Posts: 85
Joined: 01 May 2013 09:18

Re: Weather on statusbar

Post by pat2net » 01 Oct 2013 15:07

There was an error in the script to get the sunset minute here is the correct flow.

http://automagic4android.com/flow.php?i ... 306f3f67cf
Last edited by pat2net on 04 Oct 2013 00:30, edited 1 time in total.

pat2net
Posts: 85
Joined: 01 May 2013 09:18

Re: Weather on statusbar

Post by pat2net » 02 Oct 2013 10:17

I add a widget to show sunrise and sunset values.

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

Trent Bates
Posts: 8
Joined: 07 Oct 2017 19:41

Re: Weather on statusbar

Post by Trent Bates » 23 May 2018 13:57

Wunderground is not a good option any longer. I've read that the cheapest membership is $850...

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

User avatar
Desmanto
Posts: 2709
Joined: 21 Jul 2017 17:50

Re: Weather on statusbar

Post by Desmanto » 23 May 2018 16:25

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)
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.

davinik
Posts: 11
Joined: 23 Oct 2018 12:36

Re: Weather on statusbar

Post by davinik » 02 Nov 2018 14:53

Any update for having weather on status bar at least external temperature Based on location?

syndromtr
Posts: 31
Joined: 01 Feb 2013 13:28

Re: Weather on statusbar

Post by syndromtr » 02 Nov 2018 18:58

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

Post Reply