Welcome to the Cumulus Support forum.

Latest Cumulus MX release 3.16.1 (build 3183) - 06 May 2022

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

If you are interested in supporting Cumulus then maybe you would like to contribute to the maintenance of the Wiki? This need not take hours of your time - just a half hour here and there can make a big difference, particularly if many people are doing this. Any contributions are very welcome, whether they involve new content or editing of existing content. It will be very helpful to current and future users of Cumulus software if the Wiki is kept well-maintained and current. If you are interested then please contact forum user saratogaWX and ask for a Wiki account.

Data not written to database

Discussion of the Weather34 web site template

Moderators: saratogaWX, weatherist34

Post Reply
ole.vik
Posts: 3
Joined: Mon 19 May 2014 11:42 am
Weather Station: Davis Vantage Vue
Operating System: Win 2012
Location: Norge

Data not written to database

Post by ole.vik »

Hi

Just installed the template and it seemingly Works as it should. But, when i check the db, nothing is written there.
So i guess a lot of statistics are getting lost atm. Any chance of getting a pointer to how i can go by to fix this?
I have double and triple checked the db_name, db_user and db_host parameters, so that should be correct.
The database and tables are generated. Perhaps there is some testscript i could try against the db?

Site: https://www.tyrirabben.net
ole.vik
Posts: 3
Joined: Mon 19 May 2014 11:42 am
Weather Station: Davis Vantage Vue
Operating System: Win 2012
Location: Norge

Re: Data not written to database

Post by ole.vik »

So..no one? I can provide more info if wanted.

As mentioned, my database is working, i just can't find out where and how data is supposed to be written to it.
Do i have to set up a Cron job? Do i have to specify somewhere that the realtime data, should be written to the database?

The only Reference i have found on using the defined database in the setup script, is in the Cron scripts. But then only
as a Source for chartgeneration.

**
if ($chartsource =="mbcharts"){
//connect to mysqli db for homeweatherstation save to csv files october 2017
$conn = mysqli_connect($db_host,$db_user,$db_pass,$db_name);
$result = mysqli_query($conn,'SELECT * FROM `weatherstation`');
if (!$result) die('Couldn\'t fetch records');
**

First of all, where do i define the variable "mbcharts" ? If i had historical data in my database, i'd like to use that Source instead of WU
Second, to get actual data into the referenced MySQL database - i cant find any scripts doing it. I've sniffed tcp Connections from the
webserver, and it never tries to even contact the sql server. Not even when i specify the host/user/pass in the initial setup.

Any help appreciated. If its not possible, please let me know. I hate losing historical data.
Post Reply