Page 1 of 2

Davis VP+, VirtualVP, SheevaPlug

Posted: Tue Jun 14, 2011 6:30 am
by saratogaWX
I'm having a bit of a problem using my new SheevaPlug with an existing setup:

Davis Vantage Pro Plus (cabled, firmware 11/20/06 Rev B) is managed by VirtualVP (1.2.5) which in turn drives 4 station software packages:
WeatherLink
Weather-Display
VWS
Cumulus
on the same PC (2GB mem, WinXP-SP3) via com port emulation.

I've connected the SheevaPlug with MeteoHUB via TCP to the weather PC system on one of the TCP ports on VirtualVP.

Meteohub will start pulling data, then stop, so I get meteohub.log entries like

Code: Select all

logger (13.06.2011 15:51:33): data logger (version 4.7h, build 545) started.
logger (13.06.2011 15:51:34): connect station 0 (Vantage via TCP/IP).
logger (13.06.2011 15:51:34): connect station 1 (System Data via Plug-in).
logger (13.06.2011 15:51:35): station 0 (Vantage), wakeup sent.
logger (13.06.2011 15:51:35): station 0 (Vantage), internal logger activated.
logger (13.06.2011 15:51:35): station 0 (Vantage), syncing.
logger (13.06.2011 15:51:35): station 0 (Vantage), gettime request sent.
logger (13.06.2011 15:51:35): station 0 (Vantage), no Vantage time offset.
logger (13.06.2011 15:51:35): station 0 (Vantage), eeprom request sent.
logger (13.06.2011 15:51:35): station 0 (Vantage), rain collector size 0.01 inch per tick.
logger (13.06.2011 15:51:35): station 0 (Vantage), transmitter 1 active as station type (#0) "ISS".
logger (13.06.2011 15:51:35): station 0 (Vantage), no reading of Vantage's internal logger as data gap is less than 10 minutes: -1705 secs
logger (13.06.2011 15:52:07): station 0 (Vantage), can't write string "LOOP": Connection reset by peer
logger (13.06.2011 15:52:07): unexpected 0 bytes delivered from weather station 0 (Vantage)
logger (13.06.2011 15:52:07): disconnect station 0 (Vantage).
logger (13.06.2011 15:52:38): connect station 0 (Vantage via TCP/IP).
logger (13.06.2011 15:52:38): unexpected 0 bytes delivered from weather station 0 (Vantage)
logger (13.06.2011 15:52:38): disconnect station 0 (Vantage).
logger (13.06.2011 15:53:10): connect station 0 (Vantage via TCP/IP).
logger (13.06.2011 15:53:10): unexpected 0 bytes delivered from weather station 0 (Vantage)
logger (13.06.2011 15:53:10): disconnect station 0 (Vantage).
logger (13.06.2011 15:53:43): connect station 0 (Vantage via TCP/IP).
logger (13.06.2011 15:53:43): unexpected 0 bytes delivered from weather station 0 (Vantage)
logger (13.06.2011 15:53:43): disconnect station 0 (Vantage).
logger (13.06.2011 15:54:14): connect station 0 (Vantage via TCP/IP).
logger (13.06.2011 15:54:14): unexpected 0 bytes delivered from weather station 0 (Vantage)
logger (13.06.2011 15:54:14): disconnect station 0 (Vantage).
logger (13.06.2011 15:54:48): connect station 0 (Vantage via TCP/IP).
logger (13.06.2011 15:54:48): unexpected 0 bytes delivered from weather station 0 (Vantage)
logger (13.06.2011 15:54:48): disconnect station 0 (Vantage).
logger (13.06.2011 15:55:19): connect station 0 (Vantage via TCP/IP).
logger (13.06.2011 15:55:19): unexpected 0 bytes delivered from weather station 0 (Vantage)
logger (13.06.2011 15:55:19): disconnect station 0 (Vantage).
logger (13.06.2011 15:55:49): connect station 0 (Vantage via TCP/IP).
logger (13.06.2011 15:55:49): unexpected 0 bytes delivered from weather station 0 (Vantage)
logger (13.06.2011 15:55:49): disconnect station 0 (Vantage).
logger (13.06.2011 15:56:19): connect station 0 (Vantage via TCP/IP).
logger (13.06.2011 15:56:19): unexpected 0 bytes delivered from weather station 0 (Vantage)
logger (13.06.2011 15:56:19): disconnect station 0 (Vantage).
logger (13.06.2011 15:56:53): connect station 0 (Vantage via TCP/IP).
logger (13.06.2011 15:56:53): no valid signal from station 0 (Vantage) for 300 seconds, data logger will be restarted.
logger (13.06.2011 15:56:53): disconnect station 0 (Vantage).
logger (13.06.2011 15:56:53): disconnect station 1 (System Data).
logger (13.06.2011 15:56:53): data logger stopped.
logger (13.06.2011 15:56:53): data logger (version 4.7h, build 545) started.
logger (13.06.2011 15:56:54): connect station 0 (Vantage via TCP/IP).
logger (13.06.2011 15:56:54): connect station 1 (System Data via Plug-in).
logger (13.06.2011 15:56:55): station 0 (Vantage), wakeup sent.
logger (13.06.2011 15:56:55): station 0 (Vantage), internal logger activated.
logger (13.06.2011 15:56:55): station 0 (Vantage), syncing.
logger (13.06.2011 15:56:55): station 0 (Vantage), gettime request sent.
logger (13.06.2011 15:56:55): station 0 (Vantage), no Vantage time offset.
logger (13.06.2011 15:56:55): station 0 (Vantage), eeprom request sent.
logger (13.06.2011 15:56:55): station 0 (Vantage), rain collector size 0.01 inch per tick.
logger (13.06.2011 15:56:55): station 0 (Vantage), transmitter 1 active as station type (#0) "ISS".
logger (13.06.2011 15:56:55): station 0 (Vantage), no reading of Vantage's internal logger as data gap is less than 10 minutes: -1385 secs
logger (13.06.2011 15:57:28): station 0 (Vantage), can't write string "LOOP": Connection reset by peer
logger (13.06.2011 15:57:28): unexpected 0 bytes delivered from weather station 0 (Vantage)
logger (13.06.2011 15:57:28): disconnect station 0 (Vantage).
logger (13.06.2011 15:57:58): connect station 0 (Vantage via TCP/IP).
logger (13.06.2011 15:57:58): unexpected 0 bytes delivered from weather station 0 (Vantage)
logger (13.06.2011 15:57:58): disconnect station 0 (Vantage).
logger (13.06.2011 15:58:28): connect station 0 (Vantage via TCP/IP).
logger (13.06.2011 15:58:28): station 0 (Vantage), wakeup sent.
logger (13.06.2011 15:58:28): station 0 (Vantage), can't start internal data logger on device 192.168.1.101:22223: Connection reset by peer
logger (13.06.2011 15:58:28): unexpected 0 bytes delivered from weather station 0 (Vantage)
logger (13.06.2011 15:58:28): disconnect station 0 (Vantage).
logger (13.06.2011 15:58:58): connect station 0 (Vantage via TCP/IP).
logger (13.06.2011 15:58:58): unexpected 0 bytes delivered from weather station 0 (Vantage)
logger (13.06.2011 15:58:58): disconnect station 0 (Vantage).
logger (13.06.2011 15:59:28): connect station 0 (Vantage via TCP/IP).
logger (13.06.2011 15:59:28): station 0 (Vantage), wakeup sent.
logger (13.06.2011 15:59:29): station 0 (Vantage), can't start internal data logger on device 192.168.1.101:22223: Connection reset by peer
logger (13.06.2011 15:59:29): unexpected 0 bytes delivered from weather station 0 (Vantage)
logger (13.06.2011 15:59:29): disconnect station 0 (Vantage).
logger (13.06.2011 15:59:59): connect station 0 (Vantage via TCP/IP).
logger (13.06.2011 15:59:59): unexpected 0 bytes delivered from weather station 0 (Vantage)
logger (13.06.2011 15:59:59): disconnect station 0 (Vantage).
logger (13.06.2011 16:00:29): connect station 0 (Vantage via TCP/IP).
logger (13.06.2011 16:00:29): station 0 (Vantage), wakeup sent.
logger (13.06.2011 16:00:29): station 0 (Vantage), can't start internal data logger on device 192.168.1.101:22223: Connection reset by peer
logger (13.06.2011 16:00:29): unexpected 0 bytes delivered from weather station 0 (Vantage)
logger (13.06.2011 16:00:29): disconnect station 0 (Vantage).
logger (13.06.2011 16:00:59): connect station 0 (Vantage via TCP/IP).
logger (13.06.2011 16:00:59): unexpected 0 bytes delivered from weather station 0 (Vantage)
logger (13.06.2011 16:00:59): disconnect station 0 (Vantage).
logger (13.06.2011 16:01:33): connect station 0 (Vantage via TCP/IP).
logger (13.06.2011 16:01:33): unexpected 0 bytes delivered from weather station 0 (Vantage)
logger (13.06.2011 16:01:33): disconnect station 0 (Vantage).
logger (13.06.2011 16:02:07): connect station 0 (Vantage via TCP/IP).
logger (13.06.2011 16:02:07): no valid signal from station 0 (Vantage) for 300 seconds, data logger will be restarted.
Any assistance to help solve this would be appreciated!

Best regards,
Ken

BTW.. Why do I run 4 different software packages (and want to run 5)? I drive my own website primarily via Weather-Display and WeatherLink. The other packages are used in development/testing of the PHP/AJAX templates I freely supply .. I'd like to add MeteoHub to the mix, but can't seem to get it running quite yet.

Re: Davis VP+, VirtualVP, SheevaPlug

Posted: Tue Jun 14, 2011 5:49 pm
by admin
As the Davis LOOP protocol is bidirectional, I doubt that more than one program pollig it for data at the same time will work.
So no surprise to me that your setup is not working. I doubt that the other programs do work in paralel connecting to one and the same Davis logger.

Re: Davis VP+, VirtualVP, SheevaPlug

Posted: Tue Jun 14, 2011 6:14 pm
by saratogaWX
Some additional info:

The Davis console talks directly only to VirtualVP via a serial port, and VirtualVP offers virtual serial and TCP ports to other weather software.
Generally, the other weather software thinks they are talking directly to the Davis console as VirtualVP handles the protocols as needed.
I've been using VirtualVP since March, 2006 and it's been working great handling the 4 weather software packages I normally run.

What I did differently as a test was to redefine the TCP 5111 port in VirtualVP without the 'protect console' setting in VirtualVP ticked (normally I have it ticked for all software except for WeatherLink).

That small change (and maybe the change from port 22223 to 5511) seems to have allowed Meteohub to now get data regularly from VirtualVP :D :mrgreen:

Code: Select all

logger (14.06.2011 08:58:19): connect station 0 (Vantage via TCP/IP).
logger (14.06.2011 08:58:24): station 0 (Vantage), wakeup sent.
logger (14.06.2011 08:58:24): station 0 (Vantage), internal logger activated.
logger (14.06.2011 08:58:24): station 0 (Vantage), syncing.
logger (14.06.2011 08:58:24): station 0 (Vantage), gettime request sent.
logger (14.06.2011 08:58:25): station 0 (Vantage), no Vantage time offset.
logger (14.06.2011 08:58:25): station 0 (Vantage), eeprom request sent.
logger (14.06.2011 08:58:25): station 0 (Vantage), rain collector size 0.01 inch per tick.
logger (14.06.2011 08:58:25): station 0 (Vantage), transmitter 1 active as station type (#0) "ISS".
logger (14.06.2011 08:58:33): station 0 (Vantage), data gap of 23 minutes, start reading Vantage's internal logger after 2011-06-14 08:35 (Vantage's local time).
logger (14.06.2011 08:58:33): station 0 (Vantage), internal logger provides 1 pages of data.
logger (14.06.2011 08:58:33): station 0 (Vantage), finished reading internal logger, 4 records inserted.
Best regards,
Ken

Re: Davis VP+, VirtualVP, SheevaPlug

Posted: Tue Jun 14, 2011 6:29 pm
by admin
Cool, I was not aware that virtualVP does make this possible.

Good to hear that Meteohub does not act more picky than (most of) the other PC programs :mrgreen:

Re: Davis VP+, VirtualVP, SheevaPlug

Posted: Tue Jun 14, 2011 6:41 pm
by saratogaWX
I'm pleased it's working fine now too :)

I'm working with Rob of Rainmanweather.com to develop a Meteohub plugin for the AJAX/PHP templates and having a working Meteohub makes it possible. I'll let folks here know when the template set is ready to try for Meteohub.

Best regards,
Ken

Re: Davis VP+, VirtualVP, SheevaPlug

Posted: Tue Jun 14, 2011 7:53 pm
by wfpost
Great news,
I´m looking forward for your templates running on meteohub !!

Re: Davis VP+, VirtualVP, SheevaPlug

Posted: Tue Jun 14, 2011 8:43 pm
by YJB
saratogaWX wrote:
I'm working with Rob of Rainmanweather.com to develop a Meteohub plugin for the AJAX/PHP templates and having a working Meteohub makes it possible. I'll let folks here know when the template set is ready to try for Meteohub.

Ken
Looking forward to it; right now I'm using all kind of twists and turns to make your templates running based on whatever MH provides.

Re: Davis VP+, VirtualVP, SheevaPlug

Posted: Tue Jun 14, 2011 9:52 pm
by pinto
Hi Ken, welcome to Meteohub

Long story short
Last weekend:
Harddisk failure in the middle of a backup
No computer(using laptop from my wife right now) Lost data, ...
Needed something to feed my website
Downloaded WLtemplate, and with some minor changes have a working website using my Meteohub system running on an ALIX1 board.

But, there are a lot more tags you can use as the ones I'm using right now
Website still says Wlink, but It is completely running from Meteohub.

Jozef

Re: Davis VP+, VirtualVP, SheevaPlug

Posted: Tue Jun 14, 2011 10:21 pm
by saratogaWX
Hi Jozef,
Glad to see you again :D

Sorry about your pc disaster! I've finally taken to doing daily backups with Norton Ghost for my 3 pcs to a 2Tb raid 1 network storage on my local net .. hopefully that will be enough.

With Meteohub's clientraw output, and a lot of tags, my current thoughts are to recycle the venerable ajaxWDwx.js to a ajaxMHwx.js, likely with few or no changes. I'll create a MHtags.php and MH-defs.php to fill in the WD variable names so the ajax-dashboard/ajax-gizmo will work correctly. Already have scripts to fill-in any missing moon/season/Metar-conditions as need be.

I've got my Sheeva Meteohub now uploading to a local FTP service.. now to figure out how to insert a custom template for the MHtags file on the Meteohub.

Best regards,
Ken

Re: Davis VP+, VirtualVP, SheevaPlug

Posted: Tue Jun 14, 2011 11:46 pm
by pinto
saratogaWX wrote:I've got my Sheeva Meteohub now uploading to a local FTP service.. now to figure out how to insert a custom template for the MHtags file on the Meteohub.

Best regards,
Ken
Had to move the function to put the data in array to the defs-file.
Meteohub seems to replace everything between [ and ] and if the tag is unknown it is replaced by nothing, so a line like:
$WX[$vname] = trim($vval);
becomes
$WX = trim($vval);

ergo-- the function doesn't work anymore.
Here are the two files I'm using for my website.
I also use a WLrealtime.html for the 1 minute updates, and the clientraw from meteohub to feed WDlive.
You only have to place the .html file in /data/graphs and set the upload times in meteohub
sample.zip
(6.27 KiB) Downloaded 351 times
Hope this helps :)

Re: Davis VP+, VirtualVP, SheevaPlug

Posted: Wed Jun 15, 2011 12:05 am
by admin
Meteohub should ony replace variable names it knows of (unless you give the "blank-the-unknown" directive).
Example "$WX[$vname] = trim($vval);" is kept as is when I throw it into template replacement machine.

Do you have example code that meteohub does not handle properly?

Re: Davis VP+, VirtualVP, SheevaPlug

Posted: Wed Jun 15, 2011 1:13 am
by admin
Inspection of files in the zip archive you provided turned out, that Meteohub does wrong replacement in following situations
a) empty square brackets "[]", are replaced to empty string.
b) square brackets having non-alphanum characters and a colon inside, like "[^\d\:]" are replaced to empty string.

This will be fixed with next update. Thanks for finding this ugly bug!

Re: Davis VP+, VirtualVP, SheevaPlug

Posted: Wed Jun 15, 2011 9:02 am
by pinto
admin wrote:This will be fixed with next update. Thanks for finding this ugly bug!
Thank you Boris, it sure will help Ken to build a nice template for the meteohub system :D

Jozef

Re: Davis VP+, VirtualVP, SheevaPlug

Posted: Wed Jun 15, 2011 7:50 pm
by saratogaWX
Yes, thanks Boris!

I'm wondering if a few tags could be added for processing .. it would make setup of the template set easier:

1) [actual_version] and [actual_version_build] to indicate the version number and build number
2) [actual_temp_units], [actual_hum_units], [actual_wind_units], [actual_baro_units], [actual_rain_units] for the settings associated with the Meteohub dashboard

Given the plethora of units available with Meteohub, I'm thinking that if the Meteohub dashboard units settings were available as tags, then a subset of the available tags could be used in the template (less upload volume) so that if [actual_temp_units] were 'C', then a shorthand

$WX['actual_th0_temp'] = '[actual_th0_temp_c]';

could be selected (since the ajax-dashboard/ajax-gizmo/ rest of the pages generally use one UOM throughout and we wouldn't have to upload [actual_th0_temp_f] at all. Makes for greater savings in things like wind/gust where 4 UOM are available.

Then the MH-defs.php file could have

$temperature = $WX['actual_th0_temp'];

to load the WD variable names needed by the ajax-dashboard and ajax-gizmo.

What do you think?

Best regards,
Ken

Re: Davis VP+, VirtualVP, SheevaPlug

Posted: Wed Jun 15, 2011 8:32 pm
by admin
Adding the variables you suggest at 1) and 2) can be done, no problem.

Changing the format of existing variables is something that will break code of other users, which rely on the format as is.

Of course, one could add another line of values that always contains the vlaue regarding to the values selected for the dashboard, for example. This would add:
actual_thb0_sealevel_unit 1015.2
to already existing variables
actual_thb0_sealevel_hpa 1015.2
actual_thb0_sealevel_psi 14.72
actual_thb0_sealevel_mmhg 761.4
actual_thb0_sealevel_inhg 29.98

Bringing this so far not requested feature to the output will add more data to it and might free you from php/javasrcipt code that selects the right value according to the given unit. I am not totally convinced that it will take you more time coding that in php than me adding that to Meteohub ;-)

However, you fully convinced me to add 1) and 2) for the next update.