Author Topic: Leuven new installation problems  (Read 6893 times)

Alan Rowley

  • Strong Breeze
  • ***
  • Posts: 147
  • It is far better to wear out than to rust away.
    • D3696
    • INOTTING15
    • Selston Weather
  • Station Details: Weather station: Davis Vantage Pro2. Software: WeatherCat. Computer: Mac Mini, High Sierra OS
Re: Leuven new installation problems
« Reply #15 on: July 28, 2015, 05:40:28 PM »
Quote
The trends page is normaly not available for WeatherCat users

That explains everything. On my old site, which was fed by Weather Display, I used the trends page a lot. It's a shame that it can't be re-created in WeatherCat.

A further problem I have is how do I change the cities in the dropdown menu on the forecast pages (Brussels, Antwerp, Eindhoven etc.)? Those cities don't mean anything to me and I would like to change them to somewhere I'm interested in.

Thanks - ALAN.

wvdkuil

  • Strong Breeze
  • ***
  • Posts: 125
    • DW8113 (D8113)
    • IVLAAMSG47
    • Weatherstation Wilsele/Leuven/Belgium
  • Station Details: VantagePro2+ UV,Solar - Macbook/Mini
Re: Leuven new installation problems
« Reply #16 on: July 28, 2015, 06:39:59 PM »
Quote
The trends page is normaly not available for WeatherCat users

That explains everything. On my old site, which was fed by Weather Display, I used the trends page a lot. It's a shame that it can't be re-created in WeatherCat.

A further problem I have is how do I change the cities in the dropdown menu on the forecast pages (Brussels, Antwerp, Eindhoven etc.)? Those cities don't mean anything to me and I would like to change them to somewhere I'm interested in.

Thanks - ALAN.
The files for the different cities are in the weather??/_my_texts/ folder: lat_lon_eu.txt
Code: [Select]
# you have to find the correct latitude and longitude for the places you want to use
# You could go to google maps and click (on the city name) on the map to find the information in the browser address-area
# example
# https://www.google.be/maps/place/3012+Wilsele/@50.8904695,4.69451,15z
#
#latitude  |longitude|name      |METAR|yahoo|
|51.2603851|4.3577201|Antwerp   |EBAW|966591|
|50.6246401|5.5990901|Liège     |EBLG|973540|
|50.57     |3.82  |Mons/Bergen  |EBCV|974484|
|50.92     |5.77  |Maastricht   |EHBK|731497|
|49.63     |6.2   |Luxemburg    |ELLX|979721|
|51.2      |2.87  |Oostende     |EBOS|975129|
WiKi: http://wiki.leuven-template.eu/doku.php?id=en:forecast_settings#multiple_city_area_selection_for_forecasts

Some scripts use latitude/longitude. Others a Metar or a code such as yahoo. Those are in the first file.

There is a separate file for yr-no forecasts   yrno_areas.txt
Code: [Select]
#To find the correct Country/region/City code visit http://www.yr.no/ and locate the nearest city the place you want to use.
#In the browser address area you find the correct code. Example http://www.yr.no/place/Belgium/Flanders/Leuven/
#
for yahoo go to https://weather.yahoo.com/ and search your city
https://weather.yahoo.com/belgium/capital-region-of-brussels/brussels-968019/
#
|Norge/Rogaland/Eigersund/Egersund/|    Egersund|
|Norge/Rogaland/Stavanger/Stavanger/|   Stavanger|
|Norge/Hordaland/Bergen/Bergen/|        Bergen|
|Netherlands/North_Brabant/Eindhoven|   Eindhoven|
|Belgium/Wallonia/Liège|                Liège|

Succes, Wim
Meteohub / Meteobridge with Vantage Pro2 UV Solar Soil Leaf
www.weerstation-wilsele.be   and   www.weerstation-herent.be
WeatherDisplay Cumulus Weatherlink using VVP and WeatherCat on a Mac Mini for development
www.weerstation-leuven.be

Alan Rowley

  • Strong Breeze
  • ***
  • Posts: 147
  • It is far better to wear out than to rust away.
    • D3696
    • INOTTING15
    • Selston Weather
  • Station Details: Weather station: Davis Vantage Pro2. Software: WeatherCat. Computer: Mac Mini, High Sierra OS
Re: Leuven new installation problems
« Reply #17 on: July 28, 2015, 07:34:41 PM »
Success indeed Wim. It's working a treat. I'll change all the settings after lunch.

Thanks again - ALAN.

Alan Rowley

  • Strong Breeze
  • ***
  • Posts: 147
  • It is far better to wear out than to rust away.
    • D3696
    • INOTTING15
    • Selston Weather
  • Station Details: Weather station: Davis Vantage Pro2. Software: WeatherCat. Computer: Mac Mini, High Sierra OS
Re: Leuven new installation problems
« Reply #18 on: July 31, 2015, 05:36:46 PM »
I'm sorry to bother you guys again, but I'm stuck on another poser.

I have six years of data produced by Weather Display and the Saratoga template that I want to copy over into my new site. I am doing this by way of a daily / monthly summary page.

This is the original page - http://www.brackenhouse.net/weather/wxhistory.php.
This is my effort to integrate it into WeatherCat / Leuven - http://www.brackenhouse.net/weather27/index.php?p=157&lang=en

As you will see, the page looks fine for the current month (July 2015), but if you select another month from the dropdown menu, you are taken back to the home page. Can anyone suggest any way of forcing the page to display the correct month? I am desperate to get this working as it compensates for WeatherCat being unable to import data from Weather Display.

Wim?

wvdkuil

  • Strong Breeze
  • ***
  • Posts: 125
    • DW8113 (D8113)
    • IVLAAMSG47
    • Weatherstation Wilsele/Leuven/Belgium
  • Station Details: VantagePro2+ UV,Solar - Macbook/Mini
Re: Leuven new installation problems
« Reply #19 on: July 31, 2015, 05:56:08 PM »
I'm sorry to bother you guys again, but I'm stuck on another poser.

I have six years of data produced by Weather Display and the Saratoga template that I want to copy over into my new site. I am doing this by way of a daily / monthly summary page.

This is the original page - http://www.brackenhouse.net/weather/wxhistory.php.
This is my effort to integrate it into WeatherCat / Leuven - http://www.brackenhouse.net/weather27/index.php?p=157&lang=en

As you will see, the page looks fine for the current month (July 2015), but if you select another month from the dropdown menu, you are taken back to the home page. Can anyone suggest any way of forcing the page to display the correct month? I am desperate to get this working as it compensates for WeatherCat being unable to import data from Weather Display.

Wim?
Can you please zip the Saratoga page and post it, or send it in an email?

As Saratoga pages are 'stand-alone" the adress each other by page-name
wxhistory.php
and when you select a period
/wxhistory.php?date=201506

The leuven-template removed all general code from the page and executes the pages by
index.php?p=pagecode
and when you select a periode the link should become
index.php?p=pagecode&date=201506
So no ? as that one is already used but an &.

All scripts which use "in-script" selectors need some minor adjusting.

Hope this makes it a little bit clearer.

I think it could work already when you change line 124 in the html part of _my_scripts/wxhistory.php from
Code: [Select]
<form action="" method="get">to
Code: [Select]
<form action="index.php?p=157" method="get">We have then hard-coded the pagenumber, but for now that is OK.

Wim



Wim
Meteohub / Meteobridge with Vantage Pro2 UV Solar Soil Leaf
www.weerstation-wilsele.be   and   www.weerstation-herent.be
WeatherDisplay Cumulus Weatherlink using VVP and WeatherCat on a Mac Mini for development
www.weerstation-leuven.be

wvdkuil

  • Strong Breeze
  • ***
  • Posts: 125
    • DW8113 (D8113)
    • IVLAAMSG47
    • Weatherstation Wilsele/Leuven/Belgium
  • Station Details: VantagePro2+ UV,Solar - Macbook/Mini
Re: Leuven new installation problems
« Reply #20 on: July 31, 2015, 06:08:59 PM »
Sorry for the previous solution. It was a long day and it looked like a simple solution, they tend to not work.

You have to add one line extra below the form line:
Code: [Select]
<form action="" method="get">
<input type="hidden" style="padding: 0px; border: 0px; margin: 0px" name="p" value="157">

Otherwise the p=xyz in the form action field will be written over by the period selection just made.

Wim
Meteohub / Meteobridge with Vantage Pro2 UV Solar Soil Leaf
www.weerstation-wilsele.be   and   www.weerstation-herent.be
WeatherDisplay Cumulus Weatherlink using VVP and WeatherCat on a Mac Mini for development
www.weerstation-leuven.be

Alan Rowley

  • Strong Breeze
  • ***
  • Posts: 147
  • It is far better to wear out than to rust away.
    • D3696
    • INOTTING15
    • Selston Weather
  • Station Details: Weather station: Davis Vantage Pro2. Software: WeatherCat. Computer: Mac Mini, High Sierra OS
Re: Leuven new installation problems
« Reply #21 on: July 31, 2015, 06:15:50 PM »
Wim, you are a coding genius. Thank you so much, I am a happy man again.

Alan Rowley

  • Strong Breeze
  • ***
  • Posts: 147
  • It is far better to wear out than to rust away.
    • D3696
    • INOTTING15
    • Selston Weather
  • Station Details: Weather station: Davis Vantage Pro2. Software: WeatherCat. Computer: Mac Mini, High Sierra OS
Re: Leuven new installation problems
« Reply #22 on: August 05, 2015, 10:23:01 PM »
Another annoying little error that pops up occasionally. Anyone any ideas?

Quote
Warning: Division by zero in /home/alanrowley3/public_html/weather27/scriptsWC/tagsWC.php on line 298

ALAN.

Alan Rowley

  • Strong Breeze
  • ***
  • Posts: 147
  • It is far better to wear out than to rust away.
    • D3696
    • INOTTING15
    • Selston Weather
  • Station Details: Weather station: Davis Vantage Pro2. Software: WeatherCat. Computer: Mac Mini, High Sierra OS
Re: Leuven new installation problems
« Reply #23 on: August 08, 2015, 09:05:30 PM »
I'm still getting this division by zero error frequently. The offending line is ...

Quote
$ws['solarActPerc']      =  round((100*$ws['solarAct']/$max_solar),0);

Does anyone have any ideas?

ALAN.

xairbusdriver

  • Storm
  • *****
  • Posts: 2199
    • EW7115 (E7115)
    • KTNGERMA20
    • Mid-South Weather
  • Station Details: Davis VP2 wireless + remote Anemometer/2014 Mac min - 10.13.4/WC 3.0
Re: Leuven new installation problems
« Reply #24 on: August 09, 2015, 03:52:44 AM »
Might put try if ($max_solar > 0) { do the rounding routine } or just if(!$max_solar) {skip the routine }. I have no idea what the value is for or what might happen if it is not created; it may be used elsewhere. In that case, you could have the 'test' just set $max_solar to 1 and proceed with the rounding.

Or you could get the expert advice from Wim. Where's the fun in that! [lol]

wvdkuil

  • Strong Breeze
  • ***
  • Posts: 125
    • DW8113 (D8113)
    • IVLAAMSG47
    • Weatherstation Wilsele/Leuven/Belgium
  • Station Details: VantagePro2+ UV,Solar - Macbook/Mini
Re: Leuven new installation problems
« Reply #25 on: August 09, 2015, 08:48:15 AM »
I'm still getting this division by zero error frequently. The offending line is ...

Quote
$ws['solarActPerc']      =  round((100*$ws['solarAct']/$max_solar),0);

Does anyone have any ideas?

ALAN.
No sun => no solar value => no max_solar. Strange but with some systems it is like that. Sloppy programmer that "Wim".

Important: I do not always get a message that there are new postings, or that there is a new "leuven"-topic.

So if you have a "real" error, like this one, also use the support system to warn me. http://support.leuven-template.eu/

@ALL
Attached a new version of tagsWC.php.
1. Make a backup/copy of weather27/scriptsWC/tagsWC.php
2. Unzip attachement
3. Replace older with new version

Wim
Meteohub / Meteobridge with Vantage Pro2 UV Solar Soil Leaf
www.weerstation-wilsele.be   and   www.weerstation-herent.be
WeatherDisplay Cumulus Weatherlink using VVP and WeatherCat on a Mac Mini for development
www.weerstation-leuven.be

Alan Rowley

  • Strong Breeze
  • ***
  • Posts: 147
  • It is far better to wear out than to rust away.
    • D3696
    • INOTTING15
    • Selston Weather
  • Station Details: Weather station: Davis Vantage Pro2. Software: WeatherCat. Computer: Mac Mini, High Sierra OS
Re: Leuven new installation problems
« Reply #26 on: August 09, 2015, 11:02:23 AM »
New copy installed. Hopefully that's the end of that error.

Thanks Wim.