Toon app: Buienradar

Forum about forum-provided applications on Toon

Moderators: marcelr, TheHogNL, Toonz

yjb
Member
Member
Posts: 211
Joined: Fri Apr 17, 2009 1:15 pm
Location: Venhuizen, Netherlands

Re: Toon app: Buienradar

Post by yjb »

Hi,

For whatever reason KNMI station Berkhout (6249) never returns a value for air pressure (ld). This results in NaN hPa on the screen.

As I'm not really familiar with java I just made a quick 'n dirty fix:

Code: Select all

 diff buienradar*
--- buienradar.js
+++ buienradar.js.org
@@ -103,9 +103,6 @@


 function formatLuchtdruk(ld, humidity) {
-       if (isNaN(ld)) {
-       ld = 0;
-       }
        return i18n.number(ld, 0, i18n.general_rounding, 1) + " hPa; lv: " + humidity + " %";
 }
Might be nicer to remove the reference to a value completely if a value is NaN (not only for air pressure)
Toonz
Forum Moderator
Forum Moderator
Posts: 1873
Joined: Mon Dec 19, 2016 1:58 pm

Re: Toon app: Buienradar

Post by Toonz »

Thanks for the tip, on my todo list now...
member of the Toon Software Collective
Blacky's Boss
Starting Member
Starting Member
Posts: 36
Joined: Tue Jul 11, 2017 10:39 am

Re: Toon app: Buienradar

Post by Blacky's Boss »

I just noticed that the map is gone in the rain-location settings.
And the prediction seems to be a bit off, comparing to the android app "Buienalarm"
Toonz
Forum Moderator
Forum Moderator
Posts: 1873
Joined: Mon Dec 19, 2016 1:58 pm

Re: Toon app: Buienradar

Post by Toonz »

Blacky's Boss wrote:I just noticed that the map is gone in the rain-location settings.
And the prediction seems to be a bit off, comparing to the android app "Buienalarm"
hmmm, this is the current response from google when retrieving the map:
"The Google Maps Platform server rejected your request. You must use an API key to authenticate each request to Google Maps Platform APIs. For additional information, please refer to http://g.co/dev/maps-no-account"

Seems that I need to pay to continue using the services (although there is a free number of calls each month which is more than sufficient).
I will look into it later this month (after the calendar app has got a few updates)
member of the Toon Software Collective
Toonz
Forum Moderator
Forum Moderator
Posts: 1873
Joined: Mon Dec 19, 2016 1:58 pm

Re: Toon app: Buienradar

Post by Toonz »

I looked into this and cannot get it to work on Toon alone (due to the lack of a proper browser) with a purchased api key.
Alternatively I could host a webserver as intermediate but don't feel it's worth the trouble.

I will remove this map and provide instruction how to get your exact coordinates from a browser on another device.
I will include this in the next version which should also be compatible with firmware 5.0.0 (takes a while)

Kind regardz,

Toonz
member of the Toon Software Collective
TheHogNL
Forum Moderator
Forum Moderator
Posts: 2125
Joined: Sun Aug 20, 2017 8:53 pm

Re: Toon app: Buienradar

Post by TheHogNL »

You could also try this:

curl -Nks https://ipinfo.io/json
or
curl -Nks https://get.geojs.io/v1/ip/geo.json

both are free, and getting very close to my home (neighbouring cities, but close enough for weather).

You could use that as a default setting when started for the first time.
Member of the Toon Software Collective
Toonz
Forum Moderator
Forum Moderator
Posts: 1873
Joined: Mon Dec 19, 2016 1:58 pm

Re: Toon app: Buienradar

Post by Toonz »

this isn't good enough, for the rain prediction tile you need the nearest coordinates to your house in two decimals (which gives you a square of a few hundreds meters wide.
Visit maps.google.nl, zoom in to your location and click on your house on the map. You will get a popup window with the longitude/latitude coordinates.
Write down these coordinates (rounded to two decimals) and enter these into the buienradar config screen.

Rounding to two decimals because this is the lowest resolution in which the buienradar website provides the rain prediction datasets
member of the Toon Software Collective
TheHogNL
Forum Moderator
Forum Moderator
Posts: 2125
Joined: Sun Aug 20, 2017 8:53 pm

Re: Toon app: Buienradar

Post by TheHogNL »

Another option could be this:

Image

This is a simple javascript running on the toon which, when browsed to from your mobile, asks the geo location of the phone and prints it on screen (could be then automatically entered in buienradar app ofcourse).

Only need to enable https support on the toon for this (as this javascript doesn't work on http only).

Owh darn.. now you all know where I am...
Member of the Toon Software Collective
Toonz
Forum Moderator
Forum Moderator
Posts: 1873
Joined: Mon Dec 19, 2016 1:58 pm

Re: Toon app: Buienradar

Post by Toonz »

hi all,

the new version 8.4.1 is available on ToonStore.
Changelog:
- installer is now firmware 5 compatible, it will patch the app on the fly when installed on firmware 5.
- removed the google map on the detailed location configuration screen. Manually need to enter your lat/lon coordinates now
this is due to the new licensing model of google maps which cannot be supported on Toon without a browser

Kind regardz,

Toonz
member of the Toon Software Collective
Strijker
Starting Member
Starting Member
Posts: 7
Joined: Thu Nov 06, 2014 9:58 am

Re: Toon app: Buienradar

Post by Strijker »

For some time now, my Toon shows some rain to be expected while there realy isn't any rain forecasted. I feel it to be roughly at the same time showing the same rain expectancy pattern every day; asif some buffered data is replayed.. Yesterday I updated to 8.4.1. hoping to fix this 'glitch' but this morning I saw it's still there..
2018.12.31-09.54.35_berts7plus_IMG_3226smaller.JPG
2018.12.31-09.54.35_berts7plus_IMG_3226smaller.JPG (49.05 KiB) Viewed 8312 times
but the radar is showing nothing..
2018.12.31-10.06.28_berts7plus_IMG_3228smaller.JPG
2018.12.31-10.06.28_berts7plus_IMG_3228smaller.JPG (87 KiB) Viewed 8312 times
Any clue?
Toonz
Forum Moderator
Forum Moderator
Posts: 1873
Joined: Mon Dec 19, 2016 1:58 pm

Re: Toon app: Buienradar

Post by Toonz »

Hi,

the source of this rain prediction data is http://gadgets.buienradar.nl/data/raint ... 1&lon=4.52 (example)

The latitude (breedtegraad) and longitude(lengtegraad) are taken from the two files selectedLatitude.txt and selectedLongitude.txt.
Can you check whether these two last files exist in /qmf/qml/apps/buienradar ?
If not, click on the rain tile, press 'locatie' in the top tight corner and set these two coordinates for your location.

If that all looks fine, you can check the gadgets url manually with your coordinates to see if that delivers different data (the first three digits om each line contains the rain data).
Let me know if this all looks fine and you still see something different on Toon compared to the gadget file.

Kind regardz,

Toonz
member of the Toon Software Collective
Strijker
Starting Member
Starting Member
Posts: 7
Joined: Thu Nov 06, 2014 9:58 am

Re: Toon app: Buienradar

Post by Strijker »

Yes, those files exist and contains valid data which in turn delivers a table from buienradar.
Thank you for the link, I will check it the moment I catch a false prediction graph again.
How frequent is this data being polled?
Toonz
Forum Moderator
Forum Moderator
Posts: 1873
Joined: Mon Dec 19, 2016 1:58 pm

Re: Toon app: Buienradar

Post by Toonz »

Strijker wrote:Yes, those files exist and contains valid data which in turn delivers a table from buienradar.
Thank you for the link, I will check it the moment I catch a false prediction graph again.
How frequent is this data being polled?
every 5 minutes
member of the Toon Software Collective
imdos
Starting Member
Starting Member
Posts: 5
Joined: Tue Feb 19, 2019 2:12 pm

Re: Toon app: Buienradar

Post by imdos »

Might be a silly question and even related to the ToonStore; but I have two entries in my toon (4.22.7) on /qmf/qml/apps/

Code: Select all

buienradar
buienradar-8.4.1
And inside buienradar is a symbolic link to buienradar-8.4.1. The same applies to boilerstatus-1.0.6. However the other apps I have installed:
  • calendar
    fileinfo
    toonstore
    wastecollection
Provide a symlink on the top level e.g. /qmf/qml/apps/wastecollection => /HCBv2/qml/apps/wastecollection-4.19

I don't know which one is more correct without spending too much time on the code. I hope you could elaborate on it.

Furthermore I have added the two files: selectedLatitude.txt and selectedLongitude.txt with only the coordinates like 50.03 and 4.03 or something; since it doesn't work properly from the qt-gui.
Lastly I found that the weather report is off and found an empty weerstation.txt file in the buienradar folder.
marcelr
Global Moderator
Global Moderator
Posts: 1153
Joined: Thu May 10, 2012 10:58 pm
Location: Ehv

Re: Toon app: Buienradar

Post by marcelr »

When you look carefully, you will see that the directory entry without version number is a symbolic link to the directory entry with version number. We have designed all toonstore apps to be installed in this way, so you can immediately tell from the qmf/qml/apps/ directory which versions of an app you are using.

In older firmwares /HCBv2 was the top level directory for the toon-specific software. In later versions (as of 4.10 or thereabouts) this has been changed to /qmf. The links to /HCBv2 still exist in some apps.

Not sure about your weather issue.
Post Reply

Return to “Toon Apps”