Author Topic: PYWWS Nature Template and Raspberry Pi Problem please will you help me  (Read 11767 times)

Offline Johnww

  • New member
  • *
  • Posts: 3
    • Hambleden Cottage
Hello
I am trying to put my Maplin N96FY weather station onto my website www.hambledencottage.com/weather/index.php
You can see that I cannot see the complete template.
Here is my weather.ini and index.php files

weather.ini file

[fixed]
ws type = 1080
station clock = 1360581380.1
sensor clock = 1360581184.34
pressure offset = 9
fixed block = {'data_changed': 0, 'unknown_18': 0, 'timezone': 0, 'data_count': 322, 'min': {'hum_out': {'date': '2013-02-02 14:21', 'val': 13}, 'windchill':$

[config]
logdata sync = 1
day end hour = 24
gnuplot encoding = iso_8859_1

[paths]
templates = /home/pi/weather/code/pywws/text/
graph_templates = /home/pi/weather/code/pywws/plot/
work = /home/pi/weather/temp/

[hourly]
last update = 2013-02-11 15:06:21
plot = ['24hrs_full_features.png.xml', '24hrs.png.xml', 'rose_24hrs.png.xml']
text = ['feed_hourly.xml', '24hrs.txt']
twitter = []
services = []

[logged]
last update = 2013-02-11 15:06:21
plot = ['rose_1hr.png.xml', 'rose_12hrs.png.xml']
text = ['1hrs.txt', '6hrs.txt', '6hrs_html_cp.txt', 'forecast_icon.txt']
twitter = []
services = []

[daily]
last update = 2013-02-11 12:26:21
plot = ['7days.png.xml', '2012.png.xml', '28days.png.xml', 'rose_7days_nights.png.xml']
text = ['feed_daily.xml', 'forecast_week.txt', '7days.txt', 'allmonths.txt']
twitter = []
services = []

[live]
services = []
twitter = []
text = []
plot = []

[ftp]
secure = False
site = ftp.hambledencottage.com
local site = False
user = username
directory = public_html/weather/data
password = password

[Zambretti]
baro upper = 1050.0
north = True
baro lower = 950.0


index.php file

Design ......... :  Nature vegetal (C)2012 http://www.lady-beetle.com
Weather template : Weather by You! (C)2012 http://www.weatherbyyou.com
Date ........... : 2012/06/04
-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
  <meta http-equiv="Content-Type" content="text/html;" />
  <title>pywws - My personnal weather site</title>
  <meta http-equiv="pragma" content="no-cache" />
  <meta http-equiv="expires" content="-1" />
  <meta http-equiv="Cache-control" content="no-cache" />
  <link href="styles.css" rel="stylesheet" type="text/css" media="all" />
  <link rel="shortcut icon" href="favicon.ico" />
  <script type="text/javascript"> <!--
    // Month and day names. Replace by your own for foreign languages
    var DayName = new Array("Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday");
    var MonthName = new Array("January", "Febuary", "March", "April", "May", "June", "July",
        "August", "September", "October", "November", "December");
    //-->
  </script>
</head>
<body>
<div id="page">
  <div id="header">
    <!-- Text to be adapted for your site name and slogan  -->
    <div id="header_part1"><span>Hambleden Cottage Weather Station</span></div>
    <div id="header_part2"></div>
  </div>
  <!--  Section for main menu, all grey bar long  -->
  <div id="menubar">
    <div id="header_left">
      <!--  Script to insert today's date  -->
      <script type="text/javascript"> <!--
        var CurrentDate = new Date();
        var DateCur = CurrentDate.getDate();
        var DayNumber = CurrentDate.getDay();
        var MonthNumber = CurrentDate.getMonth();
        var Year = CurrentDate.getFullYear();
        document.write(DayName[DayNumber] + ", " + DateCur + " " + MonthName[MonthNumber] + " " + Year); //-->
      </script>
    </div>
    <a id="home" href="/weather/index.php"> >> Home</a>
    <div id="mainmenu">
      <ul>
        <li><a href="/weather/index.php?page=1hour" >1 hour</a></li>
        <li><a href="/weather/index.php?page=6hours" >6 hour</a></li>
        <li><a href="/weather/index.php?page=24hours" >24 hours</a></li>
        <li><a href="/weather/index.php?page=7days" >7 days</a></li>
        <li><a href="/weather/index.php?page=months" >Months</a></li>
      </ul>
    </div>
    <div id="cemter_menubar">Observations for last</div>
  </div>
  <div id="content_head"></div>
  <div id="content">
    <!--  Left side panel  -->
    <div id="left_col">
      <h2 class="no_margin">Forecast</h2>
      <div id="today_forecast" class="forecast"></div>
      <?php
        require_once('/weather/data/forecast_icon_9am.txt')
      ?>
      <br /><hr />
      <h3 class="no_margin">Graphs</h3>
      <hr />
      <!-- Left side menu  -->
      <ul class="sidemenu">
        <li><a href="/weather/index.php?page=24h_graph">24 hours</a></li>
        <li><a href="/weather/index.php?page=24hfull_graph">24 hours full</a></li>
        <li><a href="/weather/index.php?page=7days_graph">7 days</a></li>
        <li><a href="/weather/index.php?page=28days">28 days</a></li>
        <li><a href="/weather/index.php?page=2012">Year 2012</a></li>
        <li><a href="/weather/index.php?page=rose_1hr">Wind: 1 hour</a></li>
        <li><a href="/weather/index.php?page=rose_12hrs">Wind: 12 hours</a></li>
        <li><a href="/weather/index.php?page=rose_24hrs">Wind: 24 hours</a></li>
      </ul>
      <br /><hr />
      <h3 class="no_margin">Links</h3>
      <hr />
      <ul class="sidemenu">
        <li><a href="http://www.metoffice.gov.uk/">Met Office</a></li>
        <li><a href="http://weather.weatherbug.com/">WeatherBug</a></li>
        <li><a href="http://www.wunderground.com/">Weather Underground</a></li>
      </ul>
    </div>
    <!--  Right side (main) panel  -->
    <div id="main_panel">
      <h1>My personnal weather site</h1>
      <!-- Container for swapping content  -->
      <div id="weather_infos">
        <?php
          if (!isset($_GET['page'])) {
            require_once('/weather/index.txt');
          }
          else {
            $page = $_GET['page'];
            // echo '<h1>'.$page.'</h1>';
            switch ($page) {
              case "1hour":
                    require_once('/weather/data/1hrs.txt');
                    break;
              case "6hours":
                    require_once('/weather/data/6hrs.txt');
                    break;
              case "24hours":
                    require_once('/weather/data/24hrs.txt');
                    break;
              case "7days":
                    require_once('/weather/data/7days.txt');
                    break;
              case "months":
                    require_once('/weather/data/allmonths.txt');
                    break;
              case "24h_graph":
                    echo '<h2>Last 24 hours graphs</h2>';
                    echo '<p><img src="/weather/data/24hrs.png" alt="" title=""  /></p>';
                    break;
              case "24hfull_graph":
                    echo '<h2>Last 24 hours graphs</h2>';
                    echo '<p><img src="/weather/data/24hrs_full_features.png" alt="" title=""  /></p>';
                    break;
              case "7days_graph":
                    echo '<h2>Last 24 hours graphs</h2>';
                    echo '<p><img src="/weather/data/7days.png" alt="" title=""  /></p>';
                    break;
              case "28days":
                    echo '<h2>Last 24 hours graphs</h2>';
                    echo '<p><img src="/weather/data/28days.png" alt="" title=""  /></p>';
                    break;
              case "2012":
                    echo '<h2>Last 24 hours graphs</h2>';
                    echo '<p><img src="/weather/data/2012.png" alt="" title=""  /></p>';
                    break;
              case "rose_1hr":
                    echo '<h2>Last 24 hours graphs</h2>';
                    echo '<p><img src="/weather/data/rose_1hr.png" alt="" title=""  /></p>';
                    break;
              case "rose_12hrs":
                    echo '<h2>Last 24 hours graphs</h2>';
                    echo '<p><img src="/weather/data/rose_12hrs.png" alt="" title=""  /></p>';
                    break;
              case "rose_24hrs":
                    echo '<h2>Last 24 hours graphs</h2>';
                    echo '<p><img src="/weather/data/rose_24hrs.png" alt="" title=""  /></p>';
                    break;
            };
          }
        ?>
      </div>
    </div>
    <div style="clear: both"></div>
  </div>
  <div id="content_footer"></div>
  <div id="footer">
    <a id="pywws-link" href="http://code.google.com/p/pywws/">&nbsp;</a>
    <p>&copy;<small> 2013  </small> hambledencottage.com</p>
  </div>
  <div id="copyright">
    Provided By <a href="http://www.weatherbyyou.com/" title="Free Weather website templates">Weather by You © 2012</a> <small>|</small> <a href="http://www.lady-beetle.com/" title="Free Templates">© 2009 Lady Beetle</a>
  </div>
</div>
</body>
</html>



thank you
John wheeler

Offline Mr.Meteo

  • Administrator
  • Hero Member
  • *****
  • Posts: 1120
    • http://www.meteostours.ca
Re: PYWWS Nature Template and Raspberry Pi Problem please will you help me
« Reply #1 on: February 11, 2013, 12:09:15 PM »
Hi John,

When I look to your site I'm having an error #500 at your weather page.
Looking to your page I see that the page stop working on line :

  require_once('/weather/data/forecast_icon_9am.txt')

This line is supposed to include a file called forecast_icon_9am.txt
and it is supposed to be into folder /weather/data

Maybe you could check if this file is there
Exact directory could be different in your case as you have a "upper" site.
(... could be just removing first "/"... like that: weather/data )
... or php support

Hope this help!
Regards,
Jacques
Please, consider supporting this site 

Offline Johnww

  • New member
  • *
  • Posts: 3
    • Hambleden Cottage
Re: PYWWS Nature Template and Raspberry Pi Problem please will you help me
« Reply #2 on: February 11, 2013, 01:45:05 PM »
Working now Jacques
Thank you so much for your help and also for your hard work creating this template.

Best wishes
John