Easiest way to connect a Linux pc to the Davis Vantage Pro 2

1,887 views
Skip to first unread message

Ragnar Brynjúlfsson

unread,
Apr 24, 2016, 8:56:48 AM4/24/16
to weewx-user
I'm new here, so hi all. I'm comfortable with both Linux and Python, so weewx seems like a great solution to me for improving the display of the weather info at my windsurfing club. We have a Davis Vantage Pro 2 console, connected via ethernet to a router, that in turn connects to the internet using a mobile network. Currently it only uploads the data to weatherlink.com, which looks like it hasn't been updates since the mid 90's (Davis should really do something about this).

My original though was to just scrape the html data directly from weatherlink.com, and both log them and present them properly, but after came across weewx, I think that's probably a better alternative.

What would be a good way to connect a Linux PC to the Vantage Pro. Either directly, using something like a Rapsberry Pi, or remotely from a web server?

Thomas Keffer

unread,
Apr 24, 2016, 9:10:29 AM4/24/16
to weewx-user
Hi, Ragnar

The normal configuration is a serial or IP connection to a small server running weewx, located somewhere in close proximity to your VP2. This is where the database will reside. Then, graphs and HTML files are FTPd (or RSYNC'd) to your webserver. 

If you are uploading to weatherlink.com, you must have the IP version of the Vantage logger so, in theory, where weewx is located is limited by only where an IP packet can go, which is pretty much anywhere. In practice, things usually work better if the weewx server and the VP2 are co-located. This is because the Vantage protocol is highly stateful and sensitive to network outages or delays. Frankly, Davis made a bad decision to take what is basically a driver protocol and extend it out on to the net.

One other thing: you will not be able to upload to weatherlink.com and use weewx at the same time. Both protocols want to control the state of the console, but only one can.

Hope that helps.

-tk

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

Ragnar Brynjúlfsson

unread,
Apr 24, 2016, 4:02:13 PM4/24/16
to weewx-user
Thanks for the info.

Looking a bit around, I noticed that there is sample code for creating a driver for weewx that reads from a file. ( https://github.com/weewx/weewx/tree/master/extensions/fileparse ). Since wetherlink.com can present the data as XML ( http://www.weatherlink.com/xml.php?user=USERNAME&pass=PASSWORD  ), it should be relatively straight forward to write a driver that fetches the data directly from weatherlink.com  This way, the data could still go to weatherlink.com, but also be presented nicely through WeeWX. Has anyone written a driver like this? And if not, and there are no obvious show stoppers, it's something I could look into writing in my free time.

Thomas Keffer

unread,
Apr 24, 2016, 4:22:22 PM4/24/16
to weewx-user
That could work.

Be sure to expect network outages and delays. You'll probably need a separate thread that fetches the XML file, while the main thread monitors it. 

-tk

mwall

unread,
Apr 24, 2016, 8:52:39 PM4/24/16
to weewx-user


On Sunday, April 24, 2016 at 4:02:13 PM UTC-4, Ragnar Brynjúlfsson wrote:
Thanks for the info.

Looking a bit around, I noticed that there is sample code for creating a driver for weewx that reads from a file. ( https://github.com/weewx/weewx/tree/master/extensions/fileparse ). Since wetherlink.com can present the data as XML ( http://www.weatherlink.com/xml.php?user=USERNAME&pass=PASSWORD  ), it should be relatively straight forward to write a driver that fetches the data directly from weatherlink.com  This way, the data could still go to weatherlink.com, but also be presented nicely through WeeWX. Has anyone written a driver like this?

you could try the wlink driver:

https://github.com/weewx/weewx/wiki/wlink

 
And if not, and there are no obvious show stoppers, it's something I could look into writing in my free time.

being able to use both weewx and weatherlink is an issue that comes up many times.  there are a few approaches to solving it:

1) vpro uploads to weatherlink, then weewx downloads data from weatherlink using the wlink driver

2) vpro uploads to weatherlink.  once per week, you stop the weatherlink upload, run weewx (which pulls data from the vpro logger)

3) weewx talks to the vpro, uses a 'weatherlink uploader' restful extension to upload data to weatherlink

4) weewx talks to the vpro, uses a 'broadcast data' or 'repeat data' extension to make vpro data available to any other software that talks to a vpro

options 1 and 2 are possible right now.

it should not be very difficult to write the extension for option 3.

option 4 is probably the most difficult, not because it is hard to do, but because of all the testing required.

m
Reply all
Reply to author
Forward
0 new messages