WU for WM: Weather Underground for Watchmaker Update: 2019-04-30 Original: 2017-10-12 See the Instructions file for general information. Release Notes for 2019-04-30: Rebuilt the code with a newer version of Tasker. Fixes a memory leak and other issues. Release Notes for 2019-02-19: Minor fixes and improvements. Release Notes for 2019-01-20: This release provides limited support for a new general-purpose set of weather tags. The new tags are used by WW Dark Sky and will, I hope, become a standard interface for importing weather data into Watchmaker. Release Notes for 2018-10-30: This update brings the target APIs up to the level that is now required by Google Play. Release Notes for 2017-10-12: Removed tidal events from the "event" tag set. Now the "tide" set includes all tidal data and the "event" set includes everything else, including astronomical events. Removed the height tags ( {twu_event_height_p} ) from the "event" tag set. Non-tidal events never have a height so this tag is no longer meaningful. Added epoch tags for items where it is provided. An epoch value is the number of seconds since midnight on 1970-01-01. These values make it easier to perform date/time arithmetic. The new tags are: Forecast: {twu_epoch_p1} Period 1 (today) Epoch (seconds since 1970-01-01 00:00) {twu_epoch_p2} Period 2 (+1 day) Epoch (seconds since 1970-01-01 00:00) {twu_epoch_p3} Period 3 (+2 days) Epoch (seconds since 1970-01-01 00:00) {twu_epoch_p4} Period 4 (+3 days) Epoch (seconds since 1970-01-01 00:00) Tides: {twu_tide_high_epoch} Tide Next High Tide Epoch (seconds since 1970-01-01 00:00) {twu_tide_low_epoch} Tide Next Low Tide Epoch (seconds since 1970-01-01 00:00) {twu_tide_epoch_p1} Period 1 Tide Epoch (seconds since 1970-01-01 00:00) {twu_tide_epoch_} Period Tide Epoch (seconds since 1970-01-01 00:00) Events: {twu_event_epoch_p1} Period 1 Event Epoch (seconds since 1970-01-01 00:00) {twu_event_epoch_p} Period Event Epoch (seconds since 1970-01-01 00:00) Release Notes for 2017-10-09: Fixed an error in the forecast section that caused the QPF values to be rounded to integers. Release Notes for 2017-07-15: Fixed an error in the astronomy section when a rise or set time is blank. I introduced the error when I added the zero-padding code earlier this month. Release Notes for 2017-07-11: Improved the accuracy of the {twu_moon_age_dec} and {twu_moon_age_wm} tags. The actual moon cycle is 29.53 days and the WU API returns integer values from 0 to 30. I am now treating 30 as 29.5. The {twu_moon_age_dec} tag is then calculated by dividing that modified value by 29.53. The {twu_moon_age_wm} tag is calucated by multiplying the {twu_moon_age_dec} value by 9 and adding 1. Release Notes for 2017-07-05: Fixed a bug in the forecast {twu_time_p} tags. Zero-padded all tags where the format is shown as hh:mm in the documentation (the hh and the mm will always be two digits each). Release Notes for 2017-06-18: Fixed a calculation problem with the two new tags: {twu_tide_high_time_dec} Tide Next High Tide Time Decimal of day (0 to <1) {twu_tide_low_time_dec} Tide Next Low Tide Time Decimal of day (0 to <1) Release Notes for 2017-06-17: Added two new tide-related tags: {twu_tide_high_time_dec} Tide Next High Tide Time Decimal of day (0 to <1) {twu_tide_low_time_dec} Tide Next Low Tide Time Decimal of day (0 to <1) Release Notes for 2017-06-16: Added six new tide-related tags: {twu_tide_high_date} Tide Next High Tide Date (yyyy-mm-dd) {twu_tide_high_time} Tide Next High Tide Time (hh:mm) {twu_tide_high_height} Tide Next High Tide Height (ft or m) {twu_tide_low_date} Tide Next Low Tide Date (yyyy-mm-dd) {twu_tide_low_time} Tide Next Low Tide Time (hh:mm) {twu_tide_low_height} Tide Next Low Tide Height (ft or m) Changed {twu_running_as} tag to {twu_as} to make it consistent with my other apps. Release Notes for 2017-06-15: Added {twu_running_as} tag to tell whether this is running under Tasker or as a standalone app. Release Notes for 2017-06-14: Fixed version variable initialization. Release Notes for 2017-06-08: Minor updates to documentation, but no functional changes. Release Notes for 2017-06-06: Updated the version date that had not been updated in the 2017-06-05 release. Release Notes for 2017-06-05: The consolidation of Watchmaker with Watchmaker Premium broke the interface that this app relies on to communicate with Watchmaker. This release fixes that problem. Release NOtes for 2016-06-25: Bug Fix: Failures to connect with Weather Underground would kill the task immediately. It now updates the error counts and cleans up before ending. Release Notes for 2016-05-30: Combined all queries into a single request to reduce API use and improve efficiency. Combined the query response displays, but it can still be accessed by tapping on any of the error counts. Added a requested feature to disable the passing of data into Watchmaker. If you only want to use the data directly in Tasker create a variable named %WU_No_WM and set it to any value. Everything will work as before except that no data will be passed to Watchmaker. To enable Watchmaker again just clear the variable. Release Notes for 2016-05-23: Added better detection of non-response errors, which are now displayed when you tap on the Overall Errors count. Release Notes for 2016-05-22: Better at detecting when no record is received from WU. Still fails, but fails more gracefully. Release Notes for 2016-05-20: Minor fixes. Added the ability to detect whether the app is enabled from a watchface. {twu_interval} will be set to -1 if the app is available but not pulling data. Release Notes for 2016-05-06: Enabled Tasker's "reliable alarms" option in the app to provide reliable updates even under Marshmallow. Switched from exporting every individual Tasker component to exporting a single project XML. As far as I can tell it doesn't limit anything but does make the installation and update process a lot easier and quicker. Release Notes for 2016-05-01: Added new forecast tags for Probability of Precipitation (PoP), Quantitative Precipitation Forecast (QPF), and Snow: {twu_pop_p1}, {twu_qpf_p1}, and {twu_snow_p1}. All of these tags are available for each forecast day. Added a new tag for the app version. Note that I have been using versions in the form of a yyyy-mm-dd date string. If more than one release occurs within a day a letter is appended to the end (such as 2016-04-29b). Release Notes for 2016-04-30: Made changes in the UI to clarify what will and will not stop the app from performing weather updates. Clarified the issue in the documentation. Release Notes for 2016-04-29b: Added logic to detect problems communicating with Watchmaker. Release Notes for 2016-04-29: Split the instructions and release notes into separate files. Added a button to copy the diagnostic information to the clipboard for easy export. Minor improvements to the user interface. Release Notes for 2016-04-28: Name change! The names of the Tasker components and of the app (and app "package") have been changed from "WU Update" to "WU for WM". Make sure you remove the previous versions, since this one will not overwrite them and you'll end up with two. Sorry for the inconvenience, but I am looking into putting this on Google Play and this will make that more practical. Added the ability to select between update intervals of 20, 30, or 60 minutes. The default is 30 minutes. The new tag {twu_interval} provides the interval between updates in minutes. Added an "About" screen to the main application screen. Added diagnostic screens to the main application screen. If you tap on any of the specific query errors (Conditions, Forecast, Astronomy, Tides) it will pop-up a screen that shows the results of the last query of that type. That information should make it easier to figure out why an error happened. Release Notes for 2016-04-26: Increased frequency of the updates from every 30 minutes to every 20. The weather around here changes quickly during this season and I got tired of it being somewhat behind. That still won't put any significant strain on your watch, your data plan, or your Weather Underground API limit. Added error checking data. Each time any time any query (conditions, forecast, astronomy, tides) fails a counter is incremented. A success resets the error number to zero. You can use this to display warnings on a watchface that the weather updates are having problems. (The next release of the Orbital Weather face will include this feature.) The error counters are now included on the app's main window. Added the retrieval settings for Astronomy and Tides. You can use this to determine which optional data is being updated. Added the actual location value that is being sent to Weather Underground. Added display location in addition to the observation location. Display location tells you the location for which Weather Underground is providing the weather. Observation location tells you where the measurements you are getting were taken. Here are the new tags: {twu_update_astronomy} Retrieval setting for Astronomy ("Get" or "Skip") {twu_update_tides} Retrieval setting for Tides ("Get" or "Skip") {twu_overall_errors} Errors since last success in updating any element {twu_conditions_errors} Errors since last success in updating Conditions {twu_forecast_errors} Errors since last success in updating Forecast {twu_astronomy_errors} Errors since last success in updating Astronomy {twu_tides_errors} Errors since last success in updating Tides {twu_update_location} Location that is being sent to Weather Underground {twu_display_location} Current Display Location Full {twu_display_location_area} Current Display Location Area (within City) {twu_display_location_city} Current Display Location City {twu_display_location_state} Current Display Location State {twu_display_location_country} Current Display Location Country Release Notes for 2016-04-25: Added code to prevent failures when numeric values are missing or are not actually numeric (such as "N/A"). All such values will be reported as a space (" ") and will need to be handled by whatever formulas reference them in Watchmaker. Release Notes for 2016-04-24: The code now parses compound values for the location city into {twu_location_area} and {twu_location_city}. As an example, I am currently getting "Balcones Wood, Austin" in the city field from Weather Underground. The new code handles that by setting the {twu_location_area} tag to "Balcones Woods" and the {twu_location_city} tag to "Austin". If only a single city name is present the area tag will be blank. Release Notes for 2016-04-20: Added additional location tags: {twu_location_city}, {twu_location_state}, and {twu_location_country}. Note that each station determines how these are filled in, so the results vary. Release Notes for 2016-04-16: This is a bug fix for anyone using tide data. I accidentally left in an instruction that I was using to test the tide updates. The result was that the previous version would only report tide data for San Francisco, CA no matter where you were or what fixed location you had set. The release fixes that problem. My face is red. Release Notes for 2016-04-15b: Terry Zahn discovered that Watchmaker will only support up to a 5x5 sprite. I should have checked before adding the 6x6 tag. I have also figured out that values I am pulling never include nighttime icons, so the existing {twu_icon_id} tags can be used in combination with a 5x5 sprite. Removed the {twu_icon6x6_id} tag and the {twu_icon6x6_id_p} series of tags. Release Notes for 2016-04-15: The period tags with "tide" in the name now represent only actual tidal events. The similar tags with "event" in the name include both tidal and astronomical events as provided by Weather Underground. Added three new tags: {twu_forecast_count}, {twu_tide_count}, and {twu_event_count} to tell you how many elements are in each list. The forecast count should always be 4, but I wanted to cover all possibilities. Added a "Reset All" option to the Settings screen. This will wipe out everything including your API Key, so be careful with it. Release Notes for 2016-04-13: Note that the meaning of one set of tags has changed! {twu_icon}, {twu_icon_id}, {twu_icon6x6_id}, {twu_icon4x4_id}, and {twu_wm_icon_id} now refer to the current conditions and not to the forecast for today. If you want the previous values use {twu_icon_p1}, {twu_icon_id_p1}, {twu_icon6x6_id_p1}, {twu_icon4x4_id_p1}, or {twu_wm_icon_id_p1}. The combined date and time string that was in {twu_time_p1}, {twu_time_p2}, {twu_time_p3}, and {twu_time_p4} is now broken out separate parts to make it simpler to use. {twu_date_p1}, {twu_date_p2}, {twu_date_p3}, and {twu_date_p4} contain the forecast period's date in yyyy-mm-dd format. {twu_time_p1}, {twu_time_p2}, {twu_time_p3}, and {twu_time_p4} contain the forecast period's time in hh:mm format. None of the date and time components are zero-padded, so don't assume anything about the number of digits. Added conditions tags for {twu_units}, {twu_description}, {twu_feelslike}, and {twu_visibility}. Added forecast tags for {twu_time_p1}, {twu_time_p2}, {twu_time_p3}, {twu_time_p4}, {twu_description_p1}, {twu_description_p2}, {twu_description_p3}, and {twu_description_p4}. The new description tags closely mimic the icon names, but with normal capitalization and spacing. Added tide data with the tags {twu_tide_location}, {twu_tide_height_max}, {twu_tide_height_min}, and the numbered period sets {twu_tide_date_p?}, {twu_tide_time_p?}, {twu_tide_height_p?}, and {twu_tide_type_p?}. Improved behavior of the "main screen" for Tasker users. Release Notes for 2016-04-10: Fixed a bug that would cause the task to stop before getting the forecast and astronomy data. You can now force a fixed location by entering a latitude,longitude pair, a US State/City pair, a Country/City pair, or a US zipcode from the Settings screen. See the appropriate "Setting up" section above for instructions on how to get back to the Settings. You can now choose whether to get astronomy data. If you don't need it you can use fewer API calls and make the process run a little faster. As other types of data (beyond the core weather information) become available those will also be optional. Release Notes for 2016-04-09: Added temperatures and icon names for the three-day forecast. Added the setup scene that had only been in the app to the Tasker version. Release Notes for 2016-04-07b: This will effect very few people, but I changed the name of the temporary variable that is used to set the location from %T_Location to %WU_Update_Location to be consistent with the other names. If you changed where that value is coming from you will need to update the name. Release Notes for 2016-04-07: This version adds a major new option. I built a basic user interface and generated a standalone app. You can simply install and run the APK. It will ask you to provide your Weather Underground API Key the first time it starts. There are also options to switch between English and Metric units, change your API Key, and shut down the app. If you use the app you do not need any of the other components (or Tasker). Release Notes for 2016-04-05: My apologies for changing a few of the tag names from previous versions. I will try not to do that again. I wanted to make the naming more consistent and to provide data in formats that are more useful from inside Watchmaker. Here are the changes: Old Tag New Tag Description -------- ------- ----------- {twu_wm_icon} {twu_wm_icon_id} Today's Watchmaker Icon (1-9) {twu_moon_rise_hour} *removed* see {twu_moon_rise_dec} {twu_moon_rise_minute} *removed* see {twu_moon_rise_dec} {twu_moon_set_hour} *removed* see {twu_moon_set_dec} {twu_moon_set_minute} *removed* see {twu_moon_set_dec} {twu_sun_rise_hour} *removed* see {twu_sun_rise_dec} {twu_sun_rise_minute} *removed* see {twu_sun_rise_dec} {twu_sun_set_hour} *removed* see {twu_sun_set_dec} {twu_sun_set_minute} *removed* see {twu_sun_set_dec} *added* {twu_icon_id} Today's WU Weather Icon ID (1-20) *added* {twu_moon_age_dec} Moon Age Decimal of cycle (0-1) *added* {twu_moon_rise_dec} Moon Rise Decimal of day (0-1) *added* {twu_moon_set_dec} Moon Set Decimal of day (0-1) *added* {twu_sun_rise_dec} Sun Rise Decimal of day (0-1) *added* {twu_sun_set_dec} Sun Set Decimal of day (0-1)