Sandaysoft

Support forum for Cumulus weather station software
It is currently Wed May 22, 2013 10:06 pm
Please click here before posting. Help me to help you!
Useful Links: Cumulus FAQ • Enhancement requests • Wiki (documentation)
Please put your approximate location into your profile
Add your web site to the Cumulus user map
Vantage Pro2 users with firmware 3.00 should upgrade to fw 3.12 and Cumulus 1.9.4

All times are UTC




Post new topic Reply to topic  [ 12 posts ] 
Author Message
 Post subject: Editing <#txbattery>
PostPosted: Tue Aug 07, 2012 2:06 pm 
Offline
User avatar

Joined: Sat Jul 03, 2010 9:03 pm
Posts: 156
Location: Lake Zurich, IL; USA
Weather Station: Davis Vantage Pro 2
Operating System: Windows 7
The webtag for Davis transmitter battery status outputs a piece of text that gives the status of all 8 possible transmitters. Anyone know how can I edit this so it only displays the status of the first 2?

-Tom

_________________
Tom Keramidas, Lake Zurich, IL, USA
Image


Top
 Profile  
 
 Post subject: Re: Editing <#txbattery>
PostPosted: Tue Aug 07, 2012 2:17 pm 
Offline
User avatar

Joined: Thu Jan 07, 2010 9:44 pm
Posts: 2513
Location: Wilmslow, Cheshire, UK
Weather Station: Davis VP2
Operating System: XP SP3, Win 7
Can you post an example of the string this tag outputs?

_________________
Mark
Wilmslow Astro Weather


Top
 Profile  
 
 Post subject: Re: Editing <#txbattery>
PostPosted: Tue Aug 07, 2012 2:41 pm 
Offline

Joined: Wed May 06, 2009 6:29 pm
Posts: 1708
Location: Cheadle Hulme, Cheshire, England
Weather Station: Davis VP2 with Daytime FARS
Operating System: Windows XP SP3
Here you are Mark. Scroll down to the bottom. http://www.cheadlehulmeweather.co.uk/system.htm

_________________
Cheers,
Ray, Cheshire.

Image


Top
 Profile  
 
 Post subject: Re: Editing <#txbattery>
PostPosted: Tue Aug 07, 2012 2:48 pm 
Offline
Site Admin
User avatar

Joined: Mon Jun 02, 2008 6:49 pm
Posts: 17567
Location: Sanday, Orkney
Weather Station: Davis VP2
Operating System: Windows Home Server 2011
Code:
TX Battery Status: 1-ok 2-ok 3-ok 4-ok 5-ok 6-ok 7-ok 8-ok

It displays "ok" for transmitters which are missing, or are present with good batteries. I can't remember what it displays if a particular battery is low, possibly the string "LOW" instead of "ok".

_________________
Steve
Sanday Weather
----------------------------------------------------------------------------------------------------------------------------------
Like Cumulus and want to support it? Please donate! Image


Top
 Profile  
 
 Post subject: Re: Editing <#txbattery>
PostPosted: Tue Aug 07, 2012 4:11 pm 
Offline
User avatar

Joined: Thu Jan 07, 2010 9:44 pm
Posts: 2513
Location: Wilmslow, Cheshire, UK
Weather Station: Davis VP2
Operating System: XP SP3, Win 7
Something like....?
Code:
var val= "<#txbattery>".split(/\d-([a-z]+)/i);

//then...
//val[1] is status of battery #1
//val[3] is status of battery #2
//val[5] is status of battery #3
//val[7] is status of battery #4
//val[9] is status of battery #5
//etc


A bit messy, you could clean it up with two statements, or think of a more clever version!

_________________
Mark
Wilmslow Astro Weather


Last edited by mcrossley on Tue Aug 07, 2012 6:08 pm, edited 1 time in total.

Top
 Profile  
 
 Post subject: Re: Editing <#txbattery>
PostPosted: Tue Aug 07, 2012 5:26 pm 
Offline
User avatar

Joined: Sat Jul 03, 2010 9:03 pm
Posts: 156
Location: Lake Zurich, IL; USA
Weather Station: Davis Vantage Pro 2
Operating System: Windows 7
Excuse my ignorance, but does that entire string (customized for the transmitters I want to track--namely #1 and #2) replace the webtag?

-Tom

_________________
Tom Keramidas, Lake Zurich, IL, USA
Image


Top
 Profile  
 
 Post subject: Re: Editing <#txbattery>
PostPosted: Tue Aug 07, 2012 6:27 pm 
Offline
Site Admin
User avatar

Joined: Mon Jun 02, 2008 6:49 pm
Posts: 17567
Location: Sanday, Orkney
Weather Station: Davis VP2
Operating System: Windows Home Server 2011
I've added a 'channel' parameter to the <#txbattery> web tag, could you try it, please? It's just the cumulus.exe, zipped up: http://nybbles.co.uk/downloads/Cumulus.zip

Just extract the cumulus.exe file into your existing installation of 1.9.3

Use it like this:

<#txbattery channel=1>

to get the relevant string for channel 1, and so on, up to channel=8. The result is just the string "ok" or whatever the string is for a low battery.

_________________
Steve
Sanday Weather
----------------------------------------------------------------------------------------------------------------------------------
Like Cumulus and want to support it? Please donate! Image


Top
 Profile  
 
 Post subject: Re: Editing <#txbattery>
PostPosted: Tue Aug 07, 2012 6:47 pm 
Offline

Joined: Wed May 06, 2009 6:29 pm
Posts: 1708
Location: Cheadle Hulme, Cheshire, England
Weather Station: Davis VP2 with Daytime FARS
Operating System: Windows XP SP3
That seems to work okay Steve. I have two transmitters, one for the ISS and another for the anemometer. I presume the ISS is 1 and the ane no 2?

http://www.cheadlehulmeweather.co.uk/system.htm

_________________
Cheers,
Ray, Cheshire.

Image


Top
 Profile  
 
 Post subject: Re: Editing <#txbattery>
PostPosted: Tue Aug 07, 2012 6:58 pm 
Offline
Site Admin
User avatar

Joined: Mon Jun 02, 2008 6:49 pm
Posts: 17567
Location: Sanday, Orkney
Weather Station: Davis VP2
Operating System: Windows Home Server 2011
RayProudfoot wrote:
That seems to work okay Steve.
Thanks.

Quote:
I have two transmitters, one for the ISS and another for the anemometer. I presume the ISS is 1 and the ane no 2?
It would depend on what you've set them to on the dip switches, they could be either way around.

_________________
Steve
Sanday Weather
----------------------------------------------------------------------------------------------------------------------------------
Like Cumulus and want to support it? Please donate! Image


Top
 Profile  
 
 Post subject: Re: Editing <#txbattery>
PostPosted: Tue Aug 07, 2012 7:27 pm 
Offline
User avatar

Joined: Sat Jul 03, 2010 9:03 pm
Posts: 156
Location: Lake Zurich, IL; USA
Weather Station: Davis Vantage Pro 2
Operating System: Windows 7
This sounds great. I'll try it out when I'm home tonight!

Many thanks.

_________________
Tom Keramidas, Lake Zurich, IL, USA
Image


Top
 Profile  
 
 Post subject: Re: Editing <#txbattery>
PostPosted: Tue Aug 07, 2012 7:44 pm 
Offline

Joined: Wed May 06, 2009 6:29 pm
Posts: 1708
Location: Cheadle Hulme, Cheshire, England
Weather Station: Davis VP2 with Daytime FARS
Operating System: Windows XP SP3
steve wrote:
It would depend on what you've set them to on the dip switches, they could be either way around.


I think from memory the ISS is 1 and the anemometer tx 2 but I will check.

_________________
Cheers,
Ray, Cheshire.

Image


Top
 Profile  
 
 Post subject: Re: Editing <#txbattery>
PostPosted: Wed Aug 08, 2012 12:22 am 
Offline
User avatar

Joined: Sat Jul 03, 2010 9:03 pm
Posts: 156
Location: Lake Zurich, IL; USA
Weather Station: Davis Vantage Pro 2
Operating System: Windows 7
Attachment:
Capture.JPG
Worked like a charm! Thanks for that lightning quick enhancement!


You do not have the required permissions to view the files attached to this post.

_________________
Tom Keramidas, Lake Zurich, IL, USA
Image


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 12 posts ] 

All times are UTC


Who is online

Users browsing this forum: gemini06720, gwheelo and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  

Protected by Anti-Spam ACP Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group