Author Topic: pywws weather nature use on qnap  (Read 18146 times)

Offline badabing82

  • Jr. Member
  • **
  • Posts: 13
    • linuxfu
pywws weather nature use on qnap
« on: September 02, 2012, 02:10:25 AM »
Hi All,

Just wondering if anyone has had any success getting this template to run on a qnap as there is a pywws plugin. The plugin is working well just curious if anyone has got the template running?

Offline Mr.Meteo

  • Administrator
  • Hero Member
  • *****
  • Posts: 1120
    • http://www.meteostours.ca
Re: pywws weather nature use on qnap
« Reply #1 on: September 08, 2012, 11:42:28 AM »
Hi Bad,

I think you could check on pywws forum for Qnap experience: http://code.google.com/p/pywws/

For Template in use, you could check here:
http://www.weather.dragontail.co.uk/ (Rasperry PI)

Regards,
Jacques
(Back from vacation)
Please, consider supporting this site 

Offline badabing82

  • Jr. Member
  • **
  • Posts: 13
    • linuxfu
Re: pywws weather nature use on qnap
« Reply #2 on: September 19, 2012, 11:50:46 AM »
Hi Guys,

Just an FYI

I've now got this working on a qnap NAS. there is a qnap package for the install i've now installed and got working the template if anyone needs any help feel free to ask away.

http://forum.qnap.com/viewtopic.php?f=128&t=54137&start=165

Jacques if the maintainer ends up using this as the default template i've asked him to contact you.

Offline Mr.Meteo

  • Administrator
  • Hero Member
  • *****
  • Posts: 1120
    • http://www.meteostours.ca
Re: pywws weather nature use on qnap
« Reply #3 on: September 19, 2012, 12:44:24 PM »
Hi Dan,

I'll be happy to help if I could! But I think I would have to practice a bit on Linux before!

I've mounted this template on a Asus RT-N16 router and haven't play with it since then!
I'm an old Windows user trying to use its past knowledge of DOS to "access" Linux, but what a job!  :P

I've put hand on a Netgear WNDR3400 and I'm waiting on a Raspberry PI delevery to go back to that
project... I'll be pretty interested to play with that project if interest could be there!  ;D

Hoping a link to your installation soon!  ;)

Best Regards,
Jacques
Please, consider supporting this site 

Offline badabing82

  • Jr. Member
  • **
  • Posts: 13
    • linuxfu
Re: pywws weather nature use on qnap
« Reply #4 on: September 20, 2012, 11:37:16 AM »
Linux is not thatttt hard especially for a programmer  :P :P

does anyone know how to change wind speed from mph to kmh ?

Offline Mr.Meteo

  • Administrator
  • Hero Member
  • *****
  • Posts: 1120
    • http://www.meteostours.ca
Re: pywws weather nature use on qnap
« Reply #5 on: September 20, 2012, 12:03:55 PM »
Hi Dan,

Linux is not thatttt hard especially for a programmer  :P :P
You know, head is a container... and any container had a maximum "capacity"  ::) ;D


does anyone know how to change wind speed from mph to kmh ?
I don't think that pywws refer to measurement units, you have to configure your station
for the units you want and edit each "recipe" file.

Into plot folder, you will find each .XML files for graphs containing commands for pywws, find
titles sections like that:       <title>Wind speed (mph)</title>

Into text folder, you'll find all .TXT files needed for text, with things your searching oin it:
Like to find Wind, you'll see this:    <th colspan="3">Wind<small> mph</small></th>

Like always, be safe.... take a copy before!  ;)

Best Regards,
Jacques
Please, consider supporting this site 

Offline badabing82

  • Jr. Member
  • **
  • Posts: 13
    • linuxfu
Re: pywws weather nature use on qnap
« Reply #6 on: September 20, 2012, 01:03:00 PM »
haha not much of a leap moving from programming in php to python linux based languages! lol

There looks like a function is already in place in conversion.py and a change from the function
 <ycalc>wind_mph(data['wind_ave'])</ycalc>
to
 <ycalc>wind_kmph(data['wind_ave'])</ycalc>

should work i'm giving this a shot now

Offline jimicek

  • New member
  • *
  • Posts: 9
    • JiM's page
Re: pywws weather nature use on qnap
« Reply #7 on: September 21, 2012, 07:42:39 AM »
Hi, I found the pywws templates, and implemented on my Synology NAS. I like it very much, thanx for publishing.
Starting "plaiyng" with it and my new weatherstation.
I also found the problem with mph and kmh, but I think also, that this is only problem of the graph description, data from the station come in kmh.
Following problems appeared:
- "Last 6 hours view" has latest data at the bottom, remaining views have latest data at the top
- Forecast time stamp is more than 1 hour late, even if calculated just now
Can someone help me with correcting?
Thx,
Jimicek

Offline Mr.Meteo

  • Administrator
  • Hero Member
  • *****
  • Posts: 1120
    • http://www.meteostours.ca
Re: pywws weather nature use on qnap
« Reply #8 on: September 21, 2012, 08:11:00 AM »
Hi Jimicek,

I'n not a "pywws geek" nor a "Linux geek", but I think that the convert.py
is used to convert data already recorded in the "wrong" format.

If you always have configured your station with the right units for your convenience,
you simply have to modify "recipe" files included in plot and text folder, as indicated
in past post, because only labels beside numbers have to be changed.

Hope this help!

Regards,
Jacques
Please, consider supporting this site 

Offline badabing82

  • Jr. Member
  • **
  • Posts: 13
    • linuxfu
Re: pywws weather nature use on qnap
« Reply #9 on: September 21, 2012, 12:01:59 PM »
Hi All,

I'm still looking into the mph to kmph conversion.
I know with my weather station fine off set wh-3080 i have it all set to kmh but when you download the actual data from the station it provides it in "raw" i'm pritty sure this is meters per second.

If you take a look at the file as jacques said pywws/convert.py

you will see this.

def wind_kmph(ms):
    "Convert wind from metres per second to kilometres per hour"
    if ms is None:
        return None
    return ms * 3.6

The default template is in mph

def wind_mph(ms):
    "Convert wind from metres per second to miles per hour"
    if ms is None:
        return None
    return ms * 3.6 / 1.609344

So in theory by changing what is being called within the .xml files which call the required function then completes the conversion and then plots graphs it should work.

I've run into some issues which i'm trying to figure out.

https://groups.google.com/forum/#!topic/pywws/k9c73vT3q9s

thread explains the process by using the conversion already built in i'm just not sure why it's not working for me when i change all references from wind_mph to wind_kmph


Offline Mr.Meteo

  • Administrator
  • Hero Member
  • *****
  • Posts: 1120
    • http://www.meteostours.ca
Re: pywws weather nature use on qnap
« Reply #10 on: September 21, 2012, 12:32:42 PM »
Hi Dan,

I've take a look to post you've pointed and pywws documentation who stat that:
A set of functions to convert pywws native units (Centigrade, mm, m/s, hPa) to other popular units.

Then I think you're right, readings are made in ms (meter by seconds) and have to be converted
by wind_kmph(ms) or wind_mph(ms) depending on units wanted.

But a try is the best way to confirm that comprehension is right!
Have you an official station near you? Could be a way (and give results a "gap"... as calibration if really near!)

My pywws is unplugged for now, then I have some work to do to turn my 2nd console on pywws :-[
But if wind is stable, you could easily compare with what your console shows!

Regards,
Jacques
« Last Edit: September 21, 2012, 12:37:43 PM by Mr.Meteo »
Please, consider supporting this site 

Offline badabing82

  • Jr. Member
  • **
  • Posts: 13
    • linuxfu
Re: pywws weather nature use on qnap
« Reply #11 on: September 21, 2012, 12:40:23 PM »
Hi Jaques,

I can confirm it's meters a second. I also got it working displaying kmph but as the ranges where still 0 to 30 mph in the graphs it was cutting the graphs off. I'm assuming that the following
<title>Vitesse du vent (kmph)</title>
    <yrange>0, 30</yrange>
    <source>raw</source>
Set the yaxis range in the graph plots for wind speed?

Offline Mr.Meteo

  • Administrator
  • Hero Member
  • *****
  • Posts: 1120
    • http://www.meteostours.ca
Re: pywws weather nature use on qnap
« Reply #12 on: September 21, 2012, 12:51:26 PM »
Hi,

Yes, The "yrange" is the range that we think will fit to most numbers received.
As this refer to "numbers" and not units for these numbers, 0 to 30 is someway ok for MPH,
but for KM/H it's a bit small!

Try to play with the maximum to fit your area average "weather"

Regards,
Jacques
Please, consider supporting this site 

Offline badabing82

  • Jr. Member
  • **
  • Posts: 13
    • linuxfu
Re: pywws weather nature use on qnap
« Reply #13 on: September 22, 2012, 12:49:03 AM »
Thanks Jacques ,

All up and running now.
If anyone needs any help please free to ask.

An example can be seen here.

http://weather.linuxfu.net

Last thing i need to do is set it up to working with weatherunderground,

any one with experience doing this?

Offline jimicek

  • New member
  • *
  • Posts: 9
    • JiM's page
Re: pywws weather nature use on qnap
« Reply #14 on: September 22, 2012, 03:48:30 PM »
Hi all,

the idea changing mph to kmph seems to be correct - implemented in my system, also changed the y-axis scales, and seems to be working correctly. But what about the circular wind direction diagrams? There should be also set higher scale, and also should be changed the color scale limits for wind speed percentage. What about to change
<threshold>0.5, 3.5, 7.5, 12.5, 18.5, 24.5, 31.5</threshold>
  to 
<threshold>1, 5, 12, 20, 30, 40, 50</threshold>
in the wind rose plot templates?
yaxis defines the plot limit, but after implementing the preceding I have problem with percentage distribution in the graph. Should be modified windrose.py ??

Regards,
Jimicek
« Last Edit: September 22, 2012, 04:28:31 PM by jimicek »