[Android Apps and Games] CodeMonkey:
Update time for location within Tasker is fixed btw - you can adjust location retrieval using the Monitor settings in Tasker settings. Default for network location (%LOCN) is 30 seconds when display is on and 10 mins when off.

My profile quoted above displays the town / locality where I am at the time of update. For the sake of completeness I shall repeat it below in case you want more than just the setting.

*EDIT* having reread your question this may be far more that (or not what) you wanted, but what the hell..*EDIT*

Ok, eyes down and here we go..

Assumptions:

1. A mechanism for determining when not at home or work already exists.

I use a variable %MYLOC to track my general location. This can have (at the moment) 3 values - 0, 1 or 2.

0 = other location

1 = Home

2 = Work

2. A mechanism for tracking current behaviour already exists.

I specifically block the PlaceUpdate profile from running whilst I'm driving through my user variable %MODE - current possible values are 0, 1, 2, 10, 11

0 - default

1 - Asleep

2 - In Meeting

10 - Driving

11 - Driving & navigating (ie satnav software running)

2. Non UK residents may need to adjust the tasks to cater for their returned location information.

3. User variable %LASTLOCN is used to track the last %LOCN acted upon

4. User variables %LOCNAME and %PCODE are used to store location name and the (approximate) postcode.

%PCODE is used to obtain weather information using the Google weather API.

Setting %LOCNAME triggers a short task to update my Minimalistic Text widget.

Setting %PCODE triggers a task (PlaceChanged) which updates the weather information if the latest %LOCN is different to %LASTLOCN (a user variable) and sufficient time has elapsed since the last weather forecast retrieval.

The Profile - PlaceUpdate

Contexts:

1. Variable Value: %MYLOC = 0

2. Variable Value: %MODE < 10

3. Time : Repeat every 1 hours (from & to unchecked)

Entry Task - PlaceUpdate

1. Perform Task 'GetPlaceName' IF %LASTLOCN !~ %LOCN (Priority 8)

Task GetPlaceName

1. Variable Clear %LOCNAME

2. Variable Clear %PCODE

3. HTTP GET:

Port: maps.google.com/maps/api/geocode/json?latlng=%LOCN&sensor=false

Timeout: 10

Mime Type: text/xml

4. Variable Split %HTTPD

Splitter: ""types": [ "postal_code" ]

5. Variable Split %HTTPD1

Splitter: "locality",

Delete Base

6. Variable Split %HTTPD11

Splitter: }, {

Delete Base

7. Variable Clear %HTTPD12

8. Variable Clear %HTTPD13

9. Variable Clear %HTTPD14

10. Variable Clear %HTTPD15

11. Variable Clear %HTTPD16

12. Variable Clear %HTTPD111

13. Variable Clear %HTTPD114

14. Variable Clear %HTTPD115

15. Variable Clear %HTTPD116

16. IF %HTTPD113 Is SET

17. Variable Split %HTTPD113

Splitter: "short_name": "

Delete Base

18. Variable Clear %HTTPD1131

19. Variable Split %HTTPD1132

Splitter: ",

Delete Base

20. Variable Set %LOCNAME to %HTTPD11321

21. Variable Clear %HTTPD11321

22. Variable Clear %HTTPD11322

23. Variable Clear %HTTPD11323

24. Variable Clear %HTTPD112

25. End If

26. IF %LOCNAME ! Set

27. Variable Split %HTTPD112

Splitter: "short_name": "

Delete Base

28. Variable Clear %HTTPD1121

29. Variable Split %HTTPD1122

Splitter: ",

Delete Base

30. Variable set %LOCNAME to %HTTPD11221

31. Variable Clear %HTTPD11221

32. Variable Clear %HTTPD11222

33. End If

34. Variable Split %HTTPD2

Splitter: "short_name": "

Delete Base

35. Variable Clear %HTTPD21

36. Variable Split %HTTPD22

Splitter: ",

Delete Base

37. Variable Split %HTTPD221

Splitter:

Delete Base

38. Variable Set %PCODE to %HTTPD2211%HTTPD2212

39. Variable Clear %HTTPD2211

40. Variable Clear %HTTPD2212

41. Variable Clear %HTTPD3

42. Variable Clear %HTTPD4

43. Variable Clear %HTTPD5

44. Variable Clear %HTTPD6

45. Variable Clear %HTTPD7

46. Variable Set %LASTLOCN to %LOCN

Some Debugging Notes

If you have problems getting this working:

1. Check your splitters - I have written them here as Splitter: everything after the : and space is the splitter

2. Check what you're getting back from the HTTPGet by using a popup to get your %LOCN and feeding that into a browser to get the XML back on your laptop / PC.

3. There are a lot of variable clears here because I like to clean up after myself, they can muddy the waters when debugging though so you might want to add them in afterwards.

4. I do get the very occasional failure (which displays "Unknown" in my widget). This is probably due to a couple of towers with dodgy data near my office.

5. This comes with no guarantees - I built it using some Google documentation and a lot of patience. YMMV

Enjoy!