Welcome to the new home of the Cumulus Support forum.

Latest Cumulus release v1.9.4 (build 1099) - 28 November 2014
Latest Cumulus MX release v3.0.0 build 3046 - 02 January 2019. See the Wiki for download

Cumulus MX issue

Discussion of version 3 of Cumulus, which runs on Windows, Linux, and OS X. All Cumulus MX queries in here, please.

Moderator: mcrossley

Post Reply
mkutche
Posts: 5
Joined: Sat 26 Jan 2013 6:06 am
Weather Station: Cumulus MX
Operating System: Windows 7
Location: Gosport, IN
Contact:

Cumulus MX issue

Post by mkutche » Sun 17 Dec 2017 2:54 pm

anyone ever see this before?

Station system up for Cannot load Counter Name data because an invalid index '' was read from the registry.
Station system free memory n/a
This website uses Cumulus (3.0.0-b3043) for weather conditions reporting.

I was told by Ken from wxforum The data for that comes from Cumulus via the CUtags.php

Code: Select all

Code:
$WX['SystemUpTime'] = 'Cannot load Counter Name data because an invalid index '' was read from the registry.';
Cumulus is not providing the <#SystemUpTime> tag correctly.

And I needed to ask this question on this Cumulus forum as it is a problem with my CumulusMX installation, not a template issue.

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

Re: Cumulus MX issue

Post by steve » Sun 17 Dec 2017 3:19 pm

Searching the forum for systemuptime suggests that it doesn’t work on some systems and where it does work it is usually not correct.
Steve

mkutche
Posts: 5
Joined: Sat 26 Jan 2013 6:06 am
Weather Station: Cumulus MX
Operating System: Windows 7
Location: Gosport, IN
Contact:

Re: Cumulus MX issue

Post by mkutche » Sun 17 Dec 2017 6:18 pm

So there's no fix for it? I run windows 7 at the moment with Cumulus MX

User avatar
mcrossley
Posts: 5315
Joined: Thu 07 Jan 2010 9:44 pm
Weather Station: Davis VP2
Operating System: Stretch Lite rPi
Location: Wilmslow, Cheshire, UK
Contact:

Re: Cumulus MX issue

Post by mcrossley » Sun 17 Dec 2017 6:25 pm

How I do it in a PHP script...

Code: Select all

	$time = @file_get_contents( "/proc/uptime");
	$time = explode(" ",$time);
	$time = $time[0];
	$days = explode(".",(($time % 31556926) / 86400));
	$hours = explode(".",((($time % 31556926) % 86400) / 3600));
	$minutes = explode(".",(((($time % 31556926) % 86400) % 3600) / 60));
	$seconds = explode(".",((((($time % 31556926) % 86400) % 3600) / 60) / 60));
	$uptime = $days[0] .
			(intval($days[0])==1 ? ' day, ' : ' days, ') .
			$hours[0] .
			(intval($hours[0])==1 ? ' hour, ' : ' hours, ') .
			$minutes[0] .
			(intval($minutes[0])==1 ? ' minute' : ' minutes');

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

Re: Cumulus MX issue

Post by steve » Sun 17 Dec 2017 6:35 pm

Mark, I don’t think your solution would work on Windows?

A quick search on Google came up with this: https://stackoverflow.com/questions/179 ... -exception
Steve

User avatar
mcrossley
Posts: 5315
Joined: Thu 07 Jan 2010 9:44 pm
Weather Station: Davis VP2
Operating System: Stretch Lite rPi
Location: Wilmslow, Cheshire, UK
Contact:

Re: Cumulus MX issue

Post by mcrossley » Mon 18 Dec 2017 11:26 am

Doh! Again!
I keep reading MX and my brain says MX == Linux :bash:

mkutche
Posts: 5
Joined: Sat 26 Jan 2013 6:06 am
Weather Station: Cumulus MX
Operating System: Windows 7
Location: Gosport, IN
Contact:

Re: Cumulus MX issue

Post by mkutche » Mon 18 Dec 2017 10:21 pm

steve wrote:Mark, I don’t think your solution would work on Windows?

A quick search on Google came up with this: https://stackoverflow.com/questions/179 ... -exception
Thanks steve that fixed the issue :)

Mike

Post Reply