wfrog with pywws processed data

154 views
Skip to first unread message

Marian Soban

unread,
Aug 25, 2014, 3:25:20 PM8/25/14
to wfrog...@googlegroups.com
Hi,

I'd like to ask - is it possible to make wfrog to use already processed data files by pywws (or raw data from pywws)?

My motivation - I'm using WH1080 weather station, data are processed by pywws on Raspberry Pi.
After processing they are uploaded by very slow and unreliable telemetry link to my server and from there they go to the world.

My goal is to run wrog on my server (Ubuntu) to generate public page (since it's makes no sense to run wfrog on Pi with very slow connection).
pywws' processed or raw data would be copied by ftp from Pi -> server.
Is it possible or not?
Many thanks for answers in forward

M.

Jordi Puigsegur Figueras

unread,
Aug 26, 2014, 4:09:58 AM8/26/14
to wfrog...@googlegroups.com
Hi,

I see several options:
  1. wfrog usually runs either with 1 single process or two processes (driver + logger and render). However it could also work as three separate processes: driver, logger and render (it requires configuration and testing ...). In this setup the driver would send the events via http to the logger which saves them into the database. This requires a constant link but not much bandwith. If the link is very unreliable I wouldn't advise this type of setup. 
  2. You could run the driver and logger in your Raspberry Pi and then synchronize data to your server where the render would generate the pages. There are two options in these setup:
    • Use CSV files as storage and rsync to synchronize data (one of the online stations in https://code.google.com/p/wfrog/wiki/SeeItInAction uses this system)
    • Use mysql as storage where the master database will be in your raspberry and a slave database would be in your server.
If you ask me I'll probably go either for CSV storage+rsync or mysql storage+mysql replication. Personally I'll prefer mysql but replication might not work properly if the network is unreliable. A cron job running rsync shouldn't have problems. 

Jordi.


--
You received this message because you are subscribed to the Google Groups "wfrog-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to wfrog-users...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Marian Soban

unread,
Aug 27, 2014, 3:49:49 AM8/27/14
to wfrog...@googlegroups.com
Thank you for advice, I'll try to do it the way you suggested - there will be two instances of wfrog - one on Raspeberry Pi (for data collection), second one on Ubuntu server (for data rendering).
One thing is not clear to me yet - can pywws software and wfrog work togehter with one meteo station at the same time (@Pi) or will I have to use only wfrog as data collection service?

Jordi Puigsegur Figueras

unread,
Aug 30, 2014, 2:19:50 PM8/30/14
to wfrog...@googlegroups.com
DISCLAIMER: I haven't programmed the wh108 driver and I don't know how pywvs works. 

However, AFAIK wfrog wh108 driver uses pywvs library to connect to the weather station but you cannot have two systems collecting the data.

Jordi.


2014-08-27 9:49 GMT+02:00 Marian Soban <marian...@gmail.com>:
Thank you for advice, I'll try to do it the way you suggested - there will be two instances of wfrog - one on Raspeberry Pi (for data collection), second one on Ubuntu server (for data rendering).
One thing is not clear to me yet - can pywws software and wfrog work togehter with one meteo station at the same time (@Pi) or will I have to use only wfrog as data collection service?

--

Marian Soban

unread,
Oct 6, 2014, 4:04:16 AM10/6/14
to wfrog...@googlegroups.com
Hi, in the end I did it as follows:

1) pywws is running on Pi and immediately sends WH1080 live data to telemetry module, which represents transparent serial link
2) Data are processed in wfrog  running on Ubuntu server connected to Internet - wfrog generates web page and shares data to Weather Underground service (http://www.wunderground.com/personal-weather-station/dashboard?ID=INOVDUBN2)

For 1) I've created new LiveDataLogger in pywws that reuses short code part from wfrog's wh1080.py to obtain live (=raw) data from weather station. LiveDataLogger puts data to "sender" to serial link, which keeps sending of last live data record every 2 seconds for 30 seconds  to make sure that it's successfully transferred to receiving module. Live data are stored to framed messages with added CRC check and some byte stuffing (inspired by FrSky telemetry protocol).

For 2) I've rewritten wh1080.py driver to receive data from "receiver" part of serial link instead of pywws' weather station module.

For now it looks that it works except of computing of rain rate value, which was working on pywws correctly - not sure why yet.
I'm also missing real time weather updates for Weather Underground service in wfrog, pywws had it.

I can share my sources if someone is interested in, but please note that I'm new to python so my solution shouldn't be considered as reference python coding....
Reply all
Reply to author
Forward
0 new messages