Interactive banner

FSC830
Forecaster
Forecaster
Posts: 139
Joined: Thu Aug 02, 2018 11:40 am
Station model: Davis Vantage Pro2
Software: Meteobridge

Re: Interactive banner

Post by FSC830 » Thu Feb 23, 2023 1:17 pm

There was a little confusion when the Moon was displayed in header during daytime.
Some like it, some not. 8-)

Attached is an archive which allows you to control the Moon view by the main setup page.
Works perfect in my lab and at real site (at real site, Moon at day is currently disabled).

The archive contains 3 files: header.php, setup.php and createConfig.php. The first is to place in the <template> / (root), the other two in /<template>/install directory.

As always, at your own risk. ;)
moonView.zip
(53 KiB) Downloaded 49 times
Regards
Image

User avatar
lemimi
Advisor
Advisor
Posts: 86
Joined: Wed Dec 12, 2018 3:31 pm
Location: France - Normandie
Station model: Brandson 304557
Contact:

Re: Interactive banner

Post by lemimi » Thu Feb 23, 2023 2:07 pm

Hello,
When I want to download the moonView.zip file, it returns me:
The selected attachment does not exist anymore.
Regards... Michel

FSC830
Forecaster
Forecaster
Posts: 139
Joined: Thu Aug 02, 2018 11:40 am
Station model: Davis Vantage Pro2
Software: Meteobridge

Re: Interactive banner

Post by FSC830 » Thu Feb 23, 2023 2:28 pm

Sorry, was just replacing the archive because I found a typo in a file.
Its available again now.

Regards
Image

User avatar
Jolumarali
Forecaster
Forecaster
Posts: 240
Joined: Sun Aug 20, 2017 2:06 pm
Location: Lignerolles
Station model: Vantage Vue
Software: WlIP
Contact:

Re: Interactive banner

Post by Jolumarali » Fri Feb 24, 2023 7:23 am

Merci Michel
Parfait la traduction pour le bandeau animé

José Luis
Image
Station météo amateur Lignerolles
OS : Windows 10 Famille
Vantage Vue
Weatherlink 2.0 (WlIP)
Meteotemplate 18.0 Papaya

https://meteo-lignerolles.fr

José Luis

User avatar
MeteoElMasnou
Observer
Observer
Posts: 26
Joined: Sat Feb 05, 2022 1:56 pm
Location: El Masnou / Catalunya
Station model: Davis Vantage Vue
Software: Weewx
Contact:

Re: Interactive banner

Post by MeteoElMasnou » Sat Feb 25, 2023 7:50 am

Thanks to those who have made it possible to work.

Health.

User avatar
meteoesine
Forecaster
Forecaster
Posts: 166
Joined: Sun Aug 20, 2017 4:08 pm
Location: Esine, Valcamonica (BS) - Italy
Station model: Davis Pro2+
Software: Meteobridge nano
Contact:

Re: Interactive banner

Post by meteoesine » Mon May 01, 2023 7:38 am

despite the real rain, I very rarely see it falling on the interactive banner (graphically speaking).
so I was wondering if it would be possible to modify the interactive banner that checks directly our database (if rain, it must displays the rain animation) bypassing the metar
obviously leaving the query of the metar for the forecast background as it is...
would it be feasible?
tnx in advance for any comments
:arrow: https://meteoesine.it
ham wx aprs/cwop: IW2LAO-13

Image

FSC830
Forecaster
Forecaster
Posts: 139
Joined: Thu Aug 02, 2018 11:40 am
Station model: Davis Vantage Pro2
Software: Meteobridge

Re: Interactive banner

Post by FSC830 » Mon May 01, 2023 8:34 am

Just without verifying the code now my guess it is possible, but with some major changes.
And best way would may be to modify the code that either the Metar data or the current rain rate from database would trigger the rain graphics - just as an idea.
As said, did not verify the code now and dont have in mind, if there is any reasons against that.

Regards
Image

User avatar
Jolumarali
Forecaster
Forecaster
Posts: 240
Joined: Sun Aug 20, 2017 2:06 pm
Location: Lignerolles
Station model: Vantage Vue
Software: WlIP
Contact:

Re: Interactive banner

Post by Jolumarali » Mon May 01, 2023 12:53 pm

Hello
Another problem is the cloud cover, probably more difficult to manage in the banner

José Luis
Image
Station météo amateur Lignerolles
OS : Windows 10 Famille
Vantage Vue
Weatherlink 2.0 (WlIP)
Meteotemplate 18.0 Papaya

https://meteo-lignerolles.fr

José Luis

FSC830
Forecaster
Forecaster
Posts: 139
Joined: Thu Aug 02, 2018 11:40 am
Station model: Davis Vantage Pro2
Software: Meteobridge

Re: Interactive banner

Post by FSC830 » Mon May 01, 2023 1:09 pm

Where are problems with cloud cover?
I cant see this at my site.
Anyhow, sometimes it seems that the "blank" background is loaded and I need to reload the page 2 or 3 times until the interactive banner shows the correct background. This happens at my VM as well and I did not find a cause for this.
At my VM the Metar string is printed inside the banner, so I can verify the "condition" value, to this value the background image depends.
And the condition value is always correct, but the background is still blank. :?
But because reloading the pages one or two times fixes this, I did not investigate further.

Regards
Image

User avatar
Jolumarali
Forecaster
Forecaster
Posts: 240
Joined: Sun Aug 20, 2017 2:06 pm
Location: Lignerolles
Station model: Vantage Vue
Software: WlIP
Contact:

Re: Interactive banner

Post by Jolumarali » Mon May 01, 2023 1:36 pm

The banner changes according to the state of the sky, so the clouds and the weather conditions of the metar, how to modify this banner locally?
Here is the problem for me
Image
Station météo amateur Lignerolles
OS : Windows 10 Famille
Vantage Vue
Weatherlink 2.0 (WlIP)
Meteotemplate 18.0 Papaya

https://meteo-lignerolles.fr

José Luis

User avatar
meteoesine
Forecaster
Forecaster
Posts: 166
Joined: Sun Aug 20, 2017 4:08 pm
Location: Esine, Valcamonica (BS) - Italy
Station model: Davis Pro2+
Software: Meteobridge nano
Contact:

Re: Interactive banner

Post by meteoesine » Mon May 01, 2023 2:57 pm

the metar report available on the web has a delay of about 2 hours and a half (it's 17:00 and the metar in the cache shows 14:20) therefore it will be impossible to have a synchronized interactive banner.
As far as I'm concerned, the coverage is relatively reliable but that's okay...
the top would be - as suggested - to display the rain animation when our database detects it.
:arrow: https://meteoesine.it
ham wx aprs/cwop: IW2LAO-13

Image

FSC830
Forecaster
Forecaster
Posts: 139
Joined: Thu Aug 02, 2018 11:40 am
Station model: Davis Vantage Pro2
Software: Meteobridge

Re: Interactive banner

Post by FSC830 » Mon May 01, 2023 3:26 pm

I modified the header.php so that the Metarstring is written in banner (instead of the subtitle).
The cache can bet set somewhere in the code, so you can modify the delay - thats not an option you can modify in setup, you need to change the .php file for that.

Regards
Image

User avatar
Jolumarali
Forecaster
Forecaster
Posts: 240
Joined: Sun Aug 20, 2017 2:06 pm
Location: Lignerolles
Station model: Vantage Vue
Software: WlIP
Contact:

Re: Interactive banner

Post by Jolumarali » Mon May 01, 2023 3:43 pm

Norbert
, I see at 5:36 p.m. that on your banner, you have a slightly cloudy sky, and on your webcam, Esine is very overcast, so it is difficult if it is raining to put the rain on the banner.

this is the problem of the metar, if it is far away. personally 100Km

José Luis
Image
Station météo amateur Lignerolles
OS : Windows 10 Famille
Vantage Vue
Weatherlink 2.0 (WlIP)
Meteotemplate 18.0 Papaya

https://meteo-lignerolles.fr

José Luis

FSC830
Forecaster
Forecaster
Posts: 139
Joined: Thu Aug 02, 2018 11:40 am
Station model: Davis Vantage Pro2
Software: Meteobridge

Re: Interactive banner

Post by FSC830 » Wed May 03, 2023 11:14 am

To clarify how the interactive banner background is set:

When calling the site a file named interactiveBanner.txt is checked in cache directory.
If this file is older than 1 hour, its deleted and current condition will be read from Metar data and the file will be newly created.
If file exists and is younger than 1 hour, current condition will read from the cached file.

So the delay is about one hour in maximum. A problem may be raises if Metar data has a delay or Metar station is (to) far away and local conditions are different than at Metar site. In such a case the banner shows no rain, whereas at local site rain falls (or vice versa).

I did now modify the banner selection and added a query for local database rain rate. If average rain rate is larger than 0 in the last 10 minutes the banner should show rain.
But currently conditions here are clear sky and sunny for the next days, so I need to wait some days to verify if the modification works as expected (I dont want to drop water in the weather station cone to simulate rain fall ;) ).

If all works as expected, I will upload the modificated file.

Regards

Edit I:
Sometimes you need to think twice prior posting :D . No need to wait, because its an test environment I just edited some values in local database. As far as I can see, it works.

Try, if it works for you.
Note: due to the structure of the database query there is may be a small delay at every 1st day of month at midnight.

Regards

header.zip
(7.89 KiB) Downloaded 40 times

Edit II:
To the cloud covering in interactive banner: there is not really an option to refer to the local site. Doing so, you need a sensor which detects cloud coverage and writes a value in the database. Currently I do not know such a sensor in combination for one of the weather stations used by most of us. Even more, the database table has no entry for this, so you need to modify the database table.
In current versions the cloud coverage is only referring to the data from the Metar string. There are multiple images for some coverages (partial, mostly) available, depending to the coverage, a background image is randomly selected.
Currently I do not see any chance to refer to a local data.
Last edited by FSC830 on Fri May 05, 2023 2:09 pm, edited 3 times in total.
Image

User avatar
meteoesine
Forecaster
Forecaster
Posts: 166
Joined: Sun Aug 20, 2017 4:08 pm
Location: Esine, Valcamonica (BS) - Italy
Station model: Davis Pro2+
Software: Meteobridge nano
Contact:

Re: Interactive banner

Post by meteoesine » Thu May 04, 2023 3:56 am

Great job my friend, that's fine like this
we will see the next rainfall
:arrow: https://meteoesine.it
ham wx aprs/cwop: IW2LAO-13

Image

User avatar
Jolumarali
Forecaster
Forecaster
Posts: 240
Joined: Sun Aug 20, 2017 2:06 pm
Location: Lignerolles
Station model: Vantage Vue
Software: WlIP
Contact:

Re: Interactive banner

Post by Jolumarali » Thu May 04, 2023 5:34 am

Thank you Gruss
update done, expecting rain within 48 hours, I'll let you know at that time.

Jose Luis
Image
Station météo amateur Lignerolles
OS : Windows 10 Famille
Vantage Vue
Weatherlink 2.0 (WlIP)
Meteotemplate 18.0 Papaya

https://meteo-lignerolles.fr

José Luis

FSC830
Forecaster
Forecaster
Posts: 139
Joined: Thu Aug 02, 2018 11:40 am
Station model: Davis Vantage Pro2
Software: Meteobridge

Re: Interactive banner

Post by FSC830 » Thu May 04, 2023 6:45 am

If you like you can edit the database (control panel - database - edit data) and edit i.e. the last or one of the 3 latest entries to check.
Any value other than 0.000 will work. After this check, you can revert this value back to 0.000.
The headline for the column is MM/H, .

This check is may be better than waiting for rain. You have a clear or sunny sky, Metar has no rain, but the local database says it rains.

Beware of yours or your neighbours lawn sprinkler. :lol: :lol:

Regards
Image

User avatar
Jolumarali
Forecaster
Forecaster
Posts: 240
Joined: Sun Aug 20, 2017 2:06 pm
Location: Lignerolles
Station model: Vantage Vue
Software: WlIP
Contact:

Re: Interactive banner

Post by Jolumarali » Thu May 04, 2023 10:41 am

Rain test carried out successfully, the sky was overcast and the rain with it.
Perfect Gruss
THANKS
Image
Station météo amateur Lignerolles
OS : Windows 10 Famille
Vantage Vue
Weatherlink 2.0 (WlIP)
Meteotemplate 18.0 Papaya

https://meteo-lignerolles.fr

José Luis

FSC830
Forecaster
Forecaster
Posts: 139
Joined: Thu Aug 02, 2018 11:40 am
Station model: Davis Vantage Pro2
Software: Meteobridge

Re: Interactive banner

Post by FSC830 » Fri May 05, 2023 9:38 am

Many thanks for feedback! :D
I did an update (new file in origin post above):

I added some lines referring to the amount of rain:
from 0.000 to 0.500 mm/h condition is "drizzle"
from 0.500 to 2.000 mm/h condition is "lightrain"
higher than 2.000 mm/h condition is "rain".

These figures are a rough estimation, the condition status is used as an indicator for the strength and count of rain drops in banner.

Enjoy 8-)

Regards
Image

User avatar
Jolumarali
Forecaster
Forecaster
Posts: 240
Joined: Sun Aug 20, 2017 2:06 pm
Location: Lignerolles
Station model: Vantage Vue
Software: WlIP
Contact:

Re: Interactive banner

Post by Jolumarali » Fri May 05, 2023 10:29 am

Thank you Gruss
modification made,
Everything is operational, it is raining with the Metar and locally, so drops everywhere.
thank you for your work
enjoys :)
Jose Luis
Image
Station météo amateur Lignerolles
OS : Windows 10 Famille
Vantage Vue
Weatherlink 2.0 (WlIP)
Meteotemplate 18.0 Papaya

https://meteo-lignerolles.fr

José Luis

User avatar
MeteoElMasnou
Observer
Observer
Posts: 26
Joined: Sat Feb 05, 2022 1:56 pm
Location: El Masnou / Catalunya
Station model: Davis Vantage Vue
Software: Weewx
Contact:

Re: Interactive banner

Post by MeteoElMasnou » Fri May 05, 2023 1:09 pm

Changes made.
Thank you..

Xavi.

FSC830
Forecaster
Forecaster
Posts: 139
Joined: Thu Aug 02, 2018 11:40 am
Station model: Davis Vantage Pro2
Software: Meteobridge

Re: Interactive banner

Post by FSC830 » Fri May 05, 2023 2:13 pm

Next update :?

Did a mistake in calculating the rain rate :oops: .
Instead of calculating the average rain rate I summarized the last 3 entries.
Just noticed that, because here was a very light rain, but banner shows more rain as it was.
Zip file replaced.

to updated archive

Regards
Image

User avatar
Jolumarali
Forecaster
Forecaster
Posts: 240
Joined: Sun Aug 20, 2017 2:06 pm
Location: Lignerolles
Station model: Vantage Vue
Software: WlIP
Contact:

Re: Interactive banner

Post by Jolumarali » Fri May 05, 2023 5:16 pm

Update completed.
Thanks Gruss

José Luis
Image
Station météo amateur Lignerolles
OS : Windows 10 Famille
Vantage Vue
Weatherlink 2.0 (WlIP)
Meteotemplate 18.0 Papaya

https://meteo-lignerolles.fr

José Luis

FSC830
Forecaster
Forecaster
Posts: 139
Joined: Thu Aug 02, 2018 11:40 am
Station model: Davis Vantage Pro2
Software: Meteobridge

Re: Interactive banner

Post by FSC830 » Fri May 05, 2023 5:38 pm

And here is the next version!

This version is different from previous versions!
I modified the main setup. You can now choose in main setup to enable/disable if the rain rate from local database should affect the interactive banner.

You need to enter several values:
yes/no for enabling/disabling the interaction with banner.
The count of entries in database to calculate the average rain rate. This value depends to the interval, your data is written to database. Usually the interval I know is 5 minutes. If you write in any other interval, you need to set this value according your needs.
As an example (5 min interval) if you set this value to 3: last entry was 04:05pm, so the entries 04:05pm, 04:00pm and 03:55pm are used for calculation. If you set the value to 5 entries from 04:05pm, 04:00pm, 03:55pm, 03:50pm, 03:45pm are used for the calculation.
But: this means if rains stops at 04:05pm, it will last until 04:25pm that rain disappears from banner (last 5 entries: 04:25pm, 04:20pm, 04:15pm, 04:10pm, 04:05pm (all values must be 0)!
Using a value of 3 the rain stops at 04:15pm at banner.
Conclusion: the more entries you use, the more is the delay at banner.

Drizzle rate: up to this value rain is shown at banner as drizzle (few drops).
Lightrain rate: up to this value rain is shown at banner as light rain (more drops).
Every average rain rate higher will be shown as rain in banner (highest count of drops).

This is individual to the region you live. But this modification allows you to change the values as needed.
The archive contains 3 files:
header.php -> to be placed in /template
setup.php and createConfig.php -> to be placed in /template/install

Do a backup of your current files prior installing the new ones!
As always: use at your own risk ;) .

Thank you for feedback. 8-)

Regards

header_ib.zip
(53.83 KiB) Downloaded 69 times
Image

User avatar
steph
Observer
Observer
Posts: 21
Joined: Fri May 12, 2023 10:26 am
Station model: Ecowitt
Software: Ecowitt gw1100/Raspberry
Contact:

Re: Interactive banner

Post by steph » Wed Sep 13, 2023 6:43 am

Good morning,

Would it be possible to have the file modified for version 19.0 of Template?

Thank you so much
Image

Post Reply