The website program reads eighty five data values from an Elpro unit which maintains the current status of all the stations in GameTrail's water system. Four different types are as follows:
The Elpro system by default updates a value every 6 minutes. The timing of updates varies for each data value. The time can be programmed to be different, but Gametrail uses the default update value. However, if a 3% change is detected an update is made. This will almost always occur with the water meter data when a pump is running, so that 1 minute updates are often seen. On the other hand if poor radio reception occurs the update may not be seen for maybe an hour. Updating a new value is attempted no more than 3 times.
The website program reads data once each minute to stay up with any new data. This is an overkill for the resolution of the graphs, but is not detrimental to the performance. For the long delay in updates nothing is done to cover the roughness seen in the graph.
An idea about reception:
The website URL, gametrail.org, brings up a home page filled with buttons for all the display pages. The first row of buttons refers to a front page which can be displayed with bars or meters. The original design used the meters to show water depth in the tanks and as additional information was added they were shown numerically. The bars were developed to show all values in a simplified bar type meter to give a quicker look at where each value stood in relation to maximum values.
The values and bar readings change color from green to yellow as the maximum or minimum value is approached. When the maximum or minimum is exceeded the color becomes red. Even a red flag may need some study before emergency phone calls are made.
Though maximum for tank depth is simple, maximum for tank flow or tank usage is not and may mislead the viewer about a colored flag.
The analog and incremental values are displayed in graphs. The digital values do not have any meaningful historical data. All the graphs have multiple lines and are color coded. The same color borders a button along the bottom of the graph. That button will alternately turn on or off the line in the graph. At the end of the row is a button to turn on or off all lines, so to see one line use the "none" button and then the button for the line you wish to view. There is an automatic one minute update of each graph. This allows a graph page to be open for hours and is always up to date. However, this update will restore all graph lines. I have debated if the one minute update is necessary. I can change it to 15 minutes, or remove it. Manual refreshing is always available. I also found a web site explaining that the client does have control over this auto update. But this seems to be a bit cumbersome.
www.maketecheasier.com/disable-web-page-auto-refresh-for-various-browsers/
Shows the battery voltage at stations which run on solar power. Only three stations depend on batteries. These stations have solar cells to charge the batteries. So during the day you will see wild zags as the cells are turned on. It is impossible to see only the battery when it is charging. So the reading during the night tells more about the condition of the battery. The other 7 stations are not shown because they are using an AC adaptor to constantly charge and all you see is the charger voltage, not the battery.
Shows pressure in psi the two stations that have pressure tanks.
The only way to measure the flow is to observe the tank levels while the pump is on. The pump may be determined to be on only because of a relatively large tank level change.
Show daily usage over a 5 week period, so the horizontal axis is marked in days rather than hours. The 5 day graph makes a running average of 5 days for each days reading which shows more of a trend rather than the ragged daily changes.
The buttons just below the graphs are for toggling the graph line for the device named in the button. At the end of the row of buttons is a button for none or all to quickly change all graphs. The pumps also have buttons related to metered and unmetered pumps.
The Chlorine schedule is updated once a year in June.
The Trouble Log is updated when there is a new problem and solution written up.
The One day's report is updated once each day at 7 AM. The button gives a month and day list to select what day the report is requested. It is limited to previous Nov 1.
The One months report updates the current partial month once each day at 7 AM. The button gives a month list to select what month the report is requested. It is limited to previous Nov. The current month shows the summation up to today. Earlier months show the entire month totals.
The "Today's report" is the same as One day's report set for today. No page is shown between midnight and 7 AM.
The "Today's chlorine Report" used to help report observed values of chlorine is still being developed.
The "Digital tank flows" is used for leak searches.
A daily check should be made to help find problems as quickly as possible. Homes want water, so a quick check of water depth in all tanks and pressure in all pressurized tanks helps. A check of batteries will ensure that the stations running on batteries have power to function properly for refill.
A check for leaks is often done by looking at tank flow between 1 AM and 4 AM. Pick a time when everyone should be asleep and not using water and also when no transfer pump is creating large water level changes.
The best thing is that a daily check will soon give you a feel for when things are OK, which is most of the time. Then when something goes wrong it will stick out like a sore thumb.
These programs have been developed in programming C language and run in a Linux operating system. The task has been split up into several independent programs so that loss of data is minimized if a crash occurs. Also small programs seem to be more secure against crashes. So ElproControl, the first in the chain of programs, has a very simple task of collecting the data from the Elpro unit and writing the data to time stamped files. If programs further in the chain crash, they can be restarted and catch up from these files and no data is lost.
The second program in the chain, Remapping, selects which data goes to what device and formats the data for easy computer access then writes the data in daily files to be archived.
The third program, Summary, uses the archived files to get daily and monthly reports. Then archives those values in yearly files.
The next program, linuxsmb, generates the website graphs and text pages from all the above archived files.
Another program, Backup, cleans up used files from the first program and archives the files from the second program.
Also a program, ftp, backs up files to an ftp server. I am not sure that this is still really happening, because that server cost money. Also such backup may have questionable value. Currently no program exists to read and display it.
A recently added program, digital tank flows, has been added to help trace leaks by getting a numerical tank flow as quickly as the tank level is updated.
Additional programs which do not have any connection to the website is needed to get reports from home water meters. The first program starts with an Excel file which Don Caskey puts together each year and updates any month in which a new home meter is brought online. This file has a line for each meter giving the location by lot number and address. Home owner and source of water for the home is also given. A few lots have two meters due to difficulty in installing a single meter that reads all water sources to the home.
The first program creates water meter imp, import, files used by the Neptune meter reading device.
The second program reads the water meter exp, export, files coming from the Neptune meter reading device showing each meters current value. A csv file is created showing the water used at each home for each month. This file can be read by Excel or Numbers to create a file for state reporting. Homes with two meters have been combined for one reading.
Excel or Numbers can then make the water meter reporting.
You may wonder why the system usage is not the sum of the individual tank usages on the daily report. There is a more accurate way to calculate system usage. Each tank has some guesses about the usage because not everything is metered. However the system as a whole is well metered. All 4 well pumps have meters. Well, Well C (pun intended) is not metered, however tank C goes nowhere except into the transfer pump from C to H which is metered. So I can read 4 meters giving me the input to the system and measure the amount of water in each tank each day at 7 AM to get a total usage which is independent of each tanks usage. To be truly accurate I still have a problem. The actual volume of each tank is not known. The values I use may be off by as much as 10%. But using the same tank size all the time will give a consistant reading.
brief description of tags
AC power 7
tags exist for 7 stations that have SDCEA power (A, B, C, D, E, F, H)
converts raw Boolean data to power On/Off
Batteries 3
tags exist for 3 stations that have solar power and batteries (G, I, P)
converts raw Analog data to battery voltage ---- scale 8192 49152 6. 16.
Low Temperature 2
tags exist for 2 stations with temperature sensors (C, D)
converts raw Boolean data to low temperature Low/Ok
Pressure 2
tags exist for 2 stations with pressurized tanks (E, H)
converts raw Analog data to pounds per square inch pressure. ---- scale 8192 49152 0. 100.forE/150.forH
Tank overflow 6
tags exist for 6 stations with overflow sensors (C, D, F, G, I, P)
converts raw Boolean data to overflow On/Off
Tank water level 10
tags exist for all 10 stations
tags with "d" convert raw Analog data to depth of water in feet ---- scale 16384 49152 0. 16*probeFactor
tags with "p" convert depth of water to tank per cent full
tags with "v" convert per cent to volume of water in tank
tags with "f" convert volume to flow by rate of change
tags with "l" logs the flow values
tags with "ww" calculate water pumped by unmetered or gravity pumps
tags with "u" calculate tank water used by homes
tags with "ul" logs the usage once per day
tags with "ml" losg the usage each minute
Well pumps 3
Xfer pumps 4
tags exist for all 3 metered well pumps (A, D , F)
tags exist for all 4 metered transfer pumps (AB, BH, CH, DA)
tags with "r" read raw tick data, e.g. meter revolutions
tags with "o" senses when "r" rolls over, e.g. from 65535 to 1
tags with "c" counts the roll overs from "o"
tags with "w" calculates water pumped from "r" and "c", e.g. (c*65535+r}/ticksPerGal
tags with "f" calculates flow from "w"
tags with "l" logs pump flow values from "f"
tags with "m" accumulate raw ticks each day to full value
tags with "ww" calculate gallons of water from "m" tags ***(this eliminates the need of "o". "c", and "w" tags
Unmetered pumps (C, BE, BP, HF, HG, HI)
are estimated by watching positive water level changes in tanks C E F G I P
TAG DETAILS ********************************************
GameTrail - Context
ID
Name - GameTrail
Area - Game Trail
Description - Storage and pumping
Children
E915
Elpro
Elpro - TCP/IP Port
ID
Name - Elpro
Description - Network connection
Connection
TCP/IP Name/Address - 192.168.0.182 or 192.168.0.115
Tcp/ip Port Number - 502
Children
none
E915 - Modbus Compatible Device
ID
Name - E915
Description - Elpro modbus
Options
Chk - Open Modbus TCP
Communications
Port - [Elpro] Network connection (use tag selection)
Modus Plus
Polling Rate - 60
Children
AC Power
Batteries
Low Temperature
Pressure
Tank overflow
Tank water level
Well pumps
Xfer pumps
//********************************************************************
AC Power - Context
ID
Name - AC Power
Description - AC power On
Children
A
B
C
D
E
F
H
A thru H - IO and calculation
ID
name A thru H
Description AC power On @ station X
Data Type - Digital
I/O
Invert Input - Chk
A B C D E F H
Addresses 40510, 40520, 40530, 40540, 40550, 40560, 40580,
Quality
Questionable Data - unCheck
Logging
Enable logging - unChk
// ************************************************
Batteries - Context
ID
Name - Batteries
Description - Battery voltage
Children
G
I
P
G thru P = I/O And Calculations
ID
name G thru P
Description AC power On @ station X
I/O
G I P
Addresses 40571, 40591, 40501
Scale
8192 49152 input
6 16 output
10 16 max range
10 16 exp range
Quality
Questionable Data - unCkk
Logging
Enable logging - Chk
Display
2 decimal pts
// ************************************************
Low Temperature - Context
ID
Name - Low Temperature
Description - Low temperature flag
Children
C
D
Cand D - IO and Calculations
ID
name - C and D
Description = Low temperature @ station X
Data type - digital
I/O
C D
Read Address - 40535, 40545
Quality
Questionable Data - unCkk
Logging
Enable logging - Chk
// ************************************************
Pressure - Context
ID
Name - Pressure
Description - Pressure in pressure tank
Children
E
H
E and H - IO and Calculations
ID
name - E and H
Description = Pressure in pressure tank @ station X
I/O
E H
Read Address - 40556, 40586
Scale
16384 49152 input
0 100 station E output
0 50 max range
0 50 exp range
0 150 station H
60 120 max range
60 120 exp range
Quality
Questionable Data - unCkk
Logging
Enable logging - Chk
// ************************************************
Tank overflow - Context
ID
Name - Tank overflow
Description - Tank overflow
Children
C
D
F
G
I
P
C thru P - IO and Calculations
ID
name - C thru P
Description = Tank overflow @ station X
Data type - digital
I/O
C D E F G I P
Read Address - 40534, 40546, 40557, 40564, 40574, 40594, 40504
Quality
Questionable Data - unCkk
Logging
Enable logging - unChk
// ************************************************
Tank water level - Context
ID
Name - Tank water level
Description - Tank water level
Children
Ad/Pd
Ad thru Pd - IO and Calculations
ID
name - Ad thru Pd
Description = Water level in tank @ station X
I/O
A B C D E F G H I P
Read Address - 40513, 40523, 40533, 40543, 40553, 40563, 40573, 40583, 40593, 40503
Scale
16384 49152 input
0 15 station A output (16*probeFactor)
0 11.5328 station B output
0 15 station C output
0 15 station D output
0 12.9168 station E output
0 15 station F output
0 15 station G output
0 11.5328 station H output
0 11.5328 station I output
0 20 station P output
Quality
Questionable Data - unCkk
Logging
Enable logging - Chk
Ap thru Pp - Calculation
ID
name - Ap/Pp
Description - Per cent of full tank @ station X
Calc
[Ad] * 10 station A
[Ed] * 12.5 station E
(1 + (([Bd]/5. - 1) * Sqrt(1-([Bd]/5. - 1.)*([Bd]/5. - 1.)) - ACos([Bd]/5. - 1.)) / 3.14159)*100 station B, F, H, I, P
(1 + (([Cd]/4. - 1) * Sqrt(1-([Cd]/4. - 1.)*([Cd]/4. - 1.)) - ACos([Cd]/4. - 1.)) / 3.14159)*100 stations C, D, G
Av thru Pv - Calculation
ID
name - Av/Pv
Description - Water volume in tank @ station X
Calc
[Ap] * 200 station A, F. I, P
[Bp] * 400 station B, H
[Cp] * 50 station C, E
[Dp] * 100 station D, G
display
units-gal
Af thru Pf - Rate of change
ID
name - Af/Pf If will have to be I0f
Description - tank flow @ station Xgpm
display
units - gpm
Al thru Pl - logger
ID
name - Al/Pl
Description - logger for tank flow @ station X
Au thru Pu - script
ID
name - Au/Pu ***( Cu and Gu are missing )
Description - Calculates usage from tank X
script - tankXtag
Aul thru Pul - loggeer
ID
name - Aul/Pul
Description - logger once a day for usage
Aml thru Pml - Calculation
ID
name - Aml/Pml
Description - logger once each minute for usage
Calc
tag
// ************************************************
Well pumps - Context
ID
Name - Well pumps
Area - GameTrail
Description - Storage and pumping
Children
Ar Dr Fr
Ar thru Fr - IO and calculations
ID
name - Ar/Fr
Description - count of meter revolutions for well X
scale
0 65535 input
0 65535 output
Children
Ao Do Fo
Ao thru Fo - rate of change
ID
name - Ao/Fo
Description - sense when Ar rolls over eg Ar/Fr goes negative
Children
Ac Dc Fc
Ac thru Fc - counter
ID
name - Ac/Fc
Description - count roll overs of Ar by counting negative value from Ao
children
Aw Dw Fw
Aw thru Fw - calculation
ID
name - Aw Dw Fw
Description - water pumped by well A today
calc
([Ac]*65535 + [Ar]) / 67.57 well A
([Dc]*65535 + [Dr]) / 3.46695 well D
([Fc]*65535 + [Fr]) / 3 well F (TBD)
([ABc]*65535 + [ABr]) / 37.5 xfer AB
([BHc]*65535 + [Bhr]) / 3.7 xfer BH
([CHc]*65535 + [CHr]) / 37.3 xfer CH
([DAc]*65535 + [Dar]) / 37.2 xfer DA
children
Af Df Ff
Af thru Ff- rate of change
ID
name - Af Df Ff
Description - flow rate of pump A
Al thru Ff- logger
name - Al Dl Fl
Description - logger for flow rate
// ************************************************
Xfer pumps - Context
ID
Name - Xfer pumps
Area - GameTrail
Description - Storage and pumping
Children
ABr ABo ABc ABw ABf ABl
BH
CH
DA
//********************************************************************
//***************************************************************************
Tank overflow Children
C - I/O amd Calculations
ID
name - C
I/O
Read Address - 40570
D - I/O amd Calculations
ID
name - D
I/O
Read Address - 40570
F - I/O amd Calculations
ID
name - F
I/O
Read Address - 40570
G - I/O amd Calculations
I
name - G
I/O
Read Address - 40570
I - I/O amd Calculations
ID
name - I
I/O
Read Address - 40570
P - I/O amd Calculations
ID
name - P
I/O
Read Address - 40570
//***************************************************************************
Well pumps Children
Ar - I/O amd Calculations Ao Ac Aw
ID
name - G
I/O
Read Address - 40570
Display
Plot Line - style color width
D
F
Xfer pumps Children
ABr - I/O amd Calculations ABo ABc ABw ABf ABl
ID
name - G
I/O
Read Address - 40570
Display
Plot Line - style color width
BH
CH
DA
3 6 9
3 2 3
2
A B C D E F G H I P
0 x x x x x x x AC
1 x x x x x x x x x x batt
2 x x x x x x x x x x LowBatt
3 x x x x x x x x x x depthProbe
4 x x x x overflow
5 x x d temperature tank=A Dout 8
6 ? a a pressure tank-A-105unit Dout 1
7 x x ? s s s s pump out setpt
8 x x x setPt Xfer A
9 setpt
09 ? 115S-11 Dout 2
17p Xfer A->B
18p Well A
19x Setpt
27p Well B
28 x Setpt
36 x tank=A-105unit Dout 4
88 p C->H
89 p B->H?
610 x tank-A Dout 5
611 x tank-A Dout 6
612 x tank-A Dout 7
613 ? tank-A 105-2 Dout 2
614 ? 115S-11 Dout 3
615 p Well D
617 d well C ON?
618 x 115S-11 Dout 1
1 + (([Bd]/5. - 1) * Sqrt(1-([Bd]/5. - 1.)*([Bd]/5. - 1.)) - ACos([Bd]/5. - 1.)) / 3.14159
Last update Tue Aug 18 11:24:07 2020