Author Topic: Newbie issues with Nature Template and Raspberry Pi @PYWWS  (Read 6282 times)

Offline njordan

  • New member
  • *
  • Posts: 3
    • MyWeather
Newbie issues with Nature Template and Raspberry Pi @PYWWS
« on: March 01, 2014, 03:37:09 PM »
Hello, I'm new at almost everything right now, had some experience with Linux for several years but this is quite some years back in time....

so what happened up to now: I installed PYWWS on my Raspberry according to the authors guidelines....all works withour errors and it seems that also the Logging is doing what it should....(having a ~/webdata Folder with all the output information stored....

First i was / I am confused as it seems that the basic setup of PYWWS does not do directly anthing to provide presentation material for a webbrowser, right?????

So I downloaded Weatherby You Nature Template and copied the webpart to /var/www....which works of course with no real weather data (so everything is blank.....)

But here my problems start......the raspberry itself is the webserver....so i said in the weather.ini that its localsite=true....i changed according to the template INI (the paths, daily, live, logged, and hourly.....). I copied plot and text folders to the folder /home/pi/weather/....

but initially i received an error: No such file or directory: '/home/pi/weather/text/forecast_icon.txt when starting manually: python -m pywws.LogData -vvv ~/weather/data......

So I checked some pages here and sombody mentioned in a previous threat to change in the ini file to _9am.txt....so now I have no errors anymore....but only my previous folder /home/pi/webdata/ updates (what I can see from the file timestamps).....

So what do I do wrong, and also, why do I not see anything via browser (index.php)...except the header and the menu links......has the PHP skript somehow to be changed (any pathes??????)

Thanks Norbert

Offline Mr.Meteo

  • Administrator
  • Hero Member
  • *****
  • Posts: 1120
    • http://www.meteostours.ca
Re: Newbie issues with Nature Template and Raspberry Pi @PYWWS
« Reply #1 on: March 02, 2014, 06:33:12 AM »
Hi Norbert,

Sorry, I'm not using Linux, but as you wrote that your
files timestamp updates, pywws is working but not in the
right folder index.php file need to be in the same directory
as the folder data and images.

But, Weather.ini file in Template is outdated, you could
see with pywws'own weather.ini to merge them.

Regards,
Jacques
Please, consider supporting this site 

Offline njordan

  • New member
  • *
  • Posts: 3
    • MyWeather
Re: Newbie issues with Nature Template and Raspberry Pi @PYWWS
« Reply #2 on: March 02, 2014, 01:24:10 PM »
Thanks for the feedback.

Data + Images of course are in the same folder as the index.php (in my case /var/www).....therefore I also see the Header-Pic when i start index.php....but there is no table, no data of my station,....as it seems that there is no real link to the real data, which are located below home/pi/weather.....(plot, text).
(btw, the data folder is completely empty after 1day sync'ing with weather station...and I guess this is part of the problem)

- So, first i'm not sure if the index.php file needs to be updated (any paths in there???)

- and as written below in the pasted INI file, I'm not sure if the path-links are correct as it should be....
(as said, my webserver is in /var/www....so here is the index.php and the data/image folder...

as standard in PYWWS.....weahter is below home/pi.....so weather has its own data folder and the new two folders plot an text......the PYWWS data folder is updated, but plot and text not......

Thanks for any help you can provide here, Norbert



[config]
ws type = 1080
day end hour = 24
gnuplot encoding = iso_8859_1
language = en
logdata sync = 1
rain day threshold = 0.2
usb activity margin = 3.0
pressure offset = 25
frequent writes = False
template encoding = iso-8859-1
gnuplot version = 4.2

[fixed]
pressure offset = -7.1

[paths]
templates = /home/pi/weather/text/
graph_templates = /home/pi/weather/plot/
work = /home/pi/weather/temp/
local_files = /home/pi/weather/results/

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

[logged]
plot = ['rose_1hr.png.xml', 'rose_12hrs.png.xml']
text = ['1hrs.txt', '6hrs.txt', '6hrs_html_cp.txt', 'forecast_icon_9am.txt']
twitter = []
services = []
yowindow =

[hourly]
last update =
plot = ['24hrs_full_features.png.xml', '24hrs.png.xml', 'rose_24hrs.png.xml']
text = ['feed_hourly.xml', '24hrs.txt']
twitter = []
services = []
yowindow =

[12 hourly]
services = []
twitter = []
text = []
plot = []
yowindow =

[daily]
last update =
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 = []
yowindow =

[ftp]
local site = True
secure = False
site = ftp.your_isp.co.uk
user = username
password = userpassword
directory = /home/pi/webdata
port = 21

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


Offline Mr.Meteo

  • Administrator
  • Hero Member
  • *****
  • Posts: 1120
    • http://www.meteostours.ca
Re: Newbie issues with Nature Template and Raspberry Pi @PYWWS
« Reply #3 on: March 03, 2014, 11:10:11 AM »
Hi Norbert,

So, if you see data, I think your problem is only with your
local folder, I think it could be:

local_files = /var/www
or
local_files = /var/www/data

Since index.php page need to be "executed" by your local webserver,
you have no choice on place to put template files.

Regards,
Jacques
Please, consider supporting this site 

Offline njordan

  • New member
  • *
  • Posts: 3
    • MyWeather
Re: Newbie issues with Nature Template and Raspberry Pi @PYWWS
« Reply #4 on: March 04, 2014, 06:24:50 AM »
Hi, I now did change the local_files to /var/www and also tried /var/www/data.....but when entering the following command: python -m pywws.LogData -vvv /var/www/data     I only receive the following error log...of course the new weather.ini is located in /var/www/data..... any idea.....doing the same command with the ~/weather/data....everything works fine....

Traceback (most recent call last):
  File "/usr/lib/python2.7/runpy.py", line 162, in _run_module_as_main
    "__main__", fname, loader, pkg_name)
  File "/usr/lib/python2.7/runpy.py", line 72, in _run_code
    exec code in run_globals
  File "/usr/local/lib/python2.7/dist-packages/pywws/LogData.py", line 315, in <module>
    sys.exit(main())
  File "/usr/local/lib/python2.7/dist-packages/pywws/LogData.py", line 311, in main
    DataStore.params(root_dir), DataStore.status(root_dir),
  File "/usr/local/lib/python2.7/dist-packages/pywws/DataStore.py", line 157, in __init__
    ParamStore.__init__(self, root_dir, 'weather.ini')
  File "/usr/local/lib/python2.7/dist-packages/pywws/DataStore.py", line 100, in __init__
    self._config.read(self._path)
  File "/usr/lib/python2.7/ConfigParser.py", line 305, in read
    self._read(fp, filename)
  File "/usr/lib/python2.7/ConfigParser.py", line 546, in _read
    raise e
ConfigParser.ParsingError: File contains parsing errors: /var/www/data/weather.ini
        [line 23]: 'd[live]\n'

Offline Mr.Meteo

  • Administrator
  • Hero Member
  • *****
  • Posts: 1120
    • http://www.meteostours.ca
Re: Newbie issues with Nature Template and Raspberry Pi @PYWWS
« Reply #5 on: March 04, 2014, 06:03:58 PM »
Hi Norbert,

ConfigParser.ParsingError: File contains parsing errors: /var/www/data/weather.ini
        [line 23]: 'd[live]\n'

These lines tell you error in file weather.ini, around line #23

For folders mistakes, Sorry I'm lost! (Windows user!  :P )

Regards,
Jacques
Please, consider supporting this site