Page 8 of 21
Re: Software: modifications and extensions Toon
Posted: Tue Jan 17, 2017 11:59 pm
by Toonz
Re: Software: modifications and extensions Toon
Posted: Thu Jan 19, 2017 12:34 am
by BrainHunt
All, Inspired by, and based on, the applications I saw here and the excellent buienradar tile from Toonz, I decided to dive a bit deeper into qml and java and build my first application. I have used the clock tile and added information regarding the rain expectations from Buienradar. It shows the upcoming three instances with rain, if any rain is expected in the coming hours. This way, you don't need an extra tile for this information.

- Regenkans tile view
- Regenkans tile.PNG (67 KiB) Viewed 11519 times
Clicking the tile, activates the screen with the full details regarding rain expectation.

- Regenkans screen view
- Regenkans screen.PNG (80.93 KiB) Viewed 11519 times
Attached you can find the files. Apart from registering the tile as 'regenkans' in the Globals.qml file, you will also need to change the lattitude and longitude values in the regenkansApp.qml file. Note: Buienradar only accepts 2 decimals for the rain forecast data.
Few disclaimers

: Based on a limited search, I have made my own interpretation of what kind of rain is expected (drizzle versus heavy rain, etc). If anyone knows better, please let me know.
If you have any suggestions or comments, please let me know.
EDIT (marcelr): attachment removed, please get the latest version from the downloads section.
Re: Software: modifications and extensions Toon
Posted: Thu Jan 19, 2017 1:46 pm
by Toonz
Hi Brainhunt,
great stuff! I wasn't aware of this buienradar gadget. Would like to include this in the BuienradarApp when finished if you're ok.
Just some suggestions/ideas: we could make the buienradar map clickable and take the mouse click position to calculate the Lon/Lat values.
Or make two text entry boxes for it.
Thinking further: the message '23:15 geen regen verwacht' could also be put on the Buienradar tile (in dim state only).
Keep going

Re: Software: modifications and extensions Toon
Posted: Thu Jan 19, 2017 4:04 pm
by BrainHunt
Hi Toonz,
Thanx, I'll do that!
Feel free to edit/use part of the material. I noticed today that I forgot to remove two comment symbols so the map doesn't update at the moment. I'll post a new version later this week (I am travelling). By the way, buienradar also offers a graphical overview of the focused rain radar but I haven't been able to include that in the qml code (it isn't accepted as an animated picture). If you have any suggestions, please let me know. As an example picture:
gadgets.buienradar.nl/gadget/zoommap/?l ... amp;voor=1
More info on the free buienradar data can be found at:
http://www.buienradar.nl/overbuienradar/gratis-weerdata
Regarding your suggestions:
- - I think that programming a way to input the lon/lat values gives much more hassle than just editing the two values in the qml file. The average person on this forum is quite capable to do that (and more
)
- If rain is expected, the current 1 line that only states that at 23:15 no rain is expected will change in 3 lines, showing the upcoming first three times that rain is expected. Of course you are free to summarize that again in one line, just be aware that it is currently programmed in that way
Re: Software: modifications and extensions Toon
Posted: Thu Jan 19, 2017 8:00 pm
by Toonz
BrainHunt wrote:By the way, buienradar also offers a graphical overview of the focused rain radar but I haven't been able to include that in the qml code
I looked at this as well but this one is not offered as an animated gif but only as an iFrame to be included in your own website unfortunately. Not compatible with QML.
BrainHunt wrote:
- If rain is expected, the current 1 line that only states that at 23:15 no rain is expected will change in 3 lines, showing the upcoming first three times that rain is expected. Of course you are free to summarize that again in one line, just be aware that it is currently programmed in that way
The ideal option is to show a small graph on the tile with the mm rain data for the next hour(s) I think, more work....

Re: Software: modifications and extensions Toon
Posted: Fri Jan 20, 2017 1:00 am
by Toonz
Just a mockup example (with my 24 points testdata instead of the 24 values from buienradar (no rain expected right now)).
Needs a proper Y axis with max value in mm/u and it would be nice if we can add rasterlines for more precise reading. Or simply click on the tile to go to the Buienradar page with your detailed table. This tile is certainly not the final answer but it might spark further ideas.
I finally installed VNC, so can show some decent screenshots

.

- RegenverwachtingTile.png (22.88 KiB) Viewed 11416 times
Re: Software: modifications and extensions Toon
Posted: Fri Jan 20, 2017 1:14 am
by BrainHunt
Looks great! Can you share the code?
I looked at the tiles in the graph folder but could not figure out how to adjust the source data. Probably my lack of experience with qml/java...

Re: Software: modifications and extensions Toon
Posted: Fri Jan 20, 2017 9:06 pm
by Toonz
sure, all data is hardcoded in the Tile.
it was based on the original ./app/graph/HourTile.qml
You can replace all hardcoded values by 'app.<variablename>' in the Tile and fill those variables in the ..App.qml (like it is done in the Buienradar app)
EDIT (marcelr): attachment removed, please get the latest version from the downloads section.
Re: Software: modifications and extensions Toon
Posted: Sun Jan 22, 2017 5:43 pm
by Toonz
Hi all,
very much inspired by Brainhunt (thanks again) I present the next (
beta) version of Buienradar"
changelog:
- added a second tile with 'Regenverwachting' for the next two hours (courtesy of Brainhunt).
I listed this version as
beta because:
- there is no rain forecasted in the next week or so, I haven't therefor been able to test this with real life data.
- the number to the left of the graph is currently the maximum value of mm of rain. Would like to make a more proper Y-axis.
- I am not sure yet whether it makes sense to scale the Y-axis to the maximum value as it is now, or whether to use a fixed Y-axis .
I think the last option might be best as you then can see from a distance whether it is going to rain a lot or just a drizzle.
- Current 2-hour forecast is based on the longitude/latitude coordinates which you will need to edit yourself in BuienRadar.App to get data for your own location.
In the final release I would like to implement some sort of data entry possibility for the coordinates.
(Really would like to crack the issues with reading parameters from a file correctly after boot)
Feel free to comment /make suggestions.
First time in my life I am looking forward to rain I think
EDIT (marcelr): attachment removed, please get the latest version from the downloads section.
screenshot tile (based on my own mockup rain forecast file):
If there is no rain predicted in the next 2 hours the tile will only show "Geen regen verwacht".

- Screenshot_2017-01-22-16-18-26.png (22.92 KiB) Viewed 11262 times
Re: Software: modifications and extensions Toon
Posted: Mon Jan 23, 2017 12:38 am
by BrainHunt
Hi Toonz,
Looks great!
I haven't done anything due to the great skating weather this weekend (didn't mind that there was no snow/rain predicted

).
As food for thought, the reason that I combined the rain expectations with the clock is that we only have limited space on the main screen of the Toon. With only 4 tiles, I am currently rethinking what should be the key items to show (like the current time and rain expectations) and what to show in 'second layer screens' (so accessible through tiles or icons at the top).
Any thoughts on that from your side?
Best.
Re: Software: modifications and extensions Toon
Posted: Mon Jan 23, 2017 1:04 am
by Toonz
My reason for a separate tile was to allow enough space for the graph to be visible in the living room from a distance when going outdoors, without the need to walk to the Toon to press some keys to get the data. However, I haven't been able to experience daily usage because of the beautiful weather lately.
My four 'favourite' tiles at the moment are: adjusted clock tile (included day of week and date), Buienradar tile (of course

), Rainradar tile below it. Under the clock I have the latest 4 hours electricity usage tile (standard tile).
I agree with you that if there is no rain, the rainradar tile is wasting space......
Re: Software: modifications and extensions Toon
Posted: Thu Jan 26, 2017 11:50 am
by Toonz
Hi all,
<<<< Updated post with new beta version >>>>
while waiting for the rain (hopefully coming weekend) I did some more work on the app.
Changelog:
- improved layout Regen tile (now which Y-axis scaled to the Max Value)
- after clicking on the Regen tile you will get a data entry screen where you can key in the longitude and latitude coordinates.
values must be entered with a decimal point and will be rounded to 2 decimals due to the resolution of the data feed.
The coordinates will be shown immediately on a detailed google map for validation
To do:
- still to decide whether to use a fixed scale for the Y-axis on the tile or not. Need some rain for that

. Currently scaling to MaxValue
- update: changed alfanumeric keyboard to numeric keyboard plus a lot of code cleanup
<<<< removed attachment as newer version is posted >>>>>
As always, comments/suggestions are always welcome.
Regards, Toonz
Re: Software: modifications and extensions Toon
Posted: Sat Jan 28, 2017 4:03 pm
by Toonz
Hi all,
Probably the last version of buienradar v5 (pending new insight when rain starts):
changelog:
- I made the Y-axis scaling configurable. When clicking on the 'Regen' tile you can change the Y-axis scale as well to enter the maximum #mm of rain. Entering value 0 (zero) will make the graph scaled to the max value of the data feed (rounded to the next .5 mm of rain). This should cover everyone's needs.
- I had to do some 'defensive programming' when using built-in function like the keyboards. Behaviour of these functions slightly differ between firmware releases. Current version is tested on firmware 3.2 and 3.6 and works fine on both.
- further cosmetic changes to the tile.
As always, feel free to comment and let it rain......
EDIT (marcelr): attachement removed, please get the latest version from the downloads section.
Re: Software: modifications and extensions Toon
Posted: Sat Jan 28, 2017 9:29 pm
by Toonz
apologies, I just noticed some leftovers of testing in BuienradarApp.qml:
it adds always 0.1mm to the reading. It looks weird now when the Y-Axis is very small e.q. very little rain expected (kind of thick X-axis).
You can remove "0.1 +" on row 480 and change row 493 to "if (maxValue > 0) {"
I will include this in a next version as well
Re: Software: modifications and extensions Toon
Posted: Mon Jan 30, 2017 8:57 pm
by marcelr
Hi, I added the newest version (including the suggested edit) to the downloads thread. All intermediate version have been removed from this thread.
For further development, please use the newly uploaded version (5.0.6).
Changes:
0.1 mm precipitation offset removed.
temperature readings adapted to current locale (again).
Second min temp in details screen changed to max temp.