Rev. 3 (Document updated 28-06-2020)
Written for app version: Alpha 7 – released 28-06-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 Last column containing Indoor / Outdoor Temp / Humidity. Through Settings => Layout tab => Extra sensor in row 1 temp/hum you will be able to add an extra sensor (WH31 / DP50)
In Row 2 you will be able to customize the content shown. There are currently 4 available layout types:
- 1 graph/web, 1 extra column
- 1 graph/web, 2 extra column
- 2 graphs/web
- 2 graphs/web, 1 extra column (shown above)
Graphics boxes can contain either
- A webview with websites of your choice and up to 3 websites per graphic box.
- 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 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. 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 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 however not as often as normal. 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.
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 will changing this setting to e.g. 6 seconds 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.
Extra sensor in row 1 temp / hum category
Refer to the overview chapter in this document (Row 1 – yellow boxes). The two settings in this category lets you chose an extra sensor each to show along side the two Main sensors in Row 1’s Temperature Humidity column. The usage for this stems from some people wanting two outdoor / indoor sensors, and this lets you put them together.
Row 2 Setup category
This category is the main setup of how Row 2 should look like. It lets you define how many graphs 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 sensors of your choice further down in the Layout tab. The graph/web layout type lets you chose between either a Graph to be drawn or a WebView. 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 can be done below.
Graphics Box 1 & Graphics Box 2 categories
This lets you customize your Graphics 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 use this Graphics box as the Web 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.
Remember that if you cannot change any setting in one of the Graphics Box 1 or Graphics Box 2 category, it is because that Graphics 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 each which will have their value(s) shown.
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.
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!
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.
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.
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 Graphics Box should refresh the website.
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
You also have 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.
Information about the version of the app, my contact info, some usefull links 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). 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 accross 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
- Only compatible with the Temp/Humidity (WH31/WH32) and Soilmoisture (WH51) sensors for now. I will add compatibility with more sensors as i get them my self. For now PM2.5 (WH41) and Lightning (WH57) are planned
- 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