Rev. 6 (Document updated 09-09-2020)
Written for app version: 1.2.0 – released 12-09-2020
- Available API’s
- Settings screen
- Tendency System
- Alert System
- History and Archiving system
- Things to note
Personal Weather Tablet or PWT for short, is an Android app designed for use on Tablets primarily. The idea stems from the GW1000 weather station server not coming with a display, and since i had an old tablet laying around i didn’t use i created this app for it to be used as a display for my weather station. Since the idea was to use it with old tablets, it works with tablets running Android as old as 4.1. It runs only in landscape mode, and the app is to be open at all time to reliably recieve and store data.
The app is installed through the Google Play store. Simply search for “Personal Weather Tablet”, and you should see the app like below
To understand this documentation there are some few things you must understand about how the app is designed and what the different sections are called
Row 1 is basically fixed sensors, that you cannot change and won’t be able to change the layout of. Only exception is a few sensors selectable in the Settings menu (WH57 and PM2.5) and the last column containing Indoor / Outdoor Temp / Humidity. Through Settings => Layout tab => Row 1 temp/hum Setup you will be able to define which sensors to show there among the Default (eg. 3 armed sensor array) and/or any of the WH31 / DP50 sensors. A minimum of 1 sensor is required and a maximum of 2 is allowed for each indoor and outdoor block
In Row 2 you will be able to customize the content shown. There are currently 4 available layout types:
- 1 content box, 1 extra column
- 1 content box, 2 extra column
- 2 content boxes
- 2 content boxes, 1 extra column (shown above)
Content boxes can contain either
- A webview with websites of your choice and up to 3 websites per Content box. Instead of Websites you also have the ability to select some default content, like a clock
- A graph showing a selectable sensors values over a selectable timespan (from 5 minutes to 24 hours)
The Status bar of the app. When the app first starts and until the first update is received the app version is shown to the far left. After this the last time an update is received is shown.
In the middle, you will see icons of triggered alerts. Tapping those would reveal the exact time an alert occurred (and ended) and let you dismiss the alert, and remove the icon from the status bar
To the far right, current time is shown, and the Settings button to enter the settings menu, where you can change all the applications settings
Personal Weather Tablet currently only supports the GW1000 / DP1500 which includes the HP2551 Console. It is however created with more API options in mind, so if requested it could be relatively easily be implemented at a later stage.
GW1000 Reverse setup
Personal Weather Tablet supports the GW1000 / DP1500 and HP2551, but only through what is internally known as the “reverse” type. In any other circumstance the tablet would normally call an API on the GW1000 to get its data, however the API is, as of this writing, not opened up to the public yet and the only option to get data from it is therefore by setting up the Customized weather service option in the WS View app.
Follow the on screen instructions which appear as a popup when you first launch the application. If you have dismissed the popup and set it to not show again, you can find it by tapping settings in the bottom right corner, go the about tab, and press Show welcome popup
Getting into the applications settings is done by tapping on the Settings button / text in Row 3 to the far right just beside the clock.
When you enter the Settings screen the application will remain on getting data in the background. Settings are saved automatically once changed or otherwise stated.
Furthermore, once you go back from the settings screen to the Dashboard, the application will make a complete restart, to make sure all new settings are loaded.
Now follows a list of the different tabs which can be found on the Settings screen along with a more in depth description of each setting. Some of the settings are described in groups if they are self explainable.
Also Note: Some tabs might not be visible as they are outside the screen to the far right. They will appear if you select one of the last visible tabs.
The connection tab is the first tab you see once you enter the settings screen. Currently it holds two different settings
This setting determines the type of API you want to use with the app. The different available API’s are described further up in the document.
Time between update requests (in seconds)
The app uses this setting to determine how often it should refresh the dashboard with new data. This is entirely dependent on the API you have selected. As an example, the GW1000 Reverse API is working in a way that lets a GW1000 send the update data directly to the tablet. Therefore changing this setting to e.g. 6 seconds will not change anything if your GW1000 is set to only send the data every 16 seconds.
Perhaps the tab with most settings in it, the Layout tab lets you customize what is shown on your dashboard.
Rain visuals settings category
This category holds two settings, which defines the ratio between actual rain rate / daily rain from the weather station and what is shown in the dashboard. The value given here represents what a single rain drop / block in the interface represents from rain reported form the weather station in your selected unit. Note that this does not apply to the very first drop / block shown, as those are shown as soon as there is over 0.0 rain registered in either daily rain / rain rate.
Sensor Cycle settings
The amount of time in seconds, between each time a sensor set (described below) and/or Outdoor Humidity and Dew Point is switched between.
Row 1 temp / hum Setup
Refer to the overview chapter in this document (Row 1 – yellow boxes). The first setting in this category lets you swap the position of the Indoor and Outdoor sensors, so that the Outdoor sensors are on top instead of the Indoor sensors. The last two settings in this category lets you chose which sensors to show in each type of sensor (Indoor or Outdoor). The usage for this stems from some people who might want to use some of their WH31 / DP50 sensors as outdoor sensors, if they don’t have a 3 armed sensor array (the Default option for Outdoor) or want another indoor reading instead of their GW1000’s own reading (the Default option for Indoor).
Row 2 Setup category
This category is the main setup of how Row 2 should look like. It lets you define how many Content boxes you want and how many Extra sensor rows you want. Up to two each. Refer to the overview above for which layout setup options you have. The Extra column layout type holds selectable sets of sensors of your choice further down in the Layout tab. The content box layout type lets you chose between either a Graph to be drawn or a WebView which can hold both websites or other types of content. Both are customizable in the form of what sensors data you want shown in the graph or what websites you want shown in the webview. Customization of the graph type (time span, y axis height etc.), and number of websites in each webview or other content can be done below.
Content Box 1 & Content Box 2 categories
This lets you customize your Content box if you have selected that as your layout type above in the Row 2 Setup category.
If the Graph type is selected above, you get to choose what sensors data is drawn a graph of, how long the graph should span over (basically if the graph should show from 5 minutes of the sensors history to 24 hours of it). Be aware that the longer time span you select, the longer time it will take for the app to start up due to it having to load a longer history into the graph. You also get to chose if you want to lock the Graph’s Y axis top or bottom values. With this set and a value set in its coresponding setting below it, the graph will default to your setting as a min/max value in the Graphs Y axis. However if the data from the sensor exceeds either set min/max value, the graph will automatically expand/shrink. If you chose NOT to lock the either of these two, the Graph will attempt to set the min/max value of the Y axis based on the data in the graph. E.g. the set sensor is a temperature sensor and value of its history in the set time span, ranges from -10 to +25 this is what the graph will have as its min / max values. This will also let the graph change this value dynamically as the min / max data from the sensor in the graph changes over time in the selected time span.
If you have chosen to instead of a graph to use this Graphics box as the Website(s) / Other type setting in Row 2 Setup category, a single setting is unlocked here, that lets you choose which URL’s you want to have shown. These URL’s can be defined in the URL tab, described below. Selecting more than one URL, and Tabs will be rendered on the dashboard for you to select between the URL’s. There is also default selections available here like a Clock.
Remember that if you cannot change any setting in either of Content Box 1 or Content Box 2 category, it is because that the Content Box is not selected in the Row 2 Setup category
Extra column 1 & Extra column 2 categories
If you selected any layout type in the Row 2 Setup category, that contains an Extra column, one or both of these two categories will be available for you.
It lets you select up to 6 extra sensors in a set which will have their value(s) shown in a per set basis. The Sensor Cycle time set above will determine how many seconds a set will be shown for before it is swapped.
Here you can enable or disable the app from running in fullscreen mode. Be aware that on devices running Android older than KitKat (4.4) the bottom navigation bar cannot be hidden due to system limitations.
You will also be able to set a custom screen on/off setting other than the default, which will let the screen remain on for as long as the app is active. Switching the “Use custom timespan to have the screen turned on” enables further two settings, that lets you set at what clock the screen should turn on and off respectively
This tab lets you customize the coloring of the dashboard by either selecting a predefined theme or selecting your own set of pre-defined colors for each element on the dashboard
This category lets you chose between a number of pre-defined themes If you chose to enable the Customize colors option, the rest of the tabs settings will be unlocked for you to change, which lets you be able to select colors for each element of the dashboard. The colors already set when enabled will be selected from the theme you have first selected.
This tab lets you define what units you want to have shown on the dashboard. Be aware that history for all sensors are stored in the unit you have selected here, so if you decide to change your unit later, old data won’t be updated to the new unit!
Dew point calculation
When enabling this setting your device will calculate the Dew Point of the first selected outdoor sensor in Row 1 and swap between that sensors normally shown Humidity and the calculated Dew Point. Time each value is shown is based on the Sensor Cycle setting above.
This setting lets you swap the dashboards “Yearly” rain entry with a “Total” rain entry instead. Some weather stations report this instead of yearly rain, and some report both. This lets you switch between what is shown.
Select which sensors your have
Enabling any of these sensors, besides the Leakage sensor(s), and they will be added to Row1. WH57, will be added above your Solar / UVI values moving those down a bit and removing that columns headings. Enabling PM2.5 sensor(s) will add a box below Indoor/Outdoor values in the last column containing the(ir) data. If you have multiple PM2.5 sensors, each sensors data will be swapped according to the Sensor Cycle setting in the Layout tab. Leakage sensor(s) are not shown on the dashboard, but an alert is created if a leakage is detected in either of them.
Sensor name overrides
The Sensors tab lets you set custom names for all your sensors. This makes it easier to distinguish between your sensors, so instead of having to remember that Extra Sensor 1 is the one in the greenhouse, you can simply set Extra Sensor 1 Name to Greenhouse, and this will be reflected through all the settings and the dashboard.
This is where you can create all you custom alerts. For undstanding purposes an Alert below is not the actual alert the user gets on the dashboard, as this is below called an Alert instance. An Alert below means the customized setting the user creates for when an Alert instance should happen.
Battery alerts category
Enabling the one setting in this category, and the app will react on incoming messages from your weather station regarding low battery, and create an alert instance on your dashboard. These alerts can, as of now, not be customized.
Enabling the one setting in this category, and the app will react on incoming messages from your weather station regarding low battery, and create an alert instance on your dashboard. These alerts can, as of now, not be customized.
Update alert category
This feature, which is set to 120 seconds by default, will alert the user, if no update is received from the Weather Station to PWT after the set amount of seconds. The alert will be displayed as other alerts on the dashboard, and the updated time will flash. Changing this setting to another value, you must remember that it has to be a value higher than that which is set in the Connection tab for “Time between update requests (in seconds)”.
Your current alerts. Tab on the individual alerts to delete them category
This category will to begin with only hold a single setting called Add new.. which opens a small popup windo that lets you create a customized alert. Created alerts will be shown above this button, and tapping those will delete them. You can not edit an alert, so if you wish to change something in it, you can delete the old one and simply create a new one.
When creating an alert you have the following options:
The name you want the alert to display when it is triggered. If nothing is set here the app will set one automatically based on the sensor and other selected values.
The actual sensor to be alerted about
What sensor value you want to be alerted about when its either over or under as selected below. Some sensors have a hidden Threshold Margin, which basically means that if you set a temperature alert to trigger when the sensor value goes below 3 it will not trigger a new alert if the sensor goes up to 3.1 and then back to below 3. It will have to go above 4 before a new alert can be triggered. This is determined automatically in the background, and cannot be changed for now. Some sensors, like Wind and UVI, can also only have a single alert a day due to them being very fluctuative.
You will be alerted when value gets above threshold:
Switching this on, and the text and condition for the alert is flipped. The Text shown is what the Alert is currently set to do
Show Android notification on alert:
Switch this to on if you also want to recieve a standard Android notification based on this alerts setting. If this is not switched on, you will only recieve an in-app notifcation in Row 3.
Play sound when alert is triggered:
When this is switched on an audible sound is played on the tablet if the tablet is not muted.
Select sound to play:
Select the sound to be played from the build in sounds on your tablet
Text color on dashboard:
When the alert is triggered, the sensor value on the dashboard is changed to this color. The alert icon in Row 3 will also be in this color.
Automatically dismiss alert after (mins):
The title describes it all. When set minutes has passed after the alert conditions are no longer met, the alert will be auto dismissed, which includes removing the icon from Row 3 on the dashboard. Setting nothing here, and the alert will remain in Row 3 until it is manually dismissed or the application is closed down.
Remember that all in-app notifications can be dismissed, so no matter what the thresholdmargin is for the alert or if the alert can only happen once every 24 hours, this will reset those conditions, and you can recieve a new alert instance of the alert again
By enabling the top most switch “Use custom tendency system values” you will be able to change what values the tendency system uses to calculate what arrows to chose. The build in values will be updated regularly to finetune the system, but if you prefer your own way of how the tendency is calculated you may do so here. Each type of sensor has its own category here, namely Temperature, Humidity, Barometer and Wind. Wind is calculated using an average from history instead of a single value as described in the Tendency section of this document, otherwise the different categories has the same settings. Each setting is described a bit more by opening their dialogs, and their default value is shown. Be aware, that this default value is dependent on what unit you use!
How long back in history the current data should be compared against
This settings lets you define how long back in time the current value shown on the dashboard is being compared against in minutes. If you write e.g. 120 under temperature, then a value from 2 hours back in time will be compared to the current by the calculation described in the Tendency seciton below.
The tolerance which is given before an arrow change
This is further described in the Tendency section below, but basically the values obtained in the setting above is subtracted to the current value and the value you set here is how much of difference there can be in that result before the arrow goes either up (positive value) or down (negative value).
Time span over which an average is calculated (wind only)
Since wind is very fluctuative it would not show a meaningful tendency by only comparing the current value against one from the history. Therefore this setting allows you to select how much of a time span in minutes of your history and back from now, you want to use to calculate an average to compare against.
The Web tab lets you add Web URL’s that you can then select in the Layout tab under each Graphics Box settings above. For each url you add a name is also required. This is what is displayed in the selection screen along with the tab on the dashboard if you select more than one URL for each Graphics Box.
You also have the option here to set how often the Content Box should refresh the website.
Normally when the webviews in a Content Box is to be refreshed, they are actually completely removed and recreated like when the app first starts. This is due to some Memory management errors on older tablets, that can lead to “out of memory” errors. However due to how this is done, this can also cause issues like the device forgetting where you are position on a map shown on a website. Enabling this option, and the device will instead only refresh the current websites instead of recreating them. Even though this can help in some scenarios like the one mentioned above, be aware that “out of memory” errors can happen and crash the app.
This setting (enabled by default), locks the Graph in the History popup to predefined, non customizable values. Much like described in the Layout tab under Graphics Box 1 & 2, when locking the graph, this will do the same of the History popup graph
Theres also the option to chose how many days from today full history is saved for a sensor. All history on the days before that set number of days from today, will be converted to only hold min / max values for the day. This is done to preserve storage on the tablet.
You can also delete older history here, and tapping on that setting lets you chose how far back you want to keep your history before it is deleted. If you enter 0, ALL history will be deleted.
Information about the version of the app, my contact info, some useful links and info and a button to show the welcome popup screen if you have dismissed it and set it to not show again.
The app has a build in Tendency system, that will show an arrow beside certain sensor values. As default, this will be Wind Gust, Relative Pressure, Indoor/Outdoor Temperature/Humidity. If you chose to add more sensors on the dashboard from the settings menu, those will (if compatible) also have their tendency shown.
The tendency of a given sensors value is shown in the form of an arrow close to the value, going either up, straight or down depending on the tendency for said sensor value.
Tendency is updated at a fixed rate of every 1 minute.
The way it is calculated is by looking at near history data for the sensor and comparing this to the current value of it. For sensors of the type of Wind, Humidity and Temp, the system goes 1 hour back in time, and compares the current value to the new one. For sensors of the barometer type, 2 hour old history is used instead. For the Wind type, instead of a single value from the history an average is calculated over a timespan of 20 minutes but still from 1 hour back, and this is also compared to an average of current wind readings and 20 minutes back. This is done because wind can be very fluctuative, and comparing values directly would not give a correct picture of the tendency
Furthermore once the comparing values, history value and current value, is loaded a small margin is present for each sensor type, which also takes your set unit into consideration, before provided the tendency arrow to show. The two values are subtracted from each other and the difference is then calculated. A value over the margin in positive form would result in an arrow pointing up. A value below the margin in negative form would result in an arrow pointing down. A value in between the margin in positive and negative form would result in a straight arrow.
Example with Wind tendency calculation:
An hour back in time from now, and over a timespan of 20 minutes, a Wind average is calculated by adding stored values together and dividing them with the number of stored values resulting in 11.28 m/s. The same is done from now and 20 minutes back resulting in 8.57 m/s. Subtracting these two values from each other would result in a value of -2,71. The margin for wind in m/s is 0.5, meaning that if the subtracted result is above 0,5 an up arrow is shown, and if the subtracted result is below -0,5 an downward arrow is shown, which would be what this would end in. In between the positive and negative margin would result in a straight arrow
The alert system is already described in detail in the settings tab for it above. Refer to that on details on how to set up alerts
The Alert system is constantly checking incoming updates from your weather station for values that will trigger an Alert Instance from your created Alerts. You can see above how to set up custom alerts.
Once a condition for an alert is met, the system checks your stored alert for info about how it should alert you. If you have selected a sound to play, to change color on the dashboard, and so on. Triggered alerts is stored in the sytem as Active Alert Instances. On your Dashboards Row 3 they are divided by Alert Type. By tapping on a triggered Alert a popup is shown, where you will get a short description of why and what triggered the alert along with a list of each time the Alert Type is triggered (Aert Instances) and has ended. By tapping on Dismiss all, all Alert Instances for the Alert Type will be deactivated and the icon will be removed from the dashboard.
Be aware that the Alert Types created for sensors of Wind, UVI or Solar type, will only be triggered once every 24 hours unless you dismis. There can be only one active Alert Instance of these Alert Types at a time. This is because these sensors have very fluctuative values, and to not have an alert triggered every time their value goes over/under your said threshold, this was introdoced.
Low Battery Warnings
This is not enabled by default, and can be enabled on the Alert tab in settings. Refer to the settings description above for more info.
When this is enabled you will receive a non customizable alert like described above, if any of the shown units that has values shown on the dashboards battery gets low. It is determined in the API when a battery is low, and the system compares the current reported battery level with the one said in the API.
History and Archiving system
The app stores all updates in a local SQLite database stored on your tablet. This is done so that you can view history for each sensor when tapping on the sensor value on the dashboard. When doing so a popup appears that shows a graph for the sensors value over the current day. A Minimum and Maximum value reading for the day is also shown in the top middle, along with when that reading was first seen. Tapping on the back button goes back in days. If you go back more than 7 days, you will see a new screen that instead of showing a graph shows you the min/max for all read sensors for that day. This is done to conserve space on you tablet, but the amount of days you can go back before this is shown instead can be configured in the History tab on the Settings screen.
Every hour a background job is run that checks if there are data in the database which is older than the number of days back from today, which is configured on the History tab in settings. If there is, they are Archived by instead of keeping all values, only the minimum and maximum values for the day are kept.
When this clean up process is running the Updated time text in the far left side of Row 3 on the dashboard is replaced with a message about the cleanup. Once this is done, another message is shown, untill the next update is recieved, whereafter the Updated text returns to normal.
Things to know
Right now, the application is in the Alpha stage, which means that bugs are to be expected. I heavily rely on what reports i get from testers, but below are things i know:
- Scaling across devices might not work correctly, and some things may not show correctly. This is something I can only fix by trial and error since I only have a few devices to test it out on my self. If you experience any issues, let me know your tablet model and i can try and fix it
- The application is required to run in the foreground to log updates to history and have the alert system alert the user. It will in time be moved to a service, so that the user doesn’t have to have it open
- Landscape support only – Might look at support for portrait, however this was never the intention
- Compatible with the following sensors:
- Temp/Humidity sensors (WH31 / WH32 / DP50)
- Soilmoisture sensors (WH51 / DP100)
- PM2.5 sensors (WH43 / DP200)
- Lightning sensor (WH57 / DP60)
- Leakage sensors (WH55 / DP70)
- (more to come later as i get them my self)
- Bugs. There will be some, as its an early version and I’m the only one who has tested it, which surely isn’t enough
- Check out the bugtracker and submit any findings that is not already listed https://bitbucket.org/pingponglee/gw1000-station/issues?status=new&status=open
None yet 🙂
If you have any issues you can contact me either by mail at djda9l (at) gmail . com, or create the issue at the projects issue tracker on bitbucket