Welcome to the Cumulus Support forum.

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

Cumulus MX V4 beta test release 4.0.0 (build 4019) - 03 April 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

Davis Battery Voltage

Discussion specific to Davis weather stations
Post Reply
stevendt
Posts: 85
Joined: Sat 23 May 2020 4:19 pm
Weather Station: Davis Vatnage Pro2 Plus
Operating System: Windows 7/10
Location: Aberdeen, Scotland

Davis Battery Voltage

Post by stevendt »

Hi,

Can someone tell me how CumulusMX processes the Davis console battery voltage please?

Is the battery data just read in "real" time to populate the <#battery> tag? Or is it saved anywhere that can be used to trend it?

The reason that I am particularly interested in trending the voltage is that I think that I may have a console power supply problem and wanted to trend the battery drain. At the moment, the batteries in my VP2 console seems to be dropping about 0.01-0.02v each day. That does not sound a lot, but at that rate, would reach the low battery warning in about 4 months which is much less that it should be for new batteries - the battery usage should be negligible if the power supply is working. (I do have a WeatherLink IP connected which will be drawing quite a bit more power than the console alone would, but it should not be more than the PSU can provide.

I measured the (no load) voltage from a brand new Davis PSU and got about 5.16V (you'd expect that to drop a little when the console was drawing power). On my suspect station's PSU, the no load voltage is 5.01V and I guess that when it's powering the console, may be too low. (The PSU & console is over 10 years old). Has anyone seen the PSUs performance dropping with age?

regards
Dave
sfws
Posts: 1183
Joined: Fri 27 Jul 2012 11:29 am
Weather Station: Chas O, Maplin N96FY, N25FR
Operating System: rPi 3B+ with Buster (full)

Re: Davis Battery Voltage

Post by sfws »

As far as I know, the only way in which MX processes the battery status of Davis stations is to read it into a variable from the loop data that a Davis produces. From that one read, MX can report current status into the web tag and if it finds less than 4 volts it can set low battery alarm:

Code: Select all

TxBatText = ProcessTxBatt(loopData.TXbattStatus);
cumulus.BatteryLowAlarmState = TxBatText.Contains("LOW") || loopData.ConBatVoltage < 4.0;
I am not aware of any code that makes MX save this nor that makes it aware of earlier values, so there is no trend information put out by MX.

Don't give up yet! Now I am going to give you the outlines of an idea.

It is very simple for you to code a way of collecting these individual readings and producing your own trend. Just read the individual readings from the web tag into an array or into a file, with each new one going into next available array element or next file line respectively. Of course you need a way of making that read at a particular time interval and most script languages allow you set a timer that pauses the code for a set time.

In JavaScript:

Code: Select all

BatteryArray[BatteryArray.length] = "<#battery>"; 
in PHP

Code: Select all

BatteryArray[] = "<#battery>";
Then all you need to do is to print that array or file and you will see the trend.
stevendt
Posts: 85
Joined: Sat 23 May 2020 4:19 pm
Weather Station: Davis Vatnage Pro2 Plus
Operating System: Windows 7/10
Location: Aberdeen, Scotland

Re: Davis Battery Voltage

Post by stevendt »

sfws wrote: Fri 05 Jun 2020 1:42 pm
It is very simple for you to code a way of collecting these individual readings and producing your own trend.
Easy for you to say :-)

Thanks a lot for the info and suggestions though, I will give it some thought and see what I can do

regards
Dave
sfws
Posts: 1183
Joined: Fri 27 Jul 2012 11:29 am
Weather Station: Chas O, Maplin N96FY, N25FR
Operating System: rPi 3B+ with Buster (full)

Re: Davis Battery Voltage

Post by sfws »

stevendt wrote: Fri 05 Jun 2020 2:16 pm Easy for you to say
Fair criticism, I had not intended to make assumptions about your programming ability. I meant to say that it only needs a simple script, in comparison with the multiple scripts that MX uses to give what we see. I might have taught myself to code, but I still am not that good at selecting the right words!
stevendt
Posts: 85
Joined: Sat 23 May 2020 4:19 pm
Weather Station: Davis Vatnage Pro2 Plus
Operating System: Windows 7/10
Location: Aberdeen, Scotland

Re: Davis Battery Voltage

Post by stevendt »

Hi,

no criticism intended ! I appreciate the info.

I have done a bit of coding in the past, mainly in traditional "C" (not Windows or OO stuff), but it is a while ago and the brain is a bit rusty. Scripting in PHP & Java is new territory though

regards
Dave
Post Reply