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 4018) - 28 March 2024

Legacy Cumulus 1 release v1.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

graphing rainwater tank level

Other discussion about creating web sites for Cumulus that doesn't have a specific subforum

Moderator: daj

Post Reply
hills
Posts: 690
Joined: Sat 26 Dec 2009 8:52 am
Weather Station: Fine Offset WH1091
Operating System: Raspbian Buster
Location: Crafers, South Australia
Contact:

graphing rainwater tank level

Post by hills »

Hi all

I have always been interested in how the amount of rain affects the level of my rainwater tanks, so I have added that info to my rainfall and dailyrain graphs as below or you can view it on my graphs tab at http://members.iinet.net.au/~storerfami ... trends.htm
rainfall.JPG
dailyrain.JPG
To get the rainwater level I purchased one of these from ebay. It transmits the distance between the sensor and the water surface in mm on the 433Mhz range. Just be aware it needs to be at least 50cm above the high water mark so I installed it in an upturned bucket on the top of the tank.
watermetre.JPG
I run my weather station on a Raspberry pi so I can receive the 433mHz signal (plus that from my weather station) using one of these and the free software 433_rtl. You might need to google powershell if you want to do it on a windows PC, unfortunately I can't help there. :)
433.JPG
With a couple of small bash scripts I constantly log all data on the 433Mhz range to a daily file, then convert it to metres from the tank bottom and append it to the dailyrain and rainfall json files.

I'll attach the scripts on the next post if anyone is interested as I've just realised I can't access my pi from this computer :( Feel free to use them if you are running on raspbian or any other linux.
You do not have the required permissions to view the files attached to this post.
Last edited by hills on Sun 24 Oct 2021 12:50 am, edited 1 time in total.
hills
Posts: 690
Joined: Sat 26 Dec 2009 8:52 am
Weather Station: Fine Offset WH1091
Operating System: Raspbian Buster
Location: Crafers, South Australia
Contact:

Re: graphing rainwater tank level

Post by hills »

This will probably require some Linux and json knowledge, but feel free to give it a shot :) This was more to point out the hardware I found that does the job for those who already know a bit about this, but I'm happy to provide any further info. ALWAYS SAVE PREVIOUS COPIES OF ANY FILES YOU EDIT SO YOU CAN BACK OUT WHEN YOU BREAK THEM... like I often do ;)

This is the script to update water level. I run it from crontab every 5 minutes with 04,09,14,19,24,29,34,39,44,49,54,59 * * * * /home/pi/get_water_level.bash
waterlevel-bash-script.txt
You will also have to add the following lines to your cumuluscharts.js file under the doRain series section and change the url from raindata.json to rain1data.json. note your old raindata.json file will be unaffected so you can always swap back to that one as this sends up a second .js file with a different name.

}, {
name: 'Tank Capacity',
type: 'area',
color: 'rgb(20,20,20,.15)',
yAxis: 1,
tooltip: {valueSuffix: config.rain.units}
}, {
name: 'Water Level',
type: 'line',
yAxis: 1,
tooltip: {valueSuffix: config.rain.units}


and this to the $.ajax section under doRain

chart.series[2].setData(resp.rfull);
chart.series[3].setData(resp.wlevel);



then either create a script containing the 2 lines below and run it at boot time or create a service and enable it.

#!/bin/bash
/usr/local/bin/rtl_433 > /var/tmp/433.out 2>&1


I think that's about it for the level part.
You do not have the required permissions to view the files attached to this post.
Last edited by hills on Sun 24 Oct 2021 12:53 am, edited 1 time in total.
hills
Posts: 690
Joined: Sat 26 Dec 2009 8:52 am
Weather Station: Fine Offset WH1091
Operating System: Raspbian Buster
Location: Crafers, South Australia
Contact:

Re: graphing rainwater tank level

Post by hills »

also just for interest this is the format that 433_rlt displays the 433mHz signal for both the weather station and the water sensor.

time : 2021-10-24 11:03:12
model : Fineoffset-WHx080
Msg type : 0
Station ID: 217
Battery : 1
Temperature: 13.6 C
Humidity : 68 %
Wind Direction: 68
Wind avg speed: 3.67
Wind gust : 8.57
Total rainfall: 395.7
Integrity : CRC
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

time : 2021-10-24 11:03:13
model : Fineoffset-WHx080
Msg type : 0
Station ID: 217
Battery : 1
Temperature: 13.6 C
Humidity : 68 %
Wind Direction: 68
Wind avg speed: 3.67
Wind gust : 8.57
Total rainfall: 395.7
Integrity : CRC
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

time : 2021-10-24 11:03:46
model : TS-FT002
Id : 141
Depth : 102
Temperature: 17.3 C
Transmit Interval: 180
Battery Flag?: 0
Integrity : CHECKSUM
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

time : 2021-10-24 11:03:47
model : TS-FT002
Id : 141
Depth : 102
Temperature: 17.3 C
Transmit Interval: 180
Battery Flag?: 0
Integrity : CHECKSUM
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
User avatar
HansR
Posts: 5871
Joined: Sat 20 Oct 2012 6:53 am
Weather Station: GW1100 (WS80/WH40)
Operating System: Raspberry OS/Bullseye
Location: Wagenborgen (NL)
Contact:

Re: graphing rainwater tank level

Post by HansR »

That's a nice exercise Phil.
If there were an API interface to Cumulus to input data for homebuilt sensors in the extrasensorslog a whole new world would open up ( :idea: ).

One difficulty I see with what you did is that you modify the existing cumuluscharts you will have to repeat this at updates. But OK, it is not a whole lot, true.
Hans

https://meteo-wagenborgen.nl
CMX build 4017+ ● RPi 3B+ ● Raspbian Linux 6.1.21-v7+ armv7l ● dotnet 8.0.3
Post Reply