WXforum.net

Weather Software => WeeWX Software => Topic started by: taylormia on October 08, 2018, 11:49:38 PM

Title: weather34 template for weeWX
Post by: taylormia on October 08, 2018, 11:49:38 PM
If anyone is interested in the weeWX adapted version of the weather34 template, you can find it at the link below courtesy of Ian Steeple. All support questions on this adapted version should be directed to Ian and not to Brian at weather34.

https://github.com/steepleian/weather34-Home-Weatherstation-Template-WeeWX-adapted

Here is my web site (https://weather.sathy.us) using this template. The additional benefit of this adapted template is the capability to display CanvasJS charts generated from native weeWX historical reports rather than a feed from the free Weather Underground API , which as many of you know is going away shortly.

(https://i.imgur.com/YQ2XMMo.png)

(https://i.imgur.com/fdMdqpN.png)
Title: Re: weather34 template for weeWX
Post by: steepleian on October 09, 2018, 02:50:55 AM
Thanks for the nod Taylormia :grin:

Here is a bit more background: -

I think that we can all agree that the real strengths of weeWX are what goes on 'under the hood (or the bonnet for a Brit like me)', its sheer adaptability and a huge community working out solutions together.

I came to weeWX after years of being a Cumulus user (another excellent software) but came to a grinding halt when changing to unsupported Weather Station. It was weeWX to the rescue along with the HP1000 driver and I was back up and running. In my Cumulus days I had been an early adopter of the excellent weather34 template, designed and owned by Brian Underdown. This was originally designed for use with Cumulus as a single dashboard concept where everything is accessible from a single web page. So could I use the template with weeWX, yes by deploying the CRT extension to generate a realtime.txt file.

Now I wanted it to do more, I am not a coder so it takes me a bit longer to discover the snippets of code that I need to make things happen and this is where this forum and others became a valuable resource for myself along with contributions and technical support from others. A big thanks here to David Marshall who has rescued me on more than one occasion.

Recently Brian Underwood took the decision to only support the Meteobridge version of his template going forward. However, he was very happy for the other versions of the template to hosted and maintained by others. On this basis, both the weeWX and Cumulus versions live on. I am now hosting the weeWX version and actively maintaining it in the spirit of Brian's original concept. You can find it here: -

https://github.com/steepleian/weather34-Home-Weatherstation-Template-weeWX-adapted

The latest version is now using the weeWX archive database to generate the pop-up CanvasJS charts instead of relying on Weather Underground. The setup guides are provided for general guidance only due to the multitude of ways weeWX can be setup by individual users.

I would like to re-iterate that although Brian Underdown is very happy for this version to exist and be maintained, he offers no support whatsoever for this version. Any requests to do so will remain unanswered. Please respect Brian's wishes in this respect. Any issues should be directed to this forum.

My own current version of the template shows additional features which may be included in future updates if there is sufficient demand. It can found here https://claydonsweather.org.uk

When used with a smartphone or a narrow browser window, the page morphs into a slimline mobile version.

Steepleian
Title: Re: weather34 template for weeWX
Post by: taylormia on October 16, 2018, 10:27:01 AM
At the link below is a general guide on integrating weeWX weather software with the weather34 web template adapted for weeWX by Ian Steeple. In this example, the weeWX server and the web server are on separate systems. Download the guide to use the embedded web links.

https://github.com/steepleian/weather34-Home-Weatherstation-Template-WeeWX-adapted/blob/master/taylormia_remote_server_setup.pdf
Title: Re: weather34 template for weeWX
Post by: Storm017 on October 29, 2018, 10:26:42 PM
I'm trying to install the template (WE34-WE131018), but get the following error.

2018-10-28 18:59:39: (mod_fastcgi.c.2543) FastCGI-stderr: PHP message: PHP Warning:  include(): Failed opening 'version.php' for inclusion (include_path='.:/usr/share/php') in /var/www/html/settings.php on line 2
2018-10-28 18:59:39: (mod_fastcgi.c.2543) FastCGI-stderr: PHP message: PHP Notice:  Undefined variable: wver in /var/www/html/settings.php on line 27

Title: Re: weather34 template for weeWX
Post by: taylormia on October 30, 2018, 01:52:14 AM
When installing Apache and PHP, did you follow the guide referenced in Step 2 of my writeup.  Not sure if the reason is this but you may have not installed some PHP modules such as "php-curl" and "php-mbstring" .
Title: Re: weather34 template for weeWX
Post by: steepleian on October 30, 2018, 06:20:43 AM
I'm trying to install the template (WE34-WE131018), but get the following error.

2018-10-28 18:59:39: (mod_fastcgi.c.2543) FastCGI-stderr: PHP message: PHP Warning:  include(): Failed opening 'version.php' for inclusion (include_path='.:/usr/share/php') in /var/www/html/settings.php on line 2
2018-10-28 18:59:39: (mod_fastcgi.c.2543) FastCGI-stderr: PHP message: PHP Notice:  Undefined variable: wver in /var/www/html/settings.php on line 27

Are your weeWX and webserver on the same computer or is the server at a remote location. Also what is the root of your webserver. If it is different to /html you will need to edit the skin.conf file.

Steepleian
Title: Re: weather34 template for weeWX
Post by: Storm017 on October 30, 2018, 07:41:01 AM
When installing Apache and PHP, did you follow the guide referenced in Step 2 of my writeup.  Not sure if the reason is this but you may have not installed some PHP modules such as "php-curl" and "php-mbstring" .

Yes I did follow your write up.  I believe I have everything required installed...Will check this evening.
Title: Re: weather34 template for weeWX
Post by: Storm017 on October 30, 2018, 07:42:49 AM
I'm trying to install the template (WE34-WE131018), but get the following error.

2018-10-28 18:59:39: (mod_fastcgi.c.2543) FastCGI-stderr: PHP message: PHP Warning:  include(): Failed opening 'version.php' for inclusion (include_path='.:/usr/share/php') in /var/www/html/settings.php on line 2
2018-10-28 18:59:39: (mod_fastcgi.c.2543) FastCGI-stderr: PHP message: PHP Notice:  Undefined variable: wver in /var/www/html/settings.php on line 27

Are your weeWX and webserver on the same computer or is the server at a remote location. Also what is the root of your webserver. If it is different to /html you will need to edit the skin.conf file.

Steepleian
They are on the same computer.  Will check the ownership of the webserver this evening.
Title: Re: weather34 template for weeWX
Post by: Storm017 on October 30, 2018, 09:27:47 PM
I'm trying to install the template (WE34-WE131018), but get the following error.

2018-10-28 18:59:39: (mod_fastcgi.c.2543) FastCGI-stderr: PHP message: PHP Warning:  include(): Failed opening 'version.php' for inclusion (include_path='.:/usr/share/php') in /var/www/html/settings.php on line 2
2018-10-28 18:59:39: (mod_fastcgi.c.2543) FastCGI-stderr: PHP message: PHP Notice:  Undefined variable: wver in /var/www/html/settings.php on line 27

Are your weeWX and webserver on the same computer or is the server at a remote location. Also what is the root of your webserver. If it is different to /html you will need to edit the skin.conf file.

Steepleian

The root of the webserver is "var/www/html".  The ownership is pi:www-data and permissions are 0775. Going to reread the instructions taylormia provided.  Might of skipped something.
Title: Re: weather34 template for weeWX
Post by: Storm017 on October 30, 2018, 10:19:08 PM
I was missing the php-mbstring.  I can go to the IP address and the template appears but does not populate with realtime data, but I'm still have the same errors:

2018-10-30 22:04:57: (mod_fastcgi.c.2543) FastCGI-stderr: PHP message: PHP Warning:  include(version.php): failed to open stream: No such file or directory in /var/www/html/settings.php on line 2
2018-10-30 22:04:57: (mod_fastcgi.c.2543) FastCGI-stderr: PHP message: PHP Warning:  include(): Failed opening 'version.php' for inclusion (include_path='.:/usr/share/php') in /var/www/html/settings.php on line 2
2018-10-30 22:04:57: (mod_fastcgi.c.2543) FastCGI-stderr: PHP message: PHP Notice:  Undefined variable: wver in /var/www/html/settings.php on line 27

The path match in both the Weewx config file and the settings1.php file.  The real time txt file does update.
Title: Re: weather34 template for weeWX
Post by: kc2kzz on November 01, 2018, 10:14:03 AM
Everything is working fine on mine except the daylight box.  Is there a specific setting I missed for that?
Title: Re: weather34 template for weeWX
Post by: taylormia on November 03, 2018, 04:29:49 PM
I was missing the php-mbstring.  I can go to the IP address and the template appears but does not populate with realtime data, but I'm still have the same errors:

2018-10-30 22:04:57: (mod_fastcgi.c.2543) FastCGI-stderr: PHP message: PHP Warning:  include(version.php): failed to open stream: No such file or directory in /var/www/html/settings.php on line 2
2018-10-30 22:04:57: (mod_fastcgi.c.2543) FastCGI-stderr: PHP message: PHP Warning:  include(): Failed opening 'version.php' for inclusion (include_path='.:/usr/share/php') in /var/www/html/settings.php on line 2
2018-10-30 22:04:57: (mod_fastcgi.c.2543) FastCGI-stderr: PHP message: PHP Notice:  Undefined variable: wver in /var/www/html/settings.php on line 27

The path match in both the Weewx config file and the settings1.php file.  The real time txt file does update.

Looks like you are missing the "version.php" file in /var/www/html. Step 4d in my guide describes how this file is generated.
Title: Re: weather34 template for weeWX
Post by: kan6526 on November 23, 2018, 05:17:44 AM
Chart blank
http://192.168.2.10/pws/chartswu/monthlytemperature.php 



--------------------- /var/log/apache2/error.log ----------------------

 PHP Warning:  include(): Failed opening 'settings2.php' for inclusion (include_path='.:/usr/share/php') in /var/www/html/pws/settings.php on line 2, referer: http://192.168.2.10/pws/


PHP Warning:  include(settings2.php): failed to open stream: No such file or directory in /var/www/html/pws/settings.php on line 2, referer: http://192.168.2.10/pws/


PHP Warning:  include(): Failed opening 'settings2.php' for inclusion (include_path='.:/usr/share/php') in /var/www/html/pws/settings.php on line 2, referer: http://192.168.2.10/pws/


PHP Notice:  Undefined variable: chartversion in /var/www/html/pws/chartswu/monthlytemperature.php on line 173, referer: http://192.168.2.10/pws/
Title: Re: weather34 template for weeWX
Post by: PaulMy on November 23, 2018, 09:46:36 AM
I don't have nor know weeWX but presume the 192.168.2.10 in your http://192.168.2.10/pws/chartswu/monthlytemperature.php (http://192.168.2.10/pws/chartswu/monthlytemperature.php) is an IP address in your local network and not visible from outside. 

For me the URL is http://www.komokaweather.com/pws/chartswu/monthlytemperature.php

Not sure where you would set that though in the weeWX version.

Enjoy,
Paul
www.komokaweather.com/pws (http://www.komokaweather.com/pws)
Title: Re: weather34 template for weeWX
Post by: kan6526 on December 06, 2018, 06:10:27 AM
WeeWX(3.8.2)
Hardware: WH2950
 Template Version: W34-WE(30 November 2018)

-----------------/var/log/apache2/error.log --------------
[Thu Dec 06 19:05:14.237736 2018] [:error] [pid 5387] [client 192.168.2.1:9460] PHP Notice:  Undefined variable: almanac in /var/www/html/pws/version.php on line 13

[Thu Dec 06 19:05:14.237822 2018] [:error] [pid 5387] [client 192.168.2.1:9460] PHP Notice:  Undefined variable: almanac in /var/www/html/pws/version.php on line 14



---------------/var/www/html/pws/version.php ---------------------------

<?php
$wver = "3.8.2";
$uptimedays = "8 days, 5 hours, 5 minutes";
$civrise = "$almanac(horizon=-6).sun(use_center=1).rise";     <---------line 13
$civset = "$almanac(horizon=-6).sun(use_center=1).set";     <----------line 14
?>


Title: Re: weather34 template for weeWX
Post by: mteva on December 06, 2018, 08:34:45 PM
Hello, and sorry for my approximate english ;)

I'm trying to install your skin, I have:
- 1 single debian server 4.18.10-2
- Apache2 2.4.37-1
- weewx v3.8.2

I have W34-WX and 34-WE installed.
But I have a problem with the realtime.txt file
What do you think ?
Title: Re: weather34 template for weeWX
Post by: kan6526 on December 06, 2018, 08:55:33 PM
Hi mteva
Your realtiem.txt has no data.

reference this
https://github.com/weewx/weewx/wiki/crt
Title: Re: weather34 template for weeWX
Post by: mteva on December 06, 2018, 09:27:38 PM
Thank you for the answer.
But where does the problem come from?
The extension does create the file, but the scrubbed data is wrong.
Title: Re: weather34 template for weeWX
Post by: kan6526 on December 06, 2018, 09:47:03 PM
------------/var/log/syslog ---------------
Dec  6 14:31:23 debian9 weewx[24254]: crt: service version is 0.18
Dec  6 14:31:23 debian9 weewx[24254]: crt: output goes to /var/www/html/realtime.txt
Dec  6 14:31:23 debian9 weewx[24254]: crt: 'None' values will be displayed as NULL
Dec  6 14:31:23 debian9 weewx[24254]: crt: units will be displayed as US
Dec  6 14:31:23 debian9 weewx[24254]: crt: zambretti forecast: False
Dec  6 14:31:23 debian9 weewx[24254]: crt: binding is loop

--------------------weewx.conf --------------------------
# Options for extension 'crt'
[CumulusRealTime]
    filename = /var/www/html/realtime.txt
    unit_system = US
# options are US, METRIC, METRICWX
-------------------------------------------------------------


maybe, you can try reinstall weewx-crt


Title: Re: weather34 template for weeWX
Post by: GW400 on February 10, 2019, 08:26:07 AM
At the link below is a general guide on integrating weeWX weather software with the weather34 web template adapted for weeWX by Ian Steeple. In this example, the weeWX server and the web server are on separate systems. Download the guide to use the embedded web links.

https://github.com/steepleian/weather34-Home-Weatherstation-Template-WeeWX-adapted/blob/master/taylormia_remote_server_setup.pdf
The url does not work any more
Title: Re: weather34 template for weeWX
Post by: GW400 on February 10, 2019, 08:27:48 AM
Thanks for the nod Taylormia :grin:

Here is a bit more background: -

I think that we can all agree that the real strengths of weeWX are what goes on 'under the hood (or the bonnet for a Brit like me)', its sheer adaptability and a huge community working out solutions together.

I came to weeWX after years of being a Cumulus user (another excellent software) but came to a grinding halt when changing to unsupported Weather Station. It was weeWX to the rescue along with the HP1000 driver and I was back up and running. In my Cumulus days I had been an early adopter of the excellent weather34 template, designed and owned by Brian Underdown. This was originally designed for use with Cumulus as a single dashboard concept where everything is accessible from a single web page. So could I use the template with weeWX, yes by deploying the CRT extension to generate a realtime.txt file.

Now I wanted it to do more, I am not a coder so it takes me a bit longer to discover the snippets of code that I need to make things happen and this is where this forum and others became a valuable resource for myself along with contributions and technical support from others. A big thanks here to David Marshall who has rescued me on more than one occasion.

Recently Brian Underwood took the decision to only support the Meteobridge version of his template going forward. However, he was very happy for the other versions of the template to hosted and maintained by others. On this basis, both the weeWX and Cumulus versions live on. I am now hosting the weeWX version and actively maintaining it in the spirit of Brian's original concept. You can find it here: -

https://github.com/steepleian/weather34-Home-Weatherstation-Template-weeWX-adapted

The latest version is now using the weeWX archive database to generate the pop-up CanvasJS charts instead of relying on Weather Underground. The setup guides are provided for general guidance only due to the multitude of ways weeWX can be setup by individual users.

I would like to re-iterate that although Brian Underdown is very happy for this version to exist and be maintained, he offers no support whatsoever for this version. Any requests to do so will remain unanswered. Please respect Brian's wishes in this respect. Any issues should be directed to this forum.

My own current version of the template shows additional features which may be included in future updates if there is sufficient demand. It can found here https://claydonsweather.org.uk

When used with a smartphone or a narrow browser window, the page morphs into a slimline mobile version.

Steepleian
Seems like the url is not working any more
Title: Re: weather34 template for weeWX
Post by: vreihen on February 10, 2019, 10:27:41 AM
https://github.com/steepleian/WX-HWS/blob/master/taylormia_remote_server_setup.pdf (https://github.com/steepleian/WX-HWS/blob/master/taylormia_remote_server_setup.pdf)
Title: Re: weather34 template for weeWX
Post by: balloon101 on March 13, 2019, 02:22:35 PM
Hi,
I am posting this in case it is an issue. I use installed weather34 template for weeWX on my raspberry pi. I did all the setup changes to get weewx charts working in the template but only todaybarometer.php was working. In looking at the url in the different php files I noticed on the charts that do not work there is ..// or ../ in front of weewx directory which is different than the todaybarometer.php. Removing the extra level change allowed all the charts to work. I followed all the latest install guides I could find but do not know why the url paths to the csv files have the extra level changes.

PS The template is a really nice, so I hope this posting will help someone.
Thanks
Title: Re: weather34 template for weeWX
Post by: balloon101 on March 14, 2019, 12:19:02 AM
Hi,
One more issue I saw using the weewx version of the template. Seems the humidity does not display correctly in the nearby metar popup due to an incorrect line in metar34get.php The correct line is

$metar34humidity          = $parsed_json->{'data'}[0]->{'humidity'}->{'percent'};

Thanks
Title: Re: weather34 template for weeWX
Post by: Russell797 on March 21, 2019, 11:24:33 PM
balloon101

 :thumbsup:

Nice catch.

Also, I managed to figure out the issue with the charts not showing due to the " ../ " misprint, but only after some frustration. Wish I had seen your posts earlier. Funny how just one chart worked, the barometric pressure, as if it were a test or a puzzle meant to be solved! Gotta love it, right!  :grin:
Title: Re: weather34 template for weeWX
Post by: herbo on April 17, 2019, 01:27:14 AM
Hi all,

Has anyone managed to get the UV almanac and solar Almanac pages to produce any information?
I cannot seem to get them to work.

Thanks
Title: Re: weather34 template for weeWX
Post by: balloon101 on April 17, 2019, 05:18:41 PM
Hi all,
If you are using the built-in wxcharts for rainfall and you are in the US and using a WS-2316/2317 then the daily rainfall is probably off by a factor of 10. Here are the changes I made to correct the issue. I suspect there are other ways to do this.

First in the file "todayrainfall.php"
Change
dataPoints1.push({label:moment(rowData[0]).format('HH:mm'),y:parseFloat(rowData[12])});

to

dataPoints1.push({label:moment(rowData[0]).format('HH:mm'),y:parseFloat(rowData[12]*<?php echo $rainfallconvmm ;?>)});

then in the file "conversion.php"
Change the following in the US section.
Note there are two locations in the US. One with no units and one with "us" units

  $rainfallconvmm='1';

to

  $rainfallconvmm='.1';

Well that is it hope this helps.