Welcome to the Cumulus Support forum.

Latest Cumulus MX V4 release 4.4.2 (build 4085) - 12 March 2025

Latest Cumulus MX V3 release 3.28.6 (build 3283) - 21 March 2024

Legacy Cumulus 1 release 1.9.4 (build 1099) - 28 November 2014
(a patch is available for 1.9.4 build 1099 that extends the date range of drop-down menus to 2030)

Download the Software (Cumulus MX / Cumulus 1 and other related items) from the Wiki

If you are posting a new Topic about an error or if you need help PLEASE read this first viewtopic.php?p=164080#p164080

v1.8.0

Discussion and questions about Cumulus weather station software version 1. This section is the main place to get help with Cumulus 1 software developed by Steve Loft that ceased development in November 2014.
TNETWeather

Re: v1.8.0

Post by TNETWeather »

Brad,

Not having access to UI-View.... give the following URL a try to see if it works for you.

http://cumulus.tnetweather.com/WXNOW.txt
or
http://cumulus.tnetweather.com/wxnow.txt

I would think that it would be easy for Steve to just generate a file like this. But in case that is not in the cards, it is easy to cause the generation of the same from the server side of a PHP based server. You could do the same with an ASP (IIS) server too, but I am not familiar with the coding on that...

This method works using some .htaccess trickery... It requires mod_rewrite to be available to on the host.

The script is actually called WXNOW.php and it parses out the data from the realtime.txt file and outputs the text as you see it.

Code: Select all

Sep 30 2008 15:50
141/002g003t098P000h18b10109
To make the system respond to WXNOW.txt or wxnow.txt, I created a simple rewrite rule like:

Code: Select all

RewriteRule ^/?wxnow.txt$ /WXNOW.php [L]
RewriteRule ^/?WXNOW.txt$ /WXNOW.php [L]
This tells the server that if it sees a request for either WXNOW.txt or wxnow.txt, to rewrite the request to point to the PHP script instead. The visitor doesn't really see this, they just get the output of the script as if they had gotten just a plain old txt file.
User avatar
steve
Cumulus Author
Posts: 26672
Joined: Mon 02 Jun 2008 6:49 pm
Weather Station: None
Operating System: None
Location: Vienne, France
Contact:

Re: v1.8.0

Post by steve »

Yes, I can easily generate one of those. The crucial information I'm missing is: What do I do with the file once I've created it?

Steve
Steve
bpsmicro
Posts: 50
Joined: Sat 23 Aug 2008 9:26 pm
Weather Station: Davis Vantage Pro 2 Wireless
Operating System: XP SP3
Location: Merrickville, Ontario, Canada

Re: v1.8.0

Post by bpsmicro »

Apologies again for the delay in getting back to you. For some reason when I log back in this thread isn't marked as "updated", and then I eventually lose it. :-(

Steve: to answer your question, you only need to create it. In UI-View (or the other APRS programs that use it), I just specify the path to where it's been saved. If you want to include the option for me to specify *where* to put the generated file, all the better, but not critical.

TNETWeather: the sample you post is close except if I open it in Notepad, it's not seeing the line break after the time. It looks like you saved it with a Unix-style linebreak (LF only) instead of a DOS-style (CRLF).

I promise to log in more often and keep track of this. Apologies again for leaving you all hanging. :-(

Brad.
User avatar
steve
Cumulus Author
Posts: 26672
Joined: Mon 02 Jun 2008 6:49 pm
Weather Station: None
Operating System: None
Location: Vienne, France
Contact:

Re: v1.8.0

Post by steve »

OK - I'll put the code in to generate one.
Steve
TNETWeather

Re: v1.8.0

Post by TNETWeather »

bpsmicro wrote: TNETWeather: the sample you post is close except if I open it in Notepad, it's not seeing the line break after the time. It looks like you saved it with a Unix-style linebreak (LF only) instead of a DOS-style (CRLF).
It is not really ever saved, it is dynamically generated each time you hit it with a browser. I suppose it depends on what browser you are using.

Using MSIE, if you look at the source, it contains CRLF's for each line.

Image

If you open it up with FireFox, it will only have LF's since that is how FF interprets it.

The script is actually outputting CRLF after each of the two lines.

When you look at via the browser itself, it won't appear to have any linefeeds since HTML browsers don't display line feeds only html linebreaks (<br/>) and the script is not outputting those.
bpsmicro
Posts: 50
Joined: Sat 23 Aug 2008 9:26 pm
Weather Station: Davis Vantage Pro 2 Wireless
Operating System: XP SP3
Location: Merrickville, Ontario, Canada

Re: v1.8.0

Post by bpsmicro »

Curiously, if I do a "Save As" and put the .txt file directly only my local machine (IE of FF) and open in Notepad, it only sees the LFs. But View Source does indeed work as expected. I've never seen that before.
But no matter, I suspect UI-View would work either way, and since I'm not grabbing the file via a browser normally, it's a non-issue. :-)

Now to eagerly watch for the next build. :-)

Brad.
TNETWeather

Re: v1.8.0

Post by TNETWeather »

If you want to use that script, you don't need to wait for the next build.

This assumes that you have PHP on your local web server.

Source:

Code: Select all

<?php
############################################################################
# A Project of TNET Services, Inc.
############################################################################
#
#   Project:    Cumulus Project
#   Module:     WXNOW.php
#   Purpose:    WXNOW Auto generated Page
#   Authors:    Kevin W. Reed <kreed@tnet.com>
#               TNET Services, Inc.
#
#   Copyright (c) 1992-2008 Copyright TNET Services, Inc.
############################################################################
#   This document uses Tab 4 Settings
############################################################################
#
#   License:    
#
#   This program is free software; you can redistribute it and/or
#   modify it under the terms of the GNU General Public License
#   as published by the Free Software Foundation; either version 2
#   of the License, or (at your option) any later version.
#   
#   This program is distributed in the hope that it will be useful,
#   but WITHOUT ANY WARRANTY; without even the implied warranty of
#   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#   GNU General Public License for more details.
#   
#   You should have received a copy of the GNU General Public License
#   along with this program; if not, write to the Free Software
#   Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, 
#   USA.
#
############################################################################
#   HISTORY
############################################################################
#
#   0.1     Beta
#
############################################################################
# HTACCESS SETTINGS
############################################################################
# If you want the script to respond to a request from a url like
#
# http://YOUR_SERVER/WXNOW.txt
#
# You can add the following to the .htaccess file in your Apache Web
# Server to have it do that.
#
#   RewriteEngine On
#   RewriteRule ^/?wxnow.txt$ /WXNOW.php [L]
#   RewriteRule ^/?WXNOW.txt$ /WXNOW.php [L]
#
############################################################################
# FORMAT OF Variation 4 (Weather Link) HTM File
############################################################################
#
# Jun 01 2003 08:07
# 272/000g006t069r010p030P020h61b10150
# ***********************************************************
#
# 272 - wind direction - 272 degrees
# 010 - wind speed - 10 mph
#
# g015 - wind gust - 15 mph
# t069 - temperature - 69 degrees F
# r010 - rain in last hour in hundredths of an inch - 0.1 inches
# p030 - rain in last 24 hours in hundredths of an inch - 0.3 inches
# P020 - rain since midnight in hundredths of an inch - 0.2 inches
# h61 - humidity 61% (00 = 100%)
# b10153 - barometric pressure in tenths of a millibar - 1015.3 millibars
############################################################################
# Format of File
# Date          DD/MM/YY (we convert it to YYYY-MM-DD
# Time
# Temp          float
# Humidity      int
# Dewpt         float
# wind speed    int
# wind gust     int
# Bearing       compass
# rain rate     float
# rain today    float
# Pressure      float
# Windir        label
# Wind Speed    float
# Wind Unit     label
############################################################################

$months = array( "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep",
    "Oct", "Nov", "Dec" );

// Change to match path to realtime.txt file
// Should be the only thing you need to change if your realtime.txt
// is NOT located in the same location as this script

$input = file("./realtime.txt");

$vars = preg_split('/ /', $input[0]);

$day    = substr($vars[0],0,2);
$month  = $months[ substr($vars[0],3,2) -1 ];
$year   = "20" . substr($vars[0],6,2) ;
$hour   = substr($vars[1],0,2);
$min    = substr($vars[1],3,2);

echo $month . ' ' . $day . ' ' . $year . ' ' . $hour . ':' . $min . PHP_EOL;
echo sprintf("%03d/%03d", $vars[7], intval($vars[5]) );
echo sprintf("g%03d", $vars[6]);
echo sprintf("t%03d", intval($vars[2]) ) ;
echo sprintf("P%03d", intval($vars[9] * 10));
$hum = intval($vars[3]);
if ($hum == 100) {
    $hum == 00;
}
echo sprintf("h%02d",$hum);
echo sprintf("b%05d", intval($vars[10] * 10) );
echo PHP_EOL;

############################################################################
# END OF SCRIPT
############################################################################
Post Reply